USERS GUIDE

Retrieve Message Container

The message container is a Catenis entity that provides detailed information about a previously executed message. Whether the message was logged or sent, it will return to the end-user the location information of where the message’s content resides.

The “retrieve message container” API method accepts a Catenis message ID. It returns information about the message storage location along with the ID of the Bitcoin transaction that proves the occurrence of the message.

Off-chain Message Container Reporting

When a message ID of an off-chain message is sent to the retrieve message container API the response will depend on whether the messages have already been published in a bitcoin transaction or not (the settlement process). Catenis receive hashes of all off-chain messages and its corresponding content which are aggregated together using a Merkle tree. The root of this tree is published in a Bitcoin transaction. This settlement process defines a set of operations that cryptographically link your message and its content to the Bitcoin blockchain

Prior to the settlement process, the retrieve message container API returns the CID of the message along with the IPFS pointer to the message content. Off-chain messages CID points to the data structure used to store the off-chain message on IPFS. See example below:


{
  "offChain": {
    "cid": "QmURTYFL2uTPoCrRHbb1agcx6HbqJK7zHaexhHgfn1V43D"
  },
  "externalStorage": {
    "ipfs": "QmREZyWyMN8PYL6Hbb19UJNBGWE18gYQRHbFHwuj4vcjes"
  }
}

After the settlement of off-chain messages, the retrieve message container API will additionally report the status of the settlement, the Bitcoin transaction ID and whether or not the bitcoin transaction has been confirmed. See example below:


{
  "status": "success",
  "data": {
    "offChain": {
      "cid": "QmUPNgbkB2eUJKYTS5rhD8wxFaCBU8JeBrBePWqMfSWub"
    },
    "blockchain": {
      "txid": "e4080d2badac0b4d4524aa20cd3abfa2f1bdd05a15c85b9d156374c7c6bbfc82",
      "isConfirmed": true
    },
    "externalStorage": {
      "ipfs": "QmQ2UaYLHwSjU4VvHISJNDHEEo7AvrufdNrX1kmsbtbn3w"
    }
  }
}


Standard Messages Container Reporting

Standard messages correlate one-to-one with a bitcoin transaction (and incur additional fees). When the message is small enough (75 bytes or smaller) it is simply included in a Bitcoin transaction the container method returns only the Bitcoin transaction ID and indicates whether or not the transaction is confirmed. If the message’s content was larger than 75 bytes when sent or logged, it will also include the IPFS hash indicating the location of the stored data in IPFS along with the Bitcoin transaction ID and a confirmation indicator.

Note: The IPFS hash of the Message Content placed in the bitcoin transactions is base56 encoded

Off-chain and standard messages can be easily identified by simply looking that the message ID. All off-chain message IDs start with “o” and all standard messages start with “m”.

Related Articles

CompanyElement_SM_LightBackgrounds
How can we make things Better for you?
  • Accepted file types: jpg, gif, png, pdf.
  • This field is for validation purposes and should be left unchanged.