# Sponsor Fee Transaction Binary Format
Learn more about sponsorship.
# Version 2
Binary format of version 2 is defined in transaction.proto (opens new window) protobuf scheme. The fields that are common to all types of transactions are described in the Transaction Binary Format article.
Version 2 is enabled by feature #15 “Ride V4, VRF, Protobuf, Failed transactions”.
message SponsorFeeTransactionData {
Amount min_fee = 1;
};
message Amount {
bytes asset_id = 1;
int64 amount = 2;
};
Field | Size | Description |
---|---|---|
min_fee.asset_id | 32 bytes | ID of asset |
min_fee.amount | 8 bytes | Amount of asset that is equivalent to 0.001 WAVES (100 000 WAVELET), specified in the minimum fraction (“cents”) of asset. See the Sponsored fee article |
# Version 1
# | Field | JSON field name | Field type | Field size in bytes | Comment |
---|---|---|---|---|---|
1 | Version flag | Byte | 1 | Indicates the transaction version is 2 or higher. Value must be 0 | |
2 | Transaction type ID | type | Byte | 1 | Value must be 14 |
3 | Transaction version | version | Byte | 1 | Value must be 1 |
4 | Transaction type ID | type | Byte | 1 | This field duplicates field 2 |
5 | Transaction version | version | Byte | 1 | This field duplicates field 3 |
6 | Public key of the transaction sender | senderPublicKey | Array[Byte] | 32 | |
7 | Token ID | assetId | Array[Byte] | 32 | |
8 | Minimal sponsored asset fee | minSponsoredAssetFee | Long | 8 | Amount of sponsored asset that is equivalent to 0.001 WAVES (100,000 WAVELET) |
9 | Transaction fee | fee | Long | 8 | |
10 | Transaction timestamp | timestamp | Long | 8 | |
11 | Transaction proofs | proofs | See Transaction Proofs Binary Format | S | If 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 numbered in bold are the transaction body bytes.
# JSON Representation of Transaction
See the example (opens new window) in Node API.