@arklabs/wallet-sdk
Version:
Bitcoin wallet SDK with Taproot and Ark integration
33 lines (32 loc) • 958 B
TypeScript
import { Transaction } from "@scure/btc-signer";
import { RelativeTimelock } from "../script/tapscript";
export interface TreeNode {
txid: string;
tx: string;
parentTxid: string;
leaf: boolean;
}
export declare class TxTreeError extends Error {
constructor(message: string);
}
export declare const ErrLeafNotFound: TxTreeError;
export declare const ErrParentNotFound: TxTreeError;
export declare class TxTree {
private tree;
constructor(tree: TreeNode[][]);
get levels(): TreeNode[][];
root(): TreeNode;
leaves(): TreeNode[];
children(nodeTxid: string): TreeNode[];
numberOfNodes(): number;
branch(vtxoTxid: string): TreeNode[];
private findParent;
validate(): void;
}
export declare function getVtxoTreeExpiry(input: {
unknown?: {
key: Uint8Array;
value: Uint8Array;
}[];
}): RelativeTimelock | null;
export declare function getCosignerKeys(tx: Transaction): Uint8Array[];