@leather.io/bitcoin 0.35.5 → 0.35.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,42 +1,44 @@
1
- import { Bip21Options } from 'bip21';
2
- import * as ecpair from 'ecpair';
3
- import * as bitcoin from 'bitcoinjs-lib';
4
- import * as btc from '@scure/btc-signer';
5
- import * as _leather_io_models from '@leather.io/models';
6
- import { BitcoinAddress, BitcoinNetworkModes, Money, AverageBitcoinFeeRates, NetworkModes, InscriptionAsset, ValueOf, TransactionErrorKey } from '@leather.io/models';
7
- import BigNumber from 'bignumber.js';
8
- import { z } from 'zod';
9
- import * as _scure_btc_signer_payment from '@scure/btc-signer/payment';
10
- import { P2Ret, P2TROut } from '@scure/btc-signer/payment';
11
- import { HDKey, Versions } from '@scure/bip32';
12
- import { TransactionInput, TransactionOutput, RawPSBTV0 } from '@scure/btc-signer/psbt';
13
- import { BitcoinPaymentTypes, signatureHash, PaymentTypes } from '@leather.io/rpc';
14
- import { deriveBip39SeedFromMnemonic, deriveRootBip32Keychain } from '@leather.io/crypto';
15
- import { SigHash } from '@scure/btc-signer/transaction';
16
- import { Network } from 'bitcoin-address-validation';
1
+ import { Bip21Options } from "bip21";
2
+ import * as bitcoin from "bitcoinjs-lib";
3
+ import * as ecpair0 from "ecpair";
4
+ import { HDKey, Versions } from "@scure/bip32";
5
+ import * as btc from "@scure/btc-signer";
6
+ import { deriveBip39SeedFromMnemonic, deriveRootBip32Keychain } from "@leather.io/crypto";
7
+ import { Network } from "bitcoin-address-validation";
8
+ import BigNumber from "bignumber.js";
9
+ import { z } from "zod";
10
+ import { RawPSBTV0, TransactionInput, TransactionOutput } from "@scure/btc-signer/psbt";
11
+ import * as _leather_io_models0 from "@leather.io/models";
12
+ import { AverageBitcoinFeeRates, BitcoinAddress, BitcoinNetworkModes, InscriptionAsset, Money, NetworkModes, TransactionErrorKey, ValueOf } from "@leather.io/models";
13
+ import * as _scure_btc_signer_payment0 from "@scure/btc-signer/payment";
14
+ import { P2Ret, P2TROut } from "@scure/btc-signer/payment";
15
+ import { BitcoinPaymentTypes, PaymentTypes, signatureHash } from "@leather.io/rpc";
16
+ import { SigHash } from "@scure/btc-signer/transaction";
17
17
 
18
+ //#region src/bip21/bip21.d.ts
18
19
  interface Bip21ResultValue {
19
- address: string;
20
- [key: string]: string | number | undefined;
20
+ address: string;
21
+ [key: string]: string | number | undefined;
21
22
  }
22
23
  type Bip21Result = {
23
- success: true;
24
- data: Bip21ResultValue;
24
+ success: true;
25
+ data: Bip21ResultValue;
25
26
  } | {
26
- success: false;
27
- error: string;
27
+ success: false;
28
+ error: string;
28
29
  };
29
30
  declare const bip21: {
30
- decode: (uri: string, urnScheme?: string) => Bip21Result;
31
- encode: (address: string, options: Bip21Options, urnScheme?: string) => string | null;
31
+ decode: (uri: string, urnScheme?: string) => Bip21Result;
32
+ encode: (address: string, options: Bip21Options, urnScheme?: string) => string | null;
32
33
  };
33
-
34
- declare function ecPairFromPrivateKey(key: Uint8Array): ecpair.ECPairInterface;
34
+ //#endregion
35
+ //#region src/bip322/bip322-utils.d.ts
36
+ declare function ecPairFromPrivateKey(key: Uint8Array): ecpair0.ECPairInterface;
35
37
  declare function hashBip322Message(message: Uint8Array | string): Uint8Array<ArrayBufferLike>;
36
38
  declare const bip322TransactionToSignValues: {
37
- prevoutHash: Uint8Array<ArrayBufferLike>;
38
- prevoutIndex: number;
39
- sequence: number;
39
+ prevoutHash: Uint8Array<ArrayBufferLike>;
40
+ prevoutIndex: number;
41
+ sequence: number;
40
42
  };
41
43
  declare function isSupportedMessageSigningPaymentType(paymentType: string): boolean;
42
44
  /**
@@ -45,194 +47,232 @@ declare function isSupportedMessageSigningPaymentType(paymentType: string): bool
45
47
  */
46
48
  declare function encodeMessageWitnessData(witnessArray: Buffer[]): Buffer<ArrayBuffer>;
47
49
  declare function tweakSigner(signer: bitcoin.Signer, opts?: any): bitcoin.Signer;
48
-
49
- declare function createNativeSegwitBitcoinJsSigner(privateKey: Buffer): ecpair.ECPairInterface;
50
+ //#endregion
51
+ //#region src/bip322/sign-message-bip322-bitcoinjs.d.ts
52
+ declare function createNativeSegwitBitcoinJsSigner(privateKey: Buffer): ecpair0.ECPairInterface;
50
53
  declare function createTaprootBitcoinJsSigner(privateKey: Buffer): bitcoin.Signer;
51
54
  declare function createToSpendTx(address: BitcoinAddress, message: string, network: BitcoinNetworkModes): {
52
- virtualToSpend: bitcoin.Transaction;
53
- script: Buffer<ArrayBufferLike>;
55
+ virtualToSpend: bitcoin.Transaction;
56
+ script: Buffer<ArrayBufferLike>;
54
57
  };
55
58
  interface SignBip322MessageSimple {
56
- address: BitcoinAddress;
57
- message: string;
58
- network: BitcoinNetworkModes;
59
- signPsbt(psbt: bitcoin.Psbt): Promise<btc.Transaction>;
59
+ address: BitcoinAddress;
60
+ message: string;
61
+ network: BitcoinNetworkModes;
62
+ signPsbt(psbt: bitcoin.Psbt): Promise<btc.Transaction>;
60
63
  }
61
64
  declare function signBip322MessageSimple(args: SignBip322MessageSimple): Promise<{
62
- virtualToSpend: bitcoin.Transaction;
63
- virtualToSign: bitcoin.Transaction;
64
- unencodedSig: Buffer<ArrayBuffer>;
65
- signature: string;
65
+ virtualToSpend: bitcoin.Transaction;
66
+ virtualToSign: bitcoin.Transaction;
67
+ unencodedSig: Buffer<ArrayBuffer>;
68
+ signature: string;
66
69
  }>;
67
-
70
+ //#endregion
71
+ //#region src/coin-selection/calculate-max-spend.d.ts
68
72
  interface CalculateMaxSpendArgs {
69
- recipient: string;
70
- utxos: {
71
- value: number;
72
- txid: string;
73
- }[];
74
- feeRates?: AverageBitcoinFeeRates;
75
- feeRate?: number;
73
+ recipient: string;
74
+ utxos: {
75
+ value: number;
76
+ txid: string;
77
+ }[];
78
+ feeRates?: AverageBitcoinFeeRates;
79
+ feeRate?: number;
76
80
  }
