Token model
A custom token is identified by aTokenId derived from (issuer_did, token_name, creation_height). Token holders are indexed by DID.
Transactions
| Variant | Purpose |
|---|---|
CreateCustomToken | Register a new token with initial supply credited to the issuer. |
MintCustomToken | Mint additional supply (only if mintable = true). |
BurnCustomToken | Burn from the caller’s balance (only if burnable = true). |
TransferCustomToken | Move tokens between DIDs. |
Creation
Transfer
token/<token_id>/holder/<did> and indexed by token/by-holder/<did>/<token_id>.
Why not a contract
A native typed token is:- Uniform across wallets and explorers without per-contract integration code.
- Free of common bug classes (re-entry, integer overflow, ABI mismatch).
- Gas-free for transfers — only the flat fee-market cost applies.
- Indexed at the state-partition level for fast RPC reads.
Token discovery
| Method | Returns |
|---|---|
sigil_getCustomToken | Token record by token_id. |
sigil_listTokensByIssuer | All tokens issued by a DID. |
sigil_getTokenBalance | Balance of a token for a DID. |
sigil_listTokensByHolder | All tokens held by a DID. |
Limits
| Limit | Value |
|---|---|
| Name | 3–64 chars, [a-z0-9-] |
| Symbol | 1–8 chars, ASCII uppercase |
| Decimals | 0..=18 |
| Max supply | 2^128 − 1 |
Implementation
- Types:
node/sigil-core/src/custom_token.rs. - Executor:
node/sigil-node/src/executor_custom_token.rs. - RPC:
node/sigil-rpc/src/methods/custom_token.rs.
See also
- Build a token — recipe.
- Native DEX — trade custom tokens against MINT.
- Native NFTs — non-fungible siblings.