@btc-vision/transaction 1.7.24 → 1.7.26
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/browser/btc-vision-bitcoin.js +12 -13
- package/browser/index.js +410 -397
- package/browser/noble-curves.js +1045 -1016
- package/browser/noble-hashes.js +918 -728
- package/browser/vendors.js +11492 -12407
- package/build/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
- package/build/transaction/builders/ChallengeSolutionTransaction.js +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +20 -18
- package/src/crypto/crypto-browser.js +9 -16
- package/src/shims/vm-browser.js +19 -0
- package/src/shims/zlib-browser.js +24 -0
- package/tsconfig.build.json +5 -0
- package/vite.config.browser.ts +32 -29
- package/browser/bip39.js +0 -204
- package/browser/bitcoin-utils.js +0 -3172
- package/browser/btc-vision-bip32.js +0 -805
- package/browser/btc-vision-logger.js +0 -273
- package/browser/btc-vision-post-quantum.js +0 -542
- package/browser/polyfills.js +0 -4590
- package/browser/scure-base.js +0 -410
- package/build/crypto/crypto-browser.d.ts +0 -11
- package/build/crypto/crypto-browser.js +0 -56
- package/gulpfile.js +0 -42
- package/webpack.config.js +0 -220
package/browser/index.js
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { B as a, g as Yt, h as Ie, j as P, k as Q, s as ki, l as te, a as I, L as ke, d as Dt, m as Ft, n as gt, c as Li, f as Ui, e as _i, o as Ki } from "./vendors.js";
|
|
2
|
+
import { i as at, b as T, p as Di, a as dt, c as ee, t as O, d as st, e as rt, f as L, g as Le, h as ie, j as St, k as Pe, l as Ci, o as g, m as F, n as Ct, q as Zt, r as Ue, s as Ri, u as G, v as ft, w as Fi, x as Wi, y as _e, z as xt, A as Gt, B as Ke, C as Mi, D as De, P as v, E as Ni, F as Ee, G as Hi, H as Ae, I as Vi, J as zi, K as qi, L as $i, M as _, T as re, N as Xi } from "./btc-vision-bitcoin.js";
|
|
3
|
+
import { s as Yi, m as Gi, f as Qi } from "./noble-curves.js";
|
|
4
|
+
import { C as ji, n as ae, l as Zi, g as Ji } from "./noble-hashes.js";
|
|
5
|
+
const tr = "1.7.24";
|
|
6
|
+
function er(n, t = {}) {
|
|
7
|
+
return a.from(Yt.gzip(n, { level: t.level || 6 }));
|
|
8
|
+
}
|
|
9
|
+
function ir(n) {
|
|
10
|
+
return a.from(Yt.ungzip(n));
|
|
11
|
+
}
|
|
12
|
+
function rr(n, t = {}) {
|
|
13
|
+
return a.from(Yt.deflate(n, { level: t.level || 6 }));
|
|
14
|
+
}
|
|
15
|
+
function sr(n) {
|
|
16
|
+
return a.from(Yt.inflate(n));
|
|
17
|
+
}
|
|
18
|
+
const Oe = {
|
|
19
|
+
gzipSync: er,
|
|
20
|
+
gunzipSync: ir,
|
|
21
|
+
deflateSync: rr,
|
|
22
|
+
inflateSync: sr
|
|
23
|
+
};
|
|
11
24
|
class N {
|
|
12
25
|
static {
|
|
13
26
|
this.zlibOptions = {
|
|
@@ -22,7 +35,7 @@ class N {
|
|
|
22
35
|
* @returns {Buffer} The compressed data.
|
|
23
36
|
*/
|
|
24
37
|
static compress(t) {
|
|
25
|
-
return
|
|
38
|
+
return Oe.gzipSync(t, N.zlibOptions);
|
|
26
39
|
}
|
|
27
40
|
/**
|
|
28
41
|
* Decompresses the data using gunzip.
|
|
@@ -30,23 +43,23 @@ class N {
|
|
|
30
43
|
* @returns {Buffer} The decompressed data.
|
|
31
44
|
*/
|
|
32
45
|
static decompress(t) {
|
|
33
|
-
return
|
|
46
|
+
return Oe.gunzipSync(t, N.zlibOptions);
|
|
34
47
|
}
|
|
35
48
|
}
|
|
36
49
|
at(Q);
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
50
|
+
const Ce = typeof Ie == "function" ? Ie : P.BIP32Factory;
|
|
51
|
+
if (!Ce)
|
|
39
52
|
throw new Error("Failed to load BIP32 library");
|
|
40
|
-
const ct =
|
|
41
|
-
function
|
|
42
|
-
return
|
|
53
|
+
const ct = Yi.Point, nr = ct.Fn.ORDER, or = ji("TapTweak"), Be = ae(or);
|
|
54
|
+
function ar(n) {
|
|
55
|
+
return ae(Ji(Be, Be, n));
|
|
43
56
|
}
|
|
44
57
|
class A {
|
|
45
58
|
static {
|
|
46
|
-
this.BIP32 =
|
|
59
|
+
this.BIP32 = Ce(Q);
|
|
47
60
|
}
|
|
48
61
|
static {
|
|
49
|
-
this.ECPair =
|
|
62
|
+
this.ECPair = ki.ECPairFactory(Q);
|
|
50
63
|
}
|
|
51
64
|
static {
|
|
52
65
|
ct.BASE.precompute(8);
|
|
@@ -93,7 +106,7 @@ class A {
|
|
|
93
106
|
static generateMultiSigAddress(t, e, i = T) {
|
|
94
107
|
const r = this.verifyPubKeys(t, i);
|
|
95
108
|
if (r.length !== t.length) throw new Error("Contains invalid public keys");
|
|
96
|
-
const s =
|
|
109
|
+
const s = Di({
|
|
97
110
|
m: e,
|
|
98
111
|
pubkeys: r,
|
|
99
112
|
network: i
|
|
@@ -124,7 +137,7 @@ class A {
|
|
|
124
137
|
* @returns {string} - The address
|
|
125
138
|
*/
|
|
126
139
|
static getP2WPKHAddress(t, e = T) {
|
|
127
|
-
const i =
|
|
140
|
+
const i = ee({ pubkey: a.from(t.publicKey), network: e });
|
|
128
141
|
if (!i.address)
|
|
129
142
|
throw new Error("Failed to generate wallet");
|
|
130
143
|
return i.address;
|
|
@@ -172,7 +185,7 @@ class A {
|
|
|
172
185
|
if (r.length < 2 || r.length > 40)
|
|
173
186
|
throw new Error("Witness program must be 2-40 bytes.");
|
|
174
187
|
const s = L([g.OP_16, r]);
|
|
175
|
-
return
|
|
188
|
+
return Le(s, e);
|
|
176
189
|
}
|
|
177
190
|
/**
|
|
178
191
|
* Get the address of a xOnly tweaked public key
|
|
@@ -199,7 +212,7 @@ class A {
|
|
|
199
212
|
*/
|
|
200
213
|
static tweakPublicKey(t) {
|
|
201
214
|
typeof t == "string" && t.startsWith("0x") && (t = t.slice(2));
|
|
202
|
-
const e = ct.fromHex(t), i = (e.y & 1n) === 0n ? e : e.negate(), r = a.from(i.toBytes(!0).subarray(1)), s =
|
|
215
|
+
const e = ct.fromHex(t), i = (e.y & 1n) === 0n ? e : e.negate(), r = a.from(i.toBytes(!0).subarray(1)), s = ar(r), o = Gi(Qi(s), nr), c = i.add(ct.BASE.multiply(o));
|
|
203
216
|
return a.from(c.toBytes(!0));
|
|
204
217
|
}
|
|
205
218
|
/**
|
|
@@ -248,7 +261,7 @@ class A {
|
|
|
248
261
|
* @returns A random ML-DSA keypair
|
|
249
262
|
*/
|
|
250
263
|
static generateQuantumKeyPair(t = P.MLDSASecurityLevel.LEVEL2, e = T) {
|
|
251
|
-
const i =
|
|
264
|
+
const i = Zi(64), r = P.QuantumBIP32Factory.fromSeed(
|
|
252
265
|
a.from(i),
|
|
253
266
|
e,
|
|
254
267
|
t
|
|
@@ -267,7 +280,7 @@ class A {
|
|
|
267
280
|
* @returns {boolean} - Whether the address is valid
|
|
268
281
|
*/
|
|
269
282
|
static verifyContractAddress(t, e = T) {
|
|
270
|
-
return !!
|
|
283
|
+
return !!ie(t, e);
|
|
271
284
|
}
|
|
272
285
|
/**
|
|
273
286
|
* Get the legacy segwit address from a keypair
|
|
@@ -277,7 +290,7 @@ class A {
|
|
|
277
290
|
*/
|
|
278
291
|
static getLegacySegwitAddress(t, e = T) {
|
|
279
292
|
const i = St({
|
|
280
|
-
redeem:
|
|
293
|
+
redeem: ee({ pubkey: a.from(t.publicKey), network: e }),
|
|
281
294
|
network: e
|
|
282
295
|
});
|
|
283
296
|
if (!i.address)
|
|
@@ -291,7 +304,7 @@ class A {
|
|
|
291
304
|
* @returns {string} - The legacy address
|
|
292
305
|
*/
|
|
293
306
|
static getLegacyAddress(t, e = T) {
|
|
294
|
-
const i =
|
|
307
|
+
const i = Pe({ pubkey: a.from(t.publicKey), network: e });
|
|
295
308
|
if (!i.address)
|
|
296
309
|
throw new Error("Failed to generate wallet");
|
|
297
310
|
return i.address;
|
|
@@ -303,7 +316,7 @@ class A {
|
|
|
303
316
|
* @returns {string} - The legacy address
|
|
304
317
|
*/
|
|
305
318
|
static getP2PKH(t, e = T) {
|
|
306
|
-
const i =
|
|
319
|
+
const i = Pe({ pubkey: a.from(t), network: e });
|
|
307
320
|
if (!i.address)
|
|
308
321
|
throw new Error("Failed to generate wallet");
|
|
309
322
|
return i.address;
|
|
@@ -315,7 +328,7 @@ class A {
|
|
|
315
328
|
* @returns {string} - The legacy address
|
|
316
329
|
*/
|
|
317
330
|
static getP2PKAddress(t, e = T) {
|
|
318
|
-
const i =
|
|
331
|
+
const i = Ci({ pubkey: a.from(t.publicKey), network: e });
|
|
319
332
|
if (!i.output)
|
|
320
333
|
throw new Error("Failed to generate wallet");
|
|
321
334
|
return "0x" + i.output.toString("hex");
|
|
@@ -381,7 +394,7 @@ class A {
|
|
|
381
394
|
return this.ECPair.fromPrivateKey(a.from(r), { network: e });
|
|
382
395
|
}
|
|
383
396
|
}
|
|
384
|
-
const D = 32,
|
|
397
|
+
const D = 32, cr = 4, Pt = 32, yt = 16, Wt = 8, lt = 4, Et = 2, Mt = 1, ur = 32, mt = 16, hr = 8, lr = 4, dr = 2, fr = 1, pr = 1;
|
|
385
398
|
class Y {
|
|
386
399
|
static {
|
|
387
400
|
this.EXPECTED_BUFFER_LENGTH = 32;
|
|
@@ -422,7 +435,7 @@ class Y {
|
|
|
422
435
|
return BigInt(e ? "0x" + e : 0);
|
|
423
436
|
}
|
|
424
437
|
}
|
|
425
|
-
const
|
|
438
|
+
const gr = /^[0-9a-fA-F]+$/;
|
|
426
439
|
class K {
|
|
427
440
|
/**
|
|
428
441
|
* Converts satoshi to BTC
|
|
@@ -458,7 +471,7 @@ class K {
|
|
|
458
471
|
);
|
|
459
472
|
}
|
|
460
473
|
static isValidHex(t) {
|
|
461
|
-
return
|
|
474
|
+
return gr.test(t);
|
|
462
475
|
}
|
|
463
476
|
/**
|
|
464
477
|
* Hashes the given data
|
|
@@ -466,7 +479,7 @@ class K {
|
|
|
466
479
|
* @returns {string} The hashed data
|
|
467
480
|
*/
|
|
468
481
|
static opnetHash(t) {
|
|
469
|
-
const e =
|
|
482
|
+
const e = te("sha512");
|
|
470
483
|
e.update(t);
|
|
471
484
|
const i = e.digest();
|
|
472
485
|
return `0x${a.from(i).toString("hex")}`;
|
|
@@ -616,7 +629,7 @@ class H {
|
|
|
616
629
|
if (!t || t.length < 50) return !1;
|
|
617
630
|
let i = !1;
|
|
618
631
|
try {
|
|
619
|
-
|
|
632
|
+
ie(t, e), i = Ct(t).version === 1;
|
|
620
633
|
} catch {
|
|
621
634
|
}
|
|
622
635
|
return i;
|
|
@@ -632,8 +645,8 @@ class H {
|
|
|
632
645
|
if (!t || t.length < 20 || t.length > 50) return !1;
|
|
633
646
|
let i = !1;
|
|
634
647
|
try {
|
|
635
|
-
const r =
|
|
636
|
-
|
|
648
|
+
const r = Ct(t);
|
|
649
|
+
ie(t, e), i = r.version === 0 && r.data.length === 20;
|
|
637
650
|
} catch {
|
|
638
651
|
}
|
|
639
652
|
return i;
|
|
@@ -662,7 +675,7 @@ class H {
|
|
|
662
675
|
*/
|
|
663
676
|
static isP2PKHOrP2SH(t, e) {
|
|
664
677
|
try {
|
|
665
|
-
const i =
|
|
678
|
+
const i = Zt(t);
|
|
666
679
|
return i.version === e.pubKeyHash ? !0 : i.version === e.scriptHash;
|
|
667
680
|
} catch {
|
|
668
681
|
return !1;
|
|
@@ -740,7 +753,7 @@ class H {
|
|
|
740
753
|
static isValidP2OPAddress(t, e) {
|
|
741
754
|
if (!t || t.length < 20) return !1;
|
|
742
755
|
try {
|
|
743
|
-
const i =
|
|
756
|
+
const i = Ct(t);
|
|
744
757
|
return i.prefix === e.bech32 || i.prefix === e.bech32Opnet ? i.version === 16 && i.data.length === 21 : !1;
|
|
745
758
|
} catch {
|
|
746
759
|
return !1;
|
|
@@ -754,7 +767,7 @@ class H {
|
|
|
754
767
|
*/
|
|
755
768
|
static requireRedeemScript(t, e) {
|
|
756
769
|
try {
|
|
757
|
-
const i =
|
|
770
|
+
const i = Zt(t);
|
|
758
771
|
return i.version === e.pubKeyHash ? !1 : i.version === e.scriptHash;
|
|
759
772
|
} catch {
|
|
760
773
|
return !1;
|
|
@@ -779,7 +792,7 @@ class H {
|
|
|
779
792
|
if (H.isValidPublicKey(t, e))
|
|
780
793
|
return "P2PK";
|
|
781
794
|
try {
|
|
782
|
-
const i =
|
|
795
|
+
const i = Zt(t);
|
|
783
796
|
if (i.version === e.pubKeyHash)
|
|
784
797
|
return "P2PKH";
|
|
785
798
|
if (i.version === e.scriptHash)
|
|
@@ -787,7 +800,7 @@ class H {
|
|
|
787
800
|
} catch {
|
|
788
801
|
}
|
|
789
802
|
try {
|
|
790
|
-
const i =
|
|
803
|
+
const i = Ct(t);
|
|
791
804
|
if ((i.prefix === e.bech32Opnet || i.prefix === e.bech32) && i.version === 16 && i.data.length === 21)
|
|
792
805
|
return "P2OP";
|
|
793
806
|
if (i.prefix === e.bech32) {
|
|
@@ -885,7 +898,7 @@ class H {
|
|
|
885
898
|
}
|
|
886
899
|
}
|
|
887
900
|
const ot = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fn;
|
|
888
|
-
class
|
|
901
|
+
class Re {
|
|
889
902
|
constructor(t = 1e4) {
|
|
890
903
|
this.maxTries = t;
|
|
891
904
|
}
|
|
@@ -987,9 +1000,9 @@ class Ce {
|
|
|
987
1000
|
return e;
|
|
988
1001
|
}
|
|
989
1002
|
}
|
|
990
|
-
class
|
|
1003
|
+
class Sr {
|
|
991
1004
|
constructor() {
|
|
992
|
-
this.deriver = new
|
|
1005
|
+
this.deriver = new Re();
|
|
993
1006
|
}
|
|
994
1007
|
generateHybridKeyFromHash(t) {
|
|
995
1008
|
const e = this.deriver.findOrDeriveValidPoint(this.cloneBuffer(t), !1), i = this.deriver.getCanonicalY(e.y1, e.y2);
|
|
@@ -999,7 +1012,7 @@ class lr {
|
|
|
999
1012
|
return a.from(t);
|
|
1000
1013
|
}
|
|
1001
1014
|
}
|
|
1002
|
-
const
|
|
1015
|
+
const se = new Sr();
|
|
1003
1016
|
class M {
|
|
1004
1017
|
static {
|
|
1005
1018
|
this.UNSPENDABLE_INTERNAL_KEY = a.from(
|
|
@@ -1044,7 +1057,7 @@ class M {
|
|
|
1044
1057
|
}
|
|
1045
1058
|
static generateTimeLockScript(t, e = M.CSV_BLOCKS) {
|
|
1046
1059
|
return L([
|
|
1047
|
-
|
|
1060
|
+
Ue.encode(e),
|
|
1048
1061
|
g.OP_CHECKSEQUENCEVERIFY,
|
|
1049
1062
|
g.OP_DROP,
|
|
1050
1063
|
t,
|
|
@@ -1569,7 +1582,7 @@ class k extends Uint8Array {
|
|
|
1569
1582
|
`Invalid ML-DSA public key length: ${t.length}. Expected 1312 (ML-DSA-44/LEVEL2), 1952 (ML-DSA-65/LEVEL3), or 2592 (ML-DSA-87/LEVEL5) bytes.`
|
|
1570
1583
|
);
|
|
1571
1584
|
this.#l = new Uint8Array(t.length), this.#l.set(t);
|
|
1572
|
-
const i =
|
|
1585
|
+
const i = ae(new Uint8Array(t)), r = new Uint8Array(D);
|
|
1573
1586
|
r.set(i), super.set(r);
|
|
1574
1587
|
}
|
|
1575
1588
|
}
|
|
@@ -1584,7 +1597,7 @@ class k extends Uint8Array {
|
|
|
1584
1597
|
if (t)
|
|
1585
1598
|
if (t.length === D) {
|
|
1586
1599
|
const e = a.alloc(D);
|
|
1587
|
-
e.set(t), this.#n =
|
|
1600
|
+
e.set(t), this.#n = se.generateHybridKeyFromHash(e), this.#c = t;
|
|
1588
1601
|
} else
|
|
1589
1602
|
this.autoFormat(t);
|
|
1590
1603
|
}
|
|
@@ -1594,11 +1607,11 @@ class k extends Uint8Array {
|
|
|
1594
1607
|
*/
|
|
1595
1608
|
autoFormat(t) {
|
|
1596
1609
|
const e = t[0];
|
|
1597
|
-
e === 3 || e === 2 || (e === 4 || e === 6 || e === 7) && (t = k.uncompressedToCompressed(t)), this.#i = Uint8Array.from(t), this.#u = A.fromPublicKey(this.#i), this.#r =
|
|
1610
|
+
e === 3 || e === 2 || (e === 4 || e === 6 || e === 7) && (t = k.uncompressedToCompressed(t)), this.#i = Uint8Array.from(t), this.#u = A.fromPublicKey(this.#i), this.#r = Ri(this.#i);
|
|
1598
1611
|
const i = O(
|
|
1599
1612
|
A.tweakPublicKey(a.from(this.#i))
|
|
1600
1613
|
);
|
|
1601
|
-
this.#n =
|
|
1614
|
+
this.#n = se.generateHybridKeyFromHash(i), this.#c = new Uint8Array(D), this.#c.set(i);
|
|
1602
1615
|
}
|
|
1603
1616
|
}
|
|
1604
1617
|
class vt {
|
|
@@ -1665,7 +1678,7 @@ class vt {
|
|
|
1665
1678
|
yield [t, this._values[t]];
|
|
1666
1679
|
}
|
|
1667
1680
|
}
|
|
1668
|
-
class
|
|
1681
|
+
class Fe {
|
|
1669
1682
|
constructor(t) {
|
|
1670
1683
|
if (this.items = new vt(), t)
|
|
1671
1684
|
for (const [e, i] of t)
|
|
@@ -1719,7 +1732,7 @@ class Re {
|
|
|
1719
1732
|
yield* this.entries();
|
|
1720
1733
|
}
|
|
1721
1734
|
}
|
|
1722
|
-
class
|
|
1735
|
+
class Qt {
|
|
1723
1736
|
constructor(t) {
|
|
1724
1737
|
this.currentOffset = 0, this.buffer = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
1725
1738
|
}
|
|
@@ -1937,7 +1950,7 @@ class Gt {
|
|
|
1937
1950
|
* Reads [u16 length][ (address, u256) pairs ].
|
|
1938
1951
|
*/
|
|
1939
1952
|
readAddressValueTuple(t = !0) {
|
|
1940
|
-
const e = this.readU16(t), i = new
|
|
1953
|
+
const e = this.readU16(t), i = new Fe();
|
|
1941
1954
|
for (let r = 0; r < e; r++) {
|
|
1942
1955
|
const s = this.readAddress(), o = this.readU256(t);
|
|
1943
1956
|
if (i.has(s))
|
|
@@ -2079,7 +2092,7 @@ class C {
|
|
|
2079
2092
|
this.currentOffset = 0, this.buffer = this.getDefaultBuffer(4);
|
|
2080
2093
|
}
|
|
2081
2094
|
toBytesReader() {
|
|
2082
|
-
return new
|
|
2095
|
+
return new Qt(this.getBuffer());
|
|
2083
2096
|
}
|
|
2084
2097
|
getOffset() {
|
|
2085
2098
|
return this.currentOffset;
|
|
@@ -2271,7 +2284,7 @@ class $ {
|
|
|
2271
2284
|
r.writeBytes(i.legacySignature), e.writeBytesWithLength(r.getBuffer());
|
|
2272
2285
|
}
|
|
2273
2286
|
}
|
|
2274
|
-
class
|
|
2287
|
+
class ce extends $ {
|
|
2275
2288
|
constructor(t, e, i = T) {
|
|
2276
2289
|
super(t, e, i);
|
|
2277
2290
|
}
|
|
@@ -2358,7 +2371,7 @@ class ae extends $ {
|
|
|
2358
2371
|
return d;
|
|
2359
2372
|
}
|
|
2360
2373
|
}
|
|
2361
|
-
class
|
|
2374
|
+
class We extends $ {
|
|
2362
2375
|
constructor(t, e = T) {
|
|
2363
2376
|
super(t, void 0, e);
|
|
2364
2377
|
}
|
|
@@ -2375,7 +2388,7 @@ class Fe extends $ {
|
|
|
2375
2388
|
return i;
|
|
2376
2389
|
}
|
|
2377
2390
|
}
|
|
2378
|
-
const
|
|
2391
|
+
const Me = 0, Ne = a.from([Me]);
|
|
2379
2392
|
class Nt extends $ {
|
|
2380
2393
|
constructor(t, e, i = T) {
|
|
2381
2394
|
super(t, e, i);
|
|
@@ -2451,7 +2464,7 @@ class Nt extends $ {
|
|
|
2451
2464
|
].flat();
|
|
2452
2465
|
}
|
|
2453
2466
|
}
|
|
2454
|
-
class E extends
|
|
2467
|
+
class E extends ke {
|
|
2455
2468
|
constructor(t, e = T) {
|
|
2456
2469
|
if (super(), this.logColor = "#4a90d9", t.length !== 33)
|
|
2457
2470
|
throw new Error("Public key must be 33 bytes (compressed)");
|
|
@@ -2747,7 +2760,7 @@ class E extends Ke {
|
|
|
2747
2760
|
), s;
|
|
2748
2761
|
}
|
|
2749
2762
|
}
|
|
2750
|
-
class
|
|
2763
|
+
class wr extends $ {
|
|
2751
2764
|
constructor(t, e = T) {
|
|
2752
2765
|
super(t, a.alloc(0), e);
|
|
2753
2766
|
}
|
|
@@ -2940,23 +2953,23 @@ class Ot extends $ {
|
|
|
2940
2953
|
}
|
|
2941
2954
|
}
|
|
2942
2955
|
at(Q);
|
|
2943
|
-
class
|
|
2956
|
+
class ue {
|
|
2944
2957
|
// Generate a valid SegWit address from random bytes
|
|
2945
2958
|
static generatePKSH(t, e) {
|
|
2946
2959
|
if (t.length !== 32) throw new Error("Invalid hash length");
|
|
2947
|
-
const i =
|
|
2960
|
+
const i = Fi(t);
|
|
2948
2961
|
return this.toSegwitAddress(i, e);
|
|
2949
2962
|
}
|
|
2950
2963
|
// Generate a valid Taproot address from a public key
|
|
2951
2964
|
static generateTaprootAddress(t, e) {
|
|
2952
2965
|
if (t.length !== 32) throw new Error("Invalid public key length");
|
|
2953
|
-
const i =
|
|
2954
|
-
return i.unshift(1),
|
|
2966
|
+
const i = Dt.bech32m.toWords(t);
|
|
2967
|
+
return i.unshift(1), Dt.bech32m.encode(e.bech32, i);
|
|
2955
2968
|
}
|
|
2956
2969
|
// Convert a hash to a SegWit address
|
|
2957
2970
|
static toSegwitAddress(t, e) {
|
|
2958
|
-
const i =
|
|
2959
|
-
return i.unshift(0),
|
|
2971
|
+
const i = Dt.bech32.toWords(t);
|
|
2972
|
+
return i.unshift(0), Dt.bech32.encode(e.bech32, i);
|
|
2960
2973
|
}
|
|
2961
2974
|
}
|
|
2962
2975
|
class et {
|
|
@@ -3039,7 +3052,7 @@ class et {
|
|
|
3039
3052
|
}
|
|
3040
3053
|
}
|
|
3041
3054
|
at(Q);
|
|
3042
|
-
class
|
|
3055
|
+
class he {
|
|
3043
3056
|
/**
|
|
3044
3057
|
* Tweak a signer
|
|
3045
3058
|
* @param {Signer} signer - The signer to tweak
|
|
@@ -3053,19 +3066,19 @@ class ue {
|
|
|
3053
3066
|
t.publicKey[0] === 3 && (i = Ft.privateNegate(i));
|
|
3054
3067
|
const r = Ft.privateAdd(
|
|
3055
3068
|
i,
|
|
3056
|
-
|
|
3069
|
+
Wi(O(a.from(t.publicKey)), e.tweakHash)
|
|
3057
3070
|
);
|
|
3058
3071
|
if (!r)
|
|
3059
3072
|
throw new Error("Invalid tweaked private key!");
|
|
3060
3073
|
return A.fromPrivateKey(a.from(r), e.network);
|
|
3061
3074
|
}
|
|
3062
3075
|
}
|
|
3063
|
-
function
|
|
3076
|
+
function He(n) {
|
|
3064
3077
|
return typeof n == "object" && n !== null && "web3" in n && typeof n.web3 == "object" && "getMLDSAPublicKey" in n.web3 && "signMLDSAMessage" in n.web3;
|
|
3065
3078
|
}
|
|
3066
|
-
class
|
|
3079
|
+
class yr {
|
|
3067
3080
|
sha256(t) {
|
|
3068
|
-
return
|
|
3081
|
+
return _e(a.from(t));
|
|
3069
3082
|
}
|
|
3070
3083
|
/**
|
|
3071
3084
|
* Attempts to sign a message using OP_WALLET if available in browser environment.
|
|
@@ -3193,7 +3206,7 @@ class fr {
|
|
|
3193
3206
|
* @returns {SignedMessage} The Schnorr signature.
|
|
3194
3207
|
*/
|
|
3195
3208
|
tweakAndSignMessage(t, e, i) {
|
|
3196
|
-
const r =
|
|
3209
|
+
const r = he.tweakSigner(t, { network: i });
|
|
3197
3210
|
return this.signMessage(r, e);
|
|
3198
3211
|
}
|
|
3199
3212
|
/**
|
|
@@ -3279,10 +3292,10 @@ class fr {
|
|
|
3279
3292
|
if (typeof window > "u")
|
|
3280
3293
|
return null;
|
|
3281
3294
|
const t = window;
|
|
3282
|
-
return !t.opnet || !
|
|
3295
|
+
return !t.opnet || !He(t.opnet) ? null : t.opnet;
|
|
3283
3296
|
}
|
|
3284
3297
|
}
|
|
3285
|
-
const nt = new
|
|
3298
|
+
const nt = new yr();
|
|
3286
3299
|
at(Q);
|
|
3287
3300
|
class J {
|
|
3288
3301
|
/**
|
|
@@ -3555,7 +3568,7 @@ class J {
|
|
|
3555
3568
|
}
|
|
3556
3569
|
}
|
|
3557
3570
|
var Ht = /* @__PURE__ */ ((n) => (n[n.MINIMUM = 128] = "MINIMUM", n[n.LOW = 160] = "LOW", n[n.MEDIUM = 192] = "MEDIUM", n[n.HIGH = 224] = "HIGH", n[n.MAXIMUM = 256] = "MAXIMUM", n))(Ht || {}), bt = /* @__PURE__ */ ((n) => (n[n.BIP44 = 44] = "BIP44", n[n.BIP49 = 49] = "BIP49", n[n.BIP84 = 84] = "BIP84", n[n.BIP86 = 86] = "BIP86", n))(bt || {});
|
|
3558
|
-
function
|
|
3571
|
+
function mr(n) {
|
|
3559
3572
|
switch (n) {
|
|
3560
3573
|
case 44:
|
|
3561
3574
|
return "BIP44: Legacy addresses (P2PKH), widely used by Unisat and other wallets";
|
|
@@ -3569,12 +3582,12 @@ function pr(n) {
|
|
|
3569
3582
|
return "Unknown BIP standard";
|
|
3570
3583
|
}
|
|
3571
3584
|
}
|
|
3572
|
-
function
|
|
3585
|
+
function Ve(n, t, e, i, r) {
|
|
3573
3586
|
return `m/${n}'/${t}'/${e}'/${i}/${r}`;
|
|
3574
3587
|
}
|
|
3575
3588
|
at(Q);
|
|
3576
|
-
const
|
|
3577
|
-
class
|
|
3589
|
+
const br = P.BIP32Factory(Q);
|
|
3590
|
+
class le {
|
|
3578
3591
|
/**
|
|
3579
3592
|
* Create a new Mnemonic instance from an existing phrase
|
|
3580
3593
|
*
|
|
@@ -3587,7 +3600,7 @@ class he {
|
|
|
3587
3600
|
constructor(t, e = "", i = T, r = P.MLDSASecurityLevel.LEVEL2) {
|
|
3588
3601
|
if (!gt.validateMnemonic(t))
|
|
3589
3602
|
throw new Error("Invalid mnemonic phrase");
|
|
3590
|
-
this._phrase = t, this._passphrase = e, this._network = i, this._securityLevel = r, this._seed = gt.mnemonicToSeedSync(this._phrase, this._passphrase), this._classicalRoot =
|
|
3603
|
+
this._phrase = t, this._passphrase = e, this._network = i, this._securityLevel = r, this._seed = gt.mnemonicToSeedSync(this._phrase, this._passphrase), this._classicalRoot = br.fromSeed(this._seed, this._network), this._quantumRoot = P.QuantumBIP32Factory.fromSeed(
|
|
3591
3604
|
this._seed,
|
|
3592
3605
|
this._network,
|
|
3593
3606
|
this._securityLevel
|
|
@@ -3647,7 +3660,7 @@ class he {
|
|
|
3647
3660
|
*/
|
|
3648
3661
|
static generate(t = Ht.MAXIMUM, e = "", i = T, r = P.MLDSASecurityLevel.LEVEL2) {
|
|
3649
3662
|
const s = gt.generateMnemonic(t);
|
|
3650
|
-
return new
|
|
3663
|
+
return new le(s, e, i, r);
|
|
3651
3664
|
}
|
|
3652
3665
|
/**
|
|
3653
3666
|
* Validate a mnemonic phrase
|
|
@@ -3824,7 +3837,7 @@ class he {
|
|
|
3824
3837
|
*/
|
|
3825
3838
|
buildClassicalPath(t, e, i, r = bt.BIP84) {
|
|
3826
3839
|
const s = this.getCoinType();
|
|
3827
|
-
return
|
|
3840
|
+
return Ve(r, s, t, i ? 1 : 0, e);
|
|
3828
3841
|
}
|
|
3829
3842
|
/**
|
|
3830
3843
|
* Build a quantum derivation path (BIP360)
|
|
@@ -3843,11 +3856,11 @@ class he {
|
|
|
3843
3856
|
* @returns The coin type (0 for mainnet, 1 for testnet/regtest)
|
|
3844
3857
|
*/
|
|
3845
3858
|
getCoinType() {
|
|
3846
|
-
return this._network.bech32 === xt.bech32 || this._network.bech32 ===
|
|
3859
|
+
return this._network.bech32 === xt.bech32 || this._network.bech32 === Gt.bech32 ? 1 : 0;
|
|
3847
3860
|
}
|
|
3848
3861
|
}
|
|
3849
|
-
var
|
|
3850
|
-
function
|
|
3862
|
+
var ze = /* @__PURE__ */ ((n) => (n[n.MLDSA44 = 1312] = "MLDSA44", n[n.MLDSA65 = 1952] = "MLDSA65", n[n.MLDSA87 = 2592] = "MLDSA87", n))(ze || {});
|
|
3863
|
+
function ne(n) {
|
|
3851
3864
|
switch (n) {
|
|
3852
3865
|
case 1312:
|
|
3853
3866
|
return P.MLDSASecurityLevel.LEVEL2;
|
|
@@ -3859,7 +3872,7 @@ function se(n) {
|
|
|
3859
3872
|
throw new Error(`Invalid MLDSA public key length: ${n}`);
|
|
3860
3873
|
}
|
|
3861
3874
|
}
|
|
3862
|
-
class
|
|
3875
|
+
class Tr {
|
|
3863
3876
|
constructor(t = T) {
|
|
3864
3877
|
this.network = t;
|
|
3865
3878
|
}
|
|
@@ -3878,23 +3891,23 @@ class Sr {
|
|
|
3878
3891
|
}
|
|
3879
3892
|
}
|
|
3880
3893
|
var Bt = /* @__PURE__ */ ((n) => (n[n.Bitcoin = 0] = "Bitcoin", n[n.Fractal = 1] = "Fractal", n))(Bt || {});
|
|
3881
|
-
function
|
|
3894
|
+
function qe(n) {
|
|
3882
3895
|
return new Map(n);
|
|
3883
3896
|
}
|
|
3884
|
-
function
|
|
3897
|
+
function Ir(n) {
|
|
3885
3898
|
return {
|
|
3886
3899
|
enabled: !0,
|
|
3887
|
-
signerMap: n instanceof Map ? n :
|
|
3900
|
+
signerMap: n instanceof Map ? n : qe(n)
|
|
3888
3901
|
};
|
|
3889
3902
|
}
|
|
3890
|
-
function
|
|
3903
|
+
function Pr() {
|
|
3891
3904
|
return {
|
|
3892
3905
|
enabled: !1,
|
|
3893
3906
|
signerMap: /* @__PURE__ */ new Map()
|
|
3894
3907
|
};
|
|
3895
3908
|
}
|
|
3896
3909
|
var y = /* @__PURE__ */ ((n) => (n[n.GENERIC = 0] = "GENERIC", n[n.FUNDING = 1] = "FUNDING", n[n.DEPLOYMENT = 2] = "DEPLOYMENT", n[n.INTERACTION = 3] = "INTERACTION", n[n.MULTI_SIG = 4] = "MULTI_SIG", n[n.CUSTOM_CODE = 5] = "CUSTOM_CODE", n[n.CANCEL = 6] = "CANCEL", n[n.CONSOLIDATED_SETUP = 7] = "CONSOLIDATED_SETUP", n[n.CONSOLIDATED_REVEAL = 8] = "CONSOLIDATED_REVEAL", n))(y || {}), kt = /* @__PURE__ */ ((n) => (n[n.Roswell = 0] = "Roswell", n[n.Rachel = 1] = "Rachel", n[n.Kecksburg = 2] = "Kecksburg", n[n.Phoenix = 3] = "Phoenix", n[n.Aurora = 4] = "Aurora", n[n.Rendlesham = 5] = "Rendlesham", n[n.Lazar = 6] = "Lazar", n[n.ShagHarbor = 7] = "ShagHarbor", n[n.Exeter = 8] = "Exeter", n[n.Stephenville = 9] = "Stephenville", n[n.Valensole = 10] = "Valensole", n[n.Socorro = 11] = "Socorro", n[n.Pascagoula = 12] = "Pascagoula", n[n.Tehran = 13] = "Tehran", n[n.Westall = 14] = "Westall", n[n.Hopkinsville = 15] = "Hopkinsville", n[n.Belgium = 16] = "Belgium", n[n.Breeze = 17] = "Breeze", n[n.Flatwoods = 18] = "Flatwoods", n[n.Maury = 20] = "Maury", n[n.Varginha = 21] = "Varginha", n[n.Trindade = 22] = "Trindade", n[n.Levelland = 23] = "Levelland", n[n.Wanaque = 24] = "Wanaque", n[n.Coyame = 25] = "Coyame", n[n.Delphos = 26] = "Delphos", n))(kt || {});
|
|
3897
|
-
const
|
|
3910
|
+
const $e = {
|
|
3898
3911
|
CONSENSUS: kt.Roswell,
|
|
3899
3912
|
CONSENSUS_NAME: "Roswell",
|
|
3900
3913
|
// The block height at which this consensus was enabled.
|
|
@@ -3911,26 +3924,26 @@ const qe = {
|
|
|
3911
3924
|
//UNWRAP_CONSOLIDATION_PREPAID_FEES: 250n,
|
|
3912
3925
|
// Equivalent to 56500 satoshis, calculated from UNWRAP_CONSOLIDATION_PREPAID_FEES.
|
|
3913
3926
|
//UNWRAP_CONSOLIDATION_PREPAID_FEES_SAT: 56500n,
|
|
3914
|
-
},
|
|
3915
|
-
[kt.Roswell]:
|
|
3916
|
-
},
|
|
3917
|
-
function
|
|
3918
|
-
return n && !!(n.tapInternalKey || n.tapMerkleRoot || n.tapLeafScript && n.tapLeafScript.length || n.tapBip32Derivation && n.tapBip32Derivation.length || n.witnessUtxo &&
|
|
3927
|
+
}, Xe = {
|
|
3928
|
+
[kt.Roswell]: $e
|
|
3929
|
+
}, jt = kt.Roswell, Er = Xe[jt];
|
|
3930
|
+
function de(n) {
|
|
3931
|
+
return n && !!(n.tapInternalKey || n.tapMerkleRoot || n.tapLeafScript && n.tapLeafScript.length || n.tapBip32Derivation && n.tapBip32Derivation.length || n.witnessUtxo && Ke(n.witnessUtxo.script));
|
|
3919
3932
|
}
|
|
3920
|
-
function
|
|
3933
|
+
function Ar(n) {
|
|
3921
3934
|
return n.redeemScript ? n.redeemScript : n.witnessScript ? n.witnessScript : n.witnessUtxo ? n.witnessUtxo.script : (n.nonWitnessUtxo, null);
|
|
3922
3935
|
}
|
|
3923
|
-
function
|
|
3936
|
+
function fe(n, t) {
|
|
3924
3937
|
if (n.nonWitnessUtxo && !n.redeemScript && !n.witnessScript && !n.witnessUtxo || n.redeemScript)
|
|
3925
3938
|
return !0;
|
|
3926
|
-
const e =
|
|
3927
|
-
return e ?
|
|
3939
|
+
const e = Ar(n);
|
|
3940
|
+
return e ? pe(t, e) : !1;
|
|
3928
3941
|
}
|
|
3929
|
-
function
|
|
3930
|
-
return
|
|
3942
|
+
function pe(n, t) {
|
|
3943
|
+
return Mi(n, t) !== -1;
|
|
3931
3944
|
}
|
|
3932
|
-
var
|
|
3933
|
-
class Lt extends
|
|
3945
|
+
var Ye = /* @__PURE__ */ ((n) => (n[n.REPLACE_BY_FEE = 4294967293] = "REPLACE_BY_FEE", n[n.FINAL = 4294967295] = "FINAL", n))(Ye || {}), Ge = /* @__PURE__ */ ((n) => (n[n.BLOCKS = 0] = "BLOCKS", n[n.TIMESTAMPS = 1] = "TIMESTAMPS", n))(Ge || {});
|
|
3946
|
+
class Lt extends ke {
|
|
3934
3947
|
constructor(t) {
|
|
3935
3948
|
super(), this.logColor = "#00ffe1", this.finalized = !1, this.signed = !1, this.scriptData = null, this.tapData = null, this.inputs = [], this.sequence = 4294967293, this.tapLeafScript = null, this.isBrowser = !1, this.csvInputIndices = /* @__PURE__ */ new Set(), this.anchorInputIndices = /* @__PURE__ */ new Set(), this.regenerated = !1, this.ignoreSignatureErrors = !1, this.noSignatures = !1, this.txVersion = 2, this._mldsaSigner = null, this._hashedPublicKey = null, this.addressRotationEnabled = !1, this.signerMap = /* @__PURE__ */ new Map(), this.inputSignerMap = /* @__PURE__ */ new Map(), this.tweakedSignerCache = /* @__PURE__ */ new Map(), this.customFinalizerP2SH = (e, i, r, s, o, c) => {
|
|
3936
3949
|
const u = this.inputs[e];
|
|
@@ -3959,7 +3972,7 @@ class Lt extends Ke {
|
|
|
3959
3972
|
};
|
|
3960
3973
|
}
|
|
3961
3974
|
}
|
|
3962
|
-
return
|
|
3975
|
+
return De(
|
|
3963
3976
|
e,
|
|
3964
3977
|
i,
|
|
3965
3978
|
r,
|
|
@@ -4000,7 +4013,7 @@ class Lt extends Ke {
|
|
|
4000
4013
|
return e += c, u;
|
|
4001
4014
|
}
|
|
4002
4015
|
function r() {
|
|
4003
|
-
const c =
|
|
4016
|
+
const c = Li(t, e);
|
|
4004
4017
|
return e += c.bytes, c.numberValue || 0;
|
|
4005
4018
|
}
|
|
4006
4019
|
function s() {
|
|
@@ -4213,7 +4226,7 @@ class Lt extends Ke {
|
|
|
4213
4226
|
async signInput(t, e, i, r, s = !1, o = !1) {
|
|
4214
4227
|
if (this.anchorInputIndices.has(i)) return;
|
|
4215
4228
|
const c = r.publicKey;
|
|
4216
|
-
let u =
|
|
4229
|
+
let u = de(e);
|
|
4217
4230
|
s && (u = !u);
|
|
4218
4231
|
let h = !1, l = !1;
|
|
4219
4232
|
if (u)
|
|
@@ -4224,7 +4237,7 @@ class Lt extends Ke {
|
|
|
4224
4237
|
`Failed to sign Taproot script path input ${i} (reverse: ${s}): ${d.message}`
|
|
4225
4238
|
), l = !0;
|
|
4226
4239
|
}
|
|
4227
|
-
else if (s ||
|
|
4240
|
+
else if (s || fe(e, c))
|
|
4228
4241
|
try {
|
|
4229
4242
|
await this.signNonTaprootInput(r, t, i), h = !0;
|
|
4230
4243
|
} catch (d) {
|
|
@@ -4313,7 +4326,7 @@ class Lt extends Ke {
|
|
|
4313
4326
|
network: this.network
|
|
4314
4327
|
};
|
|
4315
4328
|
if (t && (i.tweakHash = this.getTweakerHash()), "privateKey" in e)
|
|
4316
|
-
return
|
|
4329
|
+
return he.tweakSigner(e, i);
|
|
4317
4330
|
}
|
|
4318
4331
|
generateP2SHRedeemScript(t) {
|
|
4319
4332
|
const e = dt({
|
|
@@ -4345,14 +4358,14 @@ class Lt extends Ke {
|
|
|
4345
4358
|
// The P2WSH is wrapped inside the P2SH
|
|
4346
4359
|
network: this.network
|
|
4347
4360
|
});
|
|
4348
|
-
if (
|
|
4361
|
+
if (Le(s, this.network) === t && c.redeem && c.redeem.output)
|
|
4349
4362
|
return {
|
|
4350
4363
|
redeemScript: i,
|
|
4351
4364
|
outputScript: c.redeem.output
|
|
4352
4365
|
};
|
|
4353
4366
|
}
|
|
4354
4367
|
generateP2SHP2PKHRedeemScript(t, e) {
|
|
4355
|
-
const i = this.addressRotationEnabled && e !== void 0 ? this.getSignerForInput(e) : this.signer, r = I.isBuffer(i.publicKey) ? i.publicKey : I.from(i.publicKey, "hex"), s =
|
|
4368
|
+
const i = this.addressRotationEnabled && e !== void 0 ? this.getSignerForInput(e) : this.signer, r = I.isBuffer(i.publicKey) ? i.publicKey : I.from(i.publicKey, "hex"), s = ee({
|
|
4356
4369
|
pubkey: r,
|
|
4357
4370
|
network: this.network
|
|
4358
4371
|
}), o = St({
|
|
@@ -4385,14 +4398,14 @@ class Lt extends Ke {
|
|
|
4385
4398
|
script: r
|
|
4386
4399
|
}
|
|
4387
4400
|
};
|
|
4388
|
-
if (
|
|
4401
|
+
if (Ni(r))
|
|
4389
4402
|
if (t.nonWitnessUtxo)
|
|
4390
4403
|
s.nonWitnessUtxo = I.isBuffer(t.nonWitnessUtxo) ? t.nonWitnessUtxo : I.from(t.nonWitnessUtxo, "hex");
|
|
4391
4404
|
else
|
|
4392
4405
|
throw new Error("Missing nonWitnessUtxo for P2PKH UTXO");
|
|
4393
|
-
else if (!(
|
|
4406
|
+
else if (!(Ee(r) || Hi(r))) if (Ae(r))
|
|
4394
4407
|
this.processP2WSHInput(t, s, e);
|
|
4395
|
-
else if (
|
|
4408
|
+
else if (Vi(r)) {
|
|
4396
4409
|
let o;
|
|
4397
4410
|
if (t.redeemScript)
|
|
4398
4411
|
o = I.isBuffer(t.redeemScript) ? t.redeemScript : I.from(t.redeemScript, "hex");
|
|
@@ -4416,16 +4429,16 @@ class Lt extends Ke {
|
|
|
4416
4429
|
const u = c.redeem.output;
|
|
4417
4430
|
if (!u)
|
|
4418
4431
|
throw new Error("Failed to extract redeem output from P2SH UTXO");
|
|
4419
|
-
t.nonWitnessUtxo && (s.nonWitnessUtxo = I.isBuffer(t.nonWitnessUtxo) ? t.nonWitnessUtxo : I.from(t.nonWitnessUtxo, "hex")),
|
|
4420
|
-
} else if (
|
|
4432
|
+
t.nonWitnessUtxo && (s.nonWitnessUtxo = I.isBuffer(t.nonWitnessUtxo) ? t.nonWitnessUtxo : I.from(t.nonWitnessUtxo, "hex")), Ee(u) ? delete s.nonWitnessUtxo : Ae(u) ? (delete s.nonWitnessUtxo, this.processP2WSHInput(t, s, e)) : delete s.witnessUtxo;
|
|
4433
|
+
} else if (Ke(r)) {
|
|
4421
4434
|
if (this.sighashTypes) {
|
|
4422
4435
|
const o = Lt.calculateSignHash(this.sighashTypes);
|
|
4423
4436
|
o && (s.sighashType = o);
|
|
4424
4437
|
}
|
|
4425
4438
|
this.addressRotationEnabled ? s.tapInternalKey = this.internalPubKeyToXOnlyForInput(e) : (this.tweakSigner(), s.tapInternalKey = this.internalPubKeyToXOnly());
|
|
4426
|
-
} else if (
|
|
4439
|
+
} else if (zi(r))
|
|
4427
4440
|
this.anchorInputIndices.add(e), s.isPayToAnchor = !0;
|
|
4428
|
-
else if (
|
|
4441
|
+
else if (qi(r) || $i(r))
|
|
4429
4442
|
if (t.nonWitnessUtxo)
|
|
4430
4443
|
s.nonWitnessUtxo = I.isBuffer(t.nonWitnessUtxo) ? t.nonWitnessUtxo : I.from(t.nonWitnessUtxo, "hex");
|
|
4431
4444
|
else
|
|
@@ -4506,7 +4519,7 @@ class Lt extends Ke {
|
|
|
4506
4519
|
if (t[e] === g.OP_CHECKSEQUENCEVERIFY && e > 0) {
|
|
4507
4520
|
const i = t[e - 1];
|
|
4508
4521
|
if (I.isBuffer(i))
|
|
4509
|
-
return
|
|
4522
|
+
return Ue.decode(i);
|
|
4510
4523
|
if (typeof i == "number") {
|
|
4511
4524
|
if (i === g.OP_0 || i === g.OP_FALSE)
|
|
4512
4525
|
return 0;
|
|
@@ -4539,7 +4552,7 @@ class Lt extends Ke {
|
|
|
4539
4552
|
isTaprootScriptSpend(t, e) {
|
|
4540
4553
|
if (t.tapLeafScript && t.tapLeafScript.length > 0) {
|
|
4541
4554
|
for (const i of t.tapLeafScript)
|
|
4542
|
-
if (
|
|
4555
|
+
if (pe(e, i.script))
|
|
4543
4556
|
return !0;
|
|
4544
4557
|
}
|
|
4545
4558
|
return !1;
|
|
@@ -4558,22 +4571,22 @@ class Lt extends Ke {
|
|
|
4558
4571
|
"signInput" in t ? await t.signInput(e, i) : e.signInput(i, t);
|
|
4559
4572
|
}
|
|
4560
4573
|
}
|
|
4561
|
-
function
|
|
4574
|
+
function Jt(n, t) {
|
|
4562
4575
|
return JSON.stringify(n) === JSON.stringify(t);
|
|
4563
4576
|
}
|
|
4564
|
-
function
|
|
4565
|
-
if (
|
|
4577
|
+
function Or(n) {
|
|
4578
|
+
if (Jt(n, T))
|
|
4566
4579
|
return "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f";
|
|
4567
|
-
if (
|
|
4580
|
+
if (Jt(n, xt))
|
|
4568
4581
|
return "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943";
|
|
4569
|
-
if (
|
|
4582
|
+
if (Jt(n, Gt))
|
|
4570
4583
|
return "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206";
|
|
4571
4584
|
throw new Error("Unsupported network for chain ID retrieval");
|
|
4572
4585
|
}
|
|
4573
|
-
function
|
|
4574
|
-
return Uint8Array.from(a.from(
|
|
4586
|
+
function xe(n) {
|
|
4587
|
+
return Uint8Array.from(a.from(Or(n), "hex"));
|
|
4575
4588
|
}
|
|
4576
|
-
const
|
|
4589
|
+
const ve = Uint8Array.from(
|
|
4577
4590
|
a.from(
|
|
4578
4591
|
"e784995a412d773988c4b8e333d7b39dfb3cabf118d0d645411a916ca2407939",
|
|
4579
4592
|
// sha256("OP_NET")
|
|
@@ -4581,7 +4594,7 @@ const xe = Uint8Array.from(
|
|
|
4581
4594
|
)
|
|
4582
4595
|
);
|
|
4583
4596
|
at(Q);
|
|
4584
|
-
const z = 330n, wt = 297n,
|
|
4597
|
+
const z = 330n, wt = 297n, oe = a.from("51024e73", "hex");
|
|
4585
4598
|
class m extends Lt {
|
|
4586
4599
|
constructor(t) {
|
|
4587
4600
|
if (super(t), this.logColor = "#785def", this.debugFees = !1, this.overflowFees = 0n, this.transactionFee = 0n, this.estimatedFees = 0n, this.updateInputs = [], this.outputs = [], this.feeOutput = null, this._maximumFeeRate = 1e8, this.optionalOutputsAdded = !1, t.estimatedFees && (this.estimatedFees = t.estimatedFees), this.signer = t.signer, this.network = t.network, this.feeRate = t.feeRate, this.priorityFee = t.priorityFee ?? 0n, this.gasSatFee = t.gasSatFee ?? 0n, this.utxos = t.utxos, this.optionalInputs = t.optionalInputs || [], this.to = t.to || void 0, this.debugFees = t.debugFees || !1, this.LOCK_LEAF_SCRIPT = this.defineLockScript(), t.note && (typeof t.note == "string" ? this.note = a.from(t.note, "utf8") : this.note = t.note), this.anchor = t.anchor ?? !1, this.isPubKeyDestination = this.to ? H.isValidPublicKey(this.to, this.network) : !1, this.optionalOutputs = t.optionalOutputs, this.from = m.getFrom(t.from, this.signer, this.network), this.totalInputAmount = this.calculateTotalUTXOAmount(), this.calculateTotalVOutAmount() < this.totalInputAmount)
|
|
@@ -4609,8 +4622,8 @@ class m extends Lt {
|
|
|
4609
4622
|
e = a.concat([e, a.from(c)]);
|
|
4610
4623
|
}
|
|
4611
4624
|
function r(c) {
|
|
4612
|
-
const u = e.length, h =
|
|
4613
|
-
e = a.concat([e, a.allocUnsafe(h)]),
|
|
4625
|
+
const u = e.length, h = Ui(c);
|
|
4626
|
+
e = a.concat([e, a.allocUnsafe(h)]), _i(c, e, u);
|
|
4614
4627
|
}
|
|
4615
4628
|
function s(c) {
|
|
4616
4629
|
r(c.length), i(c);
|
|
@@ -4630,7 +4643,7 @@ class m extends Lt {
|
|
|
4630
4643
|
addAnchor() {
|
|
4631
4644
|
this.addOutput({
|
|
4632
4645
|
value: 0,
|
|
4633
|
-
script:
|
|
4646
|
+
script: oe
|
|
4634
4647
|
});
|
|
4635
4648
|
}
|
|
4636
4649
|
async getFundingTransactionParameters() {
|
|
@@ -4736,7 +4749,7 @@ class m extends Lt {
|
|
|
4736
4749
|
throw new Error("Output value is 0 and no script provided");
|
|
4737
4750
|
if (i.script.length < 2)
|
|
4738
4751
|
throw new Error("Output script is too short");
|
|
4739
|
-
if (i.script[0] !== g.OP_RETURN && !i.script.equals(
|
|
4752
|
+
if (i.script[0] !== g.OP_RETURN && !i.script.equals(oe))
|
|
4740
4753
|
throw new Error(
|
|
4741
4754
|
"Output script must start with OP_RETURN or be an ANCHOR when value is 0"
|
|
4742
4755
|
);
|
|
@@ -4891,7 +4904,7 @@ class m extends Lt {
|
|
|
4891
4904
|
s,
|
|
4892
4905
|
o
|
|
4893
4906
|
])
|
|
4894
|
-
} :
|
|
4907
|
+
} : De(
|
|
4895
4908
|
p,
|
|
4896
4909
|
f,
|
|
4897
4910
|
w,
|
|
@@ -4917,7 +4930,7 @@ class m extends Lt {
|
|
|
4917
4930
|
return this.transaction = _.fromBase64(t, {
|
|
4918
4931
|
network: this.network,
|
|
4919
4932
|
version: this.txVersion
|
|
4920
|
-
}), this.signed = !1, this.sighashTypes = [
|
|
4933
|
+
}), this.signed = !1, this.sighashTypes = [re.SIGHASH_ANYONECANPAY, re.SIGHASH_ALL], await this.signPSBT();
|
|
4921
4934
|
}
|
|
4922
4935
|
setPSBT(t) {
|
|
4923
4936
|
this.transaction = t;
|
|
@@ -5024,8 +5037,8 @@ class m extends Lt {
|
|
|
5024
5037
|
const t = O(this.tweakedSigner.publicKey), e = this.signer.publicKey;
|
|
5025
5038
|
if (e.length !== 33)
|
|
5026
5039
|
throw new Error("Original public key must be compressed (33 bytes)");
|
|
5027
|
-
const i =
|
|
5028
|
-
r.writeU8(P.MLDSASecurityLevel.LEVEL2), r.writeBytes(this.hashedPublicKey), r.writeBytes(t), r.writeBytes(e), r.writeBytes(
|
|
5040
|
+
const i = xe(this.network), r = new C();
|
|
5041
|
+
r.writeU8(P.MLDSASecurityLevel.LEVEL2), r.writeBytes(this.hashedPublicKey), r.writeBytes(t), r.writeBytes(e), r.writeBytes(ve), r.writeBytes(i);
|
|
5029
5042
|
const s = r.getBuffer(), o = nt.signMessage(this.tweakedSigner, s);
|
|
5030
5043
|
if (!nt.verifySignature(t, s, o.signature))
|
|
5031
5044
|
throw new Error("Could not verify generated legacy signature for MLDSA link request");
|
|
@@ -5039,11 +5052,11 @@ class m extends Lt {
|
|
|
5039
5052
|
const t = O(this.tweakedSigner.publicKey), e = this.signer.publicKey;
|
|
5040
5053
|
if (e.length !== 33)
|
|
5041
5054
|
throw new Error("Original public key must be compressed (33 bytes)");
|
|
5042
|
-
const i =
|
|
5055
|
+
const i = xe(this.network), r = ne(this.mldsaSigner.publicKey.length);
|
|
5043
5056
|
if (r !== P.MLDSASecurityLevel.LEVEL2)
|
|
5044
5057
|
throw new Error("Only MLDSA level 2 is supported for link requests");
|
|
5045
5058
|
const s = new C();
|
|
5046
|
-
s.writeU8(r), s.writeBytes(this.hashedPublicKey), s.writeBytes(this.mldsaSigner.publicKey), s.writeBytes(t), s.writeBytes(e), s.writeBytes(
|
|
5059
|
+
s.writeU8(r), s.writeBytes(this.hashedPublicKey), s.writeBytes(this.mldsaSigner.publicKey), s.writeBytes(t), s.writeBytes(e), s.writeBytes(ve), s.writeBytes(i);
|
|
5047
5060
|
const o = s.getBuffer(), c = nt.signMLDSAMessage(this.mldsaSigner, o);
|
|
5048
5061
|
if (!nt.verifyMLDSASignature(
|
|
5049
5062
|
this.mldsaSigner,
|
|
@@ -5064,7 +5077,7 @@ class m extends Lt {
|
|
|
5064
5077
|
verifyRequest: !!t.revealMLDSAPublicKey,
|
|
5065
5078
|
publicKey: i.publicKey,
|
|
5066
5079
|
hashedPublicKey: this.hashedPublicKey,
|
|
5067
|
-
level:
|
|
5080
|
+
level: ne(i.publicKey.length),
|
|
5068
5081
|
legacySignature: r,
|
|
5069
5082
|
mldsaSignature: s
|
|
5070
5083
|
}
|
|
@@ -5338,7 +5351,7 @@ class Vt extends m {
|
|
|
5338
5351
|
};
|
|
5339
5352
|
}, !t.script) throw new Error("Bitcoin script is required");
|
|
5340
5353
|
if (!t.witnesses) throw new Error("Witness(es) are required");
|
|
5341
|
-
this.witnesses = t.witnesses, this.randomBytes = t.randomBytes || K.rndBytes(), this.LOCK_LEAF_SCRIPT = this.defineLockScript(), this.scriptSeed = this.getContractSeed(), this.contractSigner = A.fromSeedKeyPair(this.scriptSeed, this.network), this.generator = new
|
|
5354
|
+
this.witnesses = t.witnesses, this.randomBytes = t.randomBytes || K.rndBytes(), this.LOCK_LEAF_SCRIPT = this.defineLockScript(), this.scriptSeed = this.getContractSeed(), this.contractSigner = A.fromSeedKeyPair(this.scriptSeed, this.network), this.generator = new We(this.internalPubKeyToXOnly(), this.network), this.compiledTargetScript = this.generator.compile(t.script), this.scriptTree = this.getScriptTree(), this.internalInit(), this._scriptAddress = ue.generatePKSH(this.scriptSeed, this.network);
|
|
5342
5355
|
}
|
|
5343
5356
|
/**
|
|
5344
5357
|
* @description Get the contract address (PKSH)
|
|
@@ -5508,7 +5521,7 @@ class Vt extends m {
|
|
|
5508
5521
|
];
|
|
5509
5522
|
}
|
|
5510
5523
|
}
|
|
5511
|
-
class
|
|
5524
|
+
class ge extends m {
|
|
5512
5525
|
constructor(t) {
|
|
5513
5526
|
if (super(t), this.targetScriptRedeem = null, this.leftOverFundsScriptRedeem = null, this.customFinalizer = (e, i) => {
|
|
5514
5527
|
if (!this.tapLeafScript)
|
|
@@ -5526,7 +5539,7 @@ class pe extends m {
|
|
|
5526
5539
|
this.challenge = t.challenge, this.LOCK_LEAF_SCRIPT = this.defineLockScript(), this.disableAutoRefund = t.disableAutoRefund || !1, this.epochChallenge = M.generateTimeLockAddress(
|
|
5527
5540
|
this.challenge.publicKey.originalPublicKeyBuffer(),
|
|
5528
5541
|
this.network
|
|
5529
|
-
), this.calldata = N.compress(t.calldata), this.randomBytes = t.randomBytes || K.rndBytes(), this.scriptSigner = this.generateKeyPairFromSeed(), this.calldataGenerator = new
|
|
5542
|
+
), this.calldata = N.compress(t.calldata), this.randomBytes = t.randomBytes || K.rndBytes(), this.scriptSigner = this.generateKeyPairFromSeed(), this.calldataGenerator = new ce(
|
|
5530
5543
|
a.from(this.signer.publicKey),
|
|
5531
5544
|
this.scriptSignerXOnlyPubKey(),
|
|
5532
5545
|
this.network
|
|
@@ -5756,7 +5769,7 @@ class pt extends m {
|
|
|
5756
5769
|
};
|
|
5757
5770
|
}, !this.hashedPublicKey)
|
|
5758
5771
|
throw new Error("MLDSA signer must be defined to deploy a contract.");
|
|
5759
|
-
if (this.bytecode = N.compress(a.concat([
|
|
5772
|
+
if (this.bytecode = N.compress(a.concat([Ne, t.bytecode])), this.verifyBytecode(), t.calldata && (this.calldata = t.calldata, this.verifyCalldata()), !t.challenge) throw new Error("Challenge solution is required");
|
|
5760
5773
|
if (this.randomBytes = t.randomBytes || K.rndBytes(), this.challenge = t.challenge, this.LOCK_LEAF_SCRIPT = this.defineLockScript(), this.epochChallenge = M.generateTimeLockAddress(
|
|
5761
5774
|
this.challenge.publicKey.originalPublicKeyBuffer(),
|
|
5762
5775
|
this.network
|
|
@@ -5937,7 +5950,7 @@ class pt extends m {
|
|
|
5937
5950
|
return t.linkMLDSAPublicKeyToAddress && this.generateMLDSALinkRequest(t, e), e;
|
|
5938
5951
|
}
|
|
5939
5952
|
verifyCalldata() {
|
|
5940
|
-
if (this.calldata && this.calldata.length >
|
|
5953
|
+
if (this.calldata && this.calldata.length > ge.MAXIMUM_CALLDATA_SIZE)
|
|
5941
5954
|
throw new Error("Calldata size overflow.");
|
|
5942
5955
|
}
|
|
5943
5956
|
verifyBytecode() {
|
|
@@ -6049,7 +6062,7 @@ class zt extends m {
|
|
|
6049
6062
|
return this.signer;
|
|
6050
6063
|
}
|
|
6051
6064
|
}
|
|
6052
|
-
class qt extends
|
|
6065
|
+
class qt extends ge {
|
|
6053
6066
|
constructor(t) {
|
|
6054
6067
|
if (super(t), this.type = y.INTERACTION, this.tapLeafScript = null, !t.contract)
|
|
6055
6068
|
throw new Error("parameters.contract is required for interaction transaction.");
|
|
@@ -6275,7 +6288,7 @@ class Z extends m {
|
|
|
6275
6288
|
return e;
|
|
6276
6289
|
}
|
|
6277
6290
|
}
|
|
6278
|
-
class
|
|
6291
|
+
class Se extends m {
|
|
6279
6292
|
constructor(t) {
|
|
6280
6293
|
super({
|
|
6281
6294
|
...t,
|
|
@@ -6437,7 +6450,7 @@ class ge extends m {
|
|
|
6437
6450
|
};
|
|
6438
6451
|
}
|
|
6439
6452
|
}
|
|
6440
|
-
class
|
|
6453
|
+
class Qe extends m {
|
|
6441
6454
|
constructor(t) {
|
|
6442
6455
|
if (super(t), this.type = y.INTERACTION, this.cachedValuePerOutput = null, !t.to)
|
|
6443
6456
|
throw new Error("Contract address (to) is required");
|
|
@@ -6452,7 +6465,7 @@ class Ge extends m {
|
|
|
6452
6465
|
if (this.calldata = N.compress(t.calldata), this.randomBytes = t.randomBytes || K.rndBytes(), this.scriptSigner = A.fromSeedKeyPair(this.randomBytes, this.network), this.challenge = t.challenge, this.epochChallenge = M.generateTimeLockAddress(
|
|
6453
6466
|
this.challenge.publicKey.originalPublicKeyBuffer(),
|
|
6454
6467
|
this.network
|
|
6455
|
-
), this.calldataGenerator = new
|
|
6468
|
+
), this.calldataGenerator = new ce(
|
|
6456
6469
|
I.from(this.signer.publicKey),
|
|
6457
6470
|
O(I.from(this.scriptSigner.publicKey)),
|
|
6458
6471
|
this.network
|
|
@@ -6677,7 +6690,7 @@ class Ge extends m {
|
|
|
6677
6690
|
* Get refund address.
|
|
6678
6691
|
*/
|
|
6679
6692
|
getRefundAddress() {
|
|
6680
|
-
return this.from ? this.from :
|
|
6693
|
+
return this.from ? this.from : ue.generatePKSH(this.signer.publicKey, this.network);
|
|
6681
6694
|
}
|
|
6682
6695
|
/**
|
|
6683
6696
|
* Generate features (same as InteractionTransaction).
|
|
@@ -6713,7 +6726,7 @@ class Ge extends m {
|
|
|
6713
6726
|
}
|
|
6714
6727
|
}
|
|
6715
6728
|
}
|
|
6716
|
-
class
|
|
6729
|
+
class je {
|
|
6717
6730
|
constructor() {
|
|
6718
6731
|
this.debug = !1, this.DUMMY_PUBKEY = a.alloc(32, 1), this.P2TR_SCRIPT = a.concat([a.from([81, 32]), this.DUMMY_PUBKEY]), this.INITIAL_FUNDING_ESTIMATE = 2000n, this.MAX_ITERATIONS = 10;
|
|
6719
6732
|
}
|
|
@@ -6734,7 +6747,7 @@ class Qe {
|
|
|
6734
6747
|
return e;
|
|
6735
6748
|
if (!("signer" in t))
|
|
6736
6749
|
throw new Error('Field "signer" not provided, OP_WALLET not detected.');
|
|
6737
|
-
const r = await new
|
|
6750
|
+
const r = await new Se(t).signTransaction();
|
|
6738
6751
|
return {
|
|
6739
6752
|
transaction: r.toHex(),
|
|
6740
6753
|
nextUTXOs: this.getUTXOAsTransaction(r, t.from, 0),
|
|
@@ -6900,7 +6913,7 @@ class Qe {
|
|
|
6900
6913
|
throw new Error('Field "signer" not provided.');
|
|
6901
6914
|
if (!t.challenge)
|
|
6902
6915
|
throw new Error('Field "challenge" not provided.');
|
|
6903
|
-
const e = this.parseOptionalInputs(t.optionalInputs), i = new
|
|
6916
|
+
const e = this.parseOptionalInputs(t.optionalInputs), i = new Qe({
|
|
6904
6917
|
...t,
|
|
6905
6918
|
optionalInputs: e
|
|
6906
6919
|
}), r = await i.build();
|
|
@@ -6932,8 +6945,8 @@ class Qe {
|
|
|
6932
6945
|
{ ...t, optionalInputs: i },
|
|
6933
6946
|
pt,
|
|
6934
6947
|
async (Ut) => {
|
|
6935
|
-
const _t = await Ut.estimateTransactionFees(), Kt = this.getPriorityFee(t),
|
|
6936
|
-
return _t + Kt +
|
|
6948
|
+
const _t = await Ut.estimateTransactionFees(), Kt = this.getPriorityFee(t), vi = Ut.getOptionalOutputValue();
|
|
6949
|
+
return _t + Kt + vi;
|
|
6937
6950
|
},
|
|
6938
6951
|
"Deployment"
|
|
6939
6952
|
);
|
|
@@ -7153,7 +7166,7 @@ class Qe {
|
|
|
7153
7166
|
*/
|
|
7154
7167
|
writePSBTHeader(t, e) {
|
|
7155
7168
|
const i = a.from(e, "base64"), r = a.alloc(2);
|
|
7156
|
-
return r.writeUInt8(t, 0), r.writeUInt8(
|
|
7169
|
+
return r.writeUInt8(t, 0), r.writeUInt8(jt, 1), a.concat([r, i]).toString("hex");
|
|
7157
7170
|
}
|
|
7158
7171
|
/**
|
|
7159
7172
|
* Sign a P2WDA interaction transaction
|
|
@@ -7225,7 +7238,7 @@ class Qe {
|
|
|
7225
7238
|
let c = this.INITIAL_FUNDING_ESTIMATE, u = 0n, h = 0, l = null, d = null;
|
|
7226
7239
|
for (; h < this.MAX_ITERATIONS && c !== u; ) {
|
|
7227
7240
|
u = c;
|
|
7228
|
-
const p = new
|
|
7241
|
+
const p = new re();
|
|
7229
7242
|
p.addOutput(this.P2TR_SCRIPT, Number(c));
|
|
7230
7243
|
const f = {
|
|
7231
7244
|
transactionId: a.alloc(32, 0).toString("hex"),
|
|
@@ -7307,7 +7320,7 @@ class x extends m {
|
|
|
7307
7320
|
if (super({
|
|
7308
7321
|
...t,
|
|
7309
7322
|
signer: A.fromPrivateKey(
|
|
7310
|
-
|
|
7323
|
+
_e(a.from("aaaaaaaa", "utf-8"))
|
|
7311
7324
|
),
|
|
7312
7325
|
priorityFee: 0n,
|
|
7313
7326
|
gasSatFee: 0n
|
|
@@ -7693,23 +7706,23 @@ class x extends m {
|
|
|
7693
7706
|
};
|
|
7694
7707
|
}
|
|
7695
7708
|
}
|
|
7696
|
-
const
|
|
7697
|
-
function
|
|
7709
|
+
const we = 1, Rt = 66;
|
|
7710
|
+
function Ze(n) {
|
|
7698
7711
|
return n.type === y.FUNDING;
|
|
7699
7712
|
}
|
|
7700
|
-
function
|
|
7713
|
+
function Je(n) {
|
|
7701
7714
|
return n.type === y.DEPLOYMENT;
|
|
7702
7715
|
}
|
|
7703
|
-
function
|
|
7716
|
+
function ti(n) {
|
|
7704
7717
|
return n.type === y.INTERACTION;
|
|
7705
7718
|
}
|
|
7706
7719
|
function it(n) {
|
|
7707
7720
|
return n.type === y.MULTI_SIG;
|
|
7708
7721
|
}
|
|
7709
|
-
function
|
|
7722
|
+
function ei(n) {
|
|
7710
7723
|
return n.type === y.CUSTOM_CODE;
|
|
7711
7724
|
}
|
|
7712
|
-
function
|
|
7725
|
+
function ii(n) {
|
|
7713
7726
|
return n.type === y.CANCEL;
|
|
7714
7727
|
}
|
|
7715
7728
|
class B {
|
|
@@ -7736,8 +7749,8 @@ class B {
|
|
|
7736
7749
|
const e = t.subarray(-32), i = t.subarray(0, -32), r = this.calculateChecksum(i);
|
|
7737
7750
|
if (!e.equals(r))
|
|
7738
7751
|
throw new Error("Invalid checksum - data may be corrupted");
|
|
7739
|
-
const s = new
|
|
7740
|
-
if (o.formatVersion >
|
|
7752
|
+
const s = new Qt(i), o = this.readHeader(s);
|
|
7753
|
+
if (o.formatVersion > we)
|
|
7741
7754
|
throw new Error(`Unsupported format version: ${o.formatVersion}`);
|
|
7742
7755
|
const c = this.readBaseParams(s), u = this.readUTXOArray(s), h = this.readUTXOArray(s), l = this.readOutputArray(s), d = s.readBoolean(), p = this.readSignerMappings(s), f = this.readTypeSpecificData(s, o.transactionType), w = this.readPrecomputedData(s);
|
|
7743
7756
|
return {
|
|
@@ -8126,8 +8139,8 @@ class B {
|
|
|
8126
8139
|
* Calculate double SHA256 checksum (Bitcoin standard)
|
|
8127
8140
|
*/
|
|
8128
8141
|
static calculateChecksum(t) {
|
|
8129
|
-
const e =
|
|
8130
|
-
return
|
|
8142
|
+
const e = te("sha256").update(t).digest();
|
|
8143
|
+
return te("sha256").update(e).digest();
|
|
8131
8144
|
}
|
|
8132
8145
|
static networkNameToU8(t) {
|
|
8133
8146
|
switch (t) {
|
|
@@ -8237,8 +8250,8 @@ class X {
|
|
|
8237
8250
|
*/
|
|
8238
8251
|
static createHeader(t, e, i) {
|
|
8239
8252
|
return {
|
|
8240
|
-
formatVersion:
|
|
8241
|
-
consensusVersion:
|
|
8253
|
+
formatVersion: we,
|
|
8254
|
+
consensusVersion: jt,
|
|
8242
8255
|
transactionType: t,
|
|
8243
8256
|
chainId: i ?? this.networkToChainId(e),
|
|
8244
8257
|
timestamp: Date.now()
|
|
@@ -8451,7 +8464,7 @@ class ut {
|
|
|
8451
8464
|
* Calculate SHA-1 hash
|
|
8452
8465
|
*/
|
|
8453
8466
|
static sha1(t) {
|
|
8454
|
-
return
|
|
8467
|
+
return Xi(a.isBuffer(t) ? t : a.from(t));
|
|
8455
8468
|
}
|
|
8456
8469
|
/**
|
|
8457
8470
|
* Calculate mining preimage
|
|
@@ -8547,12 +8560,12 @@ class ut {
|
|
|
8547
8560
|
};
|
|
8548
8561
|
}
|
|
8549
8562
|
}
|
|
8550
|
-
class
|
|
8563
|
+
class ri {
|
|
8551
8564
|
constructor(t) {
|
|
8552
8565
|
this.epochHash = V(t.epochHash), this.epochRoot = V(t.epochRoot), this.targetHash = V(t.targetHash), this.targetChecksum = V(t.targetChecksum), this.startBlock = BigInt(t.startBlock), this.endBlock = BigInt(t.endBlock), this.proofs = Object.freeze(t.proofs.map((e) => V(e)));
|
|
8553
8566
|
}
|
|
8554
8567
|
}
|
|
8555
|
-
class
|
|
8568
|
+
class si {
|
|
8556
8569
|
constructor(t, e) {
|
|
8557
8570
|
this.epochNumber = e, this.publicKey = k.fromString(t.mldsaPublicKey, t.legacyPublicKey), this.solution = V(t.solution), this.graffiti = t.graffiti ? V(t.graffiti) : void 0, this.signature = V(t.signature);
|
|
8558
8571
|
}
|
|
@@ -8569,7 +8582,7 @@ class ri {
|
|
|
8569
8582
|
}
|
|
8570
8583
|
class $t {
|
|
8571
8584
|
constructor(t) {
|
|
8572
|
-
this.epochNumber = BigInt(t.epochNumber), this.publicKey = k.fromString(t.mldsaPublicKey, t.legacyPublicKey), this.solution = V(t.solution), this.salt = V(t.salt), this.graffiti = V(t.graffiti), this.difficulty = t.difficulty, this.verification = new
|
|
8585
|
+
this.epochNumber = BigInt(t.epochNumber), this.publicKey = k.fromString(t.mldsaPublicKey, t.legacyPublicKey), this.solution = V(t.solution), this.salt = V(t.salt), this.graffiti = V(t.graffiti), this.difficulty = t.difficulty, this.verification = new ri(t.verification), this.submission = t.submission ? new si(t.submission, this.epochNumber + 2n) : t.submission;
|
|
8573
8586
|
}
|
|
8574
8587
|
/**
|
|
8575
8588
|
* Static method to validate from raw data directly
|
|
@@ -8696,17 +8709,17 @@ class ht {
|
|
|
8696
8709
|
estimatedFees: t.precomputedData.estimatedFees ? BigInt(t.precomputedData.estimatedFees) : void 0,
|
|
8697
8710
|
compiledTargetScript: t.precomputedData.compiledTargetScript ? a.from(t.precomputedData.compiledTargetScript, "hex") : void 0
|
|
8698
8711
|
}, p = t.typeSpecificData;
|
|
8699
|
-
if (je(p))
|
|
8700
|
-
return this.reconstructFunding(d, p);
|
|
8701
8712
|
if (Ze(p))
|
|
8702
|
-
return this.
|
|
8713
|
+
return this.reconstructFunding(d, p);
|
|
8703
8714
|
if (Je(p))
|
|
8715
|
+
return this.reconstructDeployment(d, p, t);
|
|
8716
|
+
if (ti(p))
|
|
8704
8717
|
return this.reconstructInteraction(d, p, t);
|
|
8705
8718
|
if (it(p))
|
|
8706
8719
|
return this.reconstructMultiSig(d, p);
|
|
8707
|
-
if (ti(p))
|
|
8708
|
-
return this.reconstructCustomScript(d, p, t);
|
|
8709
8720
|
if (ei(p))
|
|
8721
|
+
return this.reconstructCustomScript(d, p, t);
|
|
8722
|
+
if (ii(p))
|
|
8710
8723
|
return this.reconstructCancel(d, p);
|
|
8711
8724
|
throw new Error(`Unsupported transaction type: ${t.header.transactionType}`);
|
|
8712
8725
|
}
|
|
@@ -8820,7 +8833,7 @@ class ht {
|
|
|
8820
8833
|
...t,
|
|
8821
8834
|
compiledTargetScript: a.from(e.compiledTargetScript, "hex")
|
|
8822
8835
|
};
|
|
8823
|
-
return new
|
|
8836
|
+
return new Se(i);
|
|
8824
8837
|
}
|
|
8825
8838
|
/**
|
|
8826
8839
|
* Build address rotation config from options
|
|
@@ -8885,13 +8898,13 @@ class ht {
|
|
|
8885
8898
|
case "testnet":
|
|
8886
8899
|
return xt;
|
|
8887
8900
|
case "regtest":
|
|
8888
|
-
return
|
|
8901
|
+
return Gt;
|
|
8889
8902
|
default:
|
|
8890
8903
|
throw new Error(`Unknown network: ${t}`);
|
|
8891
8904
|
}
|
|
8892
8905
|
}
|
|
8893
8906
|
}
|
|
8894
|
-
class
|
|
8907
|
+
class Br {
|
|
8895
8908
|
/**
|
|
8896
8909
|
* Export a FundingTransaction for offline signing
|
|
8897
8910
|
* @param params - Funding transaction parameters
|
|
@@ -9276,7 +9289,7 @@ class Ir {
|
|
|
9276
9289
|
return B.toBase64(r);
|
|
9277
9290
|
}
|
|
9278
9291
|
}
|
|
9279
|
-
class
|
|
9292
|
+
class xr {
|
|
9280
9293
|
constructor(t) {
|
|
9281
9294
|
this.opnetAPIUrl = t, this.utxoPath = "address/utxos", this.rpc = "json-rpc";
|
|
9282
9295
|
}
|
|
@@ -9400,7 +9413,7 @@ class Pr {
|
|
|
9400
9413
|
priorityFee: 0n,
|
|
9401
9414
|
gasSatFee: 330n,
|
|
9402
9415
|
mldsaSigner: null
|
|
9403
|
-
}, l = await new
|
|
9416
|
+
}, l = await new je().createBTCTransfer(u), d = await this.broadcastTransaction(l.tx, !1);
|
|
9404
9417
|
return d || { error: "Could not broadcast transaction" };
|
|
9405
9418
|
}
|
|
9406
9419
|
/**
|
|
@@ -9579,8 +9592,8 @@ class Tt extends Lt {
|
|
|
9579
9592
|
return total;
|
|
9580
9593
|
}*/
|
|
9581
9594
|
}
|
|
9582
|
-
var
|
|
9583
|
-
class
|
|
9595
|
+
var ni = /* @__PURE__ */ ((n) => (n[n.UNWRAP = 0] = "UNWRAP", n))(ni || {});
|
|
9596
|
+
class vr {
|
|
9584
9597
|
/**
|
|
9585
9598
|
* Generate a multi-sig address
|
|
9586
9599
|
* @param {Buffer[]} pubKeys - The public keys to use
|
|
@@ -9607,10 +9620,10 @@ class Er {
|
|
|
9607
9620
|
return o;
|
|
9608
9621
|
}
|
|
9609
9622
|
}
|
|
9610
|
-
var
|
|
9611
|
-
class
|
|
9623
|
+
var oi = /* @__PURE__ */ ((n) => (n.UINT8 = "UINT8", n.UINT16 = "UINT16", n.UINT32 = "UINT32", n.UINT64 = "UINT64", n.UINT128 = "UINT128", n.UINT256 = "UINT256", n.INT128 = "INT128", n.BOOL = "BOOL", n.ADDRESS = "ADDRESS", n.STRING = "STRING", n.BYTES4 = "BYTES4", n.BYTES32 = "BYTES32", n.BYTES = "BYTES", n.ADDRESS_UINT256_TUPLE = "ADDRESS_UINT256_TUPLE", n.ARRAY_OF_ADDRESSES = "ARRAY_OF_ADDRESSES", n.ARRAY_OF_UINT256 = "ARRAY_OF_UINT256", n.ARRAY_OF_UINT128 = "ARRAY_OF_UINT128", n.ARRAY_OF_UINT64 = "ARRAY_OF_UINT64", n.ARRAY_OF_UINT32 = "ARRAY_OF_UINT32", n.ARRAY_OF_UINT16 = "ARRAY_OF_UINT16", n.ARRAY_OF_UINT8 = "ARRAY_OF_UINT8", n.ARRAY_OF_STRING = "ARRAY_OF_STRING", n.ARRAY_OF_BYTES = "ARRAY_OF_BYTES", n.ARRAY_OF_BUFFERS = "ARRAY_OF_BUFFERS", n))(oi || {});
|
|
9624
|
+
class kr {
|
|
9612
9625
|
decodeData(t, e) {
|
|
9613
|
-
const i = new
|
|
9626
|
+
const i = new Qt(t), r = [];
|
|
9614
9627
|
for (let s = 0; s < e.length; s++)
|
|
9615
9628
|
switch (e[s]) {
|
|
9616
9629
|
case "UINT8":
|
|
@@ -9702,10 +9715,10 @@ class Ar {
|
|
|
9702
9715
|
return i;
|
|
9703
9716
|
}
|
|
9704
9717
|
sha256(t) {
|
|
9705
|
-
return new
|
|
9718
|
+
return new Ki.sha256().update(t).digest();
|
|
9706
9719
|
}
|
|
9707
9720
|
}
|
|
9708
|
-
class
|
|
9721
|
+
class ye {
|
|
9709
9722
|
constructor(t = []) {
|
|
9710
9723
|
this.items = /* @__PURE__ */ new Set(), this.keys = [];
|
|
9711
9724
|
for (const e of t)
|
|
@@ -9726,7 +9739,7 @@ class we {
|
|
|
9726
9739
|
this.items.delete(e) && (this.keys = this.keys.filter((i) => i.toBigInt() !== e));
|
|
9727
9740
|
}
|
|
9728
9741
|
clone() {
|
|
9729
|
-
return new
|
|
9742
|
+
return new ye(this.keys);
|
|
9730
9743
|
}
|
|
9731
9744
|
clear() {
|
|
9732
9745
|
this.items.clear(), this.keys = [];
|
|
@@ -9741,7 +9754,7 @@ class we {
|
|
|
9741
9754
|
yield* this.keys;
|
|
9742
9755
|
}
|
|
9743
9756
|
}
|
|
9744
|
-
class
|
|
9757
|
+
class me {
|
|
9745
9758
|
constructor(t) {
|
|
9746
9759
|
this.compareFn = t, this.map = new vt(), this.#t = [];
|
|
9747
9760
|
}
|
|
@@ -9750,7 +9763,7 @@ class ye {
|
|
|
9750
9763
|
return this.map.size;
|
|
9751
9764
|
}
|
|
9752
9765
|
static fromMap(t, e) {
|
|
9753
|
-
const i = new
|
|
9766
|
+
const i = new me(e);
|
|
9754
9767
|
for (const [r, s] of t)
|
|
9755
9768
|
i.set(r, s);
|
|
9756
9769
|
return i;
|
|
@@ -9814,7 +9827,7 @@ class ye {
|
|
|
9814
9827
|
yield [t, this.map.get(t)];
|
|
9815
9828
|
}
|
|
9816
9829
|
}
|
|
9817
|
-
class
|
|
9830
|
+
class be {
|
|
9818
9831
|
constructor(t) {
|
|
9819
9832
|
this.compareFn = t, this.elements = [];
|
|
9820
9833
|
}
|
|
@@ -9822,7 +9835,7 @@ class me {
|
|
|
9822
9835
|
return this.elements.length;
|
|
9823
9836
|
}
|
|
9824
9837
|
static fromSet(t, e) {
|
|
9825
|
-
const i = new
|
|
9838
|
+
const i = new be(e);
|
|
9826
9839
|
for (const r of t)
|
|
9827
9840
|
i.add(r);
|
|
9828
9841
|
return i;
|
|
@@ -9862,17 +9875,17 @@ class me {
|
|
|
9862
9875
|
return { found: !1, index: e };
|
|
9863
9876
|
}
|
|
9864
9877
|
}
|
|
9865
|
-
class
|
|
9878
|
+
class Lr {
|
|
9866
9879
|
constructor(t, e) {
|
|
9867
9880
|
this.type = t, this.data = e;
|
|
9868
9881
|
}
|
|
9869
9882
|
}
|
|
9870
|
-
class
|
|
9883
|
+
class Te {
|
|
9871
9884
|
constructor() {
|
|
9872
9885
|
}
|
|
9873
9886
|
}
|
|
9874
|
-
var It = /* @__PURE__ */ ((n) => (n.testnet = "testnet", n.mainnet = "mainnet", n.regtest = "regtest", n))(It || {}),
|
|
9875
|
-
class
|
|
9887
|
+
var It = /* @__PURE__ */ ((n) => (n.testnet = "testnet", n.mainnet = "mainnet", n.regtest = "regtest", n))(It || {}), ai = /* @__PURE__ */ ((n) => (n.BITCOIN_MAINNET = "BITCOIN_MAINNET", n.BITCOIN_TESTNET = "BITCOIN_TESTNET", n.BITCOIN_TESTNET4 = "BITCOIN_TESTNET4", n.BITCOIN_REGTEST = "BITCOIN_REGTEST", n.BITCOIN_SIGNET = "BITCOIN_SIGNET", n.FRACTAL_BITCOIN_MAINNET = "FRACTAL_BITCOIN_MAINNET", n.FRACTAL_BITCOIN_TESTNET = "FRACTAL_BITCOIN_TESTNET", n))(ai || {}), ci = /* @__PURE__ */ ((n) => (n.ecdsa = "ecdsa", n.bip322 = "bip322-simple", n))(ci || {}), ui = /* @__PURE__ */ ((n) => (n.ecdsa = "ecdsa", n.schnorr = "schnorr", n))(ui || {});
|
|
9888
|
+
class Ur extends Te {
|
|
9876
9889
|
constructor() {
|
|
9877
9890
|
if (super(), this.isInitialized = !1, !window)
|
|
9878
9891
|
throw new Error("UnisatSigner can only be used in a browser environment");
|
|
@@ -9925,7 +9938,7 @@ class Br extends be {
|
|
|
9925
9938
|
this._network = xt;
|
|
9926
9939
|
break;
|
|
9927
9940
|
case It.regtest:
|
|
9928
|
-
this._network =
|
|
9941
|
+
this._network = Gt;
|
|
9929
9942
|
break;
|
|
9930
9943
|
default:
|
|
9931
9944
|
throw new Error(`Invalid network: ${t}`);
|
|
@@ -9970,10 +9983,10 @@ class Br extends be {
|
|
|
9970
9983
|
e.push(c);
|
|
9971
9984
|
const u = o.data.inputs.map((h, l) => {
|
|
9972
9985
|
let d = !1, p = !1;
|
|
9973
|
-
if (
|
|
9986
|
+
if (de(h)) {
|
|
9974
9987
|
if (h.tapLeafScript && h.tapLeafScript.length > 0) {
|
|
9975
9988
|
for (const f of h.tapLeafScript)
|
|
9976
|
-
if (
|
|
9989
|
+
if (_r(this.publicKey, f.script)) {
|
|
9977
9990
|
d = !0, p = !1;
|
|
9978
9991
|
break;
|
|
9979
9992
|
}
|
|
@@ -9982,7 +9995,7 @@ class Br extends be {
|
|
|
9982
9995
|
const f = h.tapInternalKey, w = O(this.publicKey);
|
|
9983
9996
|
f.equals(w) && (d = !0, p = !0);
|
|
9984
9997
|
}
|
|
9985
|
-
} else
|
|
9998
|
+
} else fe(h, this.publicKey) && (d = !0, p = !1);
|
|
9986
9999
|
return d ? {
|
|
9987
10000
|
index: l,
|
|
9988
10001
|
publicKey: this.publicKey.toString("hex"),
|
|
@@ -10048,15 +10061,15 @@ class Br extends be {
|
|
|
10048
10061
|
return i;
|
|
10049
10062
|
}
|
|
10050
10063
|
}
|
|
10051
|
-
function
|
|
10052
|
-
return
|
|
10064
|
+
function _r(n, t) {
|
|
10065
|
+
return Kr(n, t) !== -1;
|
|
10053
10066
|
}
|
|
10054
|
-
function
|
|
10067
|
+
function Kr(n, t) {
|
|
10055
10068
|
const e = ft(n), i = O(n), r = F(t);
|
|
10056
10069
|
if (r === null) throw new Error("Unknown script error");
|
|
10057
10070
|
return r.findIndex((s) => typeof s == "number" ? !1 : a.isBuffer(s) && (s.equals(n) || s.equals(e) || s.equals(i)));
|
|
10058
10071
|
}
|
|
10059
|
-
class
|
|
10072
|
+
class Dr extends Te {
|
|
10060
10073
|
constructor() {
|
|
10061
10074
|
if (super(), this.isInitialized = !1, !window)
|
|
10062
10075
|
throw new Error("XverseSigner can only be used in a browser environment");
|
|
@@ -10154,10 +10167,10 @@ class kr extends be {
|
|
|
10154
10167
|
e.push(u);
|
|
10155
10168
|
const h = c.data.inputs.map((l, d) => {
|
|
10156
10169
|
let p = !1, f = !1;
|
|
10157
|
-
if (
|
|
10170
|
+
if (de(l)) {
|
|
10158
10171
|
if (l.tapLeafScript && l.tapLeafScript.length > 0) {
|
|
10159
10172
|
for (const w of l.tapLeafScript)
|
|
10160
|
-
if (
|
|
10173
|
+
if (pe(this.publicKey, w.script)) {
|
|
10161
10174
|
p = !0, f = !1;
|
|
10162
10175
|
break;
|
|
10163
10176
|
}
|
|
@@ -10166,7 +10179,7 @@ class kr extends be {
|
|
|
10166
10179
|
const w = l.tapInternalKey, S = O(this.publicKey);
|
|
10167
10180
|
w.equals(S) && (p = !0, f = !0);
|
|
10168
10181
|
}
|
|
10169
|
-
} else
|
|
10182
|
+
} else fe(l, this.publicKey) && (p = !0, f = !1);
|
|
10170
10183
|
return p ? {
|
|
10171
10184
|
index: d,
|
|
10172
10185
|
publicKey: this.publicKey.toString("hex"),
|
|
@@ -10244,38 +10257,38 @@ class kr extends be {
|
|
|
10244
10257
|
return i;
|
|
10245
10258
|
}
|
|
10246
10259
|
}
|
|
10247
|
-
var
|
|
10260
|
+
var hi = /* @__PURE__ */ ((n) => (n.mainnet = "mainnet", n.testnet = "testnet", n.signet = "Signet", n))(hi || {}), li = /* @__PURE__ */ ((n) => (n.ECDSA = "ECDSA", n.BIP322 = "BIP322", n))(li || {});
|
|
10248
10261
|
function R() {
|
|
10249
10262
|
return k.dead();
|
|
10250
10263
|
}
|
|
10251
|
-
const
|
|
10252
|
-
var
|
|
10253
|
-
class
|
|
10264
|
+
const di = R(), fi = R(), pi = R(), gi = R(), Si = R(), wi = R(), yi = R(), mi = R(), bi = R(), Ti = R(), Ii = R(), Pi = R(), Ei = R(), Ai = R(), Oi = R();
|
|
10265
|
+
var Bi = /* @__PURE__ */ ((n) => (n.Mainnet = "mainnet", n.Testnet = "testnet", n.Regtest = "regtest", n))(Bi || {});
|
|
10266
|
+
class xi {
|
|
10254
10267
|
constructor() {
|
|
10255
10268
|
this.metadata = {
|
|
10256
10269
|
[Bt.Bitcoin]: {
|
|
10257
10270
|
testnet: {
|
|
10258
|
-
factory:
|
|
10259
|
-
pool:
|
|
10260
|
-
wbtc:
|
|
10261
|
-
moto:
|
|
10262
|
-
router:
|
|
10271
|
+
factory: wi,
|
|
10272
|
+
pool: yi,
|
|
10273
|
+
wbtc: mi,
|
|
10274
|
+
moto: bi,
|
|
10275
|
+
router: Ti
|
|
10263
10276
|
},
|
|
10264
10277
|
regtest: {
|
|
10265
|
-
factory:
|
|
10266
|
-
pool:
|
|
10267
|
-
wbtc:
|
|
10268
|
-
moto:
|
|
10269
|
-
router:
|
|
10278
|
+
factory: di,
|
|
10279
|
+
pool: fi,
|
|
10280
|
+
wbtc: pi,
|
|
10281
|
+
moto: gi,
|
|
10282
|
+
router: Si
|
|
10270
10283
|
}
|
|
10271
10284
|
},
|
|
10272
10285
|
[Bt.Fractal]: {
|
|
10273
10286
|
mainnet: {
|
|
10274
|
-
factory:
|
|
10275
|
-
pool:
|
|
10276
|
-
wbtc:
|
|
10277
|
-
moto:
|
|
10278
|
-
router:
|
|
10287
|
+
factory: Ii,
|
|
10288
|
+
pool: Pi,
|
|
10289
|
+
wbtc: Ei,
|
|
10290
|
+
moto: Ai,
|
|
10291
|
+
router: Oi
|
|
10279
10292
|
}
|
|
10280
10293
|
}
|
|
10281
10294
|
};
|
|
@@ -10321,7 +10334,7 @@ class Bi {
|
|
|
10321
10334
|
return i;
|
|
10322
10335
|
}
|
|
10323
10336
|
}
|
|
10324
|
-
const
|
|
10337
|
+
const Cr = new xi();
|
|
10325
10338
|
class Xt {
|
|
10326
10339
|
constructor() {
|
|
10327
10340
|
this._size = 0, this.capacity = Xt.INITIAL_CAPACITY, this.#t = new Array(this.capacity), this.#e = new Array(this.capacity), this.deleted = new Array(this.capacity).fill(!1);
|
|
@@ -10484,47 +10497,47 @@ class Xt {
|
|
|
10484
10497
|
}
|
|
10485
10498
|
const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10486
10499
|
__proto__: null,
|
|
10487
|
-
ABICoder:
|
|
10488
|
-
ABIDataTypes:
|
|
10500
|
+
ABICoder: kr,
|
|
10501
|
+
ABIDataTypes: oi,
|
|
10489
10502
|
ADDRESS_BYTE_LENGTH: D,
|
|
10490
|
-
ANCHOR_SCRIPT:
|
|
10503
|
+
ANCHOR_SCRIPT: oe,
|
|
10491
10504
|
Address: k,
|
|
10492
|
-
AddressGenerator:
|
|
10493
|
-
AddressMap:
|
|
10494
|
-
AddressSet:
|
|
10505
|
+
AddressGenerator: ue,
|
|
10506
|
+
AddressMap: Fe,
|
|
10507
|
+
AddressSet: ye,
|
|
10495
10508
|
AddressTypes: tt,
|
|
10496
10509
|
AddressVerificator: H,
|
|
10497
10510
|
BIPStandard: bt,
|
|
10498
|
-
BOOLEAN_BYTE_LENGTH:
|
|
10499
|
-
BinaryReader:
|
|
10511
|
+
BOOLEAN_BYTE_LENGTH: pr,
|
|
10512
|
+
BinaryReader: Qt,
|
|
10500
10513
|
BinaryWriter: C,
|
|
10501
10514
|
BitcoinUtils: K,
|
|
10502
10515
|
BufferHelper: Y,
|
|
10503
|
-
CSVModes:
|
|
10504
|
-
CalldataGenerator:
|
|
10505
|
-
CancelTransaction:
|
|
10516
|
+
CSVModes: Ge,
|
|
10517
|
+
CalldataGenerator: ce,
|
|
10518
|
+
CancelTransaction: Se,
|
|
10506
10519
|
ChainId: Bt,
|
|
10507
10520
|
ChallengeSolution: $t,
|
|
10508
|
-
ChallengeSubmission:
|
|
10509
|
-
ChallengeVerification:
|
|
10521
|
+
ChallengeSubmission: si,
|
|
10522
|
+
ChallengeVerification: ri,
|
|
10510
10523
|
Compressor: N,
|
|
10511
10524
|
Consensus: kt,
|
|
10512
|
-
ConsolidatedInteractionTransaction:
|
|
10513
|
-
ContractAddress:
|
|
10514
|
-
ContractBaseMetadata:
|
|
10515
|
-
CustomGenerator:
|
|
10516
|
-
CustomKeypair:
|
|
10525
|
+
ConsolidatedInteractionTransaction: Qe,
|
|
10526
|
+
ContractAddress: se,
|
|
10527
|
+
ContractBaseMetadata: Tr,
|
|
10528
|
+
CustomGenerator: We,
|
|
10529
|
+
CustomKeypair: Te,
|
|
10517
10530
|
CustomMap: Xt,
|
|
10518
10531
|
CustomScriptTransaction: Vt,
|
|
10519
10532
|
DeploymentGenerator: Nt,
|
|
10520
10533
|
DeploymentTransaction: pt,
|
|
10521
|
-
DeterministicMap:
|
|
10522
|
-
DeterministicSet:
|
|
10534
|
+
DeterministicMap: me,
|
|
10535
|
+
DeterministicSet: be,
|
|
10523
10536
|
EcKeyPair: A,
|
|
10524
10537
|
EpochValidator: ut,
|
|
10525
|
-
FACTORY_ADDRESS_FRACTAL:
|
|
10526
|
-
FACTORY_ADDRESS_REGTEST:
|
|
10527
|
-
FACTORY_ADDRESS_TESTNET:
|
|
10538
|
+
FACTORY_ADDRESS_FRACTAL: Ii,
|
|
10539
|
+
FACTORY_ADDRESS_REGTEST: di,
|
|
10540
|
+
FACTORY_ADDRESS_TESTNET: wi,
|
|
10528
10541
|
FastMap: vt,
|
|
10529
10542
|
FeaturePriority: j,
|
|
10530
10543
|
Features: W,
|
|
@@ -10532,69 +10545,69 @@ const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10532
10545
|
Generator: $,
|
|
10533
10546
|
HashCommitmentGenerator: E,
|
|
10534
10547
|
I128_BYTE_LENGTH: mt,
|
|
10535
|
-
I16_BYTE_LENGTH:
|
|
10536
|
-
I256_BYTE_LENGTH:
|
|
10537
|
-
I64_BYTE_LENGTH:
|
|
10538
|
-
I8_BYTE_LENGTH:
|
|
10548
|
+
I16_BYTE_LENGTH: dr,
|
|
10549
|
+
I256_BYTE_LENGTH: ur,
|
|
10550
|
+
I64_BYTE_LENGTH: hr,
|
|
10551
|
+
I8_BYTE_LENGTH: fr,
|
|
10539
10552
|
InteractionTransaction: qt,
|
|
10540
10553
|
InteractionTransactionP2WDA: Z,
|
|
10541
|
-
LegacyCalldataGenerator:
|
|
10554
|
+
LegacyCalldataGenerator: wr,
|
|
10542
10555
|
MINIMUM_AMOUNT_CA: wt,
|
|
10543
10556
|
MINIMUM_AMOUNT_REWARD: z,
|
|
10544
10557
|
MLDSAKeyPair: P.MLDSAKeyPair,
|
|
10545
|
-
MLDSAPublicKeyMetadata:
|
|
10558
|
+
MLDSAPublicKeyMetadata: ze,
|
|
10546
10559
|
MLDSASecurityLevel: P.MLDSASecurityLevel,
|
|
10547
|
-
MOTO_ADDRESS_FRACTAL:
|
|
10548
|
-
MOTO_ADDRESS_REGTEST:
|
|
10549
|
-
MOTO_ADDRESS_TESTNET:
|
|
10560
|
+
MOTO_ADDRESS_FRACTAL: Ai,
|
|
10561
|
+
MOTO_ADDRESS_REGTEST: gi,
|
|
10562
|
+
MOTO_ADDRESS_TESTNET: bi,
|
|
10550
10563
|
MessageSigner: nt,
|
|
10551
|
-
MessageType:
|
|
10552
|
-
Mnemonic:
|
|
10564
|
+
MessageType: ci,
|
|
10565
|
+
Mnemonic: le,
|
|
10553
10566
|
MnemonicStrength: Ht,
|
|
10554
10567
|
MultiSignGenerator: At,
|
|
10555
10568
|
MultiSignTransaction: x,
|
|
10556
|
-
NetEvent:
|
|
10557
|
-
OPNET_DEPLOYMENT_VERSION:
|
|
10558
|
-
OPNetConsensusConfig:
|
|
10559
|
-
OPNetLimitedProvider:
|
|
10560
|
-
OPNetMetadata:
|
|
10561
|
-
OPNetNetwork:
|
|
10562
|
-
OPNetTokenAddressManager:
|
|
10563
|
-
OfflineTransactionManager:
|
|
10564
|
-
P2TR_MS:
|
|
10569
|
+
NetEvent: Lr,
|
|
10570
|
+
OPNET_DEPLOYMENT_VERSION: Me,
|
|
10571
|
+
OPNetConsensusConfig: Xe,
|
|
10572
|
+
OPNetLimitedProvider: xr,
|
|
10573
|
+
OPNetMetadata: Cr,
|
|
10574
|
+
OPNetNetwork: Bi,
|
|
10575
|
+
OPNetTokenAddressManager: xi,
|
|
10576
|
+
OfflineTransactionManager: Br,
|
|
10577
|
+
P2TR_MS: vr,
|
|
10565
10578
|
P2WDADetector: q,
|
|
10566
10579
|
P2WDAGenerator: Ot,
|
|
10567
|
-
POOL_ADDRESS_FRACTAL:
|
|
10568
|
-
POOL_ADDRESS_REGTEST:
|
|
10569
|
-
POOL_ADDRESS_TESTNET:
|
|
10570
|
-
PSBTTypes:
|
|
10580
|
+
POOL_ADDRESS_FRACTAL: Pi,
|
|
10581
|
+
POOL_ADDRESS_REGTEST: fi,
|
|
10582
|
+
POOL_ADDRESS_TESTNET: yi,
|
|
10583
|
+
PSBTTypes: ni,
|
|
10571
10584
|
PsbtTransaction: Tt,
|
|
10572
10585
|
QuantumBIP32API: P.QuantumBIP32API,
|
|
10573
10586
|
QuantumBIP32Factory: P.QuantumBIP32Factory,
|
|
10574
10587
|
QuantumBIP32Interface: P.QuantumBIP32Interface,
|
|
10575
10588
|
QuantumDerivationPath: P.QuantumDerivationPath,
|
|
10576
10589
|
QuantumSigner: P.QuantumSigner,
|
|
10577
|
-
ROUTER_ADDRESS_FRACTAL:
|
|
10578
|
-
ROUTER_ADDRESS_REGTEST:
|
|
10579
|
-
ROUTER_ADDRESS_TESTNET:
|
|
10580
|
-
RoswellConsensus:
|
|
10581
|
-
SELECTOR_BYTE_LENGTH:
|
|
10582
|
-
SERIALIZATION_FORMAT_VERSION:
|
|
10590
|
+
ROUTER_ADDRESS_FRACTAL: Oi,
|
|
10591
|
+
ROUTER_ADDRESS_REGTEST: Si,
|
|
10592
|
+
ROUTER_ADDRESS_TESTNET: Ti,
|
|
10593
|
+
RoswellConsensus: $e,
|
|
10594
|
+
SELECTOR_BYTE_LENGTH: cr,
|
|
10595
|
+
SERIALIZATION_FORMAT_VERSION: we,
|
|
10583
10596
|
SERIALIZATION_MAGIC_BYTE: Rt,
|
|
10584
|
-
Secp256k1PointDeriver:
|
|
10585
|
-
SharedInteractionTransaction:
|
|
10586
|
-
SignatureType:
|
|
10587
|
-
SigningProtocol:
|
|
10597
|
+
Secp256k1PointDeriver: Re,
|
|
10598
|
+
SharedInteractionTransaction: ge,
|
|
10599
|
+
SignatureType: ui,
|
|
10600
|
+
SigningProtocol: li,
|
|
10588
10601
|
TapscriptVerificator: et,
|
|
10589
10602
|
TimeLockGenerator: M,
|
|
10590
10603
|
TransactionBuilder: m,
|
|
10591
|
-
TransactionFactory:
|
|
10604
|
+
TransactionFactory: je,
|
|
10592
10605
|
TransactionReconstructor: ht,
|
|
10593
|
-
TransactionSequence:
|
|
10606
|
+
TransactionSequence: Ye,
|
|
10594
10607
|
TransactionSerializer: B,
|
|
10595
10608
|
TransactionStateCapture: X,
|
|
10596
10609
|
TransactionType: y,
|
|
10597
|
-
TweakedSigner:
|
|
10610
|
+
TweakedSigner: he,
|
|
10598
10611
|
TweakedTransaction: Lt,
|
|
10599
10612
|
U128_BYTE_LENGTH: yt,
|
|
10600
10613
|
U16_BYTE_LENGTH: Et,
|
|
@@ -10602,76 +10615,76 @@ const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10602
10615
|
U32_BYTE_LENGTH: lt,
|
|
10603
10616
|
U64_BYTE_LENGTH: Wt,
|
|
10604
10617
|
U8_BYTE_LENGTH: Mt,
|
|
10605
|
-
UnisatChainType:
|
|
10618
|
+
UnisatChainType: ai,
|
|
10606
10619
|
UnisatNetwork: It,
|
|
10607
|
-
UnisatSigner:
|
|
10608
|
-
WBTC_ADDRESS_FRACTAL:
|
|
10609
|
-
WBTC_ADDRESS_REGTEST:
|
|
10610
|
-
WBTC_ADDRESS_TESTNET:
|
|
10620
|
+
UnisatSigner: Ur,
|
|
10621
|
+
WBTC_ADDRESS_FRACTAL: Ei,
|
|
10622
|
+
WBTC_ADDRESS_REGTEST: pi,
|
|
10623
|
+
WBTC_ADDRESS_TESTNET: mi,
|
|
10611
10624
|
Wallet: J,
|
|
10612
|
-
XverseNetwork:
|
|
10613
|
-
XverseSigner:
|
|
10614
|
-
buildBIPPath:
|
|
10615
|
-
createAddressRotation:
|
|
10616
|
-
createSignerMap:
|
|
10617
|
-
currentConsensus:
|
|
10618
|
-
currentConsensusConfig:
|
|
10619
|
-
disabledAddressRotation:
|
|
10620
|
-
getBIPDescription:
|
|
10621
|
-
getLevelFromPublicKeyLength:
|
|
10622
|
-
isCancelSpecificData:
|
|
10623
|
-
isCustomScriptSpecificData:
|
|
10624
|
-
isDeploymentSpecificData:
|
|
10625
|
-
isFundingSpecificData:
|
|
10626
|
-
isInteractionSpecificData:
|
|
10625
|
+
XverseNetwork: hi,
|
|
10626
|
+
XverseSigner: Dr,
|
|
10627
|
+
buildBIPPath: Ve,
|
|
10628
|
+
createAddressRotation: Ir,
|
|
10629
|
+
createSignerMap: qe,
|
|
10630
|
+
currentConsensus: jt,
|
|
10631
|
+
currentConsensusConfig: Er,
|
|
10632
|
+
disabledAddressRotation: Pr,
|
|
10633
|
+
getBIPDescription: mr,
|
|
10634
|
+
getLevelFromPublicKeyLength: ne,
|
|
10635
|
+
isCancelSpecificData: ii,
|
|
10636
|
+
isCustomScriptSpecificData: ei,
|
|
10637
|
+
isDeploymentSpecificData: Je,
|
|
10638
|
+
isFundingSpecificData: Ze,
|
|
10639
|
+
isInteractionSpecificData: ti,
|
|
10627
10640
|
isMultiSigSpecificData: it,
|
|
10628
|
-
isOPWallet:
|
|
10629
|
-
number_BYTE_LENGTH:
|
|
10630
|
-
version:
|
|
10631
|
-
versionBuffer:
|
|
10641
|
+
isOPWallet: He,
|
|
10642
|
+
number_BYTE_LENGTH: lr,
|
|
10643
|
+
version: tr,
|
|
10644
|
+
versionBuffer: Ne
|
|
10632
10645
|
}, Symbol.toStringTag, { value: "Module" })), Hr = P.MLDSAKeyPair, Vr = P.MLDSASecurityLevel, zr = P.QuantumBIP32API, qr = P.QuantumBIP32Factory, $r = P.QuantumBIP32Interface, Xr = P.QuantumDerivationPath, Yr = P.QuantumSigner;
|
|
10633
10646
|
export {
|
|
10634
|
-
|
|
10635
|
-
|
|
10647
|
+
kr as ABICoder,
|
|
10648
|
+
oi as ABIDataTypes,
|
|
10636
10649
|
D as ADDRESS_BYTE_LENGTH,
|
|
10637
|
-
|
|
10650
|
+
oe as ANCHOR_SCRIPT,
|
|
10638
10651
|
k as Address,
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10652
|
+
ue as AddressGenerator,
|
|
10653
|
+
Fe as AddressMap,
|
|
10654
|
+
ye as AddressSet,
|
|
10642
10655
|
tt as AddressTypes,
|
|
10643
10656
|
H as AddressVerificator,
|
|
10644
10657
|
bt as BIPStandard,
|
|
10645
|
-
|
|
10646
|
-
|
|
10658
|
+
pr as BOOLEAN_BYTE_LENGTH,
|
|
10659
|
+
Qt as BinaryReader,
|
|
10647
10660
|
C as BinaryWriter,
|
|
10648
10661
|
K as BitcoinUtils,
|
|
10649
10662
|
Y as BufferHelper,
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10663
|
+
Ge as CSVModes,
|
|
10664
|
+
ce as CalldataGenerator,
|
|
10665
|
+
Se as CancelTransaction,
|
|
10653
10666
|
Bt as ChainId,
|
|
10654
10667
|
$t as ChallengeSolution,
|
|
10655
|
-
|
|
10656
|
-
|
|
10668
|
+
si as ChallengeSubmission,
|
|
10669
|
+
ri as ChallengeVerification,
|
|
10657
10670
|
N as Compressor,
|
|
10658
10671
|
kt as Consensus,
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10672
|
+
Qe as ConsolidatedInteractionTransaction,
|
|
10673
|
+
se as ContractAddress,
|
|
10674
|
+
Tr as ContractBaseMetadata,
|
|
10675
|
+
We as CustomGenerator,
|
|
10676
|
+
Te as CustomKeypair,
|
|
10664
10677
|
Xt as CustomMap,
|
|
10665
10678
|
Vt as CustomScriptTransaction,
|
|
10666
10679
|
Nt as DeploymentGenerator,
|
|
10667
10680
|
pt as DeploymentTransaction,
|
|
10668
|
-
|
|
10669
|
-
|
|
10681
|
+
me as DeterministicMap,
|
|
10682
|
+
be as DeterministicSet,
|
|
10670
10683
|
A as EcKeyPair,
|
|
10671
10684
|
ut as EpochValidator,
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10685
|
+
Ii as FACTORY_ADDRESS_FRACTAL,
|
|
10686
|
+
di as FACTORY_ADDRESS_REGTEST,
|
|
10687
|
+
wi as FACTORY_ADDRESS_TESTNET,
|
|
10675
10688
|
vt as FastMap,
|
|
10676
10689
|
j as FeaturePriority,
|
|
10677
10690
|
W as Features,
|
|
@@ -10679,69 +10692,69 @@ export {
|
|
|
10679
10692
|
$ as Generator,
|
|
10680
10693
|
E as HashCommitmentGenerator,
|
|
10681
10694
|
mt as I128_BYTE_LENGTH,
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10695
|
+
dr as I16_BYTE_LENGTH,
|
|
10696
|
+
ur as I256_BYTE_LENGTH,
|
|
10697
|
+
hr as I64_BYTE_LENGTH,
|
|
10698
|
+
fr as I8_BYTE_LENGTH,
|
|
10686
10699
|
qt as InteractionTransaction,
|
|
10687
10700
|
Z as InteractionTransactionP2WDA,
|
|
10688
|
-
|
|
10701
|
+
wr as LegacyCalldataGenerator,
|
|
10689
10702
|
wt as MINIMUM_AMOUNT_CA,
|
|
10690
10703
|
z as MINIMUM_AMOUNT_REWARD,
|
|
10691
10704
|
Hr as MLDSAKeyPair,
|
|
10692
|
-
|
|
10705
|
+
ze as MLDSAPublicKeyMetadata,
|
|
10693
10706
|
Vr as MLDSASecurityLevel,
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10707
|
+
Ai as MOTO_ADDRESS_FRACTAL,
|
|
10708
|
+
gi as MOTO_ADDRESS_REGTEST,
|
|
10709
|
+
bi as MOTO_ADDRESS_TESTNET,
|
|
10697
10710
|
nt as MessageSigner,
|
|
10698
|
-
|
|
10699
|
-
|
|
10711
|
+
ci as MessageType,
|
|
10712
|
+
le as Mnemonic,
|
|
10700
10713
|
Ht as MnemonicStrength,
|
|
10701
10714
|
At as MultiSignGenerator,
|
|
10702
10715
|
x as MultiSignTransaction,
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10716
|
+
Lr as NetEvent,
|
|
10717
|
+
Me as OPNET_DEPLOYMENT_VERSION,
|
|
10718
|
+
Xe as OPNetConsensusConfig,
|
|
10719
|
+
xr as OPNetLimitedProvider,
|
|
10720
|
+
Cr as OPNetMetadata,
|
|
10721
|
+
Bi as OPNetNetwork,
|
|
10722
|
+
xi as OPNetTokenAddressManager,
|
|
10723
|
+
Br as OfflineTransactionManager,
|
|
10724
|
+
vr as P2TR_MS,
|
|
10712
10725
|
q as P2WDADetector,
|
|
10713
10726
|
Ot as P2WDAGenerator,
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10727
|
+
Pi as POOL_ADDRESS_FRACTAL,
|
|
10728
|
+
fi as POOL_ADDRESS_REGTEST,
|
|
10729
|
+
yi as POOL_ADDRESS_TESTNET,
|
|
10730
|
+
ni as PSBTTypes,
|
|
10718
10731
|
Tt as PsbtTransaction,
|
|
10719
10732
|
zr as QuantumBIP32API,
|
|
10720
10733
|
qr as QuantumBIP32Factory,
|
|
10721
10734
|
$r as QuantumBIP32Interface,
|
|
10722
10735
|
Xr as QuantumDerivationPath,
|
|
10723
10736
|
Yr as QuantumSigner,
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10737
|
+
Oi as ROUTER_ADDRESS_FRACTAL,
|
|
10738
|
+
Si as ROUTER_ADDRESS_REGTEST,
|
|
10739
|
+
Ti as ROUTER_ADDRESS_TESTNET,
|
|
10740
|
+
$e as RoswellConsensus,
|
|
10741
|
+
cr as SELECTOR_BYTE_LENGTH,
|
|
10742
|
+
we as SERIALIZATION_FORMAT_VERSION,
|
|
10730
10743
|
Rt as SERIALIZATION_MAGIC_BYTE,
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10744
|
+
Re as Secp256k1PointDeriver,
|
|
10745
|
+
ge as SharedInteractionTransaction,
|
|
10746
|
+
ui as SignatureType,
|
|
10747
|
+
li as SigningProtocol,
|
|
10735
10748
|
et as TapscriptVerificator,
|
|
10736
10749
|
M as TimeLockGenerator,
|
|
10737
10750
|
m as TransactionBuilder,
|
|
10738
|
-
|
|
10751
|
+
je as TransactionFactory,
|
|
10739
10752
|
ht as TransactionReconstructor,
|
|
10740
|
-
|
|
10753
|
+
Ye as TransactionSequence,
|
|
10741
10754
|
B as TransactionSerializer,
|
|
10742
10755
|
X as TransactionStateCapture,
|
|
10743
10756
|
y as TransactionType,
|
|
10744
|
-
|
|
10757
|
+
he as TweakedSigner,
|
|
10745
10758
|
Lt as TweakedTransaction,
|
|
10746
10759
|
yt as U128_BYTE_LENGTH,
|
|
10747
10760
|
Et as U16_BYTE_LENGTH,
|
|
@@ -10749,32 +10762,32 @@ export {
|
|
|
10749
10762
|
lt as U32_BYTE_LENGTH,
|
|
10750
10763
|
Wt as U64_BYTE_LENGTH,
|
|
10751
10764
|
Mt as U8_BYTE_LENGTH,
|
|
10752
|
-
|
|
10765
|
+
ai as UnisatChainType,
|
|
10753
10766
|
It as UnisatNetwork,
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10767
|
+
Ur as UnisatSigner,
|
|
10768
|
+
Ei as WBTC_ADDRESS_FRACTAL,
|
|
10769
|
+
pi as WBTC_ADDRESS_REGTEST,
|
|
10770
|
+
mi as WBTC_ADDRESS_TESTNET,
|
|
10758
10771
|
J as Wallet,
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10772
|
+
hi as XverseNetwork,
|
|
10773
|
+
Dr as XverseSigner,
|
|
10774
|
+
Ve as buildBIPPath,
|
|
10775
|
+
Ir as createAddressRotation,
|
|
10776
|
+
qe as createSignerMap,
|
|
10777
|
+
jt as currentConsensus,
|
|
10778
|
+
Er as currentConsensusConfig,
|
|
10779
|
+
Pr as disabledAddressRotation,
|
|
10780
|
+
mr as getBIPDescription,
|
|
10781
|
+
ne as getLevelFromPublicKeyLength,
|
|
10782
|
+
ii as isCancelSpecificData,
|
|
10783
|
+
ei as isCustomScriptSpecificData,
|
|
10784
|
+
Je as isDeploymentSpecificData,
|
|
10785
|
+
Ze as isFundingSpecificData,
|
|
10786
|
+
ti as isInteractionSpecificData,
|
|
10774
10787
|
it as isMultiSigSpecificData,
|
|
10775
|
-
|
|
10776
|
-
|
|
10788
|
+
He as isOPWallet,
|
|
10789
|
+
lr as number_BYTE_LENGTH,
|
|
10777
10790
|
Nr as opnet,
|
|
10778
|
-
|
|
10779
|
-
|
|
10791
|
+
tr as version,
|
|
10792
|
+
Ne as versionBuffer
|
|
10780
10793
|
};
|