DecentralChainDecentralChain
  • Technologysubmenu
    Why DecentralChainWhat sets this chain apartHow the chain worksPublic blocks, public validatorsBlockchain featuresWhat is on, what is being voted onFinalityThe rollback bound, and what is unverifiedRIDEContracts that cannot run foreverFor machinesUnsigned transactions and RIDE in processSolana bridgePhantom and Solflare, mainnet onlyNetwork statusHeight, sync and peers, read live
  • Ecosystemsubmenu
    DCC public saleOpens 26 SeptemberDecentralCoinSupply, allocation and tokenomicsDecentral.ExchangeexternalDecentralPropDecentralScansoonCubensis ConnectDecentralAmericasoon
  • Developerssubmenu
    QuickstartRead, compile and composeREST APIEvery endpoint, no key, no accountSDK packages19 on npm, 5 in the workspaceSigningAuthorising without custodyMCP & AgentsThe chain, and the tools we have builtDecentralChain NodeRun a validator, and what LPoS pays
  • Communitysubmenu
    ChannelsTelegram, X and the reposDCC AirdropAllocated, not yet arrangedGovernanceWho can actually decide anythingBrand kitThe mark, and how to use it
  • Documentation
XGitHub
Start buildingarrow
DecentralChainDecentralChain

An open Layer-1 with Leased Proof of Stake.

Native token: DecentralCoin (DCC)

Fixed supply 100,000,000 DCC
Minted at genesis, never inflated

  • X
  • GitHub
  • Telegram

Build

  • Quickstart
  • REST API
  • SDK packages
  • Signing
  • MCP & Agents
  • Documentation

Ecosystem

  • DCC public sale
  • DecentralCoin
  • Decentral.Exchange
  • DecentralProp
  • DecentralSwap
  • Cubensis Connect

Network

  • Blockchain features
  • Finality
  • RIDE
  • Solana bridge
  • Run a node
  • Network status

Project

  • Community
  • DCC Airdrop
  • Governance
  • Brand kit
  • GitHub
mainnetHeight—Node—read from your browser
© 2026 DecentralChainOperated by DecentralExchange · Cédula Jurídica 3-102-956858
Jacó, Garabito, Costa Rica
TermsPrivacySecurityLicensingdecentralchain.io
Documentation/DecentralChain

Binary Format

DecentralChain

  • Account
  • Token (Asset)
  • Transaction
  • Block
  • Node
  • Order
  • Oracle
  • Mainnet, Testnet, Stagenet
  • Protocol
  • Binary Format
  • Address binary format
  • Alias binary format
  • Block binary format
  • Network message binary format
  • Block message binary format
  • Checkpoint message binary format
  • Get block message binary format
  • Get peers message binary format
  • Get signatures message binary format
  • Handshake message binary format
  • Peers message binary format
  • Score message binary format
  • Signatures message binary format
  • Transaction message binary format
  • Order binary format
  • Transaction binary format
  • Burn transaction binary format
  • Create alias transaction binary format
  • Data transaction binary format
  • Exchange transaction binary format
  • Genesis transaction binary format
  • Invoke script transaction binary format
  • Issue transaction binary format
  • Lease cancel transaction binary format
  • Lease transaction binary format
  • Mass transfer transaction binary format
  • Reissue transaction binary format
  • Set asset script transaction binary format
  • Set script transaction binary format
  • Sponsor fee transaction binary format
  • Transfer transaction binary format
  • Transaction proofs binary format

Address Binary Format

Learn more about address.

Address Binary Format
Field order numberFieldField typeField size in bytesComments
1Entity typeByte1Value must be 1.
2Chain IDByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
3Account public key hashArray of bytes20First 20 bytes of the result of the Keccak256 (Blake2b256 (publicKey)) hashing function. Here publicKey is the array of bytes of the account public key.
4ChecksumArray of bytes4First 4 bytes of the result of the Keccak256 (Blake2b256 (data)) hashing function. Here data is the array of bytes of three fields put together: 1) Entity type. 2) Chain ID. 3) Account public key hash.

Alias Binary Format

Learn more about alias.

Alias Binary Format
Field order numberFieldField typeField size in bytesComments
1Entity typeByte1Value must be 2.
2Chain IDByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
3Number of characters in the aliasShort2
4AliasArray of bytesFrom 4 to 30.

Block Binary Format

Learn more about block.

Blocks are stored on the blockchain in a binary format (byte representation). Node extensions such as gRPC server can work directly with data in binary format.

Version 5

message Block {
  message Header {
    int32 chain_id = 1;
    bytes reference = 2;
    int64 base_target = 3;
    bytes generation_signature = 4;
    repeated uint32 feature_votes = 5;
    int64 timestamp = 6;
    int32 version = 7;
    bytes generator = 8;
    int64 reward_vote = 9;
    bytes transactions_root = 10;
  }

  Header header = 1;
  bytes signature = 2;
  repeated SignedTransaction transactions = 3;
}
Block Binary Format Version 5
FieldDescription
chain_idChain ID
referenceBLAKE2b-256 hash of the previous block header.
base_targetBase target: а variable that is used in the block generation algorithm.
generation_signatureGeneration signature: а variable that is used in the block generation algorithm (32 bytes).
feature_votesList of features for which the block generator votes. See the features.
timestampBlock timestamp: Unix time in milliseconds.
versionBlock version: 5.
generatorBlock generator's account public key (32 bytes).
reward_voteBlock generation reward for which the block generator votes. -1 means that block generator votes for the current reward size.
transactions_rootTransactions Root Hash (32 bytes).
signatureBlock header signature (64 bytes).
transactionsFor each transaction: 1) Body bytes: up to 165,487 bytes. 2) Proofs: up to 531 bytes. See the transaction binary format article for details.

Version 4

Block Binary Format Version 4
#FieldField typeField size in bytesComments
1Block versionByte1The value must be 4.
2Block timestampLong8Unix time in milliseconds.
3Signature of the previous blockArray[Byte]64
4Base targetLong8
5Generation signatureArray[Byte]32
6Number of transactions in the blockInteger4
7.1Transaction 1Array[Byte]Body bytes: up to 165,996 bytes. Proofs: up to 531 bytes.Bytes of the 1st transaction in binary format.
7.2Transaction 2Array[Byte]Body bytes: up to 165,996 bytes. Proofs: up to 531 bytes.Bytes of the 2nd transaction in binary format.
...............
7.[N]Transaction NArray[Byte]Body bytes: up to 165,996 bytes. Proofs: up to 531 bytes.Bytes of the Nth transaction in binary format.
8Number of features for which the block generator votes4Integer
9.1Feature 12Short
...............
9.[M]Feature M2Short
10Block generation reward for which the block generator votes8Long-1 means that block generator votes for the current reward size.
11Block generator’s account public key32Array[Byte]
12Block signature64Array[Byte]

Version 3

Block Binary Format Version 3
#FieldField typeField size in bytesComments
1Block versionByte1The value must be 4.
2Block timestampLong8Unix time in milliseconds.
3Signature of the previous blockArray[Byte]64
4Base targetLong8
5Generation signatureArray[Byte]32
6Number of transactions in the blockInteger4
7.1Transaction 1Array[Byte]Body bytes: up to 165,996 bytes. Proofs: up to 531 bytes.Bytes of the 1st transaction in binary format.
7.2Transaction 2Array[Byte]Body bytes: up to 165,996 bytes. Proofs: up to 531 bytes.Bytes of the 2nd transaction in binary format.
...............
7.[N]Transaction NArray[Byte]Body bytes: up to 165,996 bytes. Proofs: up to 531 bytes.Bytes of the Nth transaction in binary format.
8Block generator’s account public keyArray[Byte]32
9Block signatureArray[Byte]64

Network Message Binary Format

  • Block message binary format
  • Checkpoint message binary format
  • Get block message binary format
  • Get peers message binary format
  • Get signatures message binary format
  • Handshake message binary format
  • Peers message binary format
  • Score message binary format
  • Signatures message binary format
  • Transaction message binary format

Block Message Binary Format

Block message is a reply to GetBlock message.

Block Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x17)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Block bytes (N)BytesN

Checkpoint Message Binary Format

Checkpoint Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x64)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Checkpoint items count (N)Int4
7Checkpoint #1 heightLong8
8Checkpoint #1 signatureBytes64
............
6 + 2 * N - 1Checkpoint #N heightLong8
6 + 2 * NCheckpoint #N signatureBytes64

Get Block Message Binary Format

Get Block Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x16)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Block IDBytes64

Get Peers Message Binary Format

Get peers message is sent when one sending node wants to know about other nodes on the network.

Get Peers Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x01)Byte1
4Payload lengthInt4
5Payload checksumBytes4

Get Signatures Message Binary Format

Get Signatures Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x14)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Block IDs count (N)Int4
7Block #1 IDLong64
............
6 + NBlock #N IDBytes64

Handshake Message Binary Format

Handshake is used to start communication between two nodes.

Handshake Message Binary Format
#Field nameTypeLength in Bytes
1Application name length (N)Byte1
2Application name (UTF-8 encoded bytes)BytesN
3Application version majorInt4
4Application version minorInt4
1Application version patchInt4
6Node name length (M)Byte1
7Node name (UTF-8 encoded bytes)BytesM
8Node nonceLong8
9Declared address length (K) or 0 if no declared address was setInt4
10Declared address bytes (if length is not 0)BytesK
11TimestampLong8

