@scure/btc-signer 2.2.0 → 2.4.0
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/README.md +196 -37
- package/index.d.ts +4 -4
- package/index.js +3 -4
- package/musig2.d.ts +28 -9
- package/musig2.js +46 -18
- package/net.d.ts +355 -0
- package/net.js +880 -0
- package/p2p.d.ts +0 -1
- package/p2p.js +23 -7
- package/package.json +18 -21
- package/payment.d.ts +18 -11
- package/payment.js +203 -58
- package/psbt.d.ts +680 -10
- package/psbt.js +204 -43
- package/script.d.ts +1 -2
- package/script.js +71 -59
- package/src/_type_test.ts +83 -0
- package/src/index.ts +4 -2
- package/src/musig2.ts +71 -19
- package/src/net.ts +1111 -0
- package/src/p2p.ts +22 -6
- package/src/payment.ts +233 -70
- package/src/psbt.ts +228 -39
- package/src/script.ts +57 -35
- package/src/transaction.ts +869 -168
- package/src/utils.ts +92 -4
- package/src/utxo.ts +223 -113
- package/transaction.d.ts +40 -7
- package/transaction.js +745 -151
- package/utils.d.ts +45 -2
- package/utils.js +80 -5
- package/utxo.d.ts +192 -2
- package/utxo.js +200 -99
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/musig2.d.ts.map +0 -1
- package/musig2.js.map +0 -1
- package/p2p.d.ts.map +0 -1
- package/p2p.js.map +0 -1
- package/payment.d.ts.map +0 -1
- package/payment.js.map +0 -1
- package/psbt.d.ts.map +0 -1
- package/psbt.js.map +0 -1
- package/script.d.ts.map +0 -1
- package/script.js.map +0 -1
- package/transaction.d.ts.map +0 -1
- package/transaction.js.map +0 -1
- package/utils.d.ts.map +0 -1
- package/utils.js.map +0 -1
- package/utxo.d.ts.map +0 -1
- package/utxo.js.map +0 -1
package/utils.d.ts
CHANGED
|
@@ -1,10 +1,40 @@
|
|
|
1
1
|
import { sha256 as nobleSha256 } from '@noble/hashes/sha2.js';
|
|
2
2
|
import { type TArg, type TRet } from '@noble/hashes/utils.js';
|
|
3
|
+
export { abytes, validateObject as vld } from '@noble/curves/utils.js';
|
|
3
4
|
export { type TArg, type TRet } from '@noble/hashes/utils.js';
|
|
4
5
|
/** Hex-like input accepted by helpers in this module. */
|
|
5
6
|
export type Hex = string | Uint8Array;
|
|
6
7
|
/** Byte array alias used across the library. */
|
|
7
8
|
export type Bytes = Uint8Array;
|
|
9
|
+
/**
|
|
10
|
+
* Validates that a value is a non-negative bigint.
|
|
11
|
+
* @param n - Value to validate.
|
|
12
|
+
* @param title - Label included in thrown errors.
|
|
13
|
+
* @returns The same bigint.
|
|
14
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
15
|
+
* @example
|
|
16
|
+
* Validate a satoshi amount before transaction encoding.
|
|
17
|
+
* ```ts
|
|
18
|
+
* abigint(1n, 'amount');
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function abigint(n: unknown, title?: string): bigint;
|
|
22
|
+
export declare function aarray<T>(item: unknown, title: string, inner?: (elm: T, title: string) => void): T[];
|
|
23
|
+
/**
|
|
24
|
+
* Asserts something is a string.
|
|
25
|
+
* @param value - Value to validate.
|
|
26
|
+
* @param title - Label included in thrown errors.
|
|
27
|
+
* @returns The validated string.
|
|
28
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
29
|
+
* @example
|
|
30
|
+
* Validate a label string.
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* astring('example', 'label');
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function astring(value: unknown, title?: string): string;
|
|
37
|
+
export declare function validateObject(object: Record<string, any>, fields?: Record<string, string>, optFields?: Record<string, string>, _title?: string): void;
|
|
8
38
|
/**
|
|
9
39
|
* Checks whether a curve y-coordinate is even.
|
|
10
40
|
* @param y - y-coordinate to inspect
|
|
@@ -234,8 +264,22 @@ export declare function taprootTweakPrivKey(privKey: TArg<Bytes>, merkleRoot?: T
|
|
|
234
264
|
* ```
|
|
235
265
|
*/
|
|
236
266
|
export declare function taprootTweakPubkey(pubKey: TArg<Bytes>, h: TArg<Bytes>): TRet<[Bytes, number]>;
|
|
237
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* Standard unspendable internal key used for script-only Taproot outputs.
|
|
269
|
+
* @deprecated Use {@link taprootNumsKey} to receive an owned copy.
|
|
270
|
+
*/
|
|
238
271
|
export declare const TAPROOT_UNSPENDABLE_KEY: TRet<Bytes>;
|
|
272
|
+
/**
|
|
273
|
+
* Returns an owned copy of the library's stable Taproot NUMS key.
|
|
274
|
+
* @returns A new 32-byte NUMS key copy.
|
|
275
|
+
* @example
|
|
276
|
+
* Obtain an internal key without sharing mutable exported storage.
|
|
277
|
+
* ```ts
|
|
278
|
+
* import { taprootNumsKey } from '@scure/btc-signer/utils.js';
|
|
279
|
+
* const internalKey = taprootNumsKey();
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
export declare function taprootNumsKey(): TRet<Bytes>;
|
|
239
283
|
/** Bitcoin network parameters. */
|
|
240
284
|
export type BTC_NETWORK = {
|
|
241
285
|
/** Human-readable prefix used by Bech32 and Bech32m addresses. */
|
|
@@ -280,4 +324,3 @@ export declare function reverseObject<T extends Record<string, string | number>>
|
|
|
280
324
|
};
|
|
281
325
|
/** Union of all value types in an object type. */
|
|
282
326
|
export type ValueOf<T> = T[keyof T];
|
|
283
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/utils.js
CHANGED
|
@@ -4,10 +4,64 @@ import { ripemd160 } from '@noble/hashes/legacy.js';
|
|
|
4
4
|
import { sha256 as nobleSha256 } from '@noble/hashes/sha2.js';
|
|
5
5
|
import {} from '@noble/hashes/utils.js';
|
|
6
6
|
import { utils as packedUtils, U32LE } from 'micro-packed';
|
|
7
|
+
export { abytes, validateObject as vld } from '@noble/curves/utils.js';
|
|
7
8
|
export {} from '@noble/hashes/utils.js';
|
|
9
|
+
/**
|
|
10
|
+
* Validates that a value is a non-negative bigint.
|
|
11
|
+
* @param n - Value to validate.
|
|
12
|
+
* @param title - Label included in thrown errors.
|
|
13
|
+
* @returns The same bigint.
|
|
14
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
15
|
+
* @example
|
|
16
|
+
* Validate a satoshi amount before transaction encoding.
|
|
17
|
+
* ```ts
|
|
18
|
+
* abigint(1n, 'amount');
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function abigint(n, title = 'value') {
|
|
22
|
+
if (typeof n !== 'bigint')
|
|
23
|
+
throw new TypeError(`"${title}" expected bigint, got type=${typeof n}`);
|
|
24
|
+
if (n < _0n)
|
|
25
|
+
throw new RangeError(`"${title}" expected non-negative bigint, got ${n}`);
|
|
26
|
+
return n;
|
|
27
|
+
}
|
|
28
|
+
import { validateObject as vld } from '@noble/curves/utils.js';
|
|
29
|
+
export function aarray(item, title, inner = () => { }) {
|
|
30
|
+
if (!Array.isArray(item))
|
|
31
|
+
throw new TypeError(`"${title}" expected array, got type=${typeof item}`);
|
|
32
|
+
for (let i = 0; i < item.length; i++)
|
|
33
|
+
inner(item[i], `${title}[${i}]`);
|
|
34
|
+
return item;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Asserts something is a string.
|
|
38
|
+
* @param value - Value to validate.
|
|
39
|
+
* @param title - Label included in thrown errors.
|
|
40
|
+
* @returns The validated string.
|
|
41
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
42
|
+
* @example
|
|
43
|
+
* Validate a label string.
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* astring('example', 'label');
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export function astring(value, title = '') {
|
|
50
|
+
if (typeof value !== 'string') {
|
|
51
|
+
const prefix = title && `"${title}" `;
|
|
52
|
+
throw new TypeError(prefix + 'expected string, got type=' + typeof value);
|
|
53
|
+
}
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
export function validateObject(object, fields = {}, optFields = {}, _title = 'object') {
|
|
57
|
+
return vld(object, fields, optFields);
|
|
58
|
+
}
|
|
8
59
|
const Point = /* @__PURE__ */ (() => secp.Point)();
|
|
9
60
|
const Fn = /* @__PURE__ */ (() => Point.Fn)();
|
|
10
61
|
const CURVE_ORDER = /* @__PURE__ */ (() => Point.Fn.ORDER)();
|
|
62
|
+
// Be friendly to bad ECMAScript parsers by not using bigint literals.
|
|
63
|
+
// prettier-ignore
|
|
64
|
+
const _0n = /* @__PURE__ */ BigInt(0), _2n = /* @__PURE__ */ BigInt(2);
|
|
11
65
|
/**
|
|
12
66
|
* Checks whether a curve y-coordinate is even.
|
|
13
67
|
* @param y - y-coordinate to inspect
|
|
@@ -18,7 +72,7 @@ const CURVE_ORDER = /* @__PURE__ */ (() => Point.Fn.ORDER)();
|
|
|
18
72
|
* hasEven(2n);
|
|
19
73
|
* ```
|
|
20
74
|
*/
|
|
21
|
-
export const hasEven = (y) => y %
|
|
75
|
+
export const hasEven = (y) => y % _2n === _0n;
|
|
22
76
|
/**
|
|
23
77
|
* Checks whether a value is a Uint8Array.
|
|
24
78
|
* @param a - value to inspect
|
|
@@ -127,7 +181,10 @@ export const pubECDSA = (privateKey, isCompressed) => secp.getPublicKey(privateK
|
|
|
127
181
|
// noble/secp256k1 does not support the feature: it is not used outside of BTC.
|
|
128
182
|
// We implement it manually, because in BTC it's common.
|
|
129
183
|
// Not best way, but closest to bitcoin implementation (easier to check)
|
|
130
|
-
|
|
184
|
+
// Hoisted: the bound is constant; no need to redo the bigint division on every
|
|
185
|
+
// grinding-loop iteration. n/2 < 2^255, so r < n/2 guarantees the 32-byte DER r.
|
|
186
|
+
const LOW_R_BOUND = /* @__PURE__ */ (() => CURVE_ORDER / _2n)();
|
|
187
|
+
const hasLowR = (sig) => sig.r < LOW_R_BOUND;
|
|
131
188
|
/**
|
|
132
189
|
* Signs a 32-byte hash with ECDSA and returns DER encoding.
|
|
133
190
|
* @param hash - message hash to sign
|
|
@@ -316,8 +373,27 @@ export function taprootTweakPubkey(pubKey, h) {
|
|
|
316
373
|
// This is the fixed BIP 341 H example, not the privacy-preserving H + rG variant.
|
|
317
374
|
// Downstream helpers use exact-byte equality with it to recognize
|
|
318
375
|
// library-generated script-only outputs.
|
|
319
|
-
|
|
320
|
-
export
|
|
376
|
+
// Keep the value used by library internals private: exported Uint8Arrays are mutable, so the
|
|
377
|
+
// public compatibility export below cannot safely be a source of cryptographic key material.
|
|
378
|
+
const INTERNAL_TAPROOT_NUMS = /* @__PURE__ */ (() => sha256(Point.BASE.toBytes(false)))();
|
|
379
|
+
/**
|
|
380
|
+
* Standard unspendable internal key used for script-only Taproot outputs.
|
|
381
|
+
* @deprecated Use {@link taprootNumsKey} to receive an owned copy.
|
|
382
|
+
*/
|
|
383
|
+
export const TAPROOT_UNSPENDABLE_KEY = /* @__PURE__ */ (() => Uint8Array.from(INTERNAL_TAPROOT_NUMS))();
|
|
384
|
+
/**
|
|
385
|
+
* Returns an owned copy of the library's stable Taproot NUMS key.
|
|
386
|
+
* @returns A new 32-byte NUMS key copy.
|
|
387
|
+
* @example
|
|
388
|
+
* Obtain an internal key without sharing mutable exported storage.
|
|
389
|
+
* ```ts
|
|
390
|
+
* import { taprootNumsKey } from '@scure/btc-signer/utils.js';
|
|
391
|
+
* const internalKey = taprootNumsKey();
|
|
392
|
+
* ```
|
|
393
|
+
*/
|
|
394
|
+
export function taprootNumsKey() {
|
|
395
|
+
return Uint8Array.from(INTERNAL_TAPROOT_NUMS);
|
|
396
|
+
}
|
|
321
397
|
/** Bitcoin mainnet network parameters. */
|
|
322
398
|
export const NETWORK = /* @__PURE__ */ Object.freeze({
|
|
323
399
|
bech32: 'bc',
|
|
@@ -378,4 +454,3 @@ export function reverseObject(obj) {
|
|
|
378
454
|
}
|
|
379
455
|
return res;
|
|
380
456
|
}
|
|
381
|
-
//# sourceMappingURL=utils.js.map
|
package/utxo.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as P from 'micro-packed';
|
|
2
2
|
import * as psbt from './psbt.ts';
|
|
3
3
|
import { Transaction, type TxOpts } from './transaction.ts';
|
|
4
|
-
import { type Bytes, NETWORK, type TArg } from './utils.ts';
|
|
4
|
+
import { type Bytes, NETWORK, type TArg, type TRet } from './utils.ts';
|
|
5
5
|
/** Minimal output target accepted by the UTXO selector. */
|
|
6
6
|
export type Output = {
|
|
7
7
|
address: string;
|
|
@@ -17,6 +17,21 @@ export type Accumulated = {
|
|
|
17
17
|
weight: number;
|
|
18
18
|
total: bigint;
|
|
19
19
|
} | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Removes Taproot spend paths that cannot be satisfied by the supplied Schnorr public keys.
|
|
22
|
+
* Non-Taproot inputs are retained, and caller-owned input metadata is never mutated.
|
|
23
|
+
* @param inputs - candidate PSBT input records to filter
|
|
24
|
+
* @param pubkeys - available x-only Schnorr public keys
|
|
25
|
+
* @returns Copies of inputs that retain at least one available path
|
|
26
|
+
* @example
|
|
27
|
+
* Filter wallet UTXOs before selecting coins.
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { filterTaproot } from '@scure/btc-signer/utxo.js';
|
|
30
|
+
* import { pubSchnorr, randomPrivateKeyBytes } from '@scure/btc-signer/utils.js';
|
|
31
|
+
* const spendable = filterTaproot([], [pubSchnorr(randomPrivateKeyBytes())]);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function filterTaproot(inputs: TArg<psbt.TransactionInputUpdate[]>, pubkeys: TArg<Bytes[]>): TRet<psbt.TransactionInputUpdate[]>;
|
|
20
35
|
export declare const _cmpBig: (a: bigint, b: bigint) => 0 | 1 | -1;
|
|
21
36
|
/** Options for fee estimation and UTXO selection. */
|
|
22
37
|
export type EstimatorOpts = TxOpts & {
|
|
@@ -30,6 +45,8 @@ export type EstimatorOpts = TxOpts & {
|
|
|
30
45
|
createTx?: boolean;
|
|
31
46
|
requiredInputs?: psbt.TransactionInputUpdate[];
|
|
32
47
|
allowSameUtxo?: boolean;
|
|
48
|
+
/** Filter Taproot candidate paths to those satisfiable by these Schnorr public keys. */
|
|
49
|
+
filterTaproot?: Bytes[];
|
|
33
50
|
};
|
|
34
51
|
type SortStrategy = 'Newest' | 'Oldest' | 'Smallest' | 'Biggest';
|
|
35
52
|
type ExactStrategy = `exact${SortStrategy}`;
|
|
@@ -118,6 +135,25 @@ export declare class _Estimator {
|
|
|
118
135
|
}>][] | undefined;
|
|
119
136
|
tapInternalKey?: Bytes | undefined;
|
|
120
137
|
tapMerkleRoot?: Bytes | undefined;
|
|
138
|
+
p2cKeyTweak?: [Bytes, Bytes][] | undefined;
|
|
139
|
+
musig2ParticipantPubkeys?: [Bytes, Bytes[]][] | undefined;
|
|
140
|
+
musig2PubNonce?: [TArg<{
|
|
141
|
+
participantPubkey: Bytes;
|
|
142
|
+
aggregatePubkey: Bytes;
|
|
143
|
+
leafHash?: Bytes;
|
|
144
|
+
}>, Bytes][] | undefined;
|
|
145
|
+
musig2PartialSig?: [TArg<{
|
|
146
|
+
participantPubkey: Bytes;
|
|
147
|
+
aggregatePubkey: Bytes;
|
|
148
|
+
leafHash?: Bytes;
|
|
149
|
+
}>, Bytes][] | undefined;
|
|
150
|
+
spEcdhShare?: [Bytes, Bytes][] | undefined;
|
|
151
|
+
spDleq?: [Bytes, Bytes][] | undefined;
|
|
152
|
+
spSpendBip32Derivation?: [Bytes, P.StructInput<{
|
|
153
|
+
fingerprint: number;
|
|
154
|
+
path: number[];
|
|
155
|
+
}>][] | undefined;
|
|
156
|
+
spTweak?: Bytes | undefined;
|
|
121
157
|
proprietary?: [Bytes, Bytes][] | undefined;
|
|
122
158
|
} & {
|
|
123
159
|
unknown?: [P.UnwrapCoder<P.CoderType<P.StructInput<{
|
|
@@ -270,6 +306,74 @@ export declare class _Estimator {
|
|
|
270
306
|
}])[]) | undefined;
|
|
271
307
|
tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
272
308
|
tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
309
|
+
p2cKeyTweak?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
310
|
+
musig2ParticipantPubkeys?: ([Bytes, Bytes[]][] & ([Bytes, Bytes[]] & [Bytes & Uint8Array<ArrayBuffer>, Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]])[]) | undefined;
|
|
311
|
+
musig2PubNonce?: ([TArg<{
|
|
312
|
+
participantPubkey: Bytes;
|
|
313
|
+
aggregatePubkey: Bytes;
|
|
314
|
+
leafHash?: Bytes;
|
|
315
|
+
}>, Bytes][] & ([TArg<{
|
|
316
|
+
participantPubkey: Bytes;
|
|
317
|
+
aggregatePubkey: Bytes;
|
|
318
|
+
leafHash?: Bytes;
|
|
319
|
+
}>, Bytes] & [({
|
|
320
|
+
participantPubkey: Bytes;
|
|
321
|
+
aggregatePubkey: Bytes;
|
|
322
|
+
leafHash?: Bytes;
|
|
323
|
+
} & {
|
|
324
|
+
participantPubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
325
|
+
aggregatePubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
326
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
327
|
+
}) | ({
|
|
328
|
+
participantPubkey: TArg<Bytes>;
|
|
329
|
+
aggregatePubkey: TArg<Bytes>;
|
|
330
|
+
leafHash?: TArg<Bytes | undefined>;
|
|
331
|
+
} & {
|
|
332
|
+
participantPubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
333
|
+
aggregatePubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
334
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>) | undefined;
|
|
335
|
+
}), Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
336
|
+
musig2PartialSig?: ([TArg<{
|
|
337
|
+
participantPubkey: Bytes;
|
|
338
|
+
aggregatePubkey: Bytes;
|
|
339
|
+
leafHash?: Bytes;
|
|
340
|
+
}>, Bytes][] & ([TArg<{
|
|
341
|
+
participantPubkey: Bytes;
|
|
342
|
+
aggregatePubkey: Bytes;
|
|
343
|
+
leafHash?: Bytes;
|
|
344
|
+
}>, Bytes] & [({
|
|
345
|
+
participantPubkey: Bytes;
|
|
346
|
+
aggregatePubkey: Bytes;
|
|
347
|
+
leafHash?: Bytes;
|
|
348
|
+
} & {
|
|
349
|
+
participantPubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
350
|
+
aggregatePubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
351
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
352
|
+
}) | ({
|
|
353
|
+
participantPubkey: TArg<Bytes>;
|
|
354
|
+
aggregatePubkey: TArg<Bytes>;
|
|
355
|
+
leafHash?: TArg<Bytes | undefined>;
|
|
356
|
+
} & {
|
|
357
|
+
participantPubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
358
|
+
aggregatePubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
359
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>) | undefined;
|
|
360
|
+
}), Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
361
|
+
spEcdhShare?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
362
|
+
spDleq?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
363
|
+
spSpendBip32Derivation?: ([Bytes, P.StructInput<{
|
|
364
|
+
fingerprint: number;
|
|
365
|
+
path: number[];
|
|
366
|
+
}>][] & ([Bytes, P.StructInput<{
|
|
367
|
+
fingerprint: number;
|
|
368
|
+
path: number[];
|
|
369
|
+
}>] & [Bytes & Uint8Array<ArrayBuffer>, {
|
|
370
|
+
path: number[];
|
|
371
|
+
fingerprint: number;
|
|
372
|
+
} & {} & {
|
|
373
|
+
path: number[] & number[];
|
|
374
|
+
fingerprint: number;
|
|
375
|
+
}])[]) | undefined;
|
|
376
|
+
spTweak?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
273
377
|
proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
274
378
|
unknown?: ([P.StructInput<{
|
|
275
379
|
type: number;
|
|
@@ -383,6 +487,25 @@ export declare function selectUTXO(inputs: TArg<psbt.TransactionInputUpdate[]>,
|
|
|
383
487
|
}>][] | undefined;
|
|
384
488
|
tapInternalKey?: Bytes | undefined;
|
|
385
489
|
tapMerkleRoot?: Bytes | undefined;
|
|
490
|
+
p2cKeyTweak?: [Bytes, Bytes][] | undefined;
|
|
491
|
+
musig2ParticipantPubkeys?: [Bytes, Bytes[]][] | undefined;
|
|
492
|
+
musig2PubNonce?: [TArg<{
|
|
493
|
+
participantPubkey: Bytes;
|
|
494
|
+
aggregatePubkey: Bytes;
|
|
495
|
+
leafHash?: Bytes;
|
|
496
|
+
}>, Bytes][] | undefined;
|
|
497
|
+
musig2PartialSig?: [TArg<{
|
|
498
|
+
participantPubkey: Bytes;
|
|
499
|
+
aggregatePubkey: Bytes;
|
|
500
|
+
leafHash?: Bytes;
|
|
501
|
+
}>, Bytes][] | undefined;
|
|
502
|
+
spEcdhShare?: [Bytes, Bytes][] | undefined;
|
|
503
|
+
spDleq?: [Bytes, Bytes][] | undefined;
|
|
504
|
+
spSpendBip32Derivation?: [Bytes, P.StructInput<{
|
|
505
|
+
fingerprint: number;
|
|
506
|
+
path: number[];
|
|
507
|
+
}>][] | undefined;
|
|
508
|
+
spTweak?: Bytes | undefined;
|
|
386
509
|
proprietary?: [Bytes, Bytes][] | undefined;
|
|
387
510
|
} & {
|
|
388
511
|
unknown?: [P.UnwrapCoder<P.CoderType<P.StructInput<{
|
|
@@ -535,6 +658,74 @@ export declare function selectUTXO(inputs: TArg<psbt.TransactionInputUpdate[]>,
|
|
|
535
658
|
}])[]) | undefined;
|
|
536
659
|
tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
537
660
|
tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
661
|
+
p2cKeyTweak?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
662
|
+
musig2ParticipantPubkeys?: ([Bytes, Bytes[]][] & ([Bytes, Bytes[]] & [Bytes & Uint8Array<ArrayBuffer>, Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]])[]) | undefined;
|
|
663
|
+
musig2PubNonce?: ([TArg<{
|
|
664
|
+
participantPubkey: Bytes;
|
|
665
|
+
aggregatePubkey: Bytes;
|
|
666
|
+
leafHash?: Bytes;
|
|
667
|
+
}>, Bytes][] & ([TArg<{
|
|
668
|
+
participantPubkey: Bytes;
|
|
669
|
+
aggregatePubkey: Bytes;
|
|
670
|
+
leafHash?: Bytes;
|
|
671
|
+
}>, Bytes] & [({
|
|
672
|
+
participantPubkey: Bytes;
|
|
673
|
+
aggregatePubkey: Bytes;
|
|
674
|
+
leafHash?: Bytes;
|
|
675
|
+
} & {
|
|
676
|
+
participantPubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
677
|
+
aggregatePubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
678
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
679
|
+
}) | ({
|
|
680
|
+
participantPubkey: TArg<Bytes>;
|
|
681
|
+
aggregatePubkey: TArg<Bytes>;
|
|
682
|
+
leafHash?: TArg<Bytes | undefined>;
|
|
683
|
+
} & {
|
|
684
|
+
participantPubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
685
|
+
aggregatePubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
686
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>) | undefined;
|
|
687
|
+
}), Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
688
|
+
musig2PartialSig?: ([TArg<{
|
|
689
|
+
participantPubkey: Bytes;
|
|
690
|
+
aggregatePubkey: Bytes;
|
|
691
|
+
leafHash?: Bytes;
|
|
692
|
+
}>, Bytes][] & ([TArg<{
|
|
693
|
+
participantPubkey: Bytes;
|
|
694
|
+
aggregatePubkey: Bytes;
|
|
695
|
+
leafHash?: Bytes;
|
|
696
|
+
}>, Bytes] & [({
|
|
697
|
+
participantPubkey: Bytes;
|
|
698
|
+
aggregatePubkey: Bytes;
|
|
699
|
+
leafHash?: Bytes;
|
|
700
|
+
} & {
|
|
701
|
+
participantPubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
702
|
+
aggregatePubkey: Bytes & Uint8Array<ArrayBuffer>;
|
|
703
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
704
|
+
}) | ({
|
|
705
|
+
participantPubkey: TArg<Bytes>;
|
|
706
|
+
aggregatePubkey: TArg<Bytes>;
|
|
707
|
+
leafHash?: TArg<Bytes | undefined>;
|
|
708
|
+
} & {
|
|
709
|
+
participantPubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
710
|
+
aggregatePubkey: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>);
|
|
711
|
+
leafHash?: (Bytes & Uint8Array<ArrayBuffer>) | (Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>) | undefined;
|
|
712
|
+
}), Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
713
|
+
spEcdhShare?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
714
|
+
spDleq?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
715
|
+
spSpendBip32Derivation?: ([Bytes, P.StructInput<{
|
|
716
|
+
fingerprint: number;
|
|
717
|
+
path: number[];
|
|
718
|
+
}>][] & ([Bytes, P.StructInput<{
|
|
719
|
+
fingerprint: number;
|
|
720
|
+
path: number[];
|
|
721
|
+
}>] & [Bytes & Uint8Array<ArrayBuffer>, {
|
|
722
|
+
path: number[];
|
|
723
|
+
fingerprint: number;
|
|
724
|
+
} & {} & {
|
|
725
|
+
path: number[] & number[];
|
|
726
|
+
fingerprint: number;
|
|
727
|
+
}])[]) | undefined;
|
|
728
|
+
spTweak?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
|
|
538
729
|
proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
|
|
539
730
|
unknown?: ([P.StructInput<{
|
|
540
731
|
type: number;
|
|
@@ -558,4 +749,3 @@ export declare function selectUTXO(inputs: TArg<psbt.TransactionInputUpdate[]>,
|
|
|
558
749
|
tx: Transaction | undefined;
|
|
559
750
|
}) | undefined;
|
|
560
751
|
export {};
|
|
561
|
-
//# sourceMappingURL=utxo.d.ts.map
|