UNPKG

ecash-lib

Version:

Library for eCash transaction building

55 lines 1.99 kB
import { AlpTokenType } from './alp.js'; import { SlpTokenType } from './slp.js'; /** GENESIS tx type: Creates a new token ID */ export declare const GENESIS_STR = "GENESIS"; export declare const GENESIS: Uint8Array; /** MINT tx type: Mints more of a token ID */ export declare const MINT_STR = "MINT"; export declare const MINT: Uint8Array; /** SEND tx type: Moves existing tokens to different outputs */ export declare const SEND_STR = "SEND"; export declare const SEND: Uint8Array; /** BURN tx type: Destroys existing tokens */ export declare const BURN_STR = "BURN"; export declare const BURN: Uint8Array; /** * UNKNOWN: Placeholder for unknown token types. * Note: These may hold valuable tokens, but which aren't recognized. * They should be excluded from UTXO selection. **/ export declare const UNKNOWN_STR = "UNKNOWN"; /** Number of bytes in a token ID */ export declare const TOKEN_ID_NUM_BYTES = 32; /** How many decimals a token can have at most (SLP/ALP) */ export declare const MAX_DECIMALS = 9; /** Genesis info found in GENESIS txs of tokens */ export interface GenesisInfo { /** token_ticker of the token */ tokenTicker?: string; /** token_name of the token */ tokenName?: string; /** URL of the token */ url?: string; /** token_document_hash of the token (only on SLP) */ hash?: string; /** mint_vault_scripthash (only on SLP V2 Mint Vault) */ mintVaultScripthash?: string; /** Arbitray payload data of the token (only on ALP) */ data?: string; /** auth_pubkey of the token (only on ALP) */ authPubkey?: string; /** decimals of the token, i.e. how many decimal places the token should be displayed with. */ decimals?: number; } /** * SLP/ALP token type. * * See `TokenType` in chronik-client. */ export type TokenType = SlpTokenType | AlpTokenType | UnknownTokenType; export interface UnknownTokenType { protocol: 'UNKNOWN'; type: 'UNKNOWN'; number: 0; } //# sourceMappingURL=common.d.ts.map