Skip to main content

User Token Partition Transaction Types

  • SystemID: 2
  • UnitID length: 32 bytes unit part + 1 byte type part
  • Valid type parts in UnitID and the corresponding unit types:
    • h'20' - fungible token type
    • h'21' - fungible token
    • h'22' - non-fungible token type
    • h'23' - non-fungible token
    • h'2f' - fee credit record
  • Hash algorithm: SHA-256

Create Non-Fungible Token Type

This transaction creates a non-fungible token type.

TransactionOrder.Payload.Type = "createNType"
TransactionOrder.Payload.Attributes contains:

/createNTypeAttributes/ [
/Symbol/ "symbol",
/Name/ "long name",
/Icon/ [/Type/ "image/png", /Data/ h''],
/ParentTypeID/ null,
/SubTypeCreationPredicate/ h'535101',
/TokenCreationPredicate/ h'5376A8014F01B327E2D37F0BFB6BABF6ACC758A101C6D8EB03991ABE7F137C62B253C5A5CFA08769AC01',
/InvariantPredicate/ h'535101',
/DataUpdatePredicate/ h'535101',
/SubTypeCreationPredicateSignatures/ [h'53']
]
  1. Symbol (text string) is the symbol (short name) of this token type. Symbols are not guaranteed to be unique.
  2. Name (text string) is the long name of this token type.
  3. Icon (array) is the icon of this token type. Consists of two data items:
    1. Type (text string) is the MIME content type of the image in Data.
    2. Data (byte string) is the image in the format specified by Type.
  4. ParentTypeID (byte string) is the UnitID of the parent type that this type derives from. null value indicates that there is no parent type.
  5. SubTypeCreationPredicate (byte string) is the predicate clause that controls defining new subtypes of this type.
  6. TokenCreationPredicate (byte string) is the predicate clause that controls creating new tokens of this type.
  7. InvariantPredicate (byte string) is the invariant predicate clause that all tokens of this type (and of subtypes) inherit into their owner predicate.
  8. DataUpdatePredicate (byte string) is the clause that all tokens of this type (and of subtypes) inherit into their data update predicates.
  9. SubTypeCreationPredicateSignatures (array of byte strings) is an array of inputs to satisfy the subtype creation predicates of all parents.

Create Non-Fungible Token

This transaction creates a new non-fungible token.

TransactionOrder.Payload.Type = "createNToken"
TransactionOrder.Payload.Attributes contains:

/createNTokenAttributes/ [
/OwnerPredicate/ h'',
/TypeID/ h'',
/Name/ "",
/URI/ "",
/Data/ h'',
/DataUpdatePredicate/ h'',
/TokenCreationPredicateSignatures/ [h'']
]
  1. OwnerPredicate (byte string) is the initial owner predicate of the new token.
  2. TypeID (byte string) is the UnitID of the type of the new token.
  3. Name (text string) is the name of the new token.
  4. URI (text string) is the optional URI of an external resource associated with the new token.
  5. Data (byte string) is the optional data associated with the new token.
  6. DataUpdatePredicate (byte string) is the data update predicate of the new token.
  7. TokenCreationPredicateSignatures (array of byte string) is an array of inputs to satisfy the token creation predicates of all parent types.

Transfer Non-Fungible Token

This transaction transfers a non-fungible token to a new owner. The token must not be in locked status.

TransactionOrder.Payload.Type = "transNToken"
TransactionOrder.Payload.Attributes contains:

/transNTokenAttributes/ [
/TargetOwner/ h'',
/Nonce/ h'',
/Backlink/ h'',
/TypeID/ h'',
/InvariantPredicateSignatures/ [h'']
]
  1. TargetOwner (byte string) is the new owner predicate of the token.
  2. Nonce (byte string) is an optional nonce.
  3. Backlink (byte string) is the backlink to the previous transaction with the token.
  4. TypeID (byte string) is the type of the token.
  5. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates down the inheritance chain.

Update Non-Fungible Token

This transaction updates the data of a non-fungible token. The token must not be in locked status.

TransactionOrder.Payload.Type = "updateNToken"
TransactionOrder.Payload.Attributes contains:

/updateNTokenAttributes/ [
/Data/ h'',
/Backlink/ h'',
/DataUpdateSignatures/ [h'']
]
  1. Data (byte string) is the new data to replace the data currently associated with the token.
  2. Backlink (byte string) is the backlink to the previous transaction with the token.
  3. DataUpdateSignatures (array of byte strings) is an array of inputs to satisfy the token data update predicates down the inheritance chain.

Create Fungible Token Type

This transaction creates a fungible token type.

TransactionOrder.Payload.Type = "createFType"
TransactionOrder.Payload.Attributes contains:

/createFTypeAttributes/ [
/Symbol/ "symbol",
/Name/ "long name",
/Icon/ [/Type/ "image/png", /Data/ h''],
/ParentTypeID/ null,
/DecimalPlaces/ 8,
/SubTypeCreationPredicate/ h'535101',
/TokenCreationPredicate/ h'5376A8014F01B327E2D37F0BFB6BABF6ACC758A101C6D8EB03991ABE7F137C62B253C5A5CFA08769AC01',
/InvariantPredicate/ h'535101',
/SubTypeCreationPredicateSignatures/ [h'53']
]
  1. Symbol (text string) is the symbol (short name) of this token type. Symbols are not guaranteed to be unique.
  2. Name (text string) is the long name of this token type.
  3. Icon (array) is the icon of this token type. Consists of two data items:
    1. Type (text string) is the MIME content type of the image in Data.
    2. Data (byte string) is the image in the format specified by Type.
  4. ParentTypeID (byte string) is the UnitID of the parent type that this type derives from. null value indicates that there is no parent type.
  5. DecimalPlaces (unsigned integer) is the number of decimal places to display for values of tokens of this type.
  6. SubTypeCreationPredicate (byte string) is the predicate clause that controls defining new subtypes of this type.
  7. TokenCreationPredicate (byte string) is the predicate clause that controls creating new tokens of this type.
  8. InvariantPredicate (byte string) is the invariant predicate clause that all tokens of this type (and of subtypes) inherit into their owner predicate.
  9. SubTypeCreationPredicateSignatures (array of byte strings) is an array of inputs to satisfy the subtype creation predicates of all parents.

