State
Resources as atomic units of state and can be used to model all kinds of objects such as fruits π, currencies π΅, messages π or anything else you might think of. The underlying resource object contains standardized data fields, which are defined in the Anoma specs. While all fields are needed for the Anoma Resource Machine the label, quantity, and value field are particularly relevant for application developers.
10βπ΅ββ{owner:βAlice}
2βπβ{fruitiness:β8/10}
1βπβ{text:β"Iββ€οΈβu"}
10 USD
resource
2 Apple
resource
1 Message
Resource
Label
The label can contain arbitrary data describing the resource and determining its kind. Examples for label data are the name and symbol of a currency, the species of an apple, or a message associated with a specific channel in a messaging application.
Value
The value field can contain arbitrary data associated with this specific resource. Examples for value data are information about the owner, the fruitiness of a fruit, or the text in a message. The difference to the label field is that this data is not influencing the resource kind.
Quantity
The quantity indicates the number of units that the resource represents. In practice, resources are often split and joined. For example, Alice owning a 10 USD resource might want to give 4 USD to pay someone and keep the remaining 6 for herself. In some cases, only one resource instance should ever exist (e.g., for a message or an NFT).
Last updated