Peers Message Binary Format

Peers message is a response to get peers message.

Peers Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x02)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Peers count (N)Int4
7Peer #1 IP addressBytes4
8Peer #1 portInt4
............
6 + 2 * N - 1Peer #N IP addressBytes4
6 + 2 * NPeer #N portInt4

Score Message Binary Format

Score Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x18)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Score (N bytes)IntN

Signatures Message Binary Format

Signatures Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x15)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Block signatures count (N)Int4
7Block #1 signatureBytes64
............
6 + NBlock #N signatureBytes64

Transaction Message Binary Format

Transaction Message Binary Format
#Field nameTypeLength in Bytes
1Packet length (BigEndian)Int4
2Magic BytesBytes4
3Content ID (0x19)Byte1
4Payload lengthInt4
5Payload checksumBytes4
6Transaction (N bytes)BytesN

Order Binary Format

Learn more about order.

  • An exchange transaction of version 3 can accept orders of versions 1–4.
  • An exchange transaction of version 2 can accept orders of versions 1–3.
  • An exchange transaction of version 1 can accept orders of version 1 only.

Version 4

message AssetPair {
    bytes amount_asset_id = 1;
    bytes price_asset_id = 2;
};

message Order {
  enum Side {
    BUY = 0;
    SELL = 1;
  };

  int32 chain_id = 1;
  bytes sender_public_key = 2;
  bytes matcher_public_key = 3;
  AssetPair asset_pair = 4;
  Side order_side = 5;
  int64 amount = 6;
  int64 price = 7;
  int64 timestamp = 8;
  int64 expiration = 9;
  Amount matcher_fee = 10;
  int32 version = 11;
  repeated bytes proofs = 12;
};

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Order Binary Format Version 4
FieldSizeDescription
chain_id1 byteChain ID
sender_public_key32 bytesPublic key of the order sender.
matcher_public_key32 bytesPublic key of matcher.
asset_pair.amount_asset_id32 bytes for asset. 0 for DecentralCoins.ID of the amount asset.
asset_pair.price_asset_id32 bytes for asset. 0 for DecentralCoins.ID of the price asset.
order_side1 byteOrder type: buy or sell.
amount8 bytesAmount of the amount asset, specified in the minimum fraction (“cent”) of asset.
price8 bytesPrice for the amount asset nominated in the price asset, multiplied by 108.
timestamp8 bytesOrder timestamp: Unix time in milliseconds.
expiration8 bytesUnix time in milliseconds when the order will be expired.
matcher_fee.asset_id32 bytes for asset. 0 for DecentralCoins.Matcher fee token ID.
matcher_fee.amount8 bytesMatcher fee
version1 byteOrder version: 4.
proofsEach proof up to 64 bytes, up to 8 proofs.Order proofs that are used to check the validity of the order.

Version 3

Order Binary Format Version 3
#Field nameJSON field nameField typeLength in bytesValue
1Order binary format version numberversionByte1Must be 3.
2Order sender public keysenderPublicKeyArray[Byte]32
3Matcher public keymatcherPublicKeyArray[Byte]32
4.1Asset B (amount asset) flagByte1If token is DecentralCoins, then value is 0, else 1.
4.2Asset B (amount Asset) IDamountAssetArray[Byte]SIf token is not DecentralCoins, then S = 32, else the field should be absent.
5.1Asset A (price asset) flagByte1If token is DecentralCoins, then value is 0, else 1.
5.2Asset A (price asset) IDpriceAssetArray[Byte]SIf token is not DecentralCoins, then S = 32, else the field should be absent.
6Order typeorderTypeByte1If order is for buying, then value is 0, if order is for selling, then value is 1.
7Amount of asset B (amount asset), which the order sender offers for one price asset(asset A)priceLong8Bytes in big-endian notation.
8Amount of asset B (price asset), which the order sender wants to buy or send depending on order typeamountLong8Bytes in big-endian notation.
9Amount of milliseconds from the beginning of Unix epoch till the moment of validation of order by matchertimestampLong8Bytes in big-endian notation.
10Amount of milliseconds from the beginning of Unix epoch till the unfulfilled order cancellationexpirationLong8Bytes in big-endian notation.
11Matcher feematcherFeeLong8Bytes in big-endian notation.
12Matcher fee token flagByte1If token is DecentralCoins, then value is 0, else 1
13Matcher fee tokenmatcherFeeAssetIdArray[Byte]FIf token is not DecentralCoins, then F = 32, else the field should be absent.
14ProofsproofsArray[Proof]SIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + (P_{1} + P_{2} + ... + P_{n}), where N is amount of proofs in the array, P_{n} — size N-th proof in bytes. Maximum amount of proofs in the array is 8. Maximum length of each proof is 64 bytes.

JSON Representation of Order Version 3

{
  "version": 3,
  "senderPublicKey": "FMc1iASTGwTC1tDwiKtrVHtdMkrVJ1S3rEBQifEdHnT2",
  "matcherPublicKey": "7kPFrHDiGw1rCm7LPszuECwWYL3dMf6iMifLRDJQZMzy",
  "assetPair": {
    "amountAsset": "BrjUWjndUanm5VsJkbUip8VRYy6LWJePtxya3FNv4TQa",
    "priceAsset": null
  },
  "orderType": "buy",
  "amount": 150000000,
  "timestamp": 1548660872383,
  "expiration": 1551252872383,
  "matcherFee": 300000,
  "proofs": [
    "YNPdPqEUGRW42bFyGqJ8VLHHBYnpukna3NSin26ERZargGEboAhjygenY67gKNgvP5nm5ZV8VGZW3bNtejSKGEa"
  ],
  "id": "Ho6Y16AKDrySs5VTa983kjg3yCx32iDzDHpDJ5iabXka",
  "sender": "3PEFvFmyyZC1n4sfNWq6iwAVhzUT87RTFcA",
  "price": 1799925005, 
}

Version 2

Order Binary Format Version 2
#Field nameTypeLength in Bytes
1VersionByte (constant, value = 2)1
2Sender's public keyPublicKey (Array[Byte])32
3Matcher's public keyPublicKey (Array[Byte])32
4.1Amount asset flag (1 - asset, 0 - DecentralCoins)Byte1
4.2Amount assetAssetId (ByteStr = Array[Byte])32 or 0 (depends on the byte in 4.1).
5.1Price asset flag (1 - asset, 1 - DecentralCoins)Byte1
5.2Price assetAssetId (ByteStr = Array[Byte])32 or 0 (depends on the byte in 5.1).
6Order type (0 - Buy, 1 - Sell)Byte1
7PriceLong8
8AmountLong8
9TimestampLong8
10ExpirationLong8
11Matcher's feeLong8
12ProofsProofs

Version 1

Order Binary Format Version 1
#Field nameTypeLength in Bytes
1Sender's public keyPublicKey (Array[Byte])32
2Matcher's public keyPublicKey (Array[Byte])32
3.1Amount asset flag (1 - asset, 0 - DecentralCoins)1
3.2Amount assetAssetId (ByteStr = Array[Byte])32 or 0 (depends on the byte in 3.1).
4.1Price asset flag (1 - asset, 0 - DecentralCoins)1
4.2Price assetAssetId (ByteStr = Array[Byte])32 or 0 (depends on the byte in 4.1).
5Order type (0 - Buy, 1 - Sell)Byte1
6PriceLong8
7AmountLong8
8TimestampLong8
9ExpirationLong8
10Matcher feeLong8
11SignatureBytes64

The price listed for amount asset in price asset * 10^8. Expiration is order time to live, timestamp in future, max = 30 days in future. The signature is calculated from the following bytes:

Order Binary Format Version 1 Bytes
#Field nameTypeLength in Bytes
1Sender's public keyPublicKey (Array[Byte])32
2Matcher's public keyPublicKey (Array[Byte])32
3.1Amount asset flag (1 - asset, 0 - DecentralCoins)1
3.2Amount assetAssetId (ByteStr = Array[Byte])32 or 0 (depends on the byte in 3.1).
4.1Price asset flag (1 - asset, 0 - DecentralCoins)1
4.2Price assetAssetId (ByteStr = Array[Byte])32 or 0 (depends on the byte in 4.1).
5Order type (0 - Buy, 1 - Sell)Bytes1
6PriceLong8
7AmountLong8
8TimestampLong8
9ExpirationLong8
10Matcher feeLong8

Transaction Binary Format

Learn more about transaction.

Transactions are stored on the blockchain in a binary format (byte representation). Node extensions such as gRPC server can work directly with data in binary format. The transaction signature and ID are also formed on the basis of the binary format, namely the transaction body bytes. The contents of transaction body bytes is given in the description of the binary format of each type and version of the transaction. Normally the transaction body bytes include all transaction fields, with the exception of the following fields:

  • Transaction ID (it is not stored on the blockchain),
  • Version flag,
  • Proofs or signature, depending on the version of the transaction.

The guideline for generating a signature and ID is given in the cryptographic practical details article. All strings are UTF-8 encoded.

Protobuf

