/** * Ordinals Module * * Skills for managing ordinals/inscriptions. * Returns WalletOutput[] directly from the SDK - no custom mapping needed. */ import { type CreateActionArgs, type WalletOutput } from "@bsv/sdk"; import type { OneSatContext, Skill } from "../skills/types"; type PubKeyHex = string; export interface TransferItem { /** The ordinal output to transfer (from listOutputs) */ ordinal: WalletOutput; /** Recipient's identity public key (preferred) */ counterparty?: PubKeyHex; /** Raw P2PKH address */ address?: string; } export interface TransferOrdinalsRequest { /** Ordinals to transfer with their destinations */ transfers: TransferItem[]; /** BEEF data from listOutputs (include: 'entire transactions') */ inputBEEF: number[]; } export interface ListOrdinalRequest { /** The ordinal output to list (from listOutputs) */ ordinal: WalletOutput; /** BEEF data from listOutputs (include: 'entire transactions') */ inputBEEF: number[]; /** Price in satoshis */ price: number; /** Address that receives payment on purchase (BRC-29 receive address) */ payAddress: string; } export interface PurchaseOrdinalRequest { /** Outpoint of listing to purchase */ outpoint: string; /** Marketplace address for fees */ marketplaceAddress?: string; /** Marketplace fee rate (0-1) */ marketplaceRate?: number; /** Optional content type - looked up from ordfs API if not provided */ contentType?: string; /** Optional origin outpoint - looked up from ordfs API if not provided */ origin?: string; /** Optional name from MAP metadata - looked up from ordfs API if not provided */ name?: string; } export interface OrdinalOperationResponse { txid?: string; rawtx?: string; error?: string; } /** * Build CreateActionArgs for transferring one or more ordinals. * Does NOT execute - returns params for createAction. */ export declare function buildTransferOrdinals(ctx: OneSatContext, request: TransferOrdinalsRequest): Promise; /** * Build CreateActionArgs for listing an ordinal for sale. * Does NOT execute - returns params for createAction. */ export declare function buildListOrdinal(ctx: OneSatContext, request: ListOrdinalRequest): Promise; /** Input for getOrdinals skill */ export interface GetOrdinalsInput { /** Max number of ordinals to return */ limit?: number; /** Offset for pagination */ offset?: number; } /** Result from getOrdinals skill */ export interface GetOrdinalsResult { outputs: WalletOutput[]; BEEF?: number[]; } /** * Get ordinals from the wallet with BEEF for spending. */ export declare const getOrdinals: Skill; /** Input for deriveCancelAddress skill */ export interface DeriveCancelAddressInput { /** Outpoint of the ordinal listing */ outpoint: string; } /** * Derive a cancel address for an ordinal listing. */ export declare const deriveCancelAddress: Skill; /** * Transfer an ordinal to a new owner. */ export declare const transferOrdinals: Skill; /** * List an ordinal for sale on the global orderbook. */ export declare const listOrdinal: Skill; /** Input for cancelListing skill */ export interface CancelListingInput { /** The listing output to cancel (from listOutputs, must include lockingScript) */ listing: WalletOutput; /** BEEF data from listOutputs (include: 'entire transactions') */ inputBEEF: number[]; } /** * Cancel an ordinal listing. */ export declare const cancelListing: Skill; /** * Purchase an ordinal from the global orderbook. */ export declare const purchaseOrdinal: Skill; /** All ordinals skills for registry */ export declare const ordinalsSkills: (Skill | Skill | Skill | Skill | Skill | Skill)[]; export {};