Messages

Decrypt From

Decrypt an AES-encrypted message. It can be used either with a secretPhrase or a privateKey (using the HD wallet).

Method: GET

https://ardr.nownodes.io/nxt?requestType=decryptFrom&secretPhrase=IWontTellYou&account=ARDOR-L6FM-89WK-VK8P-FCRBB&data=c9ba8713c422e98867137f6166ed39d1758e18bb70492be4777899554dcca7082e5c25d1072f4bcc031add28292e32d097b1f243375c4d3d73e94cb93d37a980&nonce=940ccec805655c59e69d545f369474a803ee6051fe16f1931b2b03eb1ef2313b

Example response: 200

{
    "decryptedMessage": "test message",
    "requestProcessingTime": 33
}

Download Prunable Message

Downloading a prunable message attachments directly as binary data.

Method: GET

https://ardr.nownodes.io/nxt?requestType=downloadPrunableMessage&chain=2&transaction=264609232955144528&retrieve=true

Example response: 200

{
    "errorDescription": "\"transactionFullHash\" not specified",
    "errorCode": 3
}

Encrypt To

Encrypt a message using AES without sending it.

Method: GET

https://ardr.nownodes.io/nxt?requestType=encryptTo&secretPhrase=IWontTellYou&recipient=ARDOR-L6FM-89WK-VK8P-FCRBB&messageToEncrypt=test message

Example response: 200

{
    "data": "3922e1a2db5cc63e48551ce56ff4696699305693673e1a75ee0a540ffc63ac973fa0ce1a16496335090b6372fae33b2c2b0c5e8ae31816ce9ff75b5668dea573",
    "requestProcessingTime": 45,
    "nonce": "b669b5c32079e710dc2f9fc6722d9bf182f41af9735be22cf85232a3d98e26ba"
}

Get All Prunable Messages

Get all available prunable messages in reverse block timestamp order.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getAllPrunableMessages&chain=2&lastIndex=0

Example response: 200

{
    "prunableMessages": [
        {
            "senderRS": "ARDOR-SQ5K-GGXU-GR37-AM6CT",
            "sender": "10135513086676457585",
            "recipientRS": "ARDOR-LZ8A-PVC2-BMT7-C6346",
            "recipient": "11675622367258311880",
            "transactionFullHash": "938f6620b178da4f151e220f9ca97436d2808f6c9a24878f7f123f04a436621f",
            "blockTimestamp": 197468260,
            "messageIsText": true,
            "message": "0x0314c7fBF0bd957f65925bA49A868EF9029C24f1",
            "isText": true,
            "transactionTimestamp": 197468235
        }
    ],
    "requestProcessingTime": 0
}

Get Prunable Message

Get the prunable message given a transaction ID, optionally decrypting it if encrypted and if a secretPhrase is provided, if it is still available.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getPrunableMessage&chain=2&transaction=16832262845403902696&secretPhrase=secretPhrase

Example response: 200

{
    "errorDescription": "\"transactionFullHash\" not specified",
    "errorCode": 3
}

Get Prunable Messages

Get all still-available prunable messages given an account id, optionally limiting to only those with another account as recipient or sender, in reverse chronological order.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getPrunableMessages&chain=2&account=ARDOR-4VDY-LNVT-LMAY-FMCKA&lastIndex=0

Example response: 200

{
    "prunableMessages": [],
    "requestProcessingTime": 0
}

Get Shared Key

Get the one-time shared key used for encryption of messages.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getSharedKey&account=ARDOR-5MYN-AP7M-NKMH-CRQJZ&secretPhrase=IWontTellYou&nonce=0102030405060708091011121314151617181920212223242526272829303132

Example response: 200

{
    "errorDescription": "Incorrect \"account\"",
    "errorCode": 4
}

Read Message

Get a message given a transaction ID.

Method: GET

https://ardr.nownodes.io/nxt?requestType=readMessage&chain=2&transaction=9908575668289607167&secretPhrase=IWontTellYou

Example response: 200

{
    "errorDescription": "\"transactionFullHash\" not specified",
    "errorCode": 3
}

Send Message

Create an Arbitrary Message transaction.

Method: POST

https://ardr.nownodes.io/nxt?requestType=sendMessage

Example body (x-www-form-urlencoded)

requestType = sendMessage
secretPhrase = IWontTellYou
chain = 2
recipient = ARDOR-4VNQ-RWZC-4WWQ-GVM8S
deadline = 60
message = Test Message.

Example response: 200

{
    "amount": "0",
    "chain": 2,
    "errorDescription": "Not enough funds",
    "balance": "0",
    "fee": "2514900000",
    "errorCode": 6,
    "diff": "2514900000"
}

Verify Prunable Message

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

Method: GET

https://ardr.nownodes.io/nxt?requestType=verifyPrunableMessage&chain=2&message=This is a test prunable plain message.

Example response: 200

{
    "errorDescription": "\"transactionFullHash\" not specified",
    "errorCode": 3
}

Last updated