@arklabs/wallet-sdk
Version:
Bitcoin wallet SDK with Taproot and Ark integration
27 lines (26 loc) • 840 B
TypeScript
import { BTC_NETWORK, Bytes } from "@scure/btc-signer/utils";
import { ArkAddress } from "./address";
export type TapLeafScript = [
{
version: number;
internalKey: Bytes;
merklePath: Bytes[];
},
Bytes
];
export declare function scriptFromTapLeafScript(leaf: TapLeafScript): Bytes;
export declare class VtxoScript {
readonly scripts: Bytes[];
readonly leaves: TapLeafScript[];
readonly tweakedPublicKey: Bytes;
static decode(scripts: string[]): VtxoScript;
constructor(scripts: Bytes[]);
encode(): string[];
address(prefix: string, serverPubKey: Bytes): ArkAddress;
get pkScript(): Bytes;
onchainAddress(network: BTC_NETWORK): string;
findLeaf(scriptHex: string): TapLeafScript;
}
export type EncodedVtxoScript = {
scripts: ReturnType<VtxoScript["encode"]>;
};