77
81
  interface CalculateMaxSpendResponse {
78
- spendAllFee: number;
79
- amount: Money;
80
- spendableBitcoin: BigNumber;
81
- }
82
- declare function calculateMaxSpend({ recipient, utxos, feeRate, feeRates, }: CalculateMaxSpendArgs): CalculateMaxSpendResponse;
83
-
82
+ spendAllFee: number;
83
+ amount: Money;
84
+ spendableBitcoin: BigNumber;
85
+ }
86
+ declare function calculateMaxSpend({
87
+ recipient,
88
+ utxos,
89
+ feeRate,
90
+ feeRates
91
+ }: CalculateMaxSpendArgs): CalculateMaxSpendResponse;
92
+ //#endregion
93
+ //#region src/coin-selection/coin-selection.d.ts
84
94
  interface CoinSelectionOutput {
85
- value: bigint;
86
- address?: string;
95
+ value: bigint;
96
+ address?: string;
87
97
  }
88
98
  interface CoinSelectionRecipient {
89
- address: string;
90
- amount: Money;
99
+ address: string;
100
+ amount: Money;
91
101
  }
92
102
  interface DetermineUtxosForSpendArgs<T> {
93
- feeRate: number;
94
- recipients: CoinSelectionRecipient[];
95
- utxos: T[];
103
+ feeRate: number;
104
+ recipients: CoinSelectionRecipient[];
105
+ utxos: T[];
96
106
  }
97
107
  declare function determineUtxosForSpendAll<T extends {
98
- value: number;
99
- txid: string;
100
- }>({ feeRate, recipients, utxos, }: DetermineUtxosForSpendArgs<T>): {
101
- inputs: T[];
102
- outputs: {
103
- value: bigint;
104
- address: string;
105
- }[];
106
- size: number;
107
- fee: Money;
108
+ value: number;
109
+ txid: string;
110
+ }>({
111
+ feeRate,
112
+ recipients,
113
+ utxos
114
+ }: DetermineUtxosForSpendArgs<T>): {
115
+ inputs: T[];
116
+ outputs: {
117
+ value: bigint;
118
+ address: string;
119
+ }[];
120
+ size: number;
121
+ fee: Money;
108
122
  };
109
123
  declare function determineUtxosForSpend<T extends {
110
- value: number;
111
- txid: string;
112
- }>({ feeRate, recipients, utxos, }: DetermineUtxosForSpendArgs<T>): {
113
- txVBytes: number;
114
- txBytes: number;
115
- txWeight: number;
116
- filteredUtxos: T[];
117
- inputs: T[];
118
- outputs: CoinSelectionOutput[];
119
- size: number;
120
- fee: Money;
124
+ value: number;
125
+ txid: string;
126
+ }>({
127
+ feeRate,
128
+ recipients,
129
+ utxos
130
+ }: DetermineUtxosForSpendArgs<T>): {
131
+ txVBytes: number;
132
+ txBytes: number;
133
+ txWeight: number;
134
+ filteredUtxos: T[];
135
+ inputs: T[];
136
+ outputs: CoinSelectionOutput[];
137
+ size: number;
138
+ fee: Money;
121
139
  };
122
-
140
+ //#endregion
141
+ //#region src/coin-selection/coin-selection.utils.d.ts
123
142
  declare function getUtxoTotal<T extends {
124
- value: number;
143
+ value: number;
125
144
  }>(utxos: T[]): BigNumber;
126
145
  declare function getSizeInfo(payload: {
127
- inputLength: number;
128
- recipients: CoinSelectionRecipient[];
129
- isSendMax?: boolean;
146
+ inputLength: number;
147
+ recipients: CoinSelectionRecipient[];
148
+ isSendMax?: boolean;
130
149
  }): {
131
- txVBytes: number;
132
- txBytes: number;
133
- txWeight: number;
150
+ txVBytes: number;
151
+ txBytes: number;
152
+ txWeight: number;
134
153
  };
135
154
  interface GetSpendableAmountArgs<T> {
136
- utxos: T[];
137
- feeRate: number;
138
- recipients: CoinSelectionRecipient[];
139
- isSendMax?: boolean;
155
+ utxos: T[];
156
+ feeRate: number;
157
+ recipients: CoinSelectionRecipient[];
158
+ isSendMax?: boolean;
140
159
  }
141
160
  declare function getSpendableAmount<T extends {
142
- value: number;
143
- }>({ utxos, feeRate, recipients, }: GetSpendableAmountArgs<T>): {
144
- spendableAmount: BigNumber;
145
- fee: number;
161
+ value: number;
162
+ }>({
163
+ utxos,
164
+ feeRate,
165
+ recipients
166
+ }: GetSpendableAmountArgs<T>): {
167
+ spendableAmount: BigNumber;
168
+ fee: number;
146
169
  };
