Opcodes · token · enabled

OP_UTXOTOKENCATEGORY (0xce)

Pushes the token category of the UTXO spent by input i, with a capability byte appended for mutable (0x01) or minting (0x02) NFTs. Pushes 0 if the UTXO holds no tokens.

Verified
Stack in → out
i → category[+cap] | 0
Cost
Base instruction cost 100 plus the byte length of the pushed result (2025 VM limits).
Bitcoin status
Not in Bitcoin (BTC)BTC has no native tokens. In Tapscript (BIP-342) this byte is an OP_SUCCESSx code reserved for future soft forks.

Example

OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_0 OP_OUTPUTTOKENCATEGORY OP_EQUAL

Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.

Sources

  1. CHIP-2022-02 CashTokens: Token Primitives for Bitcoin Cash
  2. Libauth BCH_2023_05 opcodes (bch-2023-opcodes.ts)