Protobuf facilitates the development of client libraries for the DecentralChain blockchain, as it avoids serialization errors and streamlines the creation of a correctly signed transaction. How to generate a transaction signature using protobuf:

  • Download the protocol buffers package for your programming language. Generate the Transaction class on the basis of transaction.proto.
  • Fill in the transaction fields.
  • Asset IDs should be specified in the binary format.
  • Addresses should be specified in the shortened binary format (without the first two and the last four bytes). See the address binary format) article.
  • Serialize the transaction object to get transaction body bytes. Detailed instructions for various programming languages are provided in protocol buffers tutorials.
  • Generate the signature for the transaction body bytes with the Curve25519 function using sender private key bytes.

The byte representation of a transaction based on the protobuf schema must not contain default values. Make sure that your protocol buffers compiler does not write the field value when serializing if it is equal to the default value for this data type, otherwise the transaction signature will be invalid. Send the signed transaction to a node:

  • If you use your own node and gRPC server, send the SignedTransaction object.
  • If you use Node REST API, compose the JSON representation of the transaction and add the base58-encoded signature to the proof array. Send the transaction to a node using POST /transactions/broadcast method.
message SignedTransaction {
  Transaction transaction = 1;
  repeated bytes proofs = 2;
}

message Transaction {
  int32 chain_id = 1;
  bytes sender_public_key = 2;
  Amount fee = 3;
  int64 timestamp = 4;
  int32 version = 5;

  oneof data {
    GenesisTransactionData genesis = 101;
    PaymentTransactionData payment = 102;
    IssueTransactionData issue = 103;
    TransferTransactionData transfer = 104;
    ReissueTransactionData reissue = 105;
    BurnTransactionData burn = 106;
    ExchangeTransactionData exchange = 107;
    LeaseTransactionData lease = 108;
    LeaseCancelTransactionData lease_cancel = 109;
    CreateAliasTransactionData create_alias = 110;
    MassTransferTransactionData mass_transfer = 111;
    DataTransactionData data_transaction = 112;
    SetScriptTransactionData set_script = 113;
    SponsorFeeTransactionData sponsor_fee = 114;
    SetAssetScriptTransactionData set_asset_script = 115;
    InvokeScriptTransactionData invoke_script = 116;
    UpdateAssetInfoTransactionData update_asset_info = 117;
  };
};

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Transaction Binary Format
FieldSizeDescription
chain_id1 byteChain ID
sender_public_key32 bytesPublic key of the transaction sender.
fee.amount8 bytesTransaction fee in the minimum fraction (“cent”) of the fee asset.
fee.asset_id32 bytes for the fee in a sponsored asset. 0 for the fee in DecentralCoinsID of the token of the fee. The fee in a sponsored asset is only available for invoke script transactions and transfer transactions. See the sponsored fee article.
timestamp8 bytesTransaction timestamp: Unix time in milliseconds. The transaction won't be added to the blockchain if the timestamp value is more than 2 hours back or 1.5 hours forward of the current block timestamp.
version1 byteTransaction version.
proofsEach proof up to 64 bytes,up to 8 proofs.Transaction proofs that are used to check the validity of the transaction. The array can contain several transaction signatures (but not limited to signatures only).

The fields that depend on the type of transaction are described in the following articles:

  • Burn transaction binary format
  • Create alias transaction binary format
  • Data transaction binary format
  • Exchange transaction binary format
  • Genesis transaction binary format
  • Invoke script transaction binary format
  • Issue transaction binary format
  • Lease cancel transaction binary format
  • Lease transaction binary format
  • Mass transfer transaction binary format
  • Reissue transaction binary format
  • Set asset script transaction binary format
  • Set script transaction binary format
  • Sponsor fee transaction binary format
  • Transfer transaction binary format
  • Update asset info transaction binary format

Burn Transaction Binary Format

Learn more about burn transaction.

Version 3

message BurnTransactionData {
  Amount asset_amount = 1;
};

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Burn Transaction Binary Format Version 3
FieldSizeDescription
asset_amount.amount8 bytesAmount of token to burn, specified in the minimum fraction (“cents”).
asset_amount.asset_id32 bytesID of token to burn.

Version 2

Burn Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 6.
3Transaction versionversionByte1Value must be 2.
4Chain IDchainIdByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6ID of the token to burnassetIdArray[Byte]32
7Amount of tokens to burnamountLong8
8Transaction feefeeLong8
9Transaction timestamptimestampLong8
10Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 2, 3, 4, 5, 6, 7, 8 and 9 are the transaction body bytes.

JSON Representation of Transaction

{
  "type":6,
  "id":"csr25XQHT1c965Fg7cY2vJ7XHYVsudPYrUbdaFqgaqL",
  "sender":"3P9QZNrHbyxXj8P9VrJZmVu2euodNtA11UW",
  "senderPublicKey":"9GaQj7gktEiiS1TTTjGbVjU9bva3AbCiawZ11qFZenBX",
  "fee":100000,
  "feeAssetId":null,
  "timestamp":1548660675277,
  "proofs": [
    "61jCivdv3KTuTY6QHgxt4jaGrXcszWg3vb9TmUR26xv7mjWWwjyqs7X5VDUs9c2ksndaPogmdunHDdjWCuG1GGhh"
  ],
  "version":2,
  "assetId":"FVxhjrxZYTFCa9Bd4JYhRqXTjwKuhYbSAbD2DWhsGidQ",
  "amount":9999,
  "chainId":87,
  "height":1370971
}

Version 1

Burn Transaction Binary Format Version 1
#FieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 6.
2Public key of the transaction senderArray[Byte]32
3ID of the token to burnArray[Byte]32
4Amount of tokens to burnLong8
5Transaction feeLong8
6Transaction timestampLong8
7Transaction signatureArray[Byte]64

The fields 1, 2, 3, 4, 5 and 6 are the transaction body bytes.

Create Alias Transaction Binary Format

Learn more about create alias transaction.

Version 3

message CreateAliasTransactionData {
  string alias = 1;
};
Create Alias Transaction Binary Format Version 3
FieldSizeDescription
aliasFrom 4 to 30 bytesAlias

Version 2

Create Alias Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 10.
3Transaction versionversionByte1Value must be 2.
4Public key of the transaction sendersenderPublicKeyArray[Byte]32
5Alias lengthShort2Number of characters in the alias name.
6AliasaliasStringfrom 4 to 30
7Transaction feefeeLong8
8Transaction timestamptimestampLong8
9Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 2, 3, 4, 5, 6, 7 and 8 are the transaction body bytes.

JSON Representation of Transaction

{
  "type":10,
  "id":"5CZV9RouJs7uaRkZY741WDy9zV69npX1FTZqxo5fsryL",
  "sender":"3PNaua1fMrQm4TArqeTuakmY1u985CgMRk6",
  "senderPublicKey":"B3f8VFh6T2NGT26U7rHk2grAxn5zi9iLkg4V9uxG6C8q",
  "fee":100000,
  "feeAssetId":null,
  "timestamp":1548666019772,
  "proofs": [
    "3cUM8Eq5KfmbS6q1qHDfzhX98YzER1ocnVjVAHG9HSkQdw86zjqxUfmsUPVwnVgwu5zatt3ETLnNFteobRMyR8bY"
  ],
  "version":2,
  "alias":"2.1.0a",
  "height":1371063
}

Version 1

Create Alias Transaction Binary Format Version 1
#FieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 10.
2Public key of the transaction senderArray[Byte]32
3Alias lengthShort2Number of characters in the alias name.
4AliasArray[Byte]From 4 to 30
5Transaction feeLong8
6Transaction timestampLong8
7Transaction signatureArray[Byte]64

The fields 1, 2, 3, 4, 5 and 6 are the transaction body bytes.

Data Transaction Binary Format

Learn more about data transaction.

Version 2

Data Transaction Binary Format Version 2
FieldSizeDescription
keyUp to 400 bytesEntry key.
valueUp to 32,767 bytesEntry value. If omitted, the transaction deletes the entry.

The maximum number of entries is 100. The maximum data size (keys + values) is 165,890 bytes.

JSON Representation of Transaction