147
170
  declare function filterUneconomicalUtxos<T extends {
148
- value: number;
149
- txid: string;
150
- }>({ utxos, feeRate, recipients, }: {
151
- utxos: T[];
152
- feeRate: number;
153
- recipients: CoinSelectionRecipient[];
171
+ value: number;
172
+ txid: string;
173
+ }>({
174
+ utxos,
175
+ feeRate,
176
+ recipients
177
+ }: {
178
+ utxos: T[];
179
+ feeRate: number;
180
+ recipients: CoinSelectionRecipient[];
154
181
  }): T[];
155
-
182
+ //#endregion
183
+ //#region src/fees/bitcoin-fees.d.ts
156
184
  type GetBitcoinTransactionFeeArgs = DetermineUtxosForSpendArgs<{
157
- value: number;
158
- txid: string;
185
+ value: number;
186
+ txid: string;
159
187
  }> & {
160
- isSendingMax?: boolean;
188
+ isSendingMax?: boolean;
161
189
  };
162
- declare function getBitcoinTransactionFee({ isSendingMax, ...props }: GetBitcoinTransactionFeeArgs): Money | null;
190
+ declare function getBitcoinTransactionFee({
191
+ isSendingMax,
192
+ ...props
193
+ }: GetBitcoinTransactionFeeArgs): Money | null;
163
194
  interface BitcoinFees {
164
- blockchain: 'bitcoin';
165
- high: {
166
- fee: Money | null;
167
- feeRate: number;
168
- };
169
- standard: {
170
- fee: Money | null;
171
- feeRate: number;
172
- };
173
- low: {
174
- fee: Money | null;
175
- feeRate: number;
176
- };
195
+ blockchain: 'bitcoin';
196
+ high: {
197
+ fee: Money | null;
198
+ feeRate: number;
199
+ };
200
+ standard: {
201
+ fee: Money | null;
202
+ feeRate: number;
203
+ };
204
+ low: {
205
+ fee: Money | null;
206
+ feeRate: number;
207
+ };
177
208
  }
178
209
  interface GetBitcoinFeesArgs {
179
- feeRates: AverageBitcoinFeeRates;
180
- isSendingMax?: boolean;
181
- recipients: CoinSelectionRecipient[];
182
- utxos: {
183
- value: number;
184
- txid: string;
185
- }[];
186
- }
187
- declare function getBitcoinFees({ feeRates, isSendingMax, recipients, utxos }: GetBitcoinFeesArgs): {
188
- high: {
189
- feeRate: number;
190
- fee: Money | null;
191
- };
192
- standard: {
193
- feeRate: number;
194
- fee: Money | null;
195
- };
196
- low: {
197
- feeRate: number;
198
- fee: Money | null;
199
- };
210
+ feeRates: AverageBitcoinFeeRates;
211
+ isSendingMax?: boolean;
212
+ recipients: CoinSelectionRecipient[];
213
+ utxos: {
214
+ value: number;
215
+ txid: string;
216
+ }[];
217
+ }
218
+ declare function getBitcoinFees({
219
+ feeRates,
220
+ isSendingMax,
221
+ recipients,
222
+ utxos
223
+ }: GetBitcoinFeesArgs): {
224
+ high: {
225
+ feeRate: number;
226
+ fee: Money | null;
227
+ };
228
+ standard: {
229
+ feeRate: number;
230
+ fee: Money | null;
231
+ };
232
+ low: {
233
+ feeRate: number;
234
+ fee: Money | null;
235
+ };
200
236
  };
201
-
202
- declare const TEST_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS: _leather_io_models.BitcoinAddress;
203
- declare const TEST_ACCOUNT_1_TAPROOT_ADDRESS: _leather_io_models.BitcoinAddress;
204
- declare const TEST_ACCOUNT_2_TAPROOT_ADDRESS: _leather_io_models.BitcoinAddress;
205
- declare const TEST_TESNET_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS: _leather_io_models.BitcoinAddress;
206
- declare const TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS: _leather_io_models.BitcoinAddress;
207
- declare const TEST_TESTNET_ACCOUNT_2_TAPROOT_ADDRESS: _leather_io_models.BitcoinAddress;
208
- declare const recipientAddress: _leather_io_models.BitcoinAddress;
209
- declare const legacyAddress: _leather_io_models.BitcoinAddress;
210
- declare const segwitAddress: _leather_io_models.BitcoinAddress;
211
- declare const taprootAddress: _leather_io_models.BitcoinAddress;
237
+ //#endregion
238
+ //#region src/mocks/mocks.d.ts
239
+ declare const TEST_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS: _leather_io_models0.BitcoinAddress;
240
+ declare const TEST_ACCOUNT_1_TAPROOT_ADDRESS: _leather_io_models0.BitcoinAddress;
241
+ declare const TEST_ACCOUNT_2_TAPROOT_ADDRESS: _leather_io_models0.BitcoinAddress;
242
+ declare const TEST_TESNET_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS: _leather_io_models0.BitcoinAddress;
243
+ declare const TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS: _leather_io_models0.BitcoinAddress;
244
+ declare const TEST_TESTNET_ACCOUNT_2_TAPROOT_ADDRESS: _leather_io_models0.BitcoinAddress;
245
+ declare const recipientAddress: _leather_io_models0.BitcoinAddress;
246
+ declare const legacyAddress: _leather_io_models0.BitcoinAddress;
247
+ declare const segwitAddress: _leather_io_models0.BitcoinAddress;
248
+ declare const taprootAddress: _leather_io_models0.BitcoinAddress;
212
249
  declare const invalidAddress = "whoop-de-da-boop-da-de-not-a-bitcoin-address";
213
- declare const inValidCharactersAddress: _leather_io_models.BitcoinAddress;
214
- declare const inValidLengthAddress: _leather_io_models.BitcoinAddress;
215
-
250
+ declare const inValidCharactersAddress: _leather_io_models0.BitcoinAddress;
251
+ declare const inValidLengthAddress: _leather_io_models0.BitcoinAddress;
252
+ //#endregion
253
+ //#region src/schemas/address-schema.d.ts
216
254
  declare function nonEmptyStringValidator(message?: string): z.ZodString;
217
255
  declare function btcAddressValidator(): z.ZodString;
218
256
  declare function getNetworkTypeFromAddress(address: string): BitcoinNetworkModes;
219
257
  declare function btcAddressNetworkValidator(network: BitcoinNetworkModes): z.ZodString;
220
-
258
+ //#endregion
259
+ //#region src/utils/bitcoin.network.d.ts
221
260
  interface BtcSignerNetwork {
222
- bech32: string;
223
- pubKeyHash: number;
224
- scriptHash: number;
225
- wif: number;
261
+ bech32: string;
262
+ pubKeyHash: number;
263
+ scriptHash: number;
264
+ wif: number;
226
265
  }
227
266
  declare function getBtcSignerLibNetworkConfigByMode(network: BitcoinNetworkModes): BtcSignerNetwork;
228
267
  declare function getBitcoinJsLibNetworkConfigByMode(network: BitcoinNetworkModes): bitcoin.networks.Network;
229
-
268
+ //#endregion
269
+ //#region src/utils/bitcoin.utils.d.ts
230
270
  interface BitcoinAccount {
231
- type: BitcoinPaymentTypes;
232
- derivationPath: string;
233
- keychain: HDKey;
234
- accountIndex: number;
235
- network: BitcoinNetworkModes;
271
+ type: BitcoinPaymentTypes;
272
+ derivationPath: string;
273
+ keychain: HDKey;
274
+ accountIndex: number;
275
+ network: BitcoinNetworkModes;
236
276
  }
237
277
  declare function initBitcoinAccount(derivationPath: string, policy: string): BitcoinAccount;
238
278
  /**
@@ -264,9 +304,9 @@ declare function getAddressFromOutScript(script: Uint8Array, bitcoinNetwork: Btc
264
304
  */
265
305
  type BtcSignerLibPaymentTypeIdentifers = 'wpkh' | 'wsh' | 'tr' | 'pkh' | 'sh';
266
306
  declare const paymentTypeMap: Record<BtcSignerLibPaymentTypeIdentifers, BitcoinPaymentTypes>;
267
- declare function btcSignerLibPaymentTypeToPaymentTypeMap(payment: BtcSignerLibPaymentTypeIdentifers): "p2tr" | "p2pkh" | "p2sh" | "p2wpkh-p2sh" | "p2wpkh";
307
+ declare function btcSignerLibPaymentTypeToPaymentTypeMap(payment: BtcSignerLibPaymentTypeIdentifers): "p2wpkh" | "p2tr" | "p2pkh" | "p2sh" | "p2wpkh-p2sh";
268
308
  declare function isBtcSignerLibPaymentType(payment: string): payment is BtcSignerLibPaymentTypeIdentifers;
269
- declare function parseKnownPaymentType(payment: BtcSignerLibPaymentTypeIdentifers | BitcoinPaymentTypes): "p2tr" | "p2pkh" | "p2sh" | "p2wpkh-p2sh" | "p2wpkh";
309
+ declare function parseKnownPaymentType(payment: BtcSignerLibPaymentTypeIdentifers | BitcoinPaymentTypes): "p2wpkh" | "p2tr" | "p2pkh" | "p2sh" | "p2wpkh-p2sh";
270
310
  type PaymentTypeMap<T> = Record<BitcoinPaymentTypes, T>;
271
311
  declare function whenPaymentType(mode: BitcoinPaymentTypes | BtcSignerLibPaymentTypeIdentifers): <T>(paymentMap: PaymentTypeMap<T>) => T;
272
312
  type SupportedPaymentType = 'p2wpkh' | 'p2tr';
@@ -286,15 +326,23 @@ declare function getHdKeyVersionsFromNetwork(network: NetworkModes): Versions |
286
326
  declare function getBitcoinInputAddress(input: TransactionInput, bitcoinNetwork: BtcSignerNetwork): BitcoinAddress | null;
287
327
  declare function getInputPaymentType(input: TransactionInput, network: BitcoinNetworkModes): BitcoinPaymentTypes;
288
328
  declare function lookUpLedgerKeysByPath(getDerivationPath: (network: BitcoinNetworkModes, accountIndex: number) => string): (ledgerKeyMap: Record<string, {
289
- policy: string;
329
+ policy: string;
290
330
  } | undefined>, network: BitcoinNetworkModes) => (accountIndex: number) => BitcoinAccount | undefined;
291
331
  interface GetAddressArgs {
292
- index: number;
293
- keychain?: HDKey;
294
- network: BitcoinNetworkModes;
295
- }
296
- declare function getTaprootAddress({ index, keychain, network }: GetAddressArgs): string;
297
- declare function getNativeSegwitAddress({ index, keychain, network }: GetAddressArgs): string;
332
+ index: number;
333
+ keychain?: HDKey;
334
+ network: BitcoinNetworkModes;
335
+ }
336
+ declare function getTaprootAddress({
337
+ index,
338
+ keychain,
339
+ network
340
+ }: GetAddressArgs): string;
341
+ declare function getNativeSegwitAddress({
342
+ index,
343
+ keychain,
344
+ network
345
+ }: GetAddressArgs): string;
298
346
  /**
299
347
  * @deprecated
300
348
  * Use `deriveRootBip32Keychain` in `@leather.io/crypto` instead
@@ -305,7 +353,8 @@ declare function getPsbtTxOutputs(psbtTx: btc.Transaction): TransactionOutput[];
305
353
  declare function inferNetworkFromAddress(address: BitcoinAddress): BitcoinNetworkModes;
306
354
  declare function inferPaymentTypeFromAddress(address: BitcoinAddress): SupportedPaymentType;
307
355
  declare function getBitcoinInputValue(input: TransactionInput): number;
308
-
356
+ //#endregion
357
+ //#region src/payments/p2tr-address-gen.d.ts
309
358
  declare function makeTaprootAccountDerivationPath(network: BitcoinNetworkModes, accountIndex: number): string;
310
359
  /** @deprecated Use makeTaprootAccountDerivationPath */
