UNPKG

micro-ordinals

Version:

Manage ordinals, inscriptions and runes using scure-btc-signer

49 lines 1.73 kB
import { type Coder } from '@scure/base'; import { type CustomScript, type OptScript, type ScriptType } from '@scure/btc-signer'; import * as P from 'micro-packed'; type Bytes = Uint8Array; export declare const InscriptionId: P.Coder<string, Bytes>; export type TagCodersType = { pointer: P.CoderType<bigint>; contentType: P.CoderType<string>; parent: P.Coder<string, Uint8Array>; metadata: P.CoderType<any>; metaprotocol: P.CoderType<string>; contentEncoding: P.CoderType<string>; delegate: P.Coder<string, Uint8Array>; rune: P.CoderType<bigint>; note: P.CoderType<string>; }; declare const TagCoders: TagCodersType; export type Tags = Partial<{ [K in keyof typeof TagCoders]: P.UnwrapCoder<(typeof TagCoders)[K]>; }> & { unknown?: [Bytes, Bytes][]; }; export type Inscription = { tags: Tags; body: Bytes; cursed?: boolean; }; type OutOrdinalRevealType = { type: 'tr_ord_reveal'; pubkey: Bytes; inscriptions: Inscription[]; }; export declare function parseInscriptions(script: ScriptType, strict?: boolean): Inscription[] | undefined; /** * Parse inscriptions from reveal tx input witness (tx.inputs[0].finalScriptWitness) */ export declare function parseWitness(witness: Bytes[]): Inscription[] | undefined; export declare const OutOrdinalReveal: Coder<OptScript, OutOrdinalRevealType | undefined> & CustomScript; /** * Create reveal transaction. Inscription created on spending output from this address by * revealing taproot script. */ export declare function p2tr_ord_reveal(pubkey: Bytes, inscriptions: Inscription[]): { type: 'tr'; script: Uint8Array; }; export declare const __test__: any; export {}; //# sourceMappingURL=index.d.ts.map