{
  "type":12,
  "id":"EByjQAWDRGrmc8uy7xRGy2zsQXZQq59bav7h8oTTJyHC",
  "sender":"3PLZcCJyYQnfWfzhKXRA4rteCQC9J1ewf5K",
  "senderPublicKey":"BQMVwAHwf2WEEwRsCxtMVcSLrXUhJ3XtCLmSptLx2e6L",
  "fee":600000,
  "feeAssetId":null,
  "timestamp":1532116120299,
  "proofs": [
    "PZiAGq2ssi1ojh2Cc9dWrzmbuw9nJif2omsQ4dvonU31oiwsJQGbZiio3LG28otatFfFbHPfcX1JVCHwP5i4mKy"
  ],
  "version":1,
  "data": [
    {"key":"4900","type":"integer","value":24010000},{"key":"4901","type":"integer","value":24019801},
    {"key":"4902","type":"integer","value":24029604},{"key":"4903","type":"integer","value":24039409},
    {"key":"4904","type":"integer","value":24049216},{"key":"4905","type":"integer","value":24059025},
    {"key":"4906","type":"integer","value":24068836},{"key":"4907","type":"integer","value":24078649},
    {"key":"4908","type":"integer","value":24088464},{"key":"4909","type":"integer","value":24098281},
    {"key":"4910","type":"integer","value":24108100},{"key":"4911","type":"integer","value":24117921},
    {"key":"4912","type":"integer","value":24127744},{"key":"4913","type":"integer","value":24137569},
    {"key":"4914","type":"integer","value":24147396},{"key":"4915","type":"integer","value":24157225},
    {"key":"4916","type":"integer","value":24167056},{"key":"4917","type":"integer","value":24176889},
    {"key":"4918","type":"integer","value":24186724},{"key":"4919","type":"integer","value":24196561},
    {"key":"4920","type":"integer","value":24206400},{"key":"4921","type":"integer","value":24216241},
    {"key":"4922","type":"integer","value":24226084},{"key":"4923","type":"integer","value":24235929},
    {"key":"4924","type":"integer","value":24245776},{"key":"4925","type":"integer","value":24255625},
    {"key":"4926","type":"integer","value":24265476},{"key":"4927","type":"integer","value":24275329},
    {"key":"4928","type":"integer","value":24285184},{"key":"4929","type":"integer","value":24295041},
    {"key":"4930","type":"integer","value":24304900},{"key":"4931","type":"integer","value":24314761},
    {"key":"4932","type":"integer","value":24324624},{"key":"4933","type":"integer","value":24334489},
    {"key":"4934","type":"integer","value":24344356},{"key":"4935","type":"integer","value":24354225},
    {"key":"4936","type":"integer","value":24364096},{"key":"4937","type":"integer","value":24373969},
    {"key":"4938","type":"integer","value":24383844},{"key":"4939","type":"integer","value":24393721},
    {"key":"4940","type":"integer","value":24403600},{"key":"4941","type":"integer","value":24413481},
    {"key":"4942","type":"integer","value":24423364},{"key":"4943","type":"integer","value":24433249},
    {"key":"4944","type":"integer","value":24443136},{"key":"4945","type":"integer","value":24453025},
    {"key":"4946","type":"integer","value":24462916},{"key":"4947","type":"integer","value":24472809},
    {"key":"4948","type":"integer","value":24482704},{"key":"4949","type":"integer","value":24492601},
    {"key":"4950","type":"integer","value":24502500},{"key":"4951","type":"integer","value":24512401},
    {"key":"4952","type":"integer","value":24522304},{"key":"4953","type":"integer","value":24532209},
    {"key":"4954","type":"integer","value":24542116},{"key":"4955","type":"integer","value":24552025},
    {"key":"4956","type":"integer","value":24561936},{"key":"4957","type":"integer","value":24571849},
    {"key":"4958","type":"integer","value":24581764},{"key":"4959","type":"integer","value":24591681},
    {"key":"4960","type":"integer","value":24601600},{"key":"4961","type":"integer","value":24611521},
    {"key":"4962","type":"integer","value":24621444},{"key":"4963","type":"integer","value":24631369},
    {"key":"4964","type":"integer","value":24641296},{"key":"4965","type":"integer","value":24651225},
    {"key":"4966","type":"integer","value":24661156},{"key":"4967","type":"integer","value":24671089},
    {"key":"4968","type":"integer","value":24681024},{"key":"4969","type":"integer","value":24690961},
    {"key":"4970","type":"integer","value":24700900},{"key":"4971","type":"integer","value":24710841},
    {"key":"4972","type":"integer","value":24720784},{"key":"4973","type":"integer","value":24730729},
    {"key":"4974","type":"integer","value":24740676},{"key":"4975","type":"integer","value":24750625},
    {"key":"4976","type":"integer","value":24760576},{"key":"4977","type":"integer","value":24770529},
    {"key":"4978","type":"integer","value":24780484},{"key":"4979","type":"integer","value":24790441},
    {"key":"4980","type":"integer","value":24800400},{"key":"4981","type":"integer","value":24810361},
    {"key":"4982","type":"integer","value":24820324},{"key":"4983","type":"integer","value":24830289},
    {"key":"4984","type":"integer","value":24840256},{"key":"4985","type":"integer","value":24850225},
    {"key":"4986","type":"integer","value":24860196},{"key":"4987","type":"integer","value":24870169},
    {"key":"4988","type":"integer","value":24880144},{"key":"4989","type":"integer","value":24890121},
    {"key":"4990","type":"integer","value":24900100},{"key":"4991","type":"integer","value":24910081},
    {"key":"4992","type":"integer","value":24920064},{"key":"4993","type":"integer","value":24930049},
    {"key":"4994","type":"integer","value":24940036},{"key":"4995","type":"integer","value":24950025},
    {"key":"4996","type":"integer","value":24960016},{"key":"4997","type":"integer","value":24970009},
    {"key":"4998","type":"integer","value":24980004},{"key":"4999","type":"integer","value":24990001}
  ],
  "height":1091300
}

Version 1

Data Transaction Binary Format Version 1
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 12.
3Transaction versionversionByte1Value must be 1.
4Public key of the transaction sendersenderPublicKeyArray[Byte]32
5Length of the data arrayShort2
6.1Key 1 lengthShort2
6.2Key 1keyStringUp to 400Maximum of 100 characters.
6.3Value 1 typetypeByte1Options are: 0 - Long. 1 - Boolean. 2 - Array[Byte]. 3 - String.
6.4Value 1 lengthShort2This field is present only if the value is of type of array of bytes or a string. If the value is of type of integer or a boolean, this field should not be included in the data structure.
6.5Value 1valueTST is one of the following: 1) Long, S = 8. 2) Boolean, S = 1. 3) Array[Byte], S ⩽ 32,767. 4) String, S ⩽ 32,767.
6.6Key 2 lengthShort2
6.7Key 2keyStringUp to 400Maximum of 100 characters.
6.8Value 2 typetypeByte1Options are: 0 - Long. 1 - Boolean. 2 - Array[Byte]. 3 - String.
6.9Value 2 lengthShort2This field is present only if the value is of type of array of bytes or a string. If the value is of type of integer or a boolean, this field should not be included in the data structure.
6.10Value 2valueTST is one of the following: 1) Long, S = 8. 2) Boolean, S = 1. 3) Array[Byte], S ⩽ 32,767. 4) String, S ⩽ 32,767.
..................
6.[5 × N - 4]N-th key lengthShort2
6.[5 × N - 3]N-th keykeyStringUp to 400Maximum of 100 characters.
6.[5 × N - 2]N-th value typetypeByte1Options are: 0 - Long. 1 - Boolean. 2 - Array[Byte]. 3 - String.
6.[5 × N - 1]N-th value lengthShort2This field is present only if the value is of type of array of bytes or a string. If the value is of type of integer or a boolean, this field should not be included in the data structure.
6.[5 × N]N-th valuevalueTST is one of the following: 1) Long, S = 8. 2) Boolean, S = 1. 3) Array[Byte], S ⩽ 32,767. 4) String, S ⩽ 32,767.
7Transaction timestamptimestampLong8
8Transaction feefeeLong8
9Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 1, 2, 3, 4, 5, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 6.10, 6.[5 × N - 4], 6.[5 × N - 3], 6.[5 × N - 2], 6.[5 × N - 1], 6.[5 × N], 7 and 8 are the transaction body bytes. The maximum number of records is 100. The maximum size of transaction body bytes is 153,600 bytes.

Exchange Transaction Binary Format

Learn more about exchange transaction.

Version 3

Exchange transaction of version 3 can accept orders of versions 1 –4.

message ExchangeTransactionData {
  int64 amount = 1;
  int64 price = 2;
  int64 buy_matcher_fee = 3;
  int64 sell_matcher_fee = 4;
  repeated Order orders = 5;
};
Exchange Transaction Binary Format Version 3
FieldSizeDescription
amount8 bytesAmount of the amount asset (base currency) that the buyer received from the seller, specified in the minimum fraction (“cent”) of asset.
price8 bytesPrice for the amount asset (base currency) nominated in the price asset (quote currency), multiplied by 10^{8}. For more details see the order article.
buy_matcher_fee8 bytesBuy matcher fee. The fee token ID is indicated in buy order.
sell_matcher_fee8 bytesSell matcher fee The fee token ID is indicated in sell order.
ordersBuy order and sell order. See the order binary format.

Version 2

Transaction version 2 can accept orders of version 1, 2 and 3.

Exchange Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 7.
3Transaction versionversionByte1Value must be 2.
4.1Buy order sizeInt4Size including flag 4.2.
4.2Buy order version flagorder1.versionByteSS = 1 if the order version is 1. S = 0 if the order version is 2 or 3.
4.3Buy orderorder1Array[Byte]See order binary format
5.1Sell order sizeInt4Size including flag 5.2.
5.2Sell order version flagorder2.versionByteSS = 1 if the order version is 1. S = 0 if the order version is 2 or 3.
5.3Sell orderorder2Array[Byte]See order binary format
6Deal pricepriceLong8Price for the amount asset (base currency) nominated in the price asset (quote currency).
7AmountamountLong8Amount of the amount asset (base currency) that the buyer received from the seller.
8Buy matcher feebuyMatcherFeeLong8
9Sell matcher feesellMatcherFeeLong8
10Transaction feefeeLong8
11Transaction timestamptimestampLong8
12Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 1, 2, 3, 4.1, 4.2, 4.3, 5.1, 5.2, 5.3, 6, 6.6, 7, 8, 9, 10 and 11 are the transaction body bytes.