311
360
  declare const getTaprootAccountDerivationPath: typeof makeTaprootAccountDerivationPath;
@@ -313,17 +362,21 @@ declare function makeTaprootAddressIndexDerivationPath(network: BitcoinNetworkMo
313
362
  /** @deprecated Use makeTaprootAddressIndexDerivationPath */
314
363
  declare const getTaprootAddressIndexDerivationPath: typeof makeTaprootAddressIndexDerivationPath;
315
364
  declare function deriveTaprootAccount(keychain: HDKey, network: BitcoinNetworkModes): (accountIndex: number) => BitcoinAccount;
316
- declare function getTaprootPayment(publicKey: Uint8Array, network: BitcoinNetworkModes): _scure_btc_signer_payment.P2TROut;
317
- declare function getTaprootPaymentFromAddressIndex(keychain: HDKey, network: BitcoinNetworkModes): _scure_btc_signer_payment.P2TROut;
365
+ declare function getTaprootPayment(publicKey: Uint8Array, network: BitcoinNetworkModes): _scure_btc_signer_payment0.P2TROut;
366
+ declare function getTaprootPaymentFromAddressIndex(keychain: HDKey, network: BitcoinNetworkModes): _scure_btc_signer_payment0.P2TROut;
318
367
  interface DeriveTaprootReceiveAddressIndexArgs {
319
- keychain: HDKey;
320
- network: BitcoinNetworkModes;
321
- }
322
- declare function deriveTaprootReceiveAddressIndexZero({ keychain, network, }: DeriveTaprootReceiveAddressIndexArgs): {
323
- keychain: HDKey;
324
- payment: _scure_btc_signer_payment.P2TROut;
368
+ keychain: HDKey;
369
+ network: BitcoinNetworkModes;
370
+ }
371
+ declare function deriveTaprootReceiveAddressIndexZero({
372
+ keychain,
373
+ network
374
+ }: DeriveTaprootReceiveAddressIndexArgs): {
375
+ keychain: HDKey;
376
+ payment: _scure_btc_signer_payment0.P2TROut;
325
377
  };
326
-
378
+ //#endregion
379
+ //#region src/payments/p2wpkh-address-gen.d.ts
327
380
  declare function makeNativeSegwitAccountDerivationPath(network: BitcoinNetworkModes, accountIndex: number): string;
328
381
  /** @deprecated Use makeNativeSegwitAccountDerivationPath */
329
382
  declare const getNativeSegwitAccountDerivationPath: typeof makeNativeSegwitAccountDerivationPath;
@@ -331,16 +384,20 @@ declare function makeNativeSegwitAddressIndexDerivationPath(network: BitcoinNetw
331
384
  /** @deprecated Use makeNativeSegwitAddressIndexDerivationPath */
332
385
  declare const getNativeSegwitAddressIndexDerivationPath: typeof makeNativeSegwitAddressIndexDerivationPath;
333
386
  declare function deriveNativeSegwitAccountFromRootKeychain(keychain: HDKey, network: BitcoinNetworkModes): (accountIndex: number) => BitcoinAccount;
334
- declare function getNativeSegwitPaymentFromAddressIndex(keychain: HDKey, network: BitcoinNetworkModes): _scure_btc_signer_payment.P2Ret;
387
+ declare function getNativeSegwitPaymentFromAddressIndex(keychain: HDKey, network: BitcoinNetworkModes): _scure_btc_signer_payment0.P2Ret;
335
388
  interface DeriveNativeSegwitReceiveAddressIndexArgs {
336
- keychain: HDKey;
337
- network: BitcoinNetworkModes;
338
- }
339
- declare function deriveNativeSegwitReceiveAddressIndexZero({ keychain, network, }: DeriveNativeSegwitReceiveAddressIndexArgs): {
340
- keychain: HDKey;
341
- payment: _scure_btc_signer_payment.P2Ret;
389
+ keychain: HDKey;
390
+ network: BitcoinNetworkModes;
391
+ }
392
+ declare function deriveNativeSegwitReceiveAddressIndexZero({
393
+ keychain,
394
+ network
395
+ }: DeriveNativeSegwitReceiveAddressIndexArgs): {
396
+ keychain: HDKey;
397
+ payment: _scure_btc_signer_payment0.P2Ret;
342
398
  };
343
-
399
+ //#endregion
400
+ //#region src/payments/p2wsh-p2sh-address-gen.d.ts
344
401
  /**
345
402
  * @deprecated
346
403
  * Use `deriveBip39MnemonicFromSeed` from `@leather.io/crypto`
@@ -357,144 +414,169 @@ declare function makePayToScriptHashKeyHash(publicKey: Uint8Array): Uint8Array<A
357
414
  declare function makePayToScriptHashAddressBytes(keyHash: Uint8Array): Uint8Array<ArrayBufferLike>;
358
415
  declare function makePayToScriptHashAddress(addressBytes: Uint8Array, network: NetworkModes): string;
359
416
  declare function publicKeyToPayToScriptHashAddress(publicKey: Uint8Array, network: NetworkModes): string;
360
-
417
+ //#endregion
418
+ //#region src/psbt/psbt-inputs.d.ts
361
419
  interface PsbtInput {
362
- address: BitcoinAddress;
363
- index?: number;
364
- inscription?: InscriptionAsset;
365
- isMutable: boolean;
366
- toSign: boolean;
367
- txid: string;
368
- value: number;
369
- bip32Derivation: TransactionInput['bip32Derivation'];
370
- tapBip32Derivation: TransactionInput['tapBip32Derivation'];
420
+ address: BitcoinAddress;
421
+ index?: number;
422
+ inscription?: InscriptionAsset;
423
+ isMutable: boolean;
424
+ toSign: boolean;
425
+ txid: string;
426
+ value: number;
427
+ bip32Derivation: TransactionInput['bip32Derivation'];
428
+ tapBip32Derivation: TransactionInput['tapBip32Derivation'];
371
429
  }
372
430
  interface GetParsedInputsArgs {
373
- inputs: TransactionInput[];
374
- indexesToSign?: number[];
375
- networkMode: BitcoinNetworkModes;
376
- psbtAddresses: BitcoinAddress[];
431
+ inputs: TransactionInput[];
432
+ indexesToSign?: number[];
433
+ networkMode: BitcoinNetworkModes;
434
+ psbtAddresses: BitcoinAddress[];
377
435
  }
378
436
  interface GetParsedInputsResponse {
379
- isPsbtMutable: boolean;
380
- parsedInputs: PsbtInput[];
381
- }
382
- declare function getParsedInputs({ inputs, indexesToSign, networkMode, psbtAddresses, }: GetParsedInputsArgs): GetParsedInputsResponse;
383
-
437
+ isPsbtMutable: boolean;
438
+ parsedInputs: PsbtInput[];
439
+ }
440
+ declare function getParsedInputs({
441
+ inputs,
442
+ indexesToSign,
443
+ networkMode,
444
+ psbtAddresses
445
+ }: GetParsedInputsArgs): GetParsedInputsResponse;
446
+ //#endregion
447
+ //#region src/psbt/psbt-outputs.d.ts
384
448
  interface PsbtOutput {
385
- address: BitcoinAddress | null;
386
- isMutable: boolean;
387
- toSign: boolean;
388
- value: number;
449
+ address: BitcoinAddress | null;
450
+ isMutable: boolean;
451
+ toSign: boolean;
452
+ value: number;
389
453
  }
390
454
  interface PsbtOutputWithAddress extends PsbtOutput {
391
- address: BitcoinAddress;
455
+ address: BitcoinAddress;
392
456
  }
393
457
  interface GetParsedOutputsArgs {
394
- isPsbtMutable: boolean;
395
- outputs: TransactionOutput[];
396
- networkMode: BitcoinNetworkModes;
397
- psbtAddresses: BitcoinAddress[];
398
- }
399
- declare function getParsedOutputs({ isPsbtMutable, outputs, networkMode, psbtAddresses, }: GetParsedOutputsArgs): PsbtOutput[];
400
-
458
+ isPsbtMutable: boolean;
459
+ outputs: TransactionOutput[];
460
+ networkMode: BitcoinNetworkModes;
461
+ psbtAddresses: BitcoinAddress[];
462
+ }
463
+ declare function getParsedOutputs({
464
+ isPsbtMutable,
465
+ outputs,
466
+ networkMode,
467
+ psbtAddresses
468
+ }: GetParsedOutputsArgs): PsbtOutput[];
469
+ //#endregion
470
+ //#region src/psbt/psbt-totals.d.ts
401
471
  interface GetPsbtTotalsProps {
402
- psbtAddresses: BitcoinAddress[];
403
- parsedInputs: PsbtInput[];
404
- parsedOutputs: PsbtOutput[];
405
- }
406
- declare function getPsbtTotals({ psbtAddresses, parsedInputs, parsedOutputs }: GetPsbtTotalsProps): {
407
- inputsTotalNativeSegwit: _leather_io_models.Money;
408
- inputsTotalTaproot: _leather_io_models.Money;
409
- outputsTotalNativeSegwit: _leather_io_models.Money;
410
- outputsTotalTaproot: _leather_io_models.Money;
411
- psbtInputsTotal: _leather_io_models.Money;
412
- psbtOutputsTotal: _leather_io_models.Money;
472
+ psbtAddresses: BitcoinAddress[];
473
+ parsedInputs: PsbtInput[];
474
+ parsedOutputs: PsbtOutput[];
475
+ }
476
+ declare function getPsbtTotals({
477
+ psbtAddresses,
478
+ parsedInputs,
479
+ parsedOutputs
480
+ }: GetPsbtTotalsProps): {
481
+ inputsTotalNativeSegwit: _leather_io_models0.Money;
482
+ inputsTotalTaproot: _leather_io_models0.Money;
483
+ outputsTotalNativeSegwit: _leather_io_models0.Money;
484
+ outputsTotalTaproot: _leather_io_models0.Money;
485
+ psbtInputsTotal: _leather_io_models0.Money;
486
+ psbtOutputsTotal: _leather_io_models0.Money;
413
487
  };
414
-
488
+ //#endregion
489
+ //#region src/psbt/psbt-details.d.ts
415
490
  interface GetPsbtDetailsArgs {
416
- psbtHex: string;
417
- psbtAddresses: BitcoinAddress[];
418
- networkMode: BitcoinNetworkModes;
419
- indexesToSign?: number[];
420
- }
421
- declare function getPsbtDetails({ psbtHex, networkMode, indexesToSign, psbtAddresses, }: GetPsbtDetailsArgs): {
422
- addressNativeSegwitTotal: _leather_io_models.Money;
423
- addressTaprootTotal: _leather_io_models.Money;
424
- fee: _leather_io_models.Money;
425
- isPsbtMutable: boolean;
426
- psbtInputs: PsbtInput[];
427
- psbtOutputs: PsbtOutput[];
491
+ psbtHex: string;
492
+ psbtAddresses: BitcoinAddress[];
493
+ networkMode: BitcoinNetworkModes;
494
+ indexesToSign?: number[];
495
+ }
496
+ declare function getPsbtDetails({
497
+ psbtHex,
498
+ networkMode,
499
+ indexesToSign,
500
+ psbtAddresses
501
+ }: GetPsbtDetailsArgs): {
502
+ addressNativeSegwitTotal: _leather_io_models0.Money;
503
+ addressTaprootTotal: _leather_io_models0.Money;
504
+ fee: _leather_io_models0.Money;
505
+ isPsbtMutable: boolean;
506
+ psbtInputs: PsbtInput[];
507
+ psbtOutputs: PsbtOutput[];
428
508
  };
429
-
509
+ //#endregion
510
+ //#region src/psbt/utils.d.ts
430
511
  type RawPsbt = ReturnType<typeof RawPSBTV0.decode>;
431
512
  declare function getPsbtAsTransaction(psbt: string | Uint8Array): btc.Transaction;
432
513
  declare function getRawPsbt(psbt: string | Uint8Array): ReturnType<typeof RawPSBTV0.decode>;
433
-
514
+ //#endregion
515
+ //#region src/signer/bitcoin-signer.d.ts
434
516
  type AllowedSighashTypes = ValueOf<typeof signatureHash> | SigHash;
435
517
  interface BitcoinAccountKeychain {
436
- descriptor: string;
437
- masterKeyFingerprint: string;
438
- keyOrigin: string;
439
- keychain: HDKey;
440
- xpub: string;
518
+ descriptor: string;
519
+ masterKeyFingerprint: string;
520
+ keyOrigin: string;
521
+ keychain: HDKey;
522
+ xpub: string;
441
523
  }
442
524
  type WithDerivePayer<T, P> = T & {
443
- derivePayer: (args: BitcoinPayerInfo) => P;
525
+ derivePayer(args: BitcoinPayerInfo): P;
444
526
  };
445
527
  interface BitcoinSigner<Payment> {
446
- network: BitcoinNetworkModes;
447
- payment: Payment;
448
- keychain: HDKey;
449
- derivationPath: string;
450
- address: BitcoinAddress;
451
- publicKey: Uint8Array;
452
- sign(tx: btc.Transaction): void;
453
- signIndex(tx: btc.Transaction, index: number, allowedSighash?: AllowedSighashTypes[]): void;
528
+ network: BitcoinNetworkModes;
529
+ payment: Payment;
530
+ keychain: HDKey;
531
+ derivationPath: string;
532
+ address: BitcoinAddress;
533
+ publicKey: Uint8Array;
534
+ sign(tx: btc.Transaction): void;
535
+ signIndex(tx: btc.Transaction, index: number, allowedSighash?: AllowedSighashTypes[]): void;
454
536
  }
455
537
  interface BitcoinPayerBase {
456
- paymentType: PaymentTypes;
457
- network: BitcoinNetworkModes;
458
- address: BitcoinAddress;
459
- keyOrigin: string;
460
- masterKeyFingerprint: string;
461
- publicKey: Uint8Array;
538
+ paymentType: PaymentTypes;
539
+ network: BitcoinNetworkModes;
540
+ address: BitcoinAddress;
541
+ keyOrigin: string;
542
+ masterKeyFingerprint: string;
543
+ publicKey: Uint8Array;
462
544
  }
463
545
  interface BitcoinNativeSegwitPayer extends BitcoinPayerBase {
464
- paymentType: 'p2wpkh';
465
- payment: P2Ret;
546
+ paymentType: 'p2wpkh';
547
+ payment: P2Ret;
466
548
  }
467
549
  interface BitcoinTaprootPayer extends BitcoinPayerBase {
468
- paymentType: 'p2tr';
469
- payment: P2TROut;
550
+ paymentType: 'p2tr';
551
+ payment: P2TROut;
470
552
  }
471
553
  type BitcoinPayer = BitcoinNativeSegwitPayer | BitcoinTaprootPayer;
472
554
  declare function initializeBitcoinAccountKeychainFromDescriptor(descriptor: string): BitcoinAccountKeychain;
473
555
  interface BitcoinPayerInfo {
474
- change: number;
475
- addressIndex: number;
476
- }
477
- declare function deriveBitcoinPayerFromAccount(descriptor: string, network: BitcoinNetworkModes): ({ change, addressIndex }: BitcoinPayerInfo) => {
478
- keyOrigin: string;
479
- masterKeyFingerprint: string;
480
- paymentType: SupportedPaymentType;
481
- network: BitcoinNetworkModes;
482
- payment: P2Ret;
483
- readonly address: string;
484
- readonly publicKey: Uint8Array<ArrayBufferLike>;
556
+ change: number;
557
+ addressIndex: number;
558
+ }
559
+ declare function deriveBitcoinPayerFromAccount(descriptor: string, network: BitcoinNetworkModes): ({
560
+ change,
561
+ addressIndex
562
+ }: BitcoinPayerInfo) => {
563
+ keyOrigin: string;
564
+ masterKeyFingerprint: string;
565
+ paymentType: SupportedPaymentType;
566
+ network: BitcoinNetworkModes;
567
+ payment: P2Ret;
568
+ readonly address: string;
569
+ readonly publicKey: Uint8Array<ArrayBufferLike>;
485
570
  };
486
571
  interface BtcSignerDerivationPath {
487
- fingerprint: number;
488
- path: number[];
572
+ fingerprint: number;
573
+ path: number[];
489
574
  }
490
575
  type BtcSignerDefaultBip32Derivation = [Uint8Array, BtcSignerDerivationPath];
491
- type BtcSignerTapBip32Derivation = [
492
- Uint8Array,
493
- {
494
- hashes: Uint8Array[];
495
- der: BtcSignerDerivationPath;
496
- }
497
- ];
576
+ type BtcSignerTapBip32Derivation = [Uint8Array, {
577
+ hashes: Uint8Array[];
578
+ der: BtcSignerDerivationPath;
579
+ }];
498
580
  type BtcSignerBip32Derivation = BtcSignerDefaultBip32Derivation | BtcSignerTapBip32Derivation;
499
581
  type PayerToBip32DerivationArgs = Pick<BitcoinPayer, 'masterKeyFingerprint' | 'keyOrigin' | 'publicKey'>;
500
582
  /**
@@ -523,8 +605,8 @@ declare function payerToTapBip32DerivationBitcoinJsLib(args: PayerToBip32Derivat
523
605
  type Bip32DerivationBitcoinJsLib = NonNullable<PsbtInputBitcoinJsLib['bip32Derivation']>['0'];
524
606
  declare function payerToBip32DerivationBitcoinJsLib(args: PayerToBip32DerivationArgs): Bip32DerivationBitcoinJsLib;
525
607
  declare function extractPayerInfoFromDerivationPath(path: string): {
526
- change: number;
527
- addressIndex: number;
608
+ change: number;
609
+ addressIndex: number;
528
610
  };
529
611
  /**
530
612
  * @description
@@ -535,7 +617,10 @@ declare function extractPayerInfoFromDerivationPath(path: string): {
535
617
  * const keyOrigin = serializeKeyOrigin(inputOne.bip32Derivation[0][1]);
536
618
  * ```
537
619
  */
538
- declare function serializeKeyOrigin({ fingerprint, path }: BtcSignerDerivationPath): string;
620
+ declare function serializeKeyOrigin({
621
+ fingerprint,
622
+ path
623
+ }: BtcSignerDerivationPath): string;
539
624
  /**
540
625
  * @description
541
626
  * Of a given set of a `tx.input`s bip32 derivation paths from
@@ -543,88 +628,120 @@ declare function serializeKeyOrigin({ fingerprint, path }: BtcSignerDerivationPa
543
628
  * internally
544
629
  */
545
630
  declare function extractRequiredKeyOrigins(derivation: BtcSignerBip32Derivation[]): string[];
546
-
631
+ //#endregion
632
+ //#region src/transactions/generate-unsigned-transaction.d.ts
547
633
  interface GenerateBitcoinUnsignedTransactionArgs<T> {
548
- feeRate: number;
549
- isSendingMax?: boolean;
550
- network: BtcSignerNetwork;
551
- recipients: CoinSelectionRecipient[];
552
- utxos: T[];
553
- changeAddress: string;
554
- payerLookup(keyOrigin: string): BitcoinNativeSegwitPayer | BitcoinTaprootPayer | undefined;
634
+ feeRate: number;
635
+ isSendingMax?: boolean;
636
+ network: BtcSignerNetwork;
637
+ recipients: CoinSelectionRecipient[];
638
+ utxos: T[];
639
+ changeAddress: string;
640
+ payerLookup(keyOrigin: string): BitcoinNativeSegwitPayer | BitcoinTaprootPayer | undefined;
555
641
  }
556
642
  declare function generateBitcoinUnsignedTransaction<T extends {
557
- txid: string;
558
- vout: number;
559
- value: number;
560
- keyOrigin: string;
561
- }>({ feeRate, isSendingMax, network, recipients, changeAddress, utxos, payerLookup, }: GenerateBitcoinUnsignedTransactionArgs<T>): {
562
- tx: btc.Transaction;
563
- hex: string;
564
- psbt: Uint8Array<ArrayBufferLike>;
565
- inputs: T[];
566
- fee: _leather_io_models.Money;
643
+ txid: string;
644
+ vout: number;
645
+ value: number;
646
+ keyOrigin: string;
647
+ }>({
648
+ feeRate,
649
+ isSendingMax,
650
+ network,
651
+ recipients,
652
+ changeAddress,
653
+ utxos,
654
+ payerLookup
655
+ }: GenerateBitcoinUnsignedTransactionArgs<T>): {
656
+ tx: btc.Transaction;
657
+ hex: string;
658
+ psbt: Uint8Array<ArrayBufferLike>;
659
+ inputs: T[];
660
+ fee: _leather_io_models0.Money;
567
661
  };
568
-
662
+ //#endregion
663
+ //#region src/validation/address-validation.d.ts
569
664
  declare function getBitcoinAddressNetworkType(network: BitcoinNetworkModes): Network;
570
665
  declare function isValidBitcoinAddress(address: string): boolean;
571
666
  declare function isValidBitcoinNetworkAddress(address: string, network: BitcoinNetworkModes): boolean;
572
-
667
+ //#endregion
668
+ //#region src/validation/amount-validation.d.ts
573
669
  interface isBtcBalanceSufficientParams {
574
- desiredSpend: Money;
575
- maxSpend: Money;
670
+ desiredSpend: Money;
671
+ maxSpend: Money;
576
672
  }
577
- declare function isBtcBalanceSufficient({ desiredSpend, maxSpend }: isBtcBalanceSufficientParams): boolean;
673
+ declare function isBtcBalanceSufficient({
674
+ desiredSpend,
675
+ maxSpend
676
+ }: isBtcBalanceSufficientParams): boolean;
578
677
  declare function isBtcMinimumSpend(desiredSpend: Money): boolean;
579
-
678
+ //#endregion
679
+ //#region src/validation/bitcoin-address.d.ts
580
680
  declare function isBitcoinAddress(value: string): value is BitcoinAddress;
581
681
  declare function createBitcoinAddress(value: string): BitcoinAddress;
582
-
682
+ //#endregion
683
+ //#region src/validation/bitcoin-error.d.ts
583
684
  declare class BitcoinError extends Error {
584
- message: BitcoinErrorKey;
585
- constructor(message: BitcoinErrorKey);
685
+ message: BitcoinErrorKey;
686
+ constructor(message: BitcoinErrorKey);
586
687
  }
587
688
  type BitcoinErrorKey = TransactionErrorKey | 'InsufficientAmount' | 'NoInputsToSign' | 'NoOutputsToSign' | 'InscribedUtxos';
588
-
689
+ //#endregion
690
+ //#region src/validation/transaction-validation.d.ts
589
691
  interface BitcoinTransaction extends Omit<GetBitcoinFeesArgs, 'recipients'> {
590
- amount: Money;
591
- payer: BitcoinAddress;
592
- recipient: BitcoinAddress;
593
- network: BitcoinNetworkModes;
594
- feeRate: number;
595
- }
596
- declare function isValidBitcoinTransaction({ amount, payer, recipient, network, utxos, feeRate, feeRates, }: BitcoinTransaction): void;
597
-
692
+ amount: Money;
693
+ payer: BitcoinAddress;
694
+ recipient: BitcoinAddress;
695
+ network: BitcoinNetworkModes;
696
+ feeRate: number;
697
+ }
698
+ declare function isValidBitcoinTransaction({
699
+ amount,
700
+ payer,
701
+ recipient,
702
+ network,
703
+ utxos,
704
+ feeRate,
705
+ feeRates
706
+ }: BitcoinTransaction): void;
707
+ //#endregion
708
+ //#region src/utils/bitcoin.descriptors.d.ts
598
709
  declare function getDescriptorFromKeychain<T extends {
599
- keyOrigin: string;
600
- xpub: string;
710
+ keyOrigin: string;
711
+ xpub: string;
601
712
  }>(accountKeychain: T): string | undefined;
602
713
  declare function inferPaymentTypeFromDescriptor(descriptor: string): SupportedPaymentType;
603
714
  declare function extractXpubFromDescriptor(descriptor: string): string;
604
715
  interface DeriveAddressesFromDescriptorArgs {
605
- accountDescriptor: string;
606
- network: BitcoinNetworkModes;
607
- limit?: number;
716
+ accountDescriptor: string;
717
+ network: BitcoinNetworkModes;
718
+ limit?: number;
608
719
  }
609
720
  interface DeriveAddressesFromDescriptorResult {
610
- address: string;
611
- path: string;
612
- }
613
- declare function deriveAddressesFromDescriptor({ accountDescriptor, network, limit, }: DeriveAddressesFromDescriptorArgs): DeriveAddressesFromDescriptorResult[];
614
-
721
+ address: string;
722
+ path: string;
723
+ }
724
+ declare function deriveAddressesFromDescriptor({
725
+ accountDescriptor,
726
+ network,
727
+ limit
728
+ }: DeriveAddressesFromDescriptorArgs): DeriveAddressesFromDescriptorResult[];
729
+ //#endregion
730
+ //#region src/utils/lookup-derivation-by-address.d.ts
615
731
  interface LookUpDerivationByAddressArgs {
616
- taprootXpub: string;
617
- nativeSegwitXpub: string;
618
- iterationLimit: number;
732
+ taprootXpub: string;
733
+ nativeSegwitXpub: string;
734
+ iterationLimit: number;
619
735
  }
