User Token Partition Transaction Types
PartitionID
: 2UnitID
length: 32 bytes unit part + 1 byte type part- Valid type parts in
UnitID
and the corresponding unit types:h'01'
- fungible token typeh'02'
- non-fungible token typeh'03'
- fungible tokenh'04'
- non-fungible tokenh'10'
- fee credit record
- Hash algorithm: SHA-256
Auth Proofs
Auth Proofs are defined separately for each transaction type, similarly to attributes.
Define Non-Fungible Token Type
This transaction creates a non-fungible token type.
TransactionOrder.Type
= 2
TransactionOrder.Attributes
contains:
/DefineNonFungibleTokenAttributes/ [
/Symbol/ "symbol",
/Name/ "long name",
/Icon/ [/Type/ "image/png", /Data/ h''],
/ParentTypeID/ null,
/SubTypeCreationPredicate/ h'535101',
/TokenMintingPredicate/ h'5376A8014F01B327E2D37F0BFB6BABF6ACC758A101C6D8EB03991ABE7F137C62B253C5A5CFA08769AC01',
/TokenTypeOwnerPredicate/ h'535101',
/DataUpdatePredicate/ h'535101',
]
Symbol
(text string) is the symbol (short name) of this token type. Symbols are not guaranteed to be unique.Name
(text string) is the long name of this token type.Icon
(array) is the icon of this token type. Consists of two data items:Type
(text string) is the MIME content type of the image inData
.Data
(byte string) is the image in the format specified byType
.
ParentTypeID
(byte string) is theUnitID
of the parent type that this type derives from.null
value indicates that there is no parent type.SubTypeCreationPredicate
(byte string) is the predicate clause that controls defining new subtypes of this type.TokenMintingPredicate
(byte string) is the predicate clause that controls minting new tokens of this type.TokenTypeOwnerPredicate
(byte string) is the predicate clause that all tokens of this type (and of subtypes) inherit into their owner predicates.DataUpdatePredicate
(byte string) is the clause that all tokens of this type (and of subtypes) inherit into their data update predicates.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/SubTypeCreationProofs/ [h'53'],
],
SubTypeCreationProofs
(array of byte strings) is an array of inputs to satisfy the subtype creation predicates of all parents.
Mint Non-Fungible Token
This transaction creates a new non-fungible token.
TransactionOrder.Type
= 4
TransactionOrder.Attributes
contains:
/MintNonFungibleTokenAttributes/ [
/TypeID/ h'',
/Name/ "",
/URI/ "",
/Data/ h'',
/OwnerPredicate/ h'',
/DataUpdatePredicate/ h'',
/Nonce/ 0,
]
TypeID
(byte string) is theUnitID
of the type of the new token.Name
(text string) is the name of the new token.URI
(text string) is the optional URI of an external resource associated with the new token.Data
(byte string) is the optional data associated with the new token.OwnerPredicate
(byte string) is the initial owner predicate of the new token.DataUpdatePredicate
(byte string) is the data update predicate of the new token.Nonce
(unsigned integer) optional nonce.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/TokenMintingProof/ [h'53'],
],
TokenMintingProof
(byte string) is an input to satisfy the token minting predicate of the token type.
Transfer Non-Fungible Token
This transaction transfers a non-fungible token to a new owner. The token must not be in locked status.
TransactionOrder.Type
= 6
TransactionOrder.Attributes
contains:
/TransferNonFungibleTokenAttributes/ [
/TypeID/ h'',
/NewOwnerPredicate/ h'',
/Counter/ 0,
]
TypeID
(byte string) is the type of the token.NewOwnerPredicate
(byte string) is the new owner predicate of the token.Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
/TokenTypeOwnerProofs/ [h'53'],
],
OwnerProof
(byte string) is an input to satisfy the owner predicate of the target token.TokenTypeOwnerProofs
(array of byte strings) is an array of inputs to satisfy the owner predicates of all parent token types.
Update Non-Fungible Token
This transaction updates the data of a non-fungible token. The token must not be in locked status.
TransactionOrder.Type
= 12
TransactionOrder.Attributes
contains:
/UpdateNonFungibleTokenAttributes/ [
/Data/ h'',
/Counter/ 0,
]
Data
(byte string) is the new data to replace the data currently associated with the token.Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/TokenDataUpdateProof/ h'53',
/TokenTypeDataUpdateProofs/ [h'53'],
],
TokenDataUpdateProof
(byte string) is an input to satisfy the token's data update predicate.TokenTypeDataUpdateProofs
(array of byte strings) is an array of inputs to satisfy the data update predicates of all parent types.
Define Fungible Token Type
This transaction creates a fungible token type.
TransactionOrder.Type
= 1
TransactionOrder.Attributes
contains:
/DefineFungibleTokenAttributes/ [
/Symbol/ "symbol",
/Name/ "long name",
/Icon/ [/Type/ "image/png", /Data/ h''],
/ParentTypeID/ null,
/DecimalPlaces/ 8,
/SubTypeCreationPredicate/ h'535101',
/TokenMintingPredicate/ h'5376A8014F01B327E2D37F0BFB6BABF6ACC758A101C6D8EB03991ABE7F137C62B253C5A5CFA08769AC01',
/TokenTypeOwnerPredicate/ h'535101',
]
Symbol
(text string) is the symbol (short name) of this token type. Symbols are not guaranteed to be unique.Name
(text string) is the long name of this token type.Icon
(array) is the icon of this token type. Consists of two data items:Type
(text string) is the MIME content type of the image inData
.Data
(byte string) is the image in the format specified byType
.
ParentTypeID
(byte string) is theUnitID
of the parent type that this type derives from.null
value indicates that there is no parent type.DecimalPlaces
(unsigned integer) is the number of decimal places to display for values of tokens of this type.SubTypeCreationPredicate
(byte string) is the predicate clause that controls defining new subtypes of this type.TokenMintingPredicate
(byte string) is the predicate clause that controls minting new tokens of this type.TokenTypeOwnerPredicate
(byte string) is the predicate clause that all tokens of this type (and of subtypes) inherit into their owner predicates.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/SubTypeCreationProofs/ [h'53'],
],
SubTypeCreationProofs
(array of byte strings) is an array of inputs to satisfy the subtype creation predicates of all parent types.
Mint Fungible Token
This transaction creates a new fungible token.
TransactionOrder.Type
= 3
TransactionOrder.Attributes
contains:
/MintFungibleTokenAttributes/ [
/TypeID/ h'',
/Value/ 1000,
/OwnerPredicate/ h'',
/Nonce/ 0,
]
TypeID
(byte string) is theUnitID
of the type of the new token.Value
(unsigned integer) is the value of the new token.OwnerPredicate
(byte string) is the initial owner predicate of the new token.Nonce
(unsigned integer) optional nonce.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/TokenMintingProof/ [h'53'],
],
TokenMintingProof
(byte string) is an input to satisfy the token minting predicate of the token type.
Transfer Fungible Token
This transaction transfers a fungible token to a new owner. The value of the transferred token is unchanged. The token must not be in locked status.
TransactionOrder.Type
= 5
TransactionOrder.Attributes
contains:
/TransferFungibleTokenAttributes/ [
/TypeID/ h'',
/Value/ 5,
/NewOwnerPredicate/ h'',
/Counter/ 0,
]
TypeID
(byte string) is the type of the token.Value
(unsigned integer) must be equal to the value of the token. The reason for including the value of the token in the transaction order is to enable the recipient of the transaction to learn the received amount without having to look up the token.NewOwnerPredicate
(byte string) is the new owner predicate of the token.Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
/TokenTypeOwnerProofs/ [h'53'],
],
OwnerProof
(byte string) is an input to satisfy the owner predicate of the target token.TokenTypeOwnerProofs
(array of byte strings) is an array of inputs to satisfy the owner predicates of all parent token types.
Split Fungible Token
This transaction splits a fungible token in two, creating a new fungible token with a new owner predicate (NewOwnerPredicate
) and value (TargetValue
). The value of the token being split is reduced by the value of the new token. The token must not be in locked status.
TransactionOrder.Type
= 9
TransactionOrder.Attributes
contains:
/SplitFungibleTokenAttributes/ [
/TypeID/ h'',
/TargetValue/ 600,
/NewOwnerPredicate/ h'00',
/Counter/ 0,
]
TypeID
(byte string) is the type of the token.TargetValue
(unsigned integer) is the value of the new token.NewOwnerPredicate
(byte string) is the owner predicate of the new token.Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
/TokenTypeOwnerProofs/ [h'53'],
],
OwnerProof
(byte string) is an input to satisfy the owner predicate of the target token.TokenTypeOwnerProofs
(array of byte strings) is an array of inputs to satisfy the owner predicates of all parent token types.
Burn Fungible Token
This transaction "burns" (deletes) a fungible token to be later joined into a larger-value fungible token with the Join Fungible Token transaction. The token must not be in locked status.
TransactionOrder.Type
= 10
TransactionOrder.Attributes
contains:
/BurnFungibleTokenAttributes/ [
/TypeID/ h'',
/Value/ 999,
/TargetTokenID/ h'',
/TargetTokenCounter/ 0,
/Counter/ 0,
]
TypeID
(byte string) is the type of the token.Value
(unsigned integer) is the value of the token.TargetTokenID
(byte string) is the token id of the target token that this burn is to be joined into.TargetTokenCounter
(unsigned integer) is the current counter value of the fungible token that this burn is to be joined into.Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
/TokenTypeOwnerProofs/ [h'53'],
],
OwnerProof
(byte string) is an input to satisfy the owner predicate of the target token.TokenTypeOwnerProofs
(array of byte strings) is an array of inputs to satisfy the owner predicates of all parent token types.
Join Fungible Tokens
This transaction joins the values of burned tokens into a target token of the same type. The target token is unlocked automatically if it was in locked status.
TransactionOrder.Type
= 11
TransactionOrder.Attributes
contains:
/JoinFungibleTokenAttributes/ [
/BurnTokenProofs/ [/TransactionRecordProof/],
]
BurnTokenProofs
(array) is an array of pairs of Burn Fungible Token transaction proofs and records, that is, the response fromstate_getTransactionProof
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
/TokenTypeOwnerProofs/ [h'53'],
],
OwnerProof
(byte string) is an input to satisfy the owner predicate of the target token.TokenTypeOwnerProofs
(array of byte strings) is an array of inputs to satisfy the owner predicates of all parent token types.
Lock Token
This transaction locks the specified token. Locked non-fungible tokens cannot be transferred or updated. Locked fungible tokens cannot be transferred, split or burned. Unlocking can happen manually with the Unlock Token transaction or automatically with the Join Fungible Token transaction for fungible tokens.
Locking of the tokens is optional. However, it is recommended to lock the target fungible token while joining is in progress, to prevent other transactions from changing its state and thus making the final join transaction fail. The specified lock status must be non-zero value and the targeted token must be unlocked.
TransactionOrder.Type
= 7
TransactionOrder.Attributes
contains:
/LockTokenAttributes/ [
/LockStatus/ 1,
/Counter/ 0,
]
LockStatus
(unsigned integer) is the status of the lock, must be non-zero value.Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
],
OwnerProof
(byte string) is an input to satisfy the fee credit record owner predicate.
Unlock Token
This transaction unlocks the specified token. Unlocking can also happen automatically when joining fungible tokens. The targeted token must be in locked status.
TransactionOrder.Type
= 8
TransactionOrder.Attributes
contains:
/UnlockTokenAttributes/ [
/Counter/ 0,
]
Counter
(unsigned integer) is the current counter value of this token.
TransactionOrder.AuthProof
contains:
/AuthProof/ [
/OwnerProof/ h'8258411937fea58c74c534cd389ebb36ce9dde86a4dc04fabc3afa16e7a8ed78bf826b5fe47070f5d37ee319e9f027fe71ef28cc9d0dce86093e38a4cb5209cb3c554900582103c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3',
],
OwnerProof
(byte string) is an input to satisfy the fee credit record owner predicate.
Add Fee Credit
See Add Fee Credit transaction.
Close Fee Credit
See Close Fee Credit transaction.
Lock Fee Credit
See Lock Fee Credit transaction.
Unlock Fee Credit
See Unlock Fee Credit transaction.