JSON Representation of Transaction

{
   "type":6,
   "id":"csr25XQHT1c965Fg7cY2vJ7XHYVsudPYrUbdaFqgaqL",
   "sender":"3P9QZNrHbyxXj8P9VrJZmVu2euodNtA11UW",
   "senderPublicKey":"9GaQj7gktEiiS1TTTjGbVjU9bva3AbCiawZ11qFZenBX",
   "fee":100000,
   "feeAssetId":null,
   "timestamp":1548660675277,
   "proofs": [
     "61jCivdv3KTuTY6QHgxt4jaGrXcszWg3vb9TmUR26xv7mjWWwjyqs7X5VDUs9c2ksndaPogmdunHDdjWCuG1GGhh"
   ],
   "version":2,
   "assetId":"FVxhjrxZYTFCa9Bd4JYhRqXTjwKuhYbSAbD2DWhsGidQ",
   "amount":9999,
   "chainId":87,
   "height":1370971
 }

Version 1

Transaction version 1 can accept orders of version 1 only.

Exchange Transaction Binary Format Version 1
#FieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 6.
2Buy order sizeInt4
3Sell order sizeInt4
4Buy orderArray[Byte]See order binary format
5Sell orderArray[Byte]See order binary format
6Deal priceLong8Price for the amount asset (base currency) nominated in the price asset (quote currency).
7AmountLong8Amount of the amount asset (base currency) that the buyer received from the seller.
8Buy matcher feeLong8
9Sell matcher feeLong8
10Transaction feeLong8
11Transaction timestampLong8
12Transaction signatureArray[Byte]64

The fields 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 are the transaction body bytes.

Genesis Transaction Binary Format

Learn more about genesis transaction.

Genesis Transaction Binary Format
#FieldJSON field nameField typeField size in bytesComment
1Transaction type IDtypeByte1Value must be 1.
2Transaction timestamptimestampLong8
3Address of the recipientrecipientArray[Byte]26
4Amount of DecentralCoins that will be transferred to the accountamountLong8

JSON Representation of Transaction

{
  "type":1,
  "id":"2DVtfgXjpMeFf2PQCqvwxAiaGbiDsxDjSdNQkc5JQ74eWxjWFYgwvqzC4dn7iB1AhuM32WxEiVi1SGijsBtYQwn8",
  "fee":0,
  "timestamp":1465742577614,
  "signature":"2DVtfgXjpMeFf2PQCqvwxAiaGbiDsxDjSdNQkc5JQ74eWxjWFYgwvqzC4dn7iB1AhuM32WxEiVi1SGijsBtYQwn8",
  "recipient":"3PAWwWa6GbwcJaFzwqXQN5KQm7H96Y7SHTQ",
  "amount":9999999500000000,
  "height":1
}

Invoke Script Transaction Binary Format

Learn more about invoke script transaction.

Version 2

message InvokeScriptTransactionData {
  Recipient d_app = 1;
  bytes function_call = 2;
  repeated Amount payments = 3;
};

message Recipient {
  oneof recipient {
    bytes public_key_hash = 1;
    string alias = 2;
  };
};

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Invoke Script Transaction Binary Format Version 2
FieldSizeDescription
d_app.public_key_hash20 bytesdApp account public key hash (a component of an address, see the Address binary format article).
d_app.aliasFrom 4 to 30 bytesdApp alias.
function_callFunction name and arguments. Binary format of function call is the same as in version 1.
payments.asset_id32 bytes for asset. 0 for DecentralCoins.ID of token in payment.
payments.amount8 bytesAmount of token in payment, specified in the atomic units.

The maximum size of d_app + function_call + payments is 5120 bytes.

JSON Representation of Transaction

{
  "type":16,
  "id":"7CVjf5KGRRYj6UyTC2Etuu4cUxx9qQnCJox8vw9Gy9yq",
  "sender":"3P5rWeMzoaGBrXJDMifQDDjCMKWJGKTiVJU",
  "senderPublicKey":"4kKN9G7cZXGQujLQm9ss5gqB7TKX4A9jtFGt7DnHUoQ6",
  "fee":500000,
  "feeAssetId":null,
  "timestamp":1565537422938,
  "proofs": [
    "28s21sisoa7yHWWmmX8U78fbNHW4KXAS9GHD8XmaN77gJxbnP2Q3DssNWpmSQ6hBq6xS985W4YiTmgvENhfWPNt5"
  ],
  "version":1,
  "dApp":"3PJbknfXMsJzZmksmsKSMz56tVdDqF5GdNM",
  "payment":[],
  "call": {
    "function":"returnSellVST",
    "args": [
      {
        "type":"string",
        "value":"GiEBRfGhEeGqhPmLCjwJcYuakyvaz2GHGCfCzuinSKD"
      }
    ]
  },
  "height":1656369,
  "stateChanges": {
    "data": [
      {
        "key":"sell_GiEBRfGhEeGqhPmLCjwJcYuakyvaz2GHGCfCzuinSKD_spent",
        "type":"integer",
        "value":10000000000
      }
    ],
    "transfers": [
      {
        "address":"3P5rWeMzoaGBrXJDMifQDDjCMKWJGKTiVJU",
        "asset":"4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8",
        "amount":10000000000
      }
    ],
    "issues":[],
    "reissues":[],
    "burns":[],
    "sponsorFees":[],
    "leases":[],
    "leaseCancels":[],
    "invokes":[]
  }
}

Version 1

Invoke Script Transaction Binary Format Version 1
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 16.
3Transaction versionversionByte1Value must be 1.
4Chain IDByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6Address or aliasdAppSee Address Binary Format, Alias Binary FormatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34.
7.1Function presence flagByte10 — the default function of the dApp is invoked. 1 — function from the current transaction should be invoked in the dApp.
7.2Function call IDByte1Constant. The value must be 9.
7.3Function type IDByte1Constant. The value must be 1.
7.4Function name lengthInt4
7.5Function namefunctionStringUp to 255
7.6.1Amount of arguments of the functionInt4
7.6.2ID of argument 1 typetypeByte10 — argument type is long. 1 — argument type is an array of bytes. 2 — argument type is a string. 6 — argument type is logical True. 7 — argument type is logical False. 11 – argument type is list.
7.6.3Argument 1valueOptions are: 1) Long. 2) Array[Byte]. 3) String. 4) Logical True. 5) Logical False. 6) List.SS = 8, if argument type is long. If the argument type is an array of bytes, string, or list, the field size is limited only by the total transaction size. If the type is list, then 1) its length must not exceed 1000 elements. 2) amount of its elements represents first 4 bytes of the current field. 3) each list element is serialized similarly to the function argument: the element type ID takes first place followed by the element's value. S = 0, if argument type is logical True or False.
7.6.4ID of argument 2 typetypeByte10 — argument type is long. 1 — argument type is an array of bytes. 2 — argument type is a string. 6 — argument type is logical True. 7 — argument type is logical False. 11 – argument type is list.
7.6.5Argument 2valueOptions are: 1) Long. 2) Array[Byte]. 3) String. 4) Logical True. 5) Logical False. 6) List.SS = 8, if argument type is long. If the argument type is an array of bytes, string, or list, the field size is limited only by the total transaction size. If the type is list, then 1) its length must not exceed 1000 elements. 2) amount of its elements represents first 4 bytes of the current field. 3) each list element is serialized similarly to the function argument: the element type ID takes first place followed by the element's value. S = 0, if argument type is logical True or False.
..................
7.6.[2 × N]ID of argument N typetypeByte10 — argument type is long. 1 — argument type is an array of bytes. 2 — argument type is a string. 6 — argument type is logical True. 7 — argument type is logical False. 11 – argument type is list.
7.6.[2 × N + 1]Argument NvalueOptions are: 1) Long. 2) Array[Byte]. 3) String. 4) Logical True. 5) Logical False. 6) List.SS = 8, if argument type is long. If the argument type is an array of bytes, string, or list, the field size is limited only by the total transaction size. If the type is list, then 1) its length must not exceed 1000 elements. 2) amount of its elements represents first 4 bytes of the current field. 3) each list element is serialized similarly to the function argument: the element type ID takes first place followed by the element's value. S = 0, if argument type is logical True or False.
8.1Amount of paymentsShort2
8.2Payment 1 lengthShort2
8.3Amount of token in payment 1amountLong8
8.4Flag of payment 1 tokenByte10 — DecentralCoins. 1 — other token.
8.5ID of payment 1 tokenArray[Byte]32Field is applicable if the token is not DecentralCoins.
..................
8.[4 × N – 2]Payment N lengthShort2
8.[4 × N – 1]Amount of token in payment NamountLong8
8.[4 × N]Flag of payment N tokenByte10 — DecentralCoins. 1 — other token.
8.[4 × N + 1]ID of payment N tokenArray[Byte]32Field is applicable if the token is not DecentralCoins.
9Transaction feefeeLong8
10.1Flag of fee tokenByte10 — DecentralCoins. 1 — other token.
10.2Fee token IDfeeAssetIdArray[Byte]SS = 0, if token is DecentralCoins. S = 32, if it is other token.
11Transaction timestamptimestampLong8
12Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The maximum number of payments is 10. The maximum size of transaction including proofs is 5120 bytes.