620
736
  declare function lookupDerivationByAddress(args: LookUpDerivationByAddressArgs): (address: BitcoinAddress) => {
621
- readonly status: "success";
622
- readonly duration: number;
623
- readonly path: string;
737
+ readonly status: "success";
738
+ readonly duration: number;
739
+ readonly path: string;
624
740
  } | {
625
- readonly status: "failure";
626
- readonly duration?: undefined;
627
- readonly path?: undefined;
741
+ readonly status: "failure";
742
+ readonly duration?: undefined;
743
+ readonly path?: undefined;
628
744
  };
629
-
630
- export { type AllowedSighashTypes, type BitcoinAccount, type BitcoinAccountKeychain, BitcoinError, type BitcoinErrorKey, type BitcoinFees, type BitcoinNativeSegwitPayer, type BitcoinPayer, type BitcoinPayerBase, type BitcoinPayerInfo, type BitcoinSigner, type BitcoinTaprootPayer, type BtcSignerDefaultBip32Derivation, type BtcSignerLibPaymentTypeIdentifers, type BtcSignerNetwork, type BtcSignerTapBip32Derivation, type CalculateMaxSpendResponse, type CoinSelectionOutput, type CoinSelectionRecipient, type DeriveAddressesFromDescriptorArgs, type DeriveAddressesFromDescriptorResult, type DetermineUtxosForSpendArgs, type GenerateBitcoinUnsignedTransactionArgs, type GetBitcoinFeesArgs, type PaymentTypeMap, type PsbtInput, type PsbtOutput, type PsbtOutputWithAddress, type RawPsbt, type SupportedPaymentType, type SupportedPaymentTypeMap, TEST_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS, TEST_ACCOUNT_1_TAPROOT_ADDRESS, TEST_ACCOUNT_2_TAPROOT_ADDRESS, TEST_TESNET_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS, TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS, TEST_TESTNET_ACCOUNT_2_TAPROOT_ADDRESS, type WithDerivePayer, bip21, bip322TransactionToSignValues, bitcoinNetworkModeToCoreNetworkMode, bitcoinNetworkToCoreNetworkMap, btcAddressNetworkValidator, btcAddressValidator, btcSignerLibPaymentTypeToPaymentTypeMap, calculateMaxSpend, coinTypeMap, createBitcoinAddress, createNativeSegwitBitcoinJsSigner, createTaprootBitcoinJsSigner, createToSpendTx, createWalletIdDecoratedPath, decodeBitcoinTx, decodeCompressedWifPrivateKey, deriveAddressIndexKeychainFromAccount, deriveAddressIndexZeroFromAccount, deriveAddressesFromDescriptor, deriveBitcoinPayerFromAccount, deriveBtcBip49SeedFromMnemonic, deriveNativeSegwitAccountFromRootKeychain, deriveNativeSegwitReceiveAddressIndexZero, deriveRootBtcKeychain, deriveTaprootAccount, deriveTaprootReceiveAddressIndexZero, determineUtxosForSpend, determineUtxosForSpendAll, ecPairFromPrivateKey, ecdsaPublicKeyLength, ecdsaPublicKeyToSchnorr, encodeMessageWitnessData, extractExtendedPublicKeyFromPolicy, extractPayerInfoFromDerivationPath, extractRequiredKeyOrigins, extractXpubFromDescriptor, filterUneconomicalUtxos, generateBitcoinUnsignedTransaction, getAddressFromOutScript, getBitcoinAddressNetworkType, getBitcoinCoinTypeIndexByNetwork, getBitcoinFees, getBitcoinInputAddress, getBitcoinInputValue, getBitcoinJsLibNetworkConfigByMode, getBitcoinTransactionFee, getBtcSignerLibNetworkConfigByMode, getDescriptorFromKeychain, getHdKeyVersionsFromNetwork, getInputPaymentType, getNativeSegwitAccountDerivationPath, getNativeSegwitAddress, getNativeSegwitAddressIndexDerivationPath, getNativeSegwitPaymentFromAddressIndex, getNetworkTypeFromAddress, getParsedInputs, getParsedOutputs, getPsbtAsTransaction, getPsbtDetails, getPsbtTotals, getPsbtTxInputs, getPsbtTxOutputs, getRawPsbt, getSizeInfo, getSpendableAmount, getTaprootAccountDerivationPath, getTaprootAddress, getTaprootAddressIndexDerivationPath, getTaprootPayment, getTaprootPaymentFromAddressIndex, getUtxoTotal, hashBip322Message, inValidCharactersAddress, inValidLengthAddress, inferNetworkFromAddress, inferNetworkFromPath, inferPaymentTypeFromAddress, inferPaymentTypeFromDescriptor, inferPaymentTypeFromPath, initBitcoinAccount, initializeBitcoinAccountKeychainFromDescriptor, invalidAddress, isBitcoinAddress, isBtcBalanceSufficient, isBtcMinimumSpend, isBtcSignerLibPaymentType, isSupportedMessageSigningPaymentType, isValidBitcoinAddress, isValidBitcoinNetworkAddress, isValidBitcoinTransaction, legacyAddress, lookUpLedgerKeysByPath, lookupDerivationByAddress, makeNativeSegwitAccountDerivationPath, makeNativeSegwitAddressIndexDerivationPath, makePayToScriptHashAddress, makePayToScriptHashAddressBytes, makePayToScriptHashKeyHash, makeTaprootAccountDerivationPath, makeTaprootAddressIndexDerivationPath, mnemonicToRootNode, nonEmptyStringValidator, parseKnownPaymentType, payToScriptHashTestnetPrefix, payerToBip32Derivation, payerToBip32DerivationBitcoinJsLib, payerToTapBip32Derivation, payerToTapBip32DerivationBitcoinJsLib, paymentTypeMap, publicKeyToPayToScriptHashAddress, recipientAddress, segwitAddress, serializeKeyOrigin, signBip322MessageSimple, taprootAddress, toXOnly, tweakSigner, whenBitcoinNetwork, whenPaymentType, whenSupportedPaymentType };
745
+ //#endregion
746
+ export { AllowedSighashTypes, BitcoinAccount, BitcoinAccountKeychain, BitcoinError, BitcoinErrorKey, BitcoinFees, BitcoinNativeSegwitPayer, BitcoinPayer, BitcoinPayerBase, BitcoinPayerInfo, BitcoinSigner, BitcoinTaprootPayer, BtcSignerDefaultBip32Derivation, BtcSignerLibPaymentTypeIdentifers, BtcSignerNetwork, BtcSignerTapBip32Derivation, CalculateMaxSpendResponse, CoinSelectionOutput, CoinSelectionRecipient, DeriveAddressesFromDescriptorArgs, DeriveAddressesFromDescriptorResult, DetermineUtxosForSpendArgs, GenerateBitcoinUnsignedTransactionArgs, GetBitcoinFeesArgs, PaymentTypeMap, PsbtInput, PsbtOutput, PsbtOutputWithAddress, RawPsbt, SupportedPaymentType, SupportedPaymentTypeMap, TEST_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS, TEST_ACCOUNT_1_TAPROOT_ADDRESS, TEST_ACCOUNT_2_TAPROOT_ADDRESS, TEST_TESNET_ACCOUNT_1_NATIVE_SEGWIT_ADDRESS, TEST_TESTNET_ACCOUNT_2_BTC_ADDRESS, TEST_TESTNET_ACCOUNT_2_TAPROOT_ADDRESS, WithDerivePayer, bip21, bip322TransactionToSignValues, bitcoinNetworkModeToCoreNetworkMode, bitcoinNetworkToCoreNetworkMap, btcAddressNetworkValidator, btcAddressValidator, btcSignerLibPaymentTypeToPaymentTypeMap, calculateMaxSpend, coinTypeMap, createBitcoinAddress, createNativeSegwitBitcoinJsSigner, createTaprootBitcoinJsSigner, createToSpendTx, createWalletIdDecoratedPath, decodeBitcoinTx, decodeCompressedWifPrivateKey, deriveAddressIndexKeychainFromAccount, deriveAddressIndexZeroFromAccount, deriveAddressesFromDescriptor, deriveBitcoinPayerFromAccount, deriveBtcBip49SeedFromMnemonic, deriveNativeSegwitAccountFromRootKeychain, deriveNativeSegwitReceiveAddressIndexZero, deriveRootBtcKeychain, deriveTaprootAccount, deriveTaprootReceiveAddressIndexZero, determineUtxosForSpend, determineUtxosForSpendAll, ecPairFromPrivateKey, ecdsaPublicKeyLength, ecdsaPublicKeyToSchnorr, encodeMessageWitnessData, extractExtendedPublicKeyFromPolicy, extractPayerInfoFromDerivationPath, extractRequiredKeyOrigins, extractXpubFromDescriptor, filterUneconomicalUtxos, generateBitcoinUnsignedTransaction, getAddressFromOutScript, getBitcoinAddressNetworkType, getBitcoinCoinTypeIndexByNetwork, getBitcoinFees, getBitcoinInputAddress, getBitcoinInputValue, getBitcoinJsLibNetworkConfigByMode, getBitcoinTransactionFee, getBtcSignerLibNetworkConfigByMode, getDescriptorFromKeychain, getHdKeyVersionsFromNetwork, getInputPaymentType, getNativeSegwitAccountDerivationPath, getNativeSegwitAddress, getNativeSegwitAddressIndexDerivationPath, getNativeSegwitPaymentFromAddressIndex, getNetworkTypeFromAddress, getParsedInputs, getParsedOutputs, getPsbtAsTransaction, getPsbtDetails, getPsbtTotals, getPsbtTxInputs, getPsbtTxOutputs, getRawPsbt, getSizeInfo, getSpendableAmount, getTaprootAccountDerivationPath, getTaprootAddress, getTaprootAddressIndexDerivationPath, getTaprootPayment, getTaprootPaymentFromAddressIndex, getUtxoTotal, hashBip322Message, inValidCharactersAddress, inValidLengthAddress, inferNetworkFromAddress, inferNetworkFromPath, inferPaymentTypeFromAddress, inferPaymentTypeFromDescriptor, inferPaymentTypeFromPath, initBitcoinAccount, initializeBitcoinAccountKeychainFromDescriptor, invalidAddress, isBitcoinAddress, isBtcBalanceSufficient, isBtcMinimumSpend, isBtcSignerLibPaymentType, isSupportedMessageSigningPaymentType, isValidBitcoinAddress, isValidBitcoinNetworkAddress, isValidBitcoinTransaction, legacyAddress, lookUpLedgerKeysByPath, lookupDerivationByAddress, makeNativeSegwitAccountDerivationPath, makeNativeSegwitAddressIndexDerivationPath, makePayToScriptHashAddress, makePayToScriptHashAddressBytes, makePayToScriptHashKeyHash, makeTaprootAccountDerivationPath, makeTaprootAddressIndexDerivationPath, mnemonicToRootNode, nonEmptyStringValidator, parseKnownPaymentType, payToScriptHashTestnetPrefix, payerToBip32Derivation, payerToBip32DerivationBitcoinJsLib, payerToTapBip32Derivation, payerToTapBip32DerivationBitcoinJsLib, paymentTypeMap, publicKeyToPayToScriptHashAddress, recipientAddress, segwitAddress, serializeKeyOrigin, signBip322MessageSimple, taprootAddress, toXOnly, tweakSigner, whenBitcoinNetwork, whenPaymentType, whenSupportedPaymentType };
747
+ //# sourceMappingURL=index.d.ts.map