You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/guides/cashtokens.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ CashTokens are native tokens on Bitcoin Cash, meaning that they are validated by
7
7
CashTokens was first proposed in February of 2022 and actived on Bitcoin Cash mainchain in May of 2023.
8
8
9
9
:::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).
11
11
:::
12
12
13
13
## CashTokens Utxo data
@@ -32,7 +32,15 @@ interface TokenDetails {
32
32
}
33
33
```
34
34
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
+
:::
36
44
37
45
## CashTokens introspection data
38
46
While CashTokens might seem overwhelming at first, realize that in contracts you will only use it through the following introspection details
0 commit comments