Transferring an Asset

This particular transaction type is designed for transferring a specified amount of an available asset from one sending wallet to a recipient wallet. In this context, the transaction body and payload will have the following structure:

TBody = {
         "ID" : [ID],
         "From" : [From],
         "To" : [To],<
         "Timestamp" : [Timestamp],
         "Payload" : {
                       "Action":"CP_SEND",
                       "Asset":[Name of the Asset],
                       "Amount":[Amount to be transferred],
                       "Fee":[Fee]
         },
         "Nonce" : [Nonce],
         "Signature" : [Signature],
         "PublicKey" : [PublicKey],
         "Blockchain" : [Blockchain],
         "Type" : "C_TYPE_TOKEN"
    }

For this specific transaction type, the Payload undergoes parsing and processing to execute the intended operation, which is a CP_SEND transfer. In this operation, the specified asset, identified by name, is moved to the "To" wallet. If the asset being transferred is the native coin "CIRX," the transaction type is labeled as C_TYPE_COIN. For all other tokens, it is identified as C_TYPE_TOKEN. For CIRX coins, the Asset name will be "Circular Coin." The amount to be transferred is represented as a double-precision floating-point number, indicating the quantity of the asset destined for the recipient wallet.

The "fee" field allows the sender to include an optional fee, signifying their willingness to expedite the transaction's inclusion in the next block. If the fee is set to zero, a nominal fee is applied, giving the transaction the lowest priority in block inclusion. It's important to note that even with an additional fee, there is no guarantee of immediate inclusion in the next block. Subsequently, the payload is converted into a string format and must be encoded in hexadecimal (Hex) without the "0x" identifier.

Last updated