Skip to content

Commit af40acf

Browse files
committed
add to cashtokens guide
1 parent 8a32f2c commit af40acf

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

website/docs/guides/cashtokens.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CashTokens are native tokens on Bitcoin Cash, meaning that they are validated by
77
CashTokens was first proposed in February of 2022 and actived on Bitcoin Cash mainchain in May of 2023.
88

99
:::tip
10-
The specification for CashTokens is the ['CHIP-2022-02-CashTokens: Token Primitives for Bitcoin '](https://github.com/cashtokens/cashtokens) document.
10+
You can read more about CashTokens on [cashtokens.org](https://cashtokens.org/) or can refer to the original specification document: ['CHIP-2022-02-CashTokens: Token Primitives for Bitcoin '](https://github.com/cashtokens/cashtokens).
1111
:::
1212

1313
## CashTokens Utxo data
@@ -32,7 +32,15 @@ interface TokenDetails {
3232
}
3333
```
3434

35-
Note that a UTXO can hold both an `amount` of fungible tokens as well as an `nft`, as long as both have the same `category` (also reffered to as "tokenId").
35+
The `amount` field is the amount of fungible tokens on the UTXO, the `category` is the "tokenId" for the token on the UTXO.
36+
Next we have the optional `nft` object, which will only be present if the UTXO contains an NFT.
37+
The `nft` object has 2 properties: the `capability` and the `commitment`. The `commitment` is the data field for the NFT.
38+
Capability `none` then refers to an immutible NFT where the commitment cannot be changes. The `mutable` capability means the `commitment` field can change over time, usually to contain smart contract state. Lastly the `minting` capability means that the NFT can create new NFTs from the same `category`.
39+
40+
:::note
41+
A UTXO can hold both an `amount` of fungible tokens as well as an `nft`, as long as both tokens have the same `category`.
42+
This is quite a common pattern for covenants which want to hold contract state and fungible tokens on the same UTXO.
43+
:::
3644

3745
## CashTokens introspection data
3846
While CashTokens might seem overwhelming at first, realize that in contracts you will only use it through the following introspection details

0 commit comments

Comments
 (0)