Asset
Assets in Byteball can be issued, transferred, and exchanged, and.they behave similarly to the native currency ‘bytes’.
Arguments
cap
integrer
optional Is the total number of coins that can be issued (money supply). If omitted, the number is unlimited.is_private
boolean
required Indicates whether the asset is private (such as blackbytes) or publicly traceable (similar to bytes).is_transferrable
boolean
required Indicates whether the asset can be freely transferred among arbitrary parties or all transfers should involve the definer address as either sender or recipient. The latter can be useful e.g. for loyalty points that cannot be resold.auto_destroy
boolean
requiredIndicates whether the asset is destroyed when it is sent to the definer address.
fixed_denominations
boolean
requiredIndicates whether the asset exists as coins (banknotes) of a limited set of denominations, similar to blackbytes. If it is
true
, the definition must also include propertydenominations
, which is an array of all denominations and the number of coins of that denomination.denominations
array
optional Array of all denominations and the number of coins of that denomination.issued_by_definer_only
boolean
required Indicates whether the asset can be issued only by the definer address. Iffalse
, anyone can issue the asset, in this casecap
must be unlimited.cosigned_by_definer
boolean
required Indicates whether each operation with the asset must be cosigned by the definer address. Useful for regulated assets where the issuer (bank) wants to perform various compliance checks (such as the funds are not arrested by a court order) prior to approving a transaction.spender_attested
boolean
required Indicates whether the spender of the asset must be attested by one of approved attestors. Also useful for regulated assets e.g. to limit the access to the asset only to KYC'ed users. Iftrue
, the definition must also include the list of approved attestor addresses.attestors
array
optional List of approved attestor addressesissue_condition
array
optional Specify the restrictions when the asset can be issued. It evaluate to a boolean and are coded in the same smart contract language as address definitions.transfer_condition
array
optional Specify the restrictions when the asset can be transferred. It evaluate to a boolean and are coded in the same smart contract language as address definitions.
Returns
Returns the unit hash.
Example
Learn more
"24. Assets" (page 33) https://byteball.org/Byteball.pdf
Issuing assets on Byteball: https://github.com/byteball/byteballcore/wiki/Issuing-assets-on-Byteball
Smart contracts: https://github.com/byteball/byteballcore/wiki/Smart-contracts
Byteball Wiki: https://wiki.byteball.org/Asset
Byteball Market: https://byteball.market
Last updated