Transfer Transaction

Transfer transactions are used to send mosaics and messages between two accounts.

../_images/transfer-transaction.png

Alice sends 10 cat.currency to Bob

Recipient

The recipient is the address of the account that receives the transfer transaction.

It is possible to send mosaics to any valid address, even if the address has not previously participated in any transaction.

Note

If nobody owns the private key of the recipient’s account, the funds are most likely lost forever.

Mosaics

A mosaic could be a token, but it could also be more specialized assets such as reward points, shares of stock, signatures, status flags, votes or even other currencies.

You can send a combination of different mosaics in the same transaction.

Message

A transfer transaction can hold a message up to 1023 characters in length, making them suitable for timestamping data permanently on the blockchain.

The messages attached are visible by default to all network participants.

Encrypted message

Encrypted messages are only accessible by the sender and the recipient.

NEM uses Bouncy Castle’s AES block cipher implementation in CBC mode to encrypt and decrypt messages.

The client-side handles the encryption and decryption of the message. You can find under the crypto module how to encode and decode encrypted messages, but we recommend you to use the available SDK public methods instead.

Guides

Schemas

Note

Configuration parameters are editable. Public network configuration may differ.

TransferTransaction

Announce a transfer transaction to send mosaics or messages between two accounts.

Version: 0x01

Entity type: 0x4154

Inlines:

Property Type Description
recipient UnresolvedAddress Address of the recipient.
messageSize uint16 Size of the attached message.
mosaicsCount uint8 Number of attached mosaics.
message array(byte, messageSize) Message type and a payload of up to 1023 bytes.
mosaics array(UnresolvedMosaic, mosaicsCount) Array of mosaics to send.

MessageType

Enumeration: uint8

Id Description
0x00 Plain message.
0x01 Encrypted message.