Skip to content

TokenId

TIP-20 token ID utilities for converting between token IDs and addresses.

TIP-20 is Tempo's native token standard for stablecoins with deterministic addresses derived from sequential token IDs. TIP-20 extends ERC-20 with payment features like configurable fee tokens, transfer memos, and built-in role-based access control.

TIP-20 Token Standard

Examples

import { TokenId } from 'ox/tempo'
 
const tokenId = TokenId.from(1n)
const address = TokenId.toAddress(1n)
// '0x20c0000000000000000000000000000000000001'

Functions

NameDescription
TokenId.fromConverts a token ID or address to a token ID.
TokenId.fromAddressConverts a TIP-20 token address to a token ID.
TokenId.toAddressConverts a TIP-20 token ID to an address.

Types

NameDescription
TokenId.TokenId
TokenId.TokenIdOrAddress