import * as core from '@bitcoinerlab/descriptors-core'; import { createBitcoinjsLib } from '@bitcoinerlab/descriptors-core/bitcoinjs'; import * as ecc from '@bitcoinerlab/secp256k1'; import { Psbt } from 'bitcoinjs-lib'; import type { LedgerManager as StrictLedgerManager, LedgerState as StrictLedgerState } from './ledger'; export type { Expansion, ExpansionMap, KeyExpressionParser, KeyInfo, Preimage, TimeConstraints, TreeNode, TapTreeNode, TapTreeInfoNode, TapLeaf, TapLeafInfo, OutputInstance, OutputConstructor, Network } from '@bitcoinerlab/descriptors-core'; export { networks, checksum, keyExpressionBIP32 } from '@bitcoinerlab/descriptors-core'; export { createBitcoinjsLib, ecc, Psbt }; type BitcoinLib = Parameters[0]; type Ecc = Parameters[0]; type Bound = ReturnType; type LedgerModule = typeof import('./ledger'); type CompatLedgerParams = Fn extends (params: infer Params) => unknown ? Omit & { ledgerManager: LedgerManager; } : never; /** @deprecated Use `LedgerState` from `@bitcoinerlab/descriptors/ledger`. */ export type LedgerState = StrictLedgerState; /** * @deprecated Use `LedgerManager` from `@bitcoinerlab/descriptors/ledger`. * The root-package type remains only for backwards compatibility with the * legacy `ledgerManager.ecc` shortcut. */ export type LedgerManager = StrictLedgerManager | (Omit & { Output?: Bound['Output']; ecc: Ecc; }); /** * @deprecated Kept only for 3.x backwards compatibility. This root-package * `DescriptorsFactory` API is planned to disappear in the next major release. */ export declare function DescriptorsFactory(): Bound; /** * @deprecated Kept only for 3.x backwards compatibility. This root-package * `DescriptorsFactory` API is planned to disappear in the next major release. */ export declare function DescriptorsFactory(ecc: Ecc): Bound; /** * @deprecated Kept only for 3.x backwards compatibility. This root-package * `DescriptorsFactory` API is planned to disappear in the next major release. */ export declare function DescriptorsFactory(bitcoinLib: BitcoinLib): Bound; /** * Signer helpers. * * Ledger-related members on this root namespace are deprecated. * Use `@bitcoinerlab/descriptors/ledger` instead. */ export declare const signers: { signInputLedger: (params: CompatLedgerParams) => Promise; signLedger: (params: CompatLedgerParams) => Promise; signInputECPair({ psbt, index, ecpair }: { psbt: import("../../../dist/bitcoinLib").PsbtLike; index: number; ecpair: import("../../../dist/bitcoinLib").ECPairInterfaceLike; }): void; signECPair({ psbt, ecpair }: { psbt: import("../../../dist/bitcoinLib").PsbtLike; ecpair: import("../../../dist/bitcoinLib").ECPairInterfaceLike; }): void; signInputPrivKey({ psbt, index, privKey }: { psbt: import("../../../dist/bitcoinLib").ScureTransactionLike; index: number; privKey: Uint8Array; }): void; signPrivKey({ psbt, privKey }: { psbt: import("../../../dist/bitcoinLib").ScureTransactionLike; privKey: Uint8Array; }): void; signInputBIP32({ psbt, index, node }: { psbt: import("../../../dist/bitcoinLib").PsbtLike | import("../../../dist/bitcoinLib").ScureTransactionLike; index: number; node: import("../../../dist/bitcoinLib").BIP32InterfaceLike | import("../../../dist/bitcoinLib").ScureHDKeyLike; }): void; signBIP32({ psbt, masterNode }: { psbt: import("../../../dist/bitcoinLib").PsbtLike | import("../../../dist/bitcoinLib").ScureTransactionLike; masterNode: import("../../../dist/bitcoinLib").BIP32InterfaceLike | import("../../../dist/bitcoinLib").ScureHDKeyLike; }): void; }; /** * @deprecated Use `keyExpressionLedger` from `@bitcoinerlab/descriptors/ledger`. */ export declare const keyExpressionLedger: (params: CompatLedgerParams) => Promise; /** * Script-expression helpers. * * Ledger-related members on this root namespace are deprecated. * Use `@bitcoinerlab/descriptors/ledger` instead. */ export declare const scriptExpressions: { pkhLedger: (params: CompatLedgerParams) => Promise; shWpkhLedger: (params: CompatLedgerParams) => Promise; wpkhLedger: (params: CompatLedgerParams) => Promise; trLedger: (params: CompatLedgerParams) => Promise; assertStandardKeyPath(keyPath: string): void; pkhBIP32: ({ masterNode, network, keyPath, account, change, index, isPublic }: { masterNode: import("../../../dist/bitcoinLib").BIP32InterfaceLike | import("../../../dist/bitcoinLib").ScureHDKeyLike; network?: core.Network; account: number; change?: number | undefined; index?: number | undefined | "*"; keyPath?: string; isPublic?: boolean; }) => string; shWpkhBIP32: ({ masterNode, network, keyPath, account, change, index, isPublic }: { masterNode: import("../../../dist/bitcoinLib").BIP32InterfaceLike | import("../../../dist/bitcoinLib").ScureHDKeyLike; network?: core.Network; account: number; change?: number | undefined; index?: number | undefined | "*"; keyPath?: string; isPublic?: boolean; }) => string; wpkhBIP32: ({ masterNode, network, keyPath, account, change, index, isPublic }: { masterNode: import("../../../dist/bitcoinLib").BIP32InterfaceLike | import("../../../dist/bitcoinLib").ScureHDKeyLike; network?: core.Network; account: number; change?: number | undefined; index?: number | undefined | "*"; keyPath?: string; isPublic?: boolean; }) => string; trBIP32: ({ masterNode, network, keyPath, account, change, index, isPublic }: { masterNode: import("../../../dist/bitcoinLib").BIP32InterfaceLike | import("../../../dist/bitcoinLib").ScureHDKeyLike; network?: core.Network; account: number; change?: number | undefined; index?: number | undefined | "*"; keyPath?: string; isPublic?: boolean; }) => string; }; /** * @deprecated Use `@bitcoinerlab/descriptors/ledger`. */ export declare const ledger: LedgerModule; export declare const Output: new ({ descriptor, index, change, checksumRequired, allowMiniscriptInP2SH, network, preimages, signersPubKeys, taprootSpendPath, tapLeaf }: { descriptor: string; index?: number; change?: number; checksumRequired?: boolean; allowMiniscriptInP2SH?: boolean; network?: core.Network; preimages?: core.Preimage[]; signersPubKeys?: Uint8Array[]; taprootSpendPath?: "key" | "script"; tapLeaf?: Uint8Array | string; }) => { readonly "__#private@#payment": import("../../../dist/bitcoinLib").Payment; readonly "__#private@#preimages": core.Preimage[]; readonly "__#private@#signersPubKeys"?: Uint8Array[]; readonly "__#private@#miniscript"?: string; readonly "__#private@#witnessScript"?: Uint8Array; readonly "__#private@#redeemScript"?: Uint8Array; readonly "__#private@#isSegwit"?: boolean; readonly "__#private@#isTaproot"?: boolean; readonly "__#private@#expandedExpression"?: string; readonly "__#private@#expandedMiniscript"?: string; readonly "__#private@#tapTreeExpression"?: string; readonly "__#private@#tapTree"?: core.TapTreeNode; readonly "__#private@#tapTreeInfo"?: core.TapTreeInfoNode; readonly "__#private@#taprootSpendPath": "key" | "script"; readonly "__#private@#tapLeaf"?: Uint8Array | string; readonly "__#private@#expansionMap"?: core.ExpansionMap; readonly "__#private@#network": core.Network; "__#private@#resolveMiniscriptSignersPubKeys"(): Uint8Array[]; "__#private@#assertMiniscriptSatisfactionResourceLimits"(scriptSatisfaction: Uint8Array): void; getScriptSatisfaction(signatures: import("../../../dist/bip174").PartialSig[]): { scriptSatisfaction: Uint8Array; nLockTime: number | undefined; nSequence: number | undefined; }; "__#private@#resolveTapTreeSignersPubKeys"(): Uint8Array[]; getTapScriptSatisfaction(signatures: import("../../../dist/bip174").PartialSig[]): import("../../../dist/tapMiniscript").TaprootLeafSatisfaction; "__#private@#getConstraints"(): { nLockTime: number | undefined; nSequence: number | undefined; tapLeafHash: Uint8Array | undefined; } | undefined; getPayment(): import("../../../dist/bitcoinLib").Payment; getAddress(): string; getScriptPubKey(): Uint8Array; getSequence(): number | undefined; getLockTime(): number | undefined; getTapLeafHash(): Uint8Array | undefined; getWitnessScript(): Uint8Array | undefined; getRedeemScript(): Uint8Array | undefined; getNetwork(): core.Network; isSegwit(): boolean | undefined; isTaproot(): boolean | undefined; guessOutput(): { isPKH: boolean; isWPKH: boolean; isSH: boolean; isWSH: boolean; isTR: boolean; }; inputWeight(isSegwitTx: boolean, signatures: import("../../../dist/bip174").PartialSig[] | "DANGEROUSLY_USE_FAKE_SIGNATURES", options?: { taprootSighash?: "SIGHASH_DEFAULT" | "non-SIGHASH_DEFAULT"; }): number; outputWeight(): number; updatePsbtAsInput({ psbt, txHex, txId, value, vout, rbf }: { psbt: import("../../../dist/bitcoinLib").PsbtLike | import("../../../dist/bitcoinLib").ScureTransactionLike; txHex?: string; txId?: string; value?: bigint; vout: number; rbf?: boolean; }): ({ psbt, validate }: { psbt: import("../../../dist/bitcoinLib").PsbtLike | import("../../../dist/bitcoinLib").ScureTransactionLike; validate?: boolean | undefined; }) => void; updatePsbtAsOutput({ psbt, value }: { psbt: import("../../../dist/bitcoinLib").PsbtLike | import("../../../dist/bitcoinLib").ScureTransactionLike; value: bigint; }): void; "__#private@#assertPsbtInput"({ psbt, index }: { psbt: import("../../../dist/bitcoinLib").PsbtLike | import("../../../dist/bitcoinLib").ScureTransactionLike; index: number; }): void; expand(): { expansionMap?: core.ExpansionMap; tapTreeInfo?: core.TapTreeInfoNode; tapTree?: core.TapTreeNode; tapTreeExpression?: string; expandedMiniscript?: string; miniscript?: string; expandedExpression?: string; }; }, parseKeyExpression: core.KeyExpressionParser, expand: (params: { descriptor: string; index?: number; change?: number; checksumRequired?: boolean; network?: core.Network; allowMiniscriptInP2SH?: boolean; }) => core.Expansion, ECPair: import("../../../dist/bitcoinLib").ECPairAPI, BIP32: import("../../../dist/bitcoinLib").BIP32API;