Skip to content

Verify Prunable Message

Verify that a prunable message obtained from any source, when hashed, matches the hash of the original prunable message.

Request: Refer to Send Message for more details about the following request parameters.

  • requestType is verifyPrunableMessage
  • message is the plain message, if applicable (optional)
  • messageIsText is false if the provided plain message is a hex string (optional)
  • encryptedMessageData is the data part of the encrypted data-nonce pair (optional if message provided)
  • encryptedMessageNonce is the nonce part of the encrypted data-nonce pair (required if encryptedMessageData provided)
  • messageToEncryptIsText is false if the encrypted message was a hex string before encryption (optional)
  • compressMessageToEncrypt is false if the encrypted message was not compressed before encryption (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Note: The hash is computed from the message itself plus its associated flag(s) isText and isCompressed (encrypted only); therefore the flag(s) must be provided for verification if different from the default(s). The original encryptedMessageData-encryptedMessageNonce pair used to compute the original hash must be provided again to recompute the hash for verification of a prunable encrypted message.

Response:

  • version.PrunablePlainMessage or version.PrunableEncryptedMessage (N) is 1, the version number
  • verify (B) is true if the original hash matches the hash computed from the provided values
  • message (S) or encryptedMessage (O) is the prunable plain message or the prunable encrypted message object containing the fields:
    • data (S)
    • nonce (B)
    • isText (B)
    • isCompressed (B)
  • messageIsText (B) is true if the plain message is text, false if it is a hex string, if applicable
  • messageHash or encryptedMessageHash (S) is the hash
  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
  • requestProcessingTime (N) is the API request processing time (in millsec)