Issue Transaction Binary Format

Learn more about issue transaction.

Version 3

message IssueTransactionData {
  string name = 1;
  string description = 2;
  int64 amount = 3;
  int32 decimals = 4;
  bool reissuable = 5;
  bytes script = 6;
};
Issue Transaction Binary Format Version 3
FieldSizeDescription
nameFrom 4 to 16 bytesToken name.
descriptionFrom 0 to 1000 bytesToken description.
amount8 bytesAmount of token to issue, specified in the minimum fraction (“cents”).
decimals1 byteNumber of decimal places.
reissuable1 byteReissue availability flag.
scriptUp to 8192 bytesAsset script.

Version 2

Issue Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte0Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte0Value must be 3.
3Transaction versionversionByte0Value must be 2.
4Chain IDchainIdByte087 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6.1Token name lengthShort2
6.2Token namenameArray[Byte]From 4 to 16
7.1Token description lengthShort2
7.2Token descriptiondescriptionArray[Byte]From 0 to 1000
8Amount of the token that will be issuedquantityShort8
9Number of decimal places of the tokendecimalsByte0
10Reissue flagreissuableBoolean0If the value is 0, then token reissue is not possible. If the value is 1, then token reissue is possible.
11Transaction feefeeShort8
12Transaction timestamptimestampShort8
13.1Script existence flagBoolean0If the value is 0, then the token does not have a script. If the value is 1, then the token has a script.
13.2Script length in bytesShortSS = 0 if the value of the script existence flag field is 0. S = 2 if the value of the script existence flag field is 1.
13.3Asset scriptscriptStringSS = 0 if the value of the script existence flag field is 0. 0 < S ≤ 8192, if the value of the script existence flag field is 1.
14Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 82. The size of each proof is 64 bytes.

The fields 2, 3, 4, 5, 6.1, 6.2, 7.1, 7.2, 8, 9, 10, 11, 12, 13.1, 13.2 and 13.3 are the transaction body bytes.

JSON Representation of Transaction

{
  "type":3,
  "id":"FTQvw9zdYirRksUFCKDvor3hiu2NiUjXEPTDEcircqti",
  "sender":"3PPP59J1pToCk7fPs4d5EK5PoHJMeQRJCTb",
  "senderPublicKey":"E8Y8ywedRS9usVvvcuczn9hsSg1SNkQVBMcNeQEnjDTP",
  "fee":100000000,
  "feeAssetId":null,
  "timestamp":1548666518362,
  "proofs": [
    "3X7GpKW1ztto1aJN5tQNByaGZ9jGkaxZNo4BT268obZckbXuNQHGKjAUxtqcSEes5aZNMaQi2JYBGeKpcaPTxpSC"
  ],
  "version":2,
  "assetId":"FTQvw9zdYirRksUFCKDvor3hiu2NiUjXEPTDEcircqti",
  "name":"DCVN",
  "quantity":990000000000000000,
  "reissuable":false,
  "decimals":8,
  "description":"Tài chính cho nền dân chủ",
  "script":null,
  "chainId":87,
  "height":1371069
}

Version 1

Issue Transaction Binary Format Version 1
#FieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 3.
2Transaction signatureArray[Byte]64
3Transaction type IDByte1This field duplicates field 1.
4Public key of the transaction senderArray[Byte]32
5.1Token name lengthShort2
5.2Token nameArray[Byte]From 4 to 16
6.1Token description lengthShort2
6.2Token descriptionArray[Byte]From 0 to 1000
7Amount of the token that will be issuedLong8
8Number of decimal places of the tokenByte1
9Reissue flagBoolean1
10Transaction feeLong8
11Transaction timestampLong8

The fields 3, 4, 5.1, 5.2, 6.1, 6.2, 7, 8, 9, 10 and 11 are the transaction body bytes.

Lease Cancel Transaction Binary Format

Learn more about lease cancel transaction

Version 3

message LeaseCancelTransactionData {
  bytes lease_id = 1;
};
Lease Cancel Transaction Binary Format Version 3
FieldSizeDescription
lease_id32 bytesLease ID.

Version 2

Lease Cancel Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 9.
3Transaction versionversionByte1Value must be 2.
4Chain IDchainIdByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6Transaction feefeeLong8
7Transaction timestamptimestampLong8
8Lease IDArray[Byte]32
9Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 2, 3, 4, 5, 6, 7, and 8 are the transaction body bytes.

JSON Representation of Transaction

{
  "type":9,
  "id":"7siEtrJAvmVzM1WDX6v9RN4qkiCtk7qQEeD5ZhE6955E",
  "sender":"3PMBXG13f89pq3WyJHHKX2m5zN6kt2CEkHQ",
  "senderPublicKey":"BEPNBjo9Pi9hJ3hVtxpwyEfXCW3qWUNk5dMD7aFdiHsa",
  "fee":100000,
  "feeAssetId":null,
  "timestamp":1548660629957,
  "proofs": [
    "3cqVVsaEDzBz367KTBFGgMXEYJ2r3yLWd4Ha8r3GzmAFsm2CZ3GeNW22wqxfK4LNRFgsM5kCWRVhf6gu2Nv6zVqW"
  ],
  "version":2,
  "leaseId":"BggRaeNCVmzuFGohzF4dQeYXSWr8i5zNSnGtdKc5eGrY",
  "chainId":87,
  "height":1370970,
  "lease": {
    "id":"BggRaeNCVmzuFGohzF4dQeYXSWr8i5zNSnGtdKc5eGrY",
    "originTransactionId":"BggRaeNCVmzuFGohzF4dQeYXSWr8i5zNSnGtdKc5eGrY",
    "sender":"3PMBXG13f89pq3WyJHHKX2m5zN6kt2CEkHQ",
    "recipient":"3PMWRsRDy882VR2viKPrXhtjAQx7ygQcnea",
    "amount":406813214,
    "height":1363095,
    "status":"canceled",
    "cancelHeight":1370970,
    "cancelTransactionId":"7siEtrJAvmVzM1WDX6v9RN4qkiCtk7qQEeD5ZhE6955E"
  }
}

Version 1

Lease Cancel Transaction Binary Format Version 1
Field order numberFieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 9.
2Public key of the transaction senderArray[Byte]32
3Transaction feeLong8
4Transaction timestampLong8
5Lease IDArray[Byte]32
6Transaction signatureArray[Byte]64

The fields 1, 2, 3, 4, and 5 are the transaction body bytes.

Lease Transaction Binary Format

Learn more about lease transaction.

Version 3

message LeaseTransactionData {
  Recipient recipient = 1;
  int64 amount = 2;
};

message Recipient {
  oneof recipient {
    bytes public_key_hash = 1;
    string alias = 2;
  };
};
Lease Transaction Binary Format Version 3
FieldSizeDescription
recipient.public_key_hash20 bytesRecipient's account public key hash (a component of an address, see the address binary format article).
recipient.aliasFrom 4 to 30 bytesRecipient's alias.
amount8 bytesAmount of DecentralCoins to lease (that is, amount of Decentralites multiplied by 10^{8}).

Version 2

Lease Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 8.
3Transaction versionversionByte1Value must be 2.
4Reserved fieldByte1Value must be equal to 0.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6address or alias of the recipientrecipientSee address binary format, alias binary formatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34.
7Amount of DecentralCoins that will be leased to the accountamountLong8
8Transaction feefeeLong8
9Transaction timestamptimestampLong8
10Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 2, 3, 4, 5, 6, 7, 8 and 9 are the transaction body bytes.

JSON Representation of Transaction

{
  "type":8,
  "id":"J6jZCzLpWJX8EDVhopKFx1mcbFizLGHVb44dvqPzH4QS",
  "sender":"3PMYNm8hshzCNjZ8GpPta5SyN7qBTEzS7Kw",
  "senderPublicKey":"GNswAY61mER5ZyUFeDBo1UyKGkPSSmmnd6yj7axN2n8f",
  "fee":100000,
  "feeAssetId":null,
  "timestamp":1548660916755,
  "proofs": [
    "2opTj7mGKXLRajkJ78wN4ctSWqTeWtvisHaR8BnL2amqJ2KB313BbcpDYJKcqr7o7EpYjL5tppMz2pGjUMWbJe9b"
  ],
  "version":2,
  "amount":14000000000,
  "recipient":"3PMWRsRDy882VR2viKPrXhtjAQx7ygQcnea",
  "height":1370973,
  "status":"canceled"
}

Version 1

Lease Transaction Binary Format Version 1
#FieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 8.
2Public key of the transaction senderArray[Byte]32
3address or alias of the recipientSee address binary format, alias binary formatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34.
4Amount of DecentralCoins that will be leased to the accountLong8
5Transaction feeLong8
6Transaction timestampLong8
7Transaction signatureArray[Byte]64

The fields 1, 2, 3, 4, 5 and 6 are the transaction body bytes.

Mass Transfer Transaction Binary Format

Learn more about mass transfer transaction.

Version 2

message MassTransferTransactionData {
  message Transfer {
    Recipient recipient = 1;
    int64 amount = 2;
  };
  bytes asset_id = 1;
  repeated Transfer transfers = 2;
  bytes attachment = 3;
};