Create Fungible Token

This transaction creates a new fungible token.

TransactionOrder.Payload.Type = "createFToken"
TransactionOrder.Payload.Attributes contains:

/createFTokenAttributes/ [
/TargetOwner/ h'',
/TypeID/ h'',
/TargetValue/ 1000,
/TokenCreationPredicateSignatures/ [h'']
]
  1. TargetOwner (byte string) is the initial owner predicate of the new token.
  2. TypeID (byte string) is the UnitID of the type of the new token.
  3. TargetValue (unsigned integer) is the value of the new token.
  4. TokenCreationPredicateSignatures (array of byte string) is an array of inputs to satisfy the token creation predicates of all parent types.

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.Payload.Type = "transFToken"
TransactionOrder.Payload.Attributes contains:

/transFTokenAttributes/ [
/TargetOwner/ h'',
/TargetValue/ 5,
/Nonce/ h'',
/Backlink/ h'',
/TypeID/ h'',
/InvariantPredicateSignatures/ [h'']
]
  1. TargetOwner (byte string) is the new owner predicate of the token.
  2. TargetValue (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.
  3. Nonce (byte string) is an optional nonce.
  4. Backlink (byte string) is the backlink to the previous transaction with the token.
  5. TypeID (byte string) is the type of the token.
  6. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates down the inheritance chain.

Split Fungible Token

This transaction splits a fungible token in two, creating a new fungible token with a new owner predicate (TargetOwner) and value (TargetValue). The value of the token being split is reduced by the value of the new token and is specified in the RemainingValue attribute. The sum of TargetValue and RemainingValue must be equal to the value of the token before the split. The token must not be in locked status.

TransactionOrder.Payload.Type = "splitFToken"
TransactionOrder.Payload.Attributes contains:

/splitFTokenAttributes/ [
/TargetOwner/ h'00',
/TargetValue/ 600,
/Nonce/ h'',
/Backlink/ h'',
/TypeID/ h'',
/RemainingValue/ 400,
/InvariantPredicateSignatures/ [h'53']
]
  1. TargetOwner (byte string) is the owner predicate of the new token.
  2. TargetValue (unsigned integer) is the value of the new token.
  3. Nonce (byte string) is an optional nonce.
  4. Backlink (byte string) is the backlink to the previous transaction with the token being split.
  5. TypeID (byte string) is the type of the token.
  6. RemainingValue (unsigned integer) is the remaining value of the token being split.
  7. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates down the inheritance chain.

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.Payload.Type = "burnFToken"
TransactionOrder.Payload.Attributes contains:

/burnFTokenAttributes/ [
/TypeID/ h'',
/Value/ 999,
/TargetTokenID/ h'',
/TargetTokenBacklink/ h'',
/Backlink/ h'',
/InvariantPredicateSignatures/ [h'']
]
  1. TypeID (byte string) is the type of the token.
  2. Value (unsigned integer) is the value of the token.
  3. TargetTokenID (byte string) is the token id of the target token that this burn is to be joined into.
  4. TargetTokenBacklink (byte string) is the backlink to the previous transaction with the fungible token that this burn is to be joined into.
  5. Backlink (byte string) is the backlink to the previous transaction with the token.
  6. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates down the inheritance chain.

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.Payload.Type = "joinFToken"
TransactionOrder.Payload.Attributes contains:

/joinFTokenAttributes/ [
/BurnTransactions/ [/omitted/],
/BurnTransactionProofs/ [/omitted/],
/Backlink/ h'',
/InvariantPredicateSignatures/ [h'']
]
  1. BurnTransactions (array) is an array of Burn Fungible Token transaction records. The transactions must be listed in strictly increasing order of token identifiers to ensure that no source token can be included multiple times.
  2. BurnTransactionProofs (array) is an array of Burn Fungible Token transaction proofs. The order of this array must match the order of BurnTransactions array, so that a transaction and its corresponding proof have the same index.
  3. Backlink (byte string) is the backlink to the previous transaction with the target token.
  4. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates down the inheritance chain.

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.Payload.Type = "lockToken"
TransactionOrder.Payload.Attributes contains:

/lockTokenAttributes/ [
/LockStatus/ 1,
/Backlink/ h'F4C65D760DA53F0F6D43E06EAD2AA6095CCF702A751286FA97EC958AFA085839',
/InvariantPredicateSignatures/ [h'']
]
  1. LockStatus (unsigned integer) is the status of the lock, must be non-zero value.
  2. Backlink (byte string) is the backlink to the previous transaction with the token.
  3. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates up the inheritance chain.

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.Payload.Type = "unlockToken"
TransactionOrder.Payload.Attributes contains:

/unlockTokenAttributes/ [
/Backlink/ h'F4C65D760DA53F0F6D43E06EAD2AA6095CCF702A751286FA97EC958AFA085839',
/InvariantPredicateSignatures/ [h'']
]
  1. Backlink (byte string) is the backlink to the previous transaction with the token.
  2. InvariantPredicateSignatures (array of byte strings) is an array of inputs to satisfy the token type invariant predicates up the inheritance chain.

Add Fee Credit

Same as the Add Fee Credit transaction in the Money Partition.

Close Fee Credit

Same as the Close Fee Credit transaction in the Money Partition.