sendMessage

Create an Arbitrary Message transaction. POST only. Refer to Create Transaction Request for common parameters.

Request: requestType is sendMessage message is either UTF-8 text or a string of hex digits (perhaps previously encoded using an arbitrary algorithm) to be converted into a bytecode with a maximum length of one kilobyte (optional)

Note: Any combination (including none or all) of the three options plain message, messageToEncrypt, and messageToEncryptToSelf will be included in the transaction. However, one and only one prunable message may be included in a single transaction if there is not already a message of the same type (either plain or encrypted).

Note: The encryptedMessageData-encryptedMessageNonce pair or the encryptToSelfMessageData-encryptToSelfMessageNonce pair can be the output of Encrypt To

Response: Refer to Create Transaction Response.

Example:

Request:

http://localhost:801/BEAM?requestType=sendMessage&recipient=15323192282528158131&secretPhrase=IWontTellYou&feeNQT=735000&deadline=24&broadcast=true&message=This%20is%20a%20sendMessage%20API%20example&messageIsText=true

Response:

{ “signatureHash”: “2bcbafeab7a0bae40337fe34adea84110b1f770a33841c95f3fe9e19dde41bae”, “unsignedTransactionBytes”: “01104ec93f071800a61325eec9e83d7cac55544b8eca8ea8034559bafb5834b8a5d3b6d4efb85f12b31119f931eaa6d4000000000000000018370b*”, “transactionJSON”: { “senderPublicKey”: “a61325eec9e83d7cac55544b8eca8ea8034559bafb5834b8a5d3b6d4efb85f12”, “signature”: “dc2503584a48e30ac62d62848f58461e0e9ff55070008743c24f380c24a9ef05525c70b5d40962566f3f4de2018277ba7956eb09d0aec84219784de7f3b76f6a”, “feeNQT”: “735000”, “type”: 1, “fullHash”: “0f37d045bc7d4f2bd85cb565a5c4e575464ac387b986f80fb8c31635cf03923e”, “version”: 1, “ecBlockId”: “1212249281481197658”, “signatureHash”: “2bcbafeab7a0bae40337fe34adea84110b1f770a33841c95f3fe9e19dde41bae”, “attachment”: { “version.Message”: 1, “messageIsText”: true, “message”: “This is a sendMessage API example” }, “senderRS”: “BEAM-7X92-29W5-MY9A-GUKQP”, “subtype”: 0, “amountNQT”: “0”, “sender”: “16922903237994405232”, “recipientRS”: “BEAM-7X92-29W5-VK8P-FCRBB”, “recipient”: “15323192282528158131”, “ecBlockHeight”: 502787, “deadline”: 24, “transaction”: “3120851314369640207”, “timestamp”: 121620814, “height”: 2147483647 }, “broadcasted”: true, “requestProcessingTime”: 11, “transactionBytes”: “01104ec93f071800a61325eec9e83d7cac55544b8eca8ea8034559bafb5834b8a5d3b6d4efb85f12b31119f931eaa6d4000000000000000018370b*”, “fullHash”: “0f37d045bc7d4f2bd85cb565a5c4e575464ac387b986f80fb8c31635cf03923e”, “transaction”: “3120851314369640207” }

Last updated