TSB-P Token Scanner Documentation

Overview

The TSB-P Token Scanner is a tool for discovering and exploring programmable Bitcoin tokens embedded directly within Taproot script paths. These tokens follow the TSB-P protocol, enabling fully Bitcoin-native tokens with metadata, timestamps, and programmable attributes.

Token Format

TSB-P tokens are encoded inside the witness data of Bitcoin transactions via a Taproot script path. The encoding follows this programmable format:

    OP_TRUE
    OP_IF
      03 "TSB"                      # TSB marker (3 bytes)
      10 [token ID]                 # Token ID (16 bytes)
      08 [amount]                   # Amount (8 bytes, big endian)
      01 [typeCode]                 # Type Code (1 byte)
      OP_DROP
      OP_DROP
      OP_DROP
      OP_DROP
      [metadata]                    # Metadata (variable length)
      08 [timestamp]                # Timestamp (8 bytes, big endian)
      OP_DROP
      OP_DROP
      OP_TRUE
    OP_ENDIF
  

Field Descriptions:

Token Type Codes

Each token has a typeCode indicating its purpose:

TypeCode Meaning
0Fungible Token (FT)
1Non-Fungible Token (NFT)
2Proof-of-Existence Token (PoE)
3Smart Contract Trigger Token
4Oracle-Verified Token
5Compliance-Bound Token (KYC/AML)
6Vesting Token (timelocked tokens)
7Multi-Sig Restricted Token
8DAO Governance Token
9Fee Payment Token (for protocol usage)
10Wrapped Asset Token (cross-chain)
11Cross-Chain Bridge Token
12Royalty Token (revenue shares)
13Subscription Access Token
14Identity Token (KYC / verifiable claims)
15Treasury Reserve Token (DAO reserve)

Note: If a token's typeCode is not assigned (outside 0-15), it will be displayed as "Unknown Type (XX)".

API Endpoints

GET /api/tokens

Returns a list of all TSB-P tokens found in the blockchain.

Query Parameters:

Example: /api/tokens

GET /api/token/:txid

Returns detailed information about a specific token by its transaction ID.

Parameters:

Example: /api/token/4fef74...ccc59

GET /api/status

Returns status and connection information about the Bitcoin node used by the scanner.

Example: /api/status