message Recipient {
  oneof recipient {
    bytes public_key_hash = 1;
    string alias = 2;
  };
}
Mass Transaction Binary Format Version 2
FieldSizeDescription
asset_id32 bytesID of token to transfer.
transfers.recipient.public_key_hash20 bytesRecipient's account public key hash (a component of an address, see the address binary format article).
transfers.recipient.aliasFrom 4 to 30 bytesRecipient's alias.
transfers.amount8 bytesAmount of token to transfer, specified in the minimum fraction (“cents”).
attachmentUp to 140 bytesArbitrary data (typically a comment to transfer).

The maximim number of transfers is 100.

JSON Representation of Transaction

{
  "type":11,
  "id":"3LRfudet7avpQcW1AdauiBGb8SSRAaoCugDzngDPLVcv",
  "sender":"3P2rvn2Hpz6pJcH8oPNrwLsetvYP852QQ2m",
  "senderPublicKey":"5DphrhGy6MM4N3yxfB2uR2oFUkp2MNMpSzhZ4uJEm3U1",
  "fee":5100000,
  "feeAssetId":null,
  "timestamp":1528973951321,
  "proofs": [
    "FmGBaWABAy5bif7Qia2LWQ5B4KNmBnbXETL1mE6XEy4AAMjftt3FrxAa8x2pZ9ux391oY5c2c6ZSDEM4nzrvJDo"
  ],
  "version":1,
  "assetId":"Fx2rhWK36H1nfXsiD4orNpBm2QG1JrMhx3eUcPVcoZm2",
  "attachment":"xZBWqm9Ddt5BJVFvHUaQwB7Dsj78UQ5HatQjD8VQKj4CHG48WswJxUUeHEDZJkHgt9LycUpHBFc8ENu8TF8vvnDJCgfy1NeKaUNydqy9vkACLZjSqaVmvfaM3NQB",
  "transferCount":6,
  "totalAmount":500000000000,
  "transfers": [
    {"recipient":"3PHnjQrdK389SbzwPEJHYKzhCqWvaoy3GQB","amount":5000000000},
    {"recipient":"3PGNLwUG2GPpw74teTAxXFLxgFt3T2uQJsF","amount":5000000000},
    {"recipient":"3P5kQneM9EdpVUbFLgefD385LLYTXY5J32c","amount":5000000000},
    {"recipient":"3P2j9FZyygnVDCQvmSc41VCAKwwCQm8QUhA","amount":5000000000},
    {"recipient":"3PNBZutLvMpjzxGAiQGqQuDyanhWyLi2Fhi","amount":5000000000},
    {"recipient":"3P84vdYxzDPFbS5zj9J6yCkmKKA2QMo1DKA","amount":5000000000},
  ],
  "height":1041197
}

Version 1

Mass Transaction Binary Format Version 1
#FieldJSON field nameField typeField size in bytesComment
1Transaction type IDtypeByte1Value must be 11.
2Transaction versionversionByte1Value must be 1.
3Public key of the transaction sendersenderPublicKeyArray[Byte]32
4.1Flag DecentralCoins/tokenByte1Value is 0 for transferring DecentralCoins. Value is 1 for transferring other tokens.
4.2Token IDassetIdArray[Byte]SS = 0 if the value of the flag DecentralCoins/token field is 0. S = 32 if the value of the flag DecentralCoins/token field is 1.
5.1Number of transferstransferCountShort2
5.2address or alias of the recipientrecipientSee address binary format, alias binary formatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34.
5.3Amount of tokens in the transfer 1amountLong8
5.4Address or alias of the recipientrecipientSee address binary format, alias binary formatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34.
5.5Amount of tokens in the transfer 2amountLong8
..................
5.[2 × N]Address or alias of the recipientrecipientSee address binary format, alias binary formatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34.
5.[2 × N + 1]Amount of tokens in the transferNamountLong8
6Transaction timestamptimestampLong8
7Transaction feefeeLong8
8.1Attachment lengthShort2
8.2AttachmentArray[Byte]2Arbitrary data attached to the transaction.
9Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 1, 2, 3, 4.1, 4.2, 5.1, 5.2, 5.3, 5.4, 5.5, 5.[2 × N], 5.[2 × N + 1], 6, 7, 8.1 and 8.2 are the transaction body bytes.

Reissue Transaction Binary Format

Learn more about reissue transaction.

Version 3

message ReissueTransactionData {
  Amount asset_amount = 1;
  bool reissuable = 2;
};

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Reissue Transaction Binary Format Version 3
FieldSizeDescription
asset_id32 bytesID of token to reissue.
asset_amount.amount8 bytesAmount of token to reissue, specified in the minimum fraction (“cents”).
reissuable1 byteReissue availability flag.

Version 2

Reissue Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 5.
3Transaction versionversionByte1Value must be 2.
4Chain IDchainIdByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6Token IDassetIdArray[Byte]32
7Amount of token that will be reissuedquantityLong8
8Reissue flagreissuableBoolean1If the value is 0, then token reissue is not possible. If the value is 1, then token reissue is possible.
9Transaction feefeeLong8
10Transaction timestamptimestampLong8
11Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 2, 3, 4, 5, 6, 7, 8, 9 and 10 are the transaction body bytes.

JSON Representation of Transaction

{
  "type":5,
  "id":"27ETigYaHym2Zbdp4x1gnXnZPF1VJCqQpXmhszC35Qac",
  "sender":"3PLJciboJqgKsZWLj7k1VariHgre6uu4S2T",
  "senderPublicKey":"DjYEAb3NsQiB6QdmVAzkwJh7iLgUs3yDLf7oFEeuZjfM",
  "fee":100000000,
  "feeAssetId":null,
  "timestamp":1548521785933,
  "proofs": [
    "5mEveeUwBdBqe8naNoV5eAe5vj6fk8U743eHGkhxhs3v9PMsb3agHqpe4EtzpUFdpASJegXyjrGSbynZg557cnSq"
  ],
  "version":2,
  "assetId":"GA4gB3Lf3AQdF1vBCbqGMTeDrkUxY7L83xskRx6Z7kEH",
  "quantity":200000,
  "reissuable":true,
  "chainId":87,
  "height":1368623
}

Version 1

.. csv-table:: Reissue Transaction Binary Format Version 1 :file: ../_static/02_decentralchain/tables/083_Reissue-Transaction-Binary-Format-V1.csv :header-rows: 1 :class: longtable :widths: 1 2 2 1 3

The fields 3, 4, 5, 6, 7, 8 and 9 are the transaction body bytes.

Set Asset Script Transaction Binary Format

Learn more about set asset script transaction.

Version 2

message SetAssetScriptTransactionData {
  bytes asset_id = 1;
  bytes script = 2;
};
Set Asset Script Transaction Binary Format Version 2
FieldSizeDescription
asset_id32 bytesID of asset.
scriptUp to 8192 bytesAsset script.

The maximim number of transfers is 100.

JSON Representation of Transaction

{
  "type":15,
  "id":"FwYSpmVDbWQ2BA5NCBZ9z5GSjY39PSyfNZzBayDiMA88",
  "sender":"3P67JUW8Djit7hMjKhADmn6CWvKPbRuh2sQ",
  "senderPublicKey":"AwQYJRHZNd9bvF7C13uwnPiLQfTzvDFJe7DTUXxzrGQS",
  "fee":100000000,
  "feeAssetId":null,
  "timestamp":1547201038106,
  "proofs": [
    "nzYhVKmRmd7BiFDDfrFVnY6Yo98xDGsKrBLWentF7ibe4P9cGWg4RtomHum2NEMBhuyZb5yjThcW7vsCLg7F8NQ"
  ],
  "version":1,
  "assetId":"7qJUQFxniMQx45wk12UdZwknEW9cDgvfoHuAvwDNVjYv",
  "script":"base64:AQa3b8tH",
  "chainId":87,
  "height":1346345
}

Version 1

.. csv-table:: Set Asset Script Transaction Binary Format Version 1 :file: ../_static/02_decentralchain/tables/085_Set-Asset-Transaction-Binary-Format-V1.csv :header-rows: 1 :class: longtable :widths: 1 2 1 1 1 3

The fields 2, 3, 4, 5, 6, 7, 8, 9.1, 9.2 and 9.3 are the transaction body bytes.

Set Script Transaction Binary Format

Learn more about set script transaction.

Version 2

message SetScriptTransactionData {
  bytes script = 1;
};
Set Script Transaction Binary Format Version 2
FieldSizeDescription
scriptUp to 32,768 bytesAccount script or dApp script.

JSON Representation of Transaction

{
  "type":13,
  "id":"8Nwjd2tcQWff3S9WAhBa7vLRNpNnigWqrTbahvyfMVrU",
  "sender":"3PBSduYkK7GQxVFWkKWMq8GQkVdAGX71hTx",
  "senderPublicKey":"3LZmDK7vuSBsDmFLxJ4qihZynUz8JF9e88dNu5fsus5p",
  "fee":2082496,
  "feeAssetId":null,
  "timestamp":1537973512182,
  "proofs": [
    "V45jPG1nuEnwaYb9jTKQCJpRskJQvtkBcnZ45WjZUbVdNTi1KijVikJkDfMNcEdSBF8oGDYZiWpVTdLSn76mV57"
  ],
  "version":1,
  "script":"base64:AQQAAAAEaW5hbAIAAAAESW5hbAQAAAAFZWxlbmECAAAAB0xlbnVza2EEAAAABGxvdmUCAAAAC0luYWxMZW51c2thCQAAAAAAAAIJAAEsAAAAAgUAAAAEaW5hbAUAAAAFZWxlbmEFAAAABGxvdmV4ZFt5",
  "chainId":87,
  "height":1190001
}

