/** * Tokens Module * * Skills for managing BSV21 tokens. */ import { type WalletOutput } from "@bsv/sdk"; import type { Skill } from "../skills/types"; type PubKeyHex = string; export interface Bsv21Balance { /** Token protocol (bsv-20) */ p: string; /** Token ID (outpoint for BSV21, tick for BSV20) */ id: string; /** Token symbol */ sym?: string; /** Token icon URL */ icon?: string; /** Decimal places */ dec: number; /** Total amount (confirmed + pending) */ amt: string; /** Breakdown of confirmed vs pending */ all: { confirmed: bigint; pending: bigint; }; /** Listed amounts (if applicable) */ listed: { confirmed: bigint; pending: bigint; }; } export interface SendBsv21Request { /** Token ID (txid_vout format) */ tokenId: string; /** Amount to send (as bigint or string) */ amount: bigint | string; /** Recipient's identity public key (preferred) */ counterparty?: PubKeyHex; /** Legacy: raw P2PKH address */ address?: string; /** Paymail address */ paymail?: string; } export interface PurchaseBsv21Request { /** Token ID (txid_vout format of the deploy transaction) */ tokenId: string; /** Outpoint of listed token UTXO (OrdLock containing BSV21) */ outpoint: string; /** Amount of tokens in the listing */ amount: bigint | string; /** Optional marketplace fee address */ marketplaceAddress?: string; /** Optional marketplace fee rate (0-1) */ marketplaceRate?: number; } export interface TokenOperationResponse { txid?: string; rawtx?: string; error?: string; } /** Input for listTokens skill */ export interface ListTokensInput { /** Max number of tokens to return */ limit?: number; } /** * List BSV21 token outputs from the wallet. */ export declare const listTokens: Skill; /** Input for getBsv21Balances skill (no required params) */ export type GetBsv21BalancesInput = Record; /** * Get aggregated BSV21 token balances. */ export declare const getBsv21Balances: Skill; /** * Send BSV21 tokens to an address. */ export declare const sendBsv21: Skill; /** * Purchase BSV21 tokens from marketplace. */ export declare const purchaseBsv21: Skill; /** All token skills for registry */ export declare const tokensSkills: (Skill | Skill | Skill | Skill)[]; export {};