Version 1

Set Script Transaction Binary Format Version 1
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 13.
3Transaction versionversionByte1Value must be 1.
4Chain IDchainIdByte187 — for Mainnet. 84 — for Testnet. 83 — for Stagenet.
5Public key of the transaction sendersenderPublicKeyArray[Byte]32
6.1Script existence flagBoolean1If the value is 0, then the token does not have a script. If the value is 1, then the token has a script.
6.2Script lengthShortSS = 0 if the value of the script existence flag field is 0. S = 2 if the value of the script existence flag field is 1.
6.3ScriptscriptStringSS = 0 if the value of the script existence flag field is 0. 0 < S ≤ 32,768, if the value of the script existence flag field is 1.
7Transaction feefeeLong8
8Transaction timestamptimestampLong8
9Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

Sponsor Fee Transaction Binary Format

Learn more about sponsor fee transaction.

Version 2

message SponsorFeeTransactionData {
  Amount min_fee = 1;
};

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Sponsor Fee Transaction Binary Format Version 2
FieldSizeDescription
min_fee.asset_id32 bytesID of asset.
min_fee.amount8 bytesAmount of asset that is equivalent to 0.001 DecentralCoins (100 000 Decentralites), specified in the minimum fraction (“cents”) of asset. See the sponsored fee article.

JSON Representation of Transaction

{
  "type":14,
  "id":"7EL2XEGP1By427BeLcHPYeVnBzGsXen4egMAwQpWGBVR",
  "sender":"3PHrS6VNPRtUD8MHkfkmELavL8JnGtSq5sx",
  "senderPublicKey":"5v5D5pqzKGBejtvtEeyDJXG28iQwMViu1uuetEcyQp9v",
  "fee":100000000,
  "feeAssetId":null,
  "timestamp":1534448057070,
  "proofs": [
    "3Q4JS4ujrGxAqp8LMXR9zZJC4tJ7YHiTo4SvMgrPhufo2UtR5x9JAaCGDjEr7qWXFDPJk7vWL8eapQkS45Dx1kcb"
  ],
  "version":1,
  "assetId":"FN76goSi7hQn6gQ8aezKVwyDvhkWx5ekXbP3sNLWqavN",
  "minSponsoredAssetFee":10,
  "height":1130205
}

Version 1

Sponsor Fee Transaction Binary Format Version 1
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 14.
3Transaction versionversionByte1Value must be 1.
4Transaction type IDtypeByte1This field duplicates field 2.
5Transaction versionversionByte1This field duplicates field 3.
6Public key of the transaction sendersenderPublicKeyArray[Byte]32
7Token IDassetIdArray[Byte]32
8Minimal sponsored asset feeminSponsoredAssetFeeLong8Amount of sponsored asset that is equivalent to 0.001 DecentralCoins (100,000 Decentralites).
9Transaction feefeeLong8
10Transaction timestamptimestampLong8
11Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

The fields 4, 5, 6, 7, 8, 9 and 10 are the transaction body bytes.

Transfer Transaction Binary Format

Learn more about transfer transaction.

Version 3

message TransferTransactionData {
  Recipient recipient = 1;
  Amount amount = 2;
  bytes attachment = 3;
};

message Recipient {
  oneof recipient {
    bytes public_key_hash = 1;
    string alias = 2;
  };

message Amount {
  bytes asset_id = 1;
  int64 amount = 2;
};
Transfer Transaction Binary Format Version 3
FieldSizeDescription
recipient.public_key_hash20 bytesRecipient's account public key hash (a component of an address, see the address binary format article).
recipient.aliasFrom 4 to 30 bytesRecipient's alias.
amount.asset_id32 bytesID of token to transfer.
amount.amount8 bytesAmount of token to transfer, specified in the minimum fraction (“cents”).
attachmentUp to 140 bytesArbitrary data (typically a comment to transfer).

Version 2

Transfer Transaction Binary Format Version 2
#FieldJSON field nameField typeField size in bytesComment
1Version flagByte1Indicates the transaction version is 2 or higher. Value must be 0.
2Transaction type IDtypeByte1Value must be 4.
3Transaction versionversionByte1Value must be 2.
4Public key of the transaction sendersenderPublicKeyArray[Byte]32
5.1Transferring token type flagByte1Value is 0 for transferring DecentralCoins. Value is 1 for transferring other token.
5.2Transferring token IDassetIdArray[Byte]Smath:`S = 0` if the value of the flag 5.1 is 0. S = 32 if the value of the flag 5.1 is 1.
6.1Fee token type flagByte1Value is 0 for fee in DecentralCoins. Value is 1 for fee in other token.
6.2Fee token IDfeeAssetIdArray[Byte]SToken to pay the fee. S = 0 if the value of the flag 6.1 is 0. S = 32 if the value of the flag 6.1 field is 1.
7Transaction timestamptimestampLong8
8Amount of token in the transferamountLong8
9Transaction feefeeLong8
10Address or aliasrecipientSee address binary format, alias binary formatSIf the first byte of the field is 1, then it is followed by address. S in this case equals 26. If the first byte of the field is 2, then it is followed by alias. In this case 8 <= S <= 34
11.1Attachment lengthShort2
11.2AttachmentattachmentArray[Byte]Up to 140 bytesArbitrary data attached to the transaction.
12Transaction proofsproofsSee transaction proofs binary formatSIf the array is empty, then S = 3. If the array is not empty, then S = 3 + 2 × N + 64 × N, where N is the number of proofs in the array. The maximum number of proofs in the array is 8. The size of each proof is 64 bytes.

JSON Representation of Transaction

{
  "type":4,
  "id":"2UMEGNXwiRzyGykG8voDgxnwHA7w5aX5gmxdcf9DZZjL",
  "sender":"3PCeQD3nAyHmzDSYBUnSPDWf9qxqzVU2sjh",
  "senderPublicKey":"6kn1XPDh2XUjVAgznxNousHq3EnKKLx7BRWyJzVFU76J",
  "fee":100000,
  "feeAssetId":null,
  "timestamp":1583160322998,
  "proofs": [
    "2z5fnoigbsCBqRPWqTDeDmGJF6qJwnm2WLspen6c6qziTc73sBh9Kh81kPhUT9DGg7ANwqsXMxQauEvyw3RxNH7z"
  ],
  "version":2,
  "recipient":"3P45uRnyVygTnbEJNxc2CHLUiC4izQxbuuS",
  "assetId":"51LxAtwBXapvvTFSbbh4nLyWFxH6x8ocfNvrXxbTChze",
  "feeAsset":null,
  "amount":30077000000,
  "attachment":"2d6RhvQATwGbyv7dKT3L77758iJx",
  "height":1954598
}

Version 1

Transfer Transaction Binary Format Version 1
#FieldField typeField size in bytesComment
1Transaction type IDByte1Value must be 4.
2Transaction signatureArray[Byte]64
3Transaction type IDByte1This field duplicates field 1.
4Public key of the transaction senderArray[Byte]32
5.1Transferring token type flagByte1Value is 0 for transferring DecentralCoins. Value is 1 for transferring other token.
5.2Transferring token IDArray[Byte]SS = 0 if the value of the flag 5.1 is 0. S = 32 if the value of the flag 5.1 is 1.
6.1Fee token type flagByte1Value is 0 for fee in DecentralCoins. Value is 1 for fee in other token.
6.2Fee token IDArray[Byte]SToken to pay the fee. S = 0 if the value of the flag 6.1 is 0. S = 32 if the value of the flag 6.1 field is 1.
7Transaction timestampLong8
8Amount of token in the transferamountLong8
9Transaction feefeeLong8
10Address or aliasrecipientSee address binary format, alias binary formatS
11.1Attachment lengthShort2
11.2AttachmentattachmentArray[Byte]Up to 140 bytes.

Update Asset Info Transaction Binary Format

Learn more about update asset info transaction.

Version 1

message UpdateAssetInfoTransactionData {
  bytes asset_id = 1;
  string name = 2;
  string description = 3;
}
Update Asset Info Transaction Binary Format Version 1
FieldSizeDescription
asset_id32 bytesToken ID.
nameFrom 4 to 16 bytesToken name.
descriptionFrom 0 to 1000 bytesToken description.

Transaction Proofs Binary Format

Transaction Proofs Binary Format
#FieldTypeSize in bytesComment
1Proofs versionByte1Value is 1.
2Proofs countShort2
3Proof 1 lengthShort2Value is 64.
4Proofs 1Array[Byte]64
5Proof 2 lengthShort2
6Proof 2Array[Byte]64
...............

The maximum number of proofs is 8.

PreviousProtocol

Elsewhere on this site

Blockchain featuresarrowWhich protocol features are switched on, read from a mainnet node while you look at it.FinalityarrowHow far the tip can be reorganised, and what a confirmation policy can sit on.