@coinflowlabs/vue 1.0.3 → 1.0.4
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 +4 -0
- package/dist/coinflow-vue.js +664 -652
- package/dist/coinflow-vue.umd.cjs +6 -6
- package/dist/lib/common/CoinflowTypes.d.ts +8 -0
- package/package.json +2 -2
package/dist/coinflow-vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var za = Object.defineProperty;
|
|
2
2
|
var qa = (n, t, e) => t in n ? za(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var le = (n, t, e) => qa(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { defineComponent as Re, openBlock as Se, createElementBlock as
|
|
4
|
+
import { defineComponent as Re, openBlock as Se, createElementBlock as Le, resolveComponent as Ro, createBlock as In, ref as cr, onMounted as Mo, watchEffect as Zr, unref as Tr, createElementVNode as Kr, normalizeStyle as Ka, renderSlot as Wa, createVNode as Wi, createStaticVNode as Bi, withCtx as To, Fragment as Da, createCommentVNode as Ms } from "vue";
|
|
5
5
|
var $a = /* @__PURE__ */ ((n) => (n.Credits = "Credits", n.USDC = "USDC", n.Bank = "Bank", n))($a || {}), Ha = /* @__PURE__ */ ((n) => (n.Rounded = "rounded", n.Sharp = "sharp", n.Pill = "pill", n))(Ha || {}), Va = /* @__PURE__ */ ((n) => (n.NoPreference = "NoPreference", n.Frictionless = "Frictionless", n.Challenge = "Challenge", n))(Va || {}), ja = /* @__PURE__ */ ((n) => (n.card = "card", n.ach = "ach", n.fasterPayments = "fasterPayments", n.sepa = "sepa", n.pix = "pix", n.usdc = "usdc", n.googlePay = "googlePay", n.applePay = "applePay", n.credits = "credits", n))(ja || {}), qr = /* @__PURE__ */ ((n) => (n.VISA = "VISA", n.MASTERCARD = "MSTR", n.AMEX = "AMEX", n.DISCOVER = "DISC", n))(qr || {});
|
|
6
6
|
function Yr(n) {
|
|
7
7
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
@@ -33,42 +33,42 @@ function Ga() {
|
|
|
33
33
|
n[s] = r[s], t[r.charCodeAt(s)] = s;
|
|
34
34
|
t[45] = 62, t[95] = 63;
|
|
35
35
|
function o(R) {
|
|
36
|
-
var
|
|
37
|
-
if (
|
|
36
|
+
var L = R.length;
|
|
37
|
+
if (L % 4 > 0)
|
|
38
38
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
39
39
|
var B = R.indexOf("=");
|
|
40
|
-
B === -1 && (B =
|
|
41
|
-
var M = B ===
|
|
40
|
+
B === -1 && (B = L);
|
|
41
|
+
var M = B === L ? 0 : 4 - B % 4;
|
|
42
42
|
return [B, M];
|
|
43
43
|
}
|
|
44
44
|
function u(R) {
|
|
45
|
-
var
|
|
45
|
+
var L = o(R), B = L[0], M = L[1];
|
|
46
46
|
return (B + M) * 3 / 4 - M;
|
|
47
47
|
}
|
|
48
|
-
function f(R,
|
|
49
|
-
return (
|
|
48
|
+
function f(R, L, B) {
|
|
49
|
+
return (L + B) * 3 / 4 - B;
|
|
50
50
|
}
|
|
51
51
|
function g(R) {
|
|
52
|
-
var
|
|
52
|
+
var L, B = o(R), M = B[0], O = B[1], $ = new e(f(R, M, O)), q = 0, X = O > 0 ? M - 4 : M, D;
|
|
53
53
|
for (D = 0; D < X; D += 4)
|
|
54
|
-
|
|
55
|
-
return O === 2 && (
|
|
54
|
+
L = t[R.charCodeAt(D)] << 18 | t[R.charCodeAt(D + 1)] << 12 | t[R.charCodeAt(D + 2)] << 6 | t[R.charCodeAt(D + 3)], $[q++] = L >> 16 & 255, $[q++] = L >> 8 & 255, $[q++] = L & 255;
|
|
55
|
+
return O === 2 && (L = t[R.charCodeAt(D)] << 2 | t[R.charCodeAt(D + 1)] >> 4, $[q++] = L & 255), O === 1 && (L = t[R.charCodeAt(D)] << 10 | t[R.charCodeAt(D + 1)] << 4 | t[R.charCodeAt(D + 2)] >> 2, $[q++] = L >> 8 & 255, $[q++] = L & 255), $;
|
|
56
56
|
}
|
|
57
57
|
function w(R) {
|
|
58
58
|
return n[R >> 18 & 63] + n[R >> 12 & 63] + n[R >> 6 & 63] + n[R & 63];
|
|
59
59
|
}
|
|
60
|
-
function k(R,
|
|
61
|
-
for (var M, O = [], $ =
|
|
60
|
+
function k(R, L, B) {
|
|
61
|
+
for (var M, O = [], $ = L; $ < B; $ += 3)
|
|
62
62
|
M = (R[$] << 16 & 16711680) + (R[$ + 1] << 8 & 65280) + (R[$ + 2] & 255), O.push(w(M));
|
|
63
63
|
return O.join("");
|
|
64
64
|
}
|
|
65
65
|
function T(R) {
|
|
66
|
-
for (var
|
|
66
|
+
for (var L, B = R.length, M = B % 3, O = [], $ = 16383, q = 0, X = B - M; q < X; q += $)
|
|
67
67
|
O.push(k(R, q, q + $ > X ? X : q + $));
|
|
68
|
-
return M === 1 ? (
|
|
69
|
-
n[
|
|
70
|
-
)) : M === 2 && (
|
|
71
|
-
n[
|
|
68
|
+
return M === 1 ? (L = R[B - 1], O.push(
|
|
69
|
+
n[L >> 2] + n[L << 4 & 63] + "=="
|
|
70
|
+
)) : M === 2 && (L = (R[B - 2] << 8) + R[B - 1], O.push(
|
|
71
|
+
n[L >> 10] + n[L >> 4 & 63] + n[L << 2 & 63] + "="
|
|
72
72
|
)), O.join("");
|
|
73
73
|
}
|
|
74
74
|
return Nr;
|
|
@@ -92,12 +92,12 @@ function Za() {
|
|
|
92
92
|
}
|
|
93
93
|
return (R ? -1 : 1) * o * Math.pow(2, i - r);
|
|
94
94
|
}, nn.write = function(n, t, e, r, s, i) {
|
|
95
|
-
var o, u, f, g = i * 8 - s - 1, w = (1 << g) - 1, k = w >> 1, T = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, R = r ? 0 : i - 1,
|
|
96
|
-
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, o = w) : (o = Math.floor(Math.log(t) / Math.LN2), t * (f = Math.pow(2, -o)) < 1 && (o--, f *= 2), o + k >= 1 ? t += T / f : t += T * Math.pow(2, 1 - k), t * f >= 2 && (o++, f /= 2), o + k >= w ? (u = 0, o = w) : o + k >= 1 ? (u = (t * f - 1) * Math.pow(2, s), o = o + k) : (u = t * Math.pow(2, k - 1) * Math.pow(2, s), o = 0)); s >= 8; n[e + R] = u & 255, R +=
|
|
95
|
+
var o, u, f, g = i * 8 - s - 1, w = (1 << g) - 1, k = w >> 1, T = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, R = r ? 0 : i - 1, L = r ? 1 : -1, B = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
96
|
+
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, o = w) : (o = Math.floor(Math.log(t) / Math.LN2), t * (f = Math.pow(2, -o)) < 1 && (o--, f *= 2), o + k >= 1 ? t += T / f : t += T * Math.pow(2, 1 - k), t * f >= 2 && (o++, f /= 2), o + k >= w ? (u = 0, o = w) : o + k >= 1 ? (u = (t * f - 1) * Math.pow(2, s), o = o + k) : (u = t * Math.pow(2, k - 1) * Math.pow(2, s), o = 0)); s >= 8; n[e + R] = u & 255, R += L, u /= 256, s -= 8)
|
|
97
97
|
;
|
|
98
|
-
for (o = o << s | u, g += s; g > 0; n[e + R] = o & 255, R +=
|
|
98
|
+
for (o = o << s | u, g += s; g > 0; n[e + R] = o & 255, R += L, o /= 256, g -= 8)
|
|
99
99
|
;
|
|
100
|
-
n[e + R -
|
|
100
|
+
n[e + R - L] |= B * 128;
|
|
101
101
|
}), nn;
|
|
102
102
|
}
|
|
103
103
|
/*!
|
|
@@ -106,9 +106,9 @@ function Za() {
|
|
|
106
106
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
107
107
|
* @license MIT
|
|
108
108
|
*/
|
|
109
|
-
var
|
|
109
|
+
var Ls;
|
|
110
110
|
function $i() {
|
|
111
|
-
return
|
|
111
|
+
return Ls || (Ls = 1, function(n) {
|
|
112
112
|
const t = Ga(), e = Za(), r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
113
113
|
n.Buffer = u, n.SlowBuffer = $, n.INSPECT_MAX_BYTES = 50;
|
|
114
114
|
const s = 2147483647;
|
|
@@ -159,7 +159,7 @@ function $i() {
|
|
|
159
159
|
if (typeof m == "string")
|
|
160
160
|
return T(m, h);
|
|
161
161
|
if (ArrayBuffer.isView(m))
|
|
162
|
-
return
|
|
162
|
+
return L(m);
|
|
163
163
|
if (m == null)
|
|
164
164
|
throw new TypeError(
|
|
165
165
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof m
|
|
@@ -218,7 +218,7 @@ function $i() {
|
|
|
218
218
|
d[_] = m[_] & 255;
|
|
219
219
|
return d;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function L(m) {
|
|
222
222
|
if (me(m, Uint8Array)) {
|
|
223
223
|
const h = new Uint8Array(m);
|
|
224
224
|
return B(h.buffer, h.byteOffset, h.byteLength);
|
|
@@ -369,7 +369,7 @@ function $i() {
|
|
|
369
369
|
case "ucs-2":
|
|
370
370
|
case "utf16le":
|
|
371
371
|
case "utf-16le":
|
|
372
|
-
return
|
|
372
|
+
return C(this, h, d);
|
|
373
373
|
default:
|
|
374
374
|
if (_) throw new TypeError("Unknown encoding: " + m);
|
|
375
375
|
m = (m + "").toLowerCase(), _ = !0;
|
|
@@ -617,10 +617,10 @@ function $i() {
|
|
|
617
617
|
(!h || h < 0) && (h = 0), (!d || d < 0 || d > _) && (d = _);
|
|
618
618
|
let N = "";
|
|
619
619
|
for (let z = h; z < d; ++z)
|
|
620
|
-
N +=
|
|
620
|
+
N += Ct[m[z]];
|
|
621
621
|
return N;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function C(m, h, d) {
|
|
624
624
|
const _ = m.slice(h, d);
|
|
625
625
|
let N = "";
|
|
626
626
|
for (let z = 0; z < _.length - 1; z += 2)
|
|
@@ -1030,7 +1030,7 @@ function $i() {
|
|
|
1030
1030
|
function Pt(m) {
|
|
1031
1031
|
return m !== m;
|
|
1032
1032
|
}
|
|
1033
|
-
const
|
|
1033
|
+
const Ct = function() {
|
|
1034
1034
|
const m = "0123456789abcdef", h = new Array(256);
|
|
1035
1035
|
for (let d = 0; d < 16; ++d) {
|
|
1036
1036
|
const _ = d * 16;
|
|
@@ -1047,7 +1047,7 @@ function $i() {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}(si)), si;
|
|
1049
1049
|
}
|
|
1050
|
-
var
|
|
1050
|
+
var lt = $i();
|
|
1051
1051
|
function yn(n) {
|
|
1052
1052
|
if (!Number.isSafeInteger(n) || n < 0)
|
|
1053
1053
|
throw new Error(`positive integer expected, not ${n}`);
|
|
@@ -1080,7 +1080,7 @@ function Po(n, t) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
const oi = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
1082
1082
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1083
|
-
const Xa = (n) => new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4)), ai = (n) => new DataView(n.buffer, n.byteOffset, n.byteLength), Ne = (n, t) => n << 32 - t | n >>> t,
|
|
1083
|
+
const Xa = (n) => new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4)), ai = (n) => new DataView(n.buffer, n.byteOffset, n.byteLength), Ne = (n, t) => n << 32 - t | n >>> t, Cs = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, Qa = (n) => n << 24 & 4278190080 | n << 8 & 16711680 | n >>> 8 & 65280 | n >>> 24 & 255;
|
|
1084
1084
|
function Os(n) {
|
|
1085
1085
|
for (let t = 0; t < n.length; t++)
|
|
1086
1086
|
n[t] = Qa(n[t]);
|
|
@@ -1116,7 +1116,7 @@ function Vi(n) {
|
|
|
1116
1116
|
const t = (r) => n().update(En(r)).digest(), e = n();
|
|
1117
1117
|
return t.outputLen = e.outputLen, t.blockLen = e.blockLen, t.create = () => n(), t;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function Lo(n = 32) {
|
|
1120
1120
|
if (oi && typeof oi.getRandomValues == "function")
|
|
1121
1121
|
return oi.getRandomValues(new Uint8Array(n));
|
|
1122
1122
|
throw new Error("crypto.getRandomValues must be defined");
|
|
@@ -1128,7 +1128,7 @@ function rc(n, t, e, r) {
|
|
|
1128
1128
|
n.setUint32(t + f, o, r), n.setUint32(t + g, u, r);
|
|
1129
1129
|
}
|
|
1130
1130
|
const nc = (n, t, e) => n & t ^ ~n & e, ic = (n, t, e) => n & t ^ n & e ^ t & e;
|
|
1131
|
-
class
|
|
1131
|
+
class Co extends Hi {
|
|
1132
1132
|
constructor(t, e, r, s) {
|
|
1133
1133
|
super(), this.blockLen = t, this.outputLen = e, this.padOffset = r, this.isLE = s, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = ai(this.buffer);
|
|
1134
1134
|
}
|
|
@@ -1300,18 +1300,18 @@ const gc = (n, t, e) => (n >>> 0) + (t >>> 0) + (e >>> 0), yc = (n, t, e, r) =>
|
|
|
1300
1300
|
"0x5fcb6fab3ad6faec",
|
|
1301
1301
|
"0x6c44198c4a475817"
|
|
1302
1302
|
].map((n) => BigInt(n))), Je = /* @__PURE__ */ new Uint32Array(80), Xe = /* @__PURE__ */ new Uint32Array(80);
|
|
1303
|
-
class xc extends
|
|
1303
|
+
class xc extends Co {
|
|
1304
1304
|
constructor() {
|
|
1305
1305
|
super(128, 64, 16, !1), this.Ah = 1779033703, this.Al = -205731576, this.Bh = -1150833019, this.Bl = -2067093701, this.Ch = 1013904242, this.Cl = -23791573, this.Dh = -1521486534, this.Dl = 1595750129, this.Eh = 1359893119, this.El = -1377402159, this.Fh = -1694144372, this.Fl = 725511199, this.Gh = 528734635, this.Gl = -79577749, this.Hh = 1541459225, this.Hl = 327033209;
|
|
1306
1306
|
}
|
|
1307
1307
|
// prettier-ignore
|
|
1308
1308
|
get() {
|
|
1309
|
-
const { Ah: t, Al: e, Bh: r, Bl: s, Ch: i, Cl: o, Dh: u, Dl: f, Eh: g, El: w, Fh: k, Fl: T, Gh: R, Gl:
|
|
1310
|
-
return [t, e, r, s, i, o, u, f, g, w, k, T, R,
|
|
1309
|
+
const { Ah: t, Al: e, Bh: r, Bl: s, Ch: i, Cl: o, Dh: u, Dl: f, Eh: g, El: w, Fh: k, Fl: T, Gh: R, Gl: L, Hh: B, Hl: M } = this;
|
|
1310
|
+
return [t, e, r, s, i, o, u, f, g, w, k, T, R, L, B, M];
|
|
1311
1311
|
}
|
|
1312
1312
|
// prettier-ignore
|
|
1313
|
-
set(t, e, r, s, i, o, u, f, g, w, k, T, R,
|
|
1314
|
-
this.Ah = t | 0, this.Al = e | 0, this.Bh = r | 0, this.Bl = s | 0, this.Ch = i | 0, this.Cl = o | 0, this.Dh = u | 0, this.Dl = f | 0, this.Eh = g | 0, this.El = w | 0, this.Fh = k | 0, this.Fl = T | 0, this.Gh = R | 0, this.Gl =
|
|
1313
|
+
set(t, e, r, s, i, o, u, f, g, w, k, T, R, L, B, M) {
|
|
1314
|
+
this.Ah = t | 0, this.Al = e | 0, this.Bh = r | 0, this.Bl = s | 0, this.Ch = i | 0, this.Cl = o | 0, this.Dh = u | 0, this.Dl = f | 0, this.Eh = g | 0, this.El = w | 0, this.Fh = k | 0, this.Fl = T | 0, this.Gh = R | 0, this.Gl = L | 0, this.Hh = B | 0, this.Hl = M | 0;
|
|
1315
1315
|
}
|
|
1316
1316
|
process(t, e) {
|
|
1317
1317
|
for (let q = 0; q < 16; q++, e += 4)
|
|
@@ -1320,14 +1320,14 @@ class xc extends Lo {
|
|
|
1320
1320
|
const X = Je[q - 15] | 0, D = Xe[q - 15] | 0, F = yt.rotrSH(X, D, 1) ^ yt.rotrSH(X, D, 8) ^ yt.shrSH(X, D, 7), Y = yt.rotrSL(X, D, 1) ^ yt.rotrSL(X, D, 8) ^ yt.shrSL(X, D, 7), Z = Je[q - 2] | 0, J = Xe[q - 2] | 0, K = yt.rotrSH(Z, J, 19) ^ yt.rotrBH(Z, J, 61) ^ yt.shrSH(Z, J, 6), V = yt.rotrSL(Z, J, 19) ^ yt.rotrBL(Z, J, 61) ^ yt.shrSL(Z, J, 6), Q = yt.add4L(Y, V, Xe[q - 7], Xe[q - 16]), I = yt.add4H(Q, F, K, Je[q - 7], Je[q - 16]);
|
|
1321
1321
|
Je[q] = I | 0, Xe[q] = Q | 0;
|
|
1322
1322
|
}
|
|
1323
|
-
let { Ah: r, Al: s, Bh: i, Bl: o, Ch: u, Cl: f, Dh: g, Dl: w, Eh: k, El: T, Fh: R, Fl:
|
|
1323
|
+
let { Ah: r, Al: s, Bh: i, Bl: o, Ch: u, Cl: f, Dh: g, Dl: w, Eh: k, El: T, Fh: R, Fl: L, Gh: B, Gl: M, Hh: O, Hl: $ } = this;
|
|
1324
1324
|
for (let q = 0; q < 80; q++) {
|
|
1325
|
-
const X = yt.rotrSH(k, T, 14) ^ yt.rotrSH(k, T, 18) ^ yt.rotrBH(k, T, 41), D = yt.rotrSL(k, T, 14) ^ yt.rotrSL(k, T, 18) ^ yt.rotrBL(k, T, 41), F = k & R ^ ~k & B, Y = T &
|
|
1326
|
-
O = B | 0, $ = M | 0, B = R | 0, M =
|
|
1325
|
+
const X = yt.rotrSH(k, T, 14) ^ yt.rotrSH(k, T, 18) ^ yt.rotrBH(k, T, 41), D = yt.rotrSL(k, T, 14) ^ yt.rotrSL(k, T, 18) ^ yt.rotrBL(k, T, 41), F = k & R ^ ~k & B, Y = T & L ^ ~T & M, Z = yt.add5L($, D, Y, Sc[q], Xe[q]), J = yt.add5H(Z, O, X, F, vc[q], Je[q]), K = Z | 0, V = yt.rotrSH(r, s, 28) ^ yt.rotrBH(r, s, 34) ^ yt.rotrBH(r, s, 39), Q = yt.rotrSL(r, s, 28) ^ yt.rotrBL(r, s, 34) ^ yt.rotrBL(r, s, 39), I = r & i ^ r & u ^ i & u, c = s & o ^ s & f ^ o & f;
|
|
1326
|
+
O = B | 0, $ = M | 0, B = R | 0, M = L | 0, R = k | 0, L = T | 0, { h: k, l: T } = yt.add(g | 0, w | 0, J | 0, K | 0), g = u | 0, w = f | 0, u = i | 0, f = o | 0, i = r | 0, o = s | 0;
|
|
1327
1327
|
const p = yt.add3L(K, Q, c);
|
|
1328
1328
|
r = yt.add3H(p, J, V, I), s = p | 0;
|
|
1329
1329
|
}
|
|
1330
|
-
({ h: r, l: s } = yt.add(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: i, l: o } = yt.add(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: u, l: f } = yt.add(this.Ch | 0, this.Cl | 0, u | 0, f | 0), { h: g, l: w } = yt.add(this.Dh | 0, this.Dl | 0, g | 0, w | 0), { h: k, l: T } = yt.add(this.Eh | 0, this.El | 0, k | 0, T | 0), { h: R, l:
|
|
1330
|
+
({ h: r, l: s } = yt.add(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: i, l: o } = yt.add(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: u, l: f } = yt.add(this.Ch | 0, this.Cl | 0, u | 0, f | 0), { h: g, l: w } = yt.add(this.Dh | 0, this.Dl | 0, g | 0, w | 0), { h: k, l: T } = yt.add(this.Eh | 0, this.El | 0, k | 0, T | 0), { h: R, l: L } = yt.add(this.Fh | 0, this.Fl | 0, R | 0, L | 0), { h: B, l: M } = yt.add(this.Gh | 0, this.Gl | 0, B | 0, M | 0), { h: O, l: $ } = yt.add(this.Hh | 0, this.Hl | 0, O | 0, $ | 0), this.set(r, s, i, o, u, f, g, w, k, T, R, L, B, M, O, $);
|
|
1331
1331
|
}
|
|
1332
1332
|
roundClean() {
|
|
1333
1333
|
Je.fill(0), Xe.fill(0);
|
|
@@ -1492,7 +1492,7 @@ function Do(n, t, e) {
|
|
|
1492
1492
|
return o(), R;
|
|
1493
1493
|
};
|
|
1494
1494
|
}
|
|
1495
|
-
const
|
|
1495
|
+
const Lc = {
|
|
1496
1496
|
bigint: (n) => typeof n == "bigint",
|
|
1497
1497
|
function: (n) => typeof n == "function",
|
|
1498
1498
|
boolean: (n) => typeof n == "boolean",
|
|
@@ -1505,7 +1505,7 @@ const Cc = {
|
|
|
1505
1505
|
};
|
|
1506
1506
|
function Pr(n, t, e = {}) {
|
|
1507
1507
|
const r = (s, i, o) => {
|
|
1508
|
-
const u =
|
|
1508
|
+
const u = Lc[i];
|
|
1509
1509
|
if (typeof u != "function")
|
|
1510
1510
|
throw new Error(`Invalid validator "${i}", expected function`);
|
|
1511
1511
|
const f = n[s];
|
|
@@ -1518,7 +1518,7 @@ function Pr(n, t, e = {}) {
|
|
|
1518
1518
|
r(s, i, !0);
|
|
1519
1519
|
return n;
|
|
1520
1520
|
}
|
|
1521
|
-
const
|
|
1521
|
+
const Cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1522
1522
|
__proto__: null,
|
|
1523
1523
|
abytes: Xr,
|
|
1524
1524
|
bitGet: Tc,
|
|
@@ -1605,8 +1605,8 @@ function Nc(n) {
|
|
|
1605
1605
|
let R = 1;
|
|
1606
1606
|
for (let B = u.sqr(T); R < g && !u.eql(B, u.ONE); R++)
|
|
1607
1607
|
B = u.sqr(B);
|
|
1608
|
-
const
|
|
1609
|
-
w = u.sqr(
|
|
1608
|
+
const L = u.pow(w, Dt << BigInt(g - R - 1));
|
|
1609
|
+
w = u.sqr(L), k = u.mul(k, L), T = u.mul(T, w), g = R;
|
|
1610
1610
|
}
|
|
1611
1611
|
return k;
|
|
1612
1612
|
};
|
|
@@ -1797,11 +1797,11 @@ function Go(n, t) {
|
|
|
1797
1797
|
const { windows: u, windowSize: f } = r(s);
|
|
1798
1798
|
let g = n.ZERO, w = n.BASE;
|
|
1799
1799
|
const k = BigInt(2 ** s - 1), T = 2 ** s, R = BigInt(s);
|
|
1800
|
-
for (let
|
|
1801
|
-
const B =
|
|
1800
|
+
for (let L = 0; L < u; L++) {
|
|
1801
|
+
const B = L * f;
|
|
1802
1802
|
let M = Number(o & k);
|
|
1803
1803
|
o >>= R, M > f && (M -= T, o += ui);
|
|
1804
|
-
const O = B, $ = B + Math.abs(M) - 1, q =
|
|
1804
|
+
const O = B, $ = B + Math.abs(M) - 1, q = L % 2 !== 0, X = M < 0;
|
|
1805
1805
|
M === 0 ? w = w.add(e(q, i[O])) : g = g.add(e(X, i[$]));
|
|
1806
1806
|
}
|
|
1807
1807
|
return { p: g, f: w };
|
|
@@ -1851,11 +1851,11 @@ function Zc(n) {
|
|
|
1851
1851
|
} catch {
|
|
1852
1852
|
return { isValid: !1, value: Te };
|
|
1853
1853
|
}
|
|
1854
|
-
}), T = t.adjustScalarBytes || ((x) => x), R = t.domain || ((x, E,
|
|
1855
|
-
if (E.length ||
|
|
1854
|
+
}), T = t.adjustScalarBytes || ((x) => x), R = t.domain || ((x, E, C) => {
|
|
1855
|
+
if (E.length || C)
|
|
1856
1856
|
throw new Error("Contexts/pre-hash are not supported");
|
|
1857
1857
|
return x;
|
|
1858
|
-
}),
|
|
1858
|
+
}), L = (x) => typeof x == "bigint" && Te < x, B = (x, E) => L(x) && L(E) && x < E, M = (x) => x === Te || B(x, g);
|
|
1859
1859
|
function O(x, E) {
|
|
1860
1860
|
if (B(x, E))
|
|
1861
1861
|
return x;
|
|
@@ -1870,10 +1870,10 @@ function Zc(n) {
|
|
|
1870
1870
|
throw new Error("ExtendedPoint expected");
|
|
1871
1871
|
}
|
|
1872
1872
|
class D {
|
|
1873
|
-
constructor(E,
|
|
1874
|
-
if (this.ex = E, this.ey =
|
|
1873
|
+
constructor(E, C, v, a) {
|
|
1874
|
+
if (this.ex = E, this.ey = C, this.ez = v, this.et = a, !M(E))
|
|
1875
1875
|
throw new Error("x required");
|
|
1876
|
-
if (!M(
|
|
1876
|
+
if (!M(C))
|
|
1877
1877
|
throw new Error("y required");
|
|
1878
1878
|
if (!M(v))
|
|
1879
1879
|
throw new Error("z required");
|
|
@@ -1889,14 +1889,14 @@ function Zc(n) {
|
|
|
1889
1889
|
static fromAffine(E) {
|
|
1890
1890
|
if (E instanceof D)
|
|
1891
1891
|
throw new Error("extended point not allowed");
|
|
1892
|
-
const { x:
|
|
1893
|
-
if (!M(
|
|
1892
|
+
const { x: C, y: v } = E || {};
|
|
1893
|
+
if (!M(C) || !M(v))
|
|
1894
1894
|
throw new Error("invalid affine point");
|
|
1895
|
-
return new D(
|
|
1895
|
+
return new D(C, v, _e, w(C * v));
|
|
1896
1896
|
}
|
|
1897
1897
|
static normalizeZ(E) {
|
|
1898
|
-
const
|
|
1899
|
-
return E.map((v, a) => v.toAffine(
|
|
1898
|
+
const C = e.invertBatch(E.map((v) => v.ez));
|
|
1899
|
+
return E.map((v, a) => v.toAffine(C[a])).map(D.fromAffine);
|
|
1900
1900
|
}
|
|
1901
1901
|
// "Private method", don't use it directly
|
|
1902
1902
|
_setWindowSize(E) {
|
|
@@ -1905,10 +1905,10 @@ function Zc(n) {
|
|
|
1905
1905
|
// Not required for fromHex(), which always creates valid points.
|
|
1906
1906
|
// Could be useful for fromAffine().
|
|
1907
1907
|
assertValidity() {
|
|
1908
|
-
const { a: E, d:
|
|
1908
|
+
const { a: E, d: C } = t;
|
|
1909
1909
|
if (this.is0())
|
|
1910
1910
|
throw new Error("bad point: ZERO");
|
|
1911
|
-
const { ex: v, ey: a, ez: l, et: b } = this, S = w(v * v), U = w(a * a), j = w(l * l), rt = w(j * j), at = w(S * E), xt = w(j * w(at + U)), dt = w(rt + w(
|
|
1911
|
+
const { ex: v, ey: a, ez: l, et: b } = this, S = w(v * v), U = w(a * a), j = w(l * l), rt = w(j * j), at = w(S * E), xt = w(j * w(at + U)), dt = w(rt + w(C * w(S * U)));
|
|
1912
1912
|
if (xt !== dt)
|
|
1913
1913
|
throw new Error("bad point: equation left != right (1)");
|
|
1914
1914
|
const bt = w(v * a), Et = w(l * b);
|
|
@@ -1918,7 +1918,7 @@ function Zc(n) {
|
|
|
1918
1918
|
// Compare one point to another.
|
|
1919
1919
|
equals(E) {
|
|
1920
1920
|
X(E);
|
|
1921
|
-
const { ex:
|
|
1921
|
+
const { ex: C, ey: v, ez: a } = this, { ex: l, ey: b, ez: S } = E, U = w(C * S), j = w(l * a), rt = w(v * S), at = w(b * a);
|
|
1922
1922
|
return U === j && rt === at;
|
|
1923
1923
|
}
|
|
1924
1924
|
is0() {
|
|
@@ -1931,7 +1931,7 @@ function Zc(n) {
|
|
|
1931
1931
|
// https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
|
|
1932
1932
|
// Cost: 4M + 4S + 1*a + 6add + 1*2.
|
|
1933
1933
|
double() {
|
|
1934
|
-
const { a: E } = t, { ex:
|
|
1934
|
+
const { a: E } = t, { ex: C, ey: v, ez: a } = this, l = w(C * C), b = w(v * v), S = w(on * w(a * a)), U = w(E * l), j = C + v, rt = w(w(j * j) - l - b), at = U + b, xt = at - S, dt = U - b, bt = w(rt * xt), Et = w(at * dt), kt = w(rt * dt), _t = w(xt * at);
|
|
1935
1935
|
return new D(bt, Et, _t, kt);
|
|
1936
1936
|
}
|
|
1937
1937
|
// Fast algo for adding 2 Extended Points.
|
|
@@ -1939,15 +1939,15 @@ function Zc(n) {
|
|
|
1939
1939
|
// Cost: 9M + 1*a + 1*d + 7add.
|
|
1940
1940
|
add(E) {
|
|
1941
1941
|
X(E);
|
|
1942
|
-
const { a:
|
|
1943
|
-
if (
|
|
1944
|
-
const me = w((l - a) * (j + U)), Pt = w((l + a) * (j - U)),
|
|
1945
|
-
if (
|
|
1942
|
+
const { a: C, d: v } = t, { ex: a, ey: l, ez: b, et: S } = this, { ex: U, ey: j, ez: rt, et: at } = E;
|
|
1943
|
+
if (C === BigInt(-1)) {
|
|
1944
|
+
const me = w((l - a) * (j + U)), Pt = w((l + a) * (j - U)), Ct = w(Pt - me);
|
|
1945
|
+
if (Ct === Te)
|
|
1946
1946
|
return this.double();
|
|
1947
|
-
const Ie = w(b * on * at), Ft = w(S * on * rt), m = Ft + Ie, h = Pt + me, d = Ft - Ie, _ = w(m *
|
|
1947
|
+
const Ie = w(b * on * at), Ft = w(S * on * rt), m = Ft + Ie, h = Pt + me, d = Ft - Ie, _ = w(m * Ct), N = w(h * d), z = w(m * d), G = w(Ct * h);
|
|
1948
1948
|
return new D(_, N, G, z);
|
|
1949
1949
|
}
|
|
1950
|
-
const xt = w(a * U), dt = w(l * j), bt = w(S * v * at), Et = w(b * rt), kt = w((a + l) * (U + j) - xt - dt), _t = Et - bt, Ue = Et + bt, Mt = w(dt -
|
|
1950
|
+
const xt = w(a * U), dt = w(l * j), bt = w(S * v * at), Et = w(b * rt), kt = w((a + l) * (U + j) - xt - dt), _t = Et - bt, Ue = Et + bt, Mt = w(dt - C * xt), qt = w(kt * _t), kr = w(Ue * Mt), Nt = w(kt * Mt), Tt = w(_t * Ue);
|
|
1951
1951
|
return new D(qt, kr, Tt, Nt);
|
|
1952
1952
|
}
|
|
1953
1953
|
subtract(E) {
|
|
@@ -1958,16 +1958,16 @@ function Zc(n) {
|
|
|
1958
1958
|
}
|
|
1959
1959
|
// Constant-time multiplication.
|
|
1960
1960
|
multiply(E) {
|
|
1961
|
-
const { p:
|
|
1962
|
-
return D.normalizeZ([
|
|
1961
|
+
const { p: C, f: v } = this.wNAF(O(E, r));
|
|
1962
|
+
return D.normalizeZ([C, v])[0];
|
|
1963
1963
|
}
|
|
1964
1964
|
// Non-constant-time multiplication. Uses double-and-add algorithm.
|
|
1965
1965
|
// It's faster, but should only be used when you don't care about
|
|
1966
1966
|
// an exposed private key e.g. sig verification.
|
|
1967
1967
|
// Does NOT allow scalars higher than CURVE.n.
|
|
1968
1968
|
multiplyUnsafe(E) {
|
|
1969
|
-
let
|
|
1970
|
-
return
|
|
1969
|
+
let C = $(E);
|
|
1970
|
+
return C === Te ? Y : this.equals(Y) || C === _e ? this : this.equals(F) ? this.wNAF(C).p : Z.unsafeLadder(this, C);
|
|
1971
1971
|
}
|
|
1972
1972
|
// Checks if point is of small order.
|
|
1973
1973
|
// If you add something to small order point, you will have "dirty"
|
|
@@ -1984,9 +1984,9 @@ function Zc(n) {
|
|
|
1984
1984
|
// Converts Extended point to default (x, y) coordinates.
|
|
1985
1985
|
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
|
1986
1986
|
toAffine(E) {
|
|
1987
|
-
const { ex:
|
|
1987
|
+
const { ex: C, ey: v, ez: a } = this, l = this.is0();
|
|
1988
1988
|
E == null && (E = l ? Vc : e.inv(a));
|
|
1989
|
-
const b = w(
|
|
1989
|
+
const b = w(C * E), S = w(v * E), U = w(a * E);
|
|
1990
1990
|
if (l)
|
|
1991
1991
|
return { x: Te, y: _e };
|
|
1992
1992
|
if (U !== _e)
|
|
@@ -1999,19 +1999,19 @@ function Zc(n) {
|
|
|
1999
1999
|
}
|
|
2000
2000
|
// Converts hash string or Uint8Array to Point.
|
|
2001
2001
|
// Uses algo from RFC8032 5.1.3.
|
|
2002
|
-
static fromHex(E,
|
|
2002
|
+
static fromHex(E, C = !1) {
|
|
2003
2003
|
const { d: v, a } = t, l = e.BYTES;
|
|
2004
2004
|
E = he("pointHex", E, l);
|
|
2005
2005
|
const b = E.slice(), S = E[l - 1];
|
|
2006
2006
|
b[l - 1] = S & -129;
|
|
2007
2007
|
const U = Sr(b);
|
|
2008
|
-
U === Te || (
|
|
2008
|
+
U === Te || (C ? O(U, g) : O(U, e.ORDER));
|
|
2009
2009
|
const j = w(U * U), rt = w(j - _e), at = w(v * j - a);
|
|
2010
2010
|
let { isValid: xt, value: dt } = k(rt, at);
|
|
2011
2011
|
if (!xt)
|
|
2012
2012
|
throw new Error("Point.fromHex: invalid y coordinate");
|
|
2013
2013
|
const bt = (dt & _e) === _e, Et = (S & 128) !== 0;
|
|
2014
|
-
if (!
|
|
2014
|
+
if (!C && dt === Te && Et)
|
|
2015
2015
|
throw new Error("Point.fromHex: x=0 and x_0=1");
|
|
2016
2016
|
return Et !== bt && (dt = w(-dt)), D.fromAffine({ x: dt, y: U });
|
|
2017
2017
|
}
|
|
@@ -2019,7 +2019,7 @@ function Zc(n) {
|
|
|
2019
2019
|
return V(E).point;
|
|
2020
2020
|
}
|
|
2021
2021
|
toRawBytes() {
|
|
2022
|
-
const { x: E, y:
|
|
2022
|
+
const { x: E, y: C } = this.toAffine(), v = Dr(C, e.BYTES);
|
|
2023
2023
|
return v[v.length - 1] |= E & _e ? 128 : 0, v;
|
|
2024
2024
|
}
|
|
2025
2025
|
toHex() {
|
|
@@ -2037,31 +2037,31 @@ function Zc(n) {
|
|
|
2037
2037
|
function V(x) {
|
|
2038
2038
|
const E = u;
|
|
2039
2039
|
x = he("private key", x, E);
|
|
2040
|
-
const
|
|
2040
|
+
const C = he("hashed private key", i(x), 2 * E), v = T(C.slice(0, E)), a = C.slice(E, 2 * E), l = K(v), b = F.multiply(l), S = b.toRawBytes();
|
|
2041
2041
|
return { head: v, prefix: a, scalar: l, point: b, pointBytes: S };
|
|
2042
2042
|
}
|
|
2043
2043
|
function Q(x) {
|
|
2044
2044
|
return V(x).pointBytes;
|
|
2045
2045
|
}
|
|
2046
2046
|
function I(x = new Uint8Array(), ...E) {
|
|
2047
|
-
const
|
|
2048
|
-
return K(i(R(
|
|
2047
|
+
const C = pr(...E);
|
|
2048
|
+
return K(i(R(C, he("context", x), !!s)));
|
|
2049
2049
|
}
|
|
2050
|
-
function c(x, E,
|
|
2050
|
+
function c(x, E, C = {}) {
|
|
2051
2051
|
x = he("message", x), s && (x = s(x));
|
|
2052
|
-
const { prefix: v, scalar: a, pointBytes: l } = V(E), b = I(
|
|
2052
|
+
const { prefix: v, scalar: a, pointBytes: l } = V(E), b = I(C.context, v, x), S = F.multiply(b).toRawBytes(), U = I(C.context, S, l, x), j = J(b + U * a);
|
|
2053
2053
|
$(j);
|
|
2054
2054
|
const rt = pr(S, Dr(j, e.BYTES));
|
|
2055
2055
|
return he("result", rt, u * 2);
|
|
2056
2056
|
}
|
|
2057
2057
|
const p = jc;
|
|
2058
|
-
function y(x, E,
|
|
2058
|
+
function y(x, E, C, v = p) {
|
|
2059
2059
|
const { context: a, zip215: l } = v, b = e.BYTES;
|
|
2060
2060
|
x = he("signature", x, 2 * b), E = he("message", E), s && (E = s(E));
|
|
2061
2061
|
const S = Sr(x.slice(b, 2 * b));
|
|
2062
2062
|
let U, j, rt;
|
|
2063
2063
|
try {
|
|
2064
|
-
U = D.fromHex(
|
|
2064
|
+
U = D.fromHex(C, l), j = D.fromHex(x.slice(0, b), l), rt = F.multiplyUnsafe(S);
|
|
2065
2065
|
} catch {
|
|
2066
2066
|
return !1;
|
|
2067
2067
|
}
|
|
@@ -2099,7 +2099,7 @@ const Yc = BigInt(1), Ks = BigInt(2);
|
|
|
2099
2099
|
BigInt(3);
|
|
2100
2100
|
const Jc = BigInt(5), Xc = BigInt(8);
|
|
2101
2101
|
function Qc(n) {
|
|
2102
|
-
const t = BigInt(10), e = BigInt(20), r = BigInt(40), s = BigInt(80), i = Yi, u = n * n % i * n % i, f = Ht(u, Ks, i) * u % i, g = Ht(f, Yc, i) * n % i, w = Ht(g, Jc, i) * g % i, k = Ht(w, t, i) * w % i, T = Ht(k, e, i) * k % i, R = Ht(T, r, i) * T % i,
|
|
2102
|
+
const t = BigInt(10), e = BigInt(20), r = BigInt(40), s = BigInt(80), i = Yi, u = n * n % i * n % i, f = Ht(u, Ks, i) * u % i, g = Ht(f, Yc, i) * n % i, w = Ht(g, Jc, i) * g % i, k = Ht(w, t, i) * w % i, T = Ht(k, e, i) * k % i, R = Ht(T, r, i) * T % i, L = Ht(R, s, i) * R % i, B = Ht(L, s, i) * R % i, M = Ht(B, t, i) * w % i;
|
|
2103
2103
|
return { pow_p_5_8: Ht(M, Ks, i) * n % i, b2: u };
|
|
2104
2104
|
}
|
|
2105
2105
|
function tu(n) {
|
|
@@ -2129,13 +2129,13 @@ const ru = Ho(Yi, void 0, !0), nu = {
|
|
|
2129
2129
|
Gx: BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),
|
|
2130
2130
|
Gy: BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),
|
|
2131
2131
|
hash: Ic,
|
|
2132
|
-
randomBytes:
|
|
2132
|
+
randomBytes: Lo,
|
|
2133
2133
|
adjustScalarBytes: tu,
|
|
2134
2134
|
// dom2
|
|
2135
2135
|
// Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.
|
|
2136
2136
|
// Constant-time, u/√v
|
|
2137
2137
|
uvRatio: eu
|
|
2138
|
-
},
|
|
2138
|
+
}, Lr = Zc(nu);
|
|
2139
2139
|
var hn = { exports: {} };
|
|
2140
2140
|
const iu = {}, su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2141
2141
|
__proto__: null,
|
|
@@ -2194,13 +2194,13 @@ function Zo() {
|
|
|
2194
2194
|
this.length = Math.ceil(c.length / 3), this.words = new Array(this.length);
|
|
2195
2195
|
for (var A = 0; A < this.length; A++)
|
|
2196
2196
|
this.words[A] = 0;
|
|
2197
|
-
var x, E,
|
|
2197
|
+
var x, E, C = 0;
|
|
2198
2198
|
if (y === "be")
|
|
2199
2199
|
for (A = c.length - 1, x = 0; A >= 0; A -= 3)
|
|
2200
|
-
E = c[A] | c[A - 1] << 8 | c[A - 2] << 16, this.words[x] |= E <<
|
|
2200
|
+
E = c[A] | c[A - 1] << 8 | c[A - 2] << 16, this.words[x] |= E << C & 67108863, this.words[x + 1] = E >>> 26 - C & 67108863, C += 24, C >= 26 && (C -= 26, x++);
|
|
2201
2201
|
else if (y === "le")
|
|
2202
2202
|
for (A = 0, x = 0; A < c.length; A += 3)
|
|
2203
|
-
E = c[A] | c[A + 1] << 8 | c[A + 2] << 16, this.words[x] |= E <<
|
|
2203
|
+
E = c[A] | c[A + 1] << 8 | c[A + 2] << 16, this.words[x] |= E << C & 67108863, this.words[x + 1] = E >>> 26 - C & 67108863, C += 24, C >= 26 && (C -= 26, x++);
|
|
2204
2204
|
return this._strip();
|
|
2205
2205
|
};
|
|
2206
2206
|
function u(I, c) {
|
|
@@ -2221,20 +2221,20 @@ function Zo() {
|
|
|
2221
2221
|
this.length = Math.ceil((c.length - p) / 6), this.words = new Array(this.length);
|
|
2222
2222
|
for (var A = 0; A < this.length; A++)
|
|
2223
2223
|
this.words[A] = 0;
|
|
2224
|
-
var x = 0, E = 0,
|
|
2224
|
+
var x = 0, E = 0, C;
|
|
2225
2225
|
if (y === "be")
|
|
2226
2226
|
for (A = c.length - 1; A >= p; A -= 2)
|
|
2227
|
-
|
|
2227
|
+
C = f(c, p, A) << x, this.words[E] |= C & 67108863, x >= 18 ? (x -= 18, E += 1, this.words[E] |= C >>> 26) : x += 8;
|
|
2228
2228
|
else {
|
|
2229
2229
|
var v = c.length - p;
|
|
2230
2230
|
for (A = v % 2 === 0 ? p + 1 : p; A < c.length; A += 2)
|
|
2231
|
-
|
|
2231
|
+
C = f(c, p, A) << x, this.words[E] |= C & 67108863, x >= 18 ? (x -= 18, E += 1, this.words[E] |= C >>> 26) : x += 8;
|
|
2232
2232
|
}
|
|
2233
2233
|
this._strip();
|
|
2234
2234
|
};
|
|
2235
2235
|
function g(I, c, p, y) {
|
|
2236
|
-
for (var A = 0, x = 0, E = Math.min(I.length, p),
|
|
2237
|
-
var v = I.charCodeAt(
|
|
2236
|
+
for (var A = 0, x = 0, E = Math.min(I.length, p), C = c; C < E; C++) {
|
|
2237
|
+
var v = I.charCodeAt(C) - 48;
|
|
2238
2238
|
A *= y, v >= 49 ? x = v - 49 + 10 : v >= 17 ? x = v - 17 + 10 : x = v, r(v >= 0 && x < y, "Invalid character"), A += x;
|
|
2239
2239
|
}
|
|
2240
2240
|
return A;
|
|
@@ -2244,11 +2244,11 @@ function Zo() {
|
|
|
2244
2244
|
for (var A = 0, x = 1; x <= 67108863; x *= p)
|
|
2245
2245
|
A++;
|
|
2246
2246
|
A--, x = x / p | 0;
|
|
2247
|
-
for (var E = c.length - y,
|
|
2247
|
+
for (var E = c.length - y, C = E % A, v = Math.min(E, E - C) + y, a = 0, l = y; l < v; l += A)
|
|
2248
2248
|
a = g(c, l, l + A, p), this.imuln(x), this.words[0] + a < 67108864 ? this.words[0] += a : this._iaddn(a);
|
|
2249
|
-
if (
|
|
2249
|
+
if (C !== 0) {
|
|
2250
2250
|
var b = 1;
|
|
2251
|
-
for (a = g(c, l, c.length, p), l = 0; l <
|
|
2251
|
+
for (a = g(c, l, c.length, p), l = 0; l < C; l++)
|
|
2252
2252
|
b *= p;
|
|
2253
2253
|
this.imuln(b), this.words[0] + a < 67108864 ? this.words[0] += a : this._iaddn(a);
|
|
2254
2254
|
}
|
|
@@ -2353,7 +2353,7 @@ function Zo() {
|
|
|
2353
2353
|
5,
|
|
2354
2354
|
5,
|
|
2355
2355
|
5
|
|
2356
|
-
],
|
|
2356
|
+
], L = [
|
|
2357
2357
|
0,
|
|
2358
2358
|
0,
|
|
2359
2359
|
33554432,
|
|
@@ -2398,15 +2398,15 @@ function Zo() {
|
|
|
2398
2398
|
if (c === 16 || c === "hex") {
|
|
2399
2399
|
y = "";
|
|
2400
2400
|
for (var A = 0, x = 0, E = 0; E < this.length; E++) {
|
|
2401
|
-
var
|
|
2402
|
-
x =
|
|
2401
|
+
var C = this.words[E], v = ((C << A | x) & 16777215).toString(16);
|
|
2402
|
+
x = C >>> 24 - A & 16777215, A += 2, A >= 26 && (A -= 26, E--), x !== 0 || E !== this.length - 1 ? y = T[6 - v.length] + v + y : y = v + y;
|
|
2403
2403
|
}
|
|
2404
2404
|
for (x !== 0 && (y = x.toString(16) + y); y.length % p !== 0; )
|
|
2405
2405
|
y = "0" + y;
|
|
2406
2406
|
return this.negative !== 0 && (y = "-" + y), y;
|
|
2407
2407
|
}
|
|
2408
2408
|
if (c === (c | 0) && c >= 2 && c <= 36) {
|
|
2409
|
-
var a = R[c], l =
|
|
2409
|
+
var a = R[c], l = L[c];
|
|
2410
2410
|
y = "";
|
|
2411
2411
|
var b = this.clone();
|
|
2412
2412
|
for (b.negative = 0; !b.isZero(); ) {
|
|
@@ -2435,20 +2435,20 @@ function Zo() {
|
|
|
2435
2435
|
this._strip();
|
|
2436
2436
|
var A = this.byteLength(), x = y || Math.max(1, A);
|
|
2437
2437
|
r(A <= x, "byte array longer than desired length"), r(x > 0, "Requested array length <= 0");
|
|
2438
|
-
var E = B(c, x),
|
|
2439
|
-
return this["_toArrayLike" +
|
|
2438
|
+
var E = B(c, x), C = p === "le" ? "LE" : "BE";
|
|
2439
|
+
return this["_toArrayLike" + C](E, A), E;
|
|
2440
2440
|
}, i.prototype._toArrayLikeLE = function(c, p) {
|
|
2441
2441
|
for (var y = 0, A = 0, x = 0, E = 0; x < this.length; x++) {
|
|
2442
|
-
var
|
|
2443
|
-
c[y++] =
|
|
2442
|
+
var C = this.words[x] << E | A;
|
|
2443
|
+
c[y++] = C & 255, y < c.length && (c[y++] = C >> 8 & 255), y < c.length && (c[y++] = C >> 16 & 255), E === 6 ? (y < c.length && (c[y++] = C >> 24 & 255), A = 0, E = 0) : (A = C >>> 24, E += 2);
|
|
2444
2444
|
}
|
|
2445
2445
|
if (y < c.length)
|
|
2446
2446
|
for (c[y++] = A; y < c.length; )
|
|
2447
2447
|
c[y++] = 0;
|
|
2448
2448
|
}, i.prototype._toArrayLikeBE = function(c, p) {
|
|
2449
2449
|
for (var y = c.length - 1, A = 0, x = 0, E = 0; x < this.length; x++) {
|
|
2450
|
-
var
|
|
2451
|
-
c[y--] =
|
|
2450
|
+
var C = this.words[x] << E | A;
|
|
2451
|
+
c[y--] = C & 255, y >= 0 && (c[y--] = C >> 8 & 255), y >= 0 && (c[y--] = C >> 16 & 255), E === 6 ? (y >= 0 && (c[y--] = C >> 24 & 255), A = 0, E = 0) : (A = C >>> 24, E += 2);
|
|
2452
2452
|
}
|
|
2453
2453
|
if (y >= 0)
|
|
2454
2454
|
for (c[y--] = A; y >= 0; )
|
|
@@ -2577,14 +2577,14 @@ function Zo() {
|
|
|
2577
2577
|
return this.negative = 0, this.length = 1, this.words[0] = 0, this;
|
|
2578
2578
|
var A, x;
|
|
2579
2579
|
y > 0 ? (A = this, x = c) : (A = c, x = this);
|
|
2580
|
-
for (var E = 0,
|
|
2581
|
-
p = (A.words[
|
|
2582
|
-
for (; E !== 0 &&
|
|
2583
|
-
p = (A.words[
|
|
2584
|
-
if (E === 0 &&
|
|
2585
|
-
for (;
|
|
2586
|
-
this.words[
|
|
2587
|
-
return this.length = Math.max(this.length,
|
|
2580
|
+
for (var E = 0, C = 0; C < x.length; C++)
|
|
2581
|
+
p = (A.words[C] | 0) - (x.words[C] | 0) + E, E = p >> 26, this.words[C] = p & 67108863;
|
|
2582
|
+
for (; E !== 0 && C < A.length; C++)
|
|
2583
|
+
p = (A.words[C] | 0) + E, E = p >> 26, this.words[C] = p & 67108863;
|
|
2584
|
+
if (E === 0 && C < A.length && A !== this)
|
|
2585
|
+
for (; C < A.length; C++)
|
|
2586
|
+
this.words[C] = A.words[C];
|
|
2587
|
+
return this.length = Math.max(this.length, C), A !== this && (this.negative = 1), this._strip();
|
|
2588
2588
|
}, i.prototype.sub = function(c) {
|
|
2589
2589
|
return this.clone().isub(c);
|
|
2590
2590
|
};
|
|
@@ -2592,8 +2592,8 @@ function Zo() {
|
|
|
2592
2592
|
p.negative = c.negative ^ I.negative;
|
|
2593
2593
|
var y = I.length + c.length | 0;
|
|
2594
2594
|
p.length = y, y = y - 1 | 0;
|
|
2595
|
-
var A = I.words[0] | 0, x = c.words[0] | 0, E = A * x,
|
|
2596
|
-
p.words[0] =
|
|
2595
|
+
var A = I.words[0] | 0, x = c.words[0] | 0, E = A * x, C = E & 67108863, v = E / 67108864 | 0;
|
|
2596
|
+
p.words[0] = C;
|
|
2597
2597
|
for (var a = 1; a < y; a++) {
|
|
2598
2598
|
for (var l = v >>> 26, b = v & 67108863, S = Math.min(a, c.length - 1), U = Math.max(0, a - I.length + 1); U <= S; U++) {
|
|
2599
2599
|
var j = a - U | 0;
|
|
@@ -2604,46 +2604,46 @@ function Zo() {
|
|
|
2604
2604
|
return v !== 0 ? p.words[a] = v | 0 : p.length--, p._strip();
|
|
2605
2605
|
}
|
|
2606
2606
|
var $ = function(c, p, y) {
|
|
2607
|
-
var A = c.words, x = p.words, E = y.words,
|
|
2607
|
+
var A = c.words, x = p.words, E = y.words, C = 0, v, a, l, b = A[0] | 0, S = b & 8191, U = b >>> 13, j = A[1] | 0, rt = j & 8191, at = j >>> 13, xt = A[2] | 0, dt = xt & 8191, bt = xt >>> 13, Et = A[3] | 0, kt = Et & 8191, _t = Et >>> 13, Ue = A[4] | 0, Mt = Ue & 8191, qt = Ue >>> 13, kr = A[5] | 0, Nt = kr & 8191, Tt = kr >>> 13, me = A[6] | 0, Pt = me & 8191, Ct = me >>> 13, Ie = A[7] | 0, Ft = Ie & 8191, m = Ie >>> 13, h = A[8] | 0, d = h & 8191, _ = h >>> 13, N = A[9] | 0, z = N & 8191, G = N >>> 13, gt = x[0] | 0, pt = gt & 8191, ft = gt >>> 13, zt = x[1] | 0, ht = zt & 8191, jt = zt >>> 13, Ss = x[2] | 0, Gt = Ss & 8191, Zt = Ss >>> 13, xs = x[3] | 0, Yt = xs & 8191, Jt = xs >>> 13, Is = x[4] | 0, Xt = Is & 8191, Qt = Is >>> 13, Es = x[5] | 0, te = Es & 8191, ee = Es >>> 13, As = x[6] | 0, re = As & 8191, ne = As >>> 13, _s = x[7] | 0, ie = _s & 8191, se = _s >>> 13, Bs = x[8] | 0, oe = Bs & 8191, ae = Bs >>> 13, Rs = x[9] | 0, ce = Rs & 8191, ue = Rs >>> 13;
|
|
2608
2608
|
y.negative = c.negative ^ p.negative, y.length = 19, v = Math.imul(S, pt), a = Math.imul(S, ft), a = a + Math.imul(U, pt) | 0, l = Math.imul(U, ft);
|
|
2609
|
-
var qn = (
|
|
2610
|
-
|
|
2611
|
-
var Kn = (
|
|
2612
|
-
|
|
2613
|
-
var Wn = (
|
|
2614
|
-
|
|
2615
|
-
var Dn = (
|
|
2616
|
-
|
|
2617
|
-
var $n = (
|
|
2618
|
-
|
|
2619
|
-
var Hn = (
|
|
2620
|
-
|
|
2621
|
-
var Vn = (
|
|
2622
|
-
|
|
2623
|
-
var jn = (
|
|
2624
|
-
|
|
2625
|
-
var Gn = (
|
|
2626
|
-
|
|
2627
|
-
var Zn = (
|
|
2628
|
-
|
|
2629
|
-
var Yn = (
|
|
2630
|
-
|
|
2631
|
-
var Jn = (
|
|
2632
|
-
|
|
2633
|
-
var Xn = (
|
|
2634
|
-
|
|
2635
|
-
var Qn = (
|
|
2636
|
-
|
|
2637
|
-
var ti = (
|
|
2638
|
-
|
|
2639
|
-
var ei = (
|
|
2640
|
-
|
|
2641
|
-
var ri = (
|
|
2642
|
-
|
|
2643
|
-
var ni = (
|
|
2644
|
-
|
|
2645
|
-
var ii = (
|
|
2646
|
-
return
|
|
2609
|
+
var qn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2610
|
+
C = (l + (a >>> 13) | 0) + (qn >>> 26) | 0, qn &= 67108863, v = Math.imul(rt, pt), a = Math.imul(rt, ft), a = a + Math.imul(at, pt) | 0, l = Math.imul(at, ft), v = v + Math.imul(S, ht) | 0, a = a + Math.imul(S, jt) | 0, a = a + Math.imul(U, ht) | 0, l = l + Math.imul(U, jt) | 0;
|
|
2611
|
+
var Kn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2612
|
+
C = (l + (a >>> 13) | 0) + (Kn >>> 26) | 0, Kn &= 67108863, v = Math.imul(dt, pt), a = Math.imul(dt, ft), a = a + Math.imul(bt, pt) | 0, l = Math.imul(bt, ft), v = v + Math.imul(rt, ht) | 0, a = a + Math.imul(rt, jt) | 0, a = a + Math.imul(at, ht) | 0, l = l + Math.imul(at, jt) | 0, v = v + Math.imul(S, Gt) | 0, a = a + Math.imul(S, Zt) | 0, a = a + Math.imul(U, Gt) | 0, l = l + Math.imul(U, Zt) | 0;
|
|
2613
|
+
var Wn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2614
|
+
C = (l + (a >>> 13) | 0) + (Wn >>> 26) | 0, Wn &= 67108863, v = Math.imul(kt, pt), a = Math.imul(kt, ft), a = a + Math.imul(_t, pt) | 0, l = Math.imul(_t, ft), v = v + Math.imul(dt, ht) | 0, a = a + Math.imul(dt, jt) | 0, a = a + Math.imul(bt, ht) | 0, l = l + Math.imul(bt, jt) | 0, v = v + Math.imul(rt, Gt) | 0, a = a + Math.imul(rt, Zt) | 0, a = a + Math.imul(at, Gt) | 0, l = l + Math.imul(at, Zt) | 0, v = v + Math.imul(S, Yt) | 0, a = a + Math.imul(S, Jt) | 0, a = a + Math.imul(U, Yt) | 0, l = l + Math.imul(U, Jt) | 0;
|
|
2615
|
+
var Dn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2616
|
+
C = (l + (a >>> 13) | 0) + (Dn >>> 26) | 0, Dn &= 67108863, v = Math.imul(Mt, pt), a = Math.imul(Mt, ft), a = a + Math.imul(qt, pt) | 0, l = Math.imul(qt, ft), v = v + Math.imul(kt, ht) | 0, a = a + Math.imul(kt, jt) | 0, a = a + Math.imul(_t, ht) | 0, l = l + Math.imul(_t, jt) | 0, v = v + Math.imul(dt, Gt) | 0, a = a + Math.imul(dt, Zt) | 0, a = a + Math.imul(bt, Gt) | 0, l = l + Math.imul(bt, Zt) | 0, v = v + Math.imul(rt, Yt) | 0, a = a + Math.imul(rt, Jt) | 0, a = a + Math.imul(at, Yt) | 0, l = l + Math.imul(at, Jt) | 0, v = v + Math.imul(S, Xt) | 0, a = a + Math.imul(S, Qt) | 0, a = a + Math.imul(U, Xt) | 0, l = l + Math.imul(U, Qt) | 0;
|
|
2617
|
+
var $n = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2618
|
+
C = (l + (a >>> 13) | 0) + ($n >>> 26) | 0, $n &= 67108863, v = Math.imul(Nt, pt), a = Math.imul(Nt, ft), a = a + Math.imul(Tt, pt) | 0, l = Math.imul(Tt, ft), v = v + Math.imul(Mt, ht) | 0, a = a + Math.imul(Mt, jt) | 0, a = a + Math.imul(qt, ht) | 0, l = l + Math.imul(qt, jt) | 0, v = v + Math.imul(kt, Gt) | 0, a = a + Math.imul(kt, Zt) | 0, a = a + Math.imul(_t, Gt) | 0, l = l + Math.imul(_t, Zt) | 0, v = v + Math.imul(dt, Yt) | 0, a = a + Math.imul(dt, Jt) | 0, a = a + Math.imul(bt, Yt) | 0, l = l + Math.imul(bt, Jt) | 0, v = v + Math.imul(rt, Xt) | 0, a = a + Math.imul(rt, Qt) | 0, a = a + Math.imul(at, Xt) | 0, l = l + Math.imul(at, Qt) | 0, v = v + Math.imul(S, te) | 0, a = a + Math.imul(S, ee) | 0, a = a + Math.imul(U, te) | 0, l = l + Math.imul(U, ee) | 0;
|
|
2619
|
+
var Hn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2620
|
+
C = (l + (a >>> 13) | 0) + (Hn >>> 26) | 0, Hn &= 67108863, v = Math.imul(Pt, pt), a = Math.imul(Pt, ft), a = a + Math.imul(Ct, pt) | 0, l = Math.imul(Ct, ft), v = v + Math.imul(Nt, ht) | 0, a = a + Math.imul(Nt, jt) | 0, a = a + Math.imul(Tt, ht) | 0, l = l + Math.imul(Tt, jt) | 0, v = v + Math.imul(Mt, Gt) | 0, a = a + Math.imul(Mt, Zt) | 0, a = a + Math.imul(qt, Gt) | 0, l = l + Math.imul(qt, Zt) | 0, v = v + Math.imul(kt, Yt) | 0, a = a + Math.imul(kt, Jt) | 0, a = a + Math.imul(_t, Yt) | 0, l = l + Math.imul(_t, Jt) | 0, v = v + Math.imul(dt, Xt) | 0, a = a + Math.imul(dt, Qt) | 0, a = a + Math.imul(bt, Xt) | 0, l = l + Math.imul(bt, Qt) | 0, v = v + Math.imul(rt, te) | 0, a = a + Math.imul(rt, ee) | 0, a = a + Math.imul(at, te) | 0, l = l + Math.imul(at, ee) | 0, v = v + Math.imul(S, re) | 0, a = a + Math.imul(S, ne) | 0, a = a + Math.imul(U, re) | 0, l = l + Math.imul(U, ne) | 0;
|
|
2621
|
+
var Vn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2622
|
+
C = (l + (a >>> 13) | 0) + (Vn >>> 26) | 0, Vn &= 67108863, v = Math.imul(Ft, pt), a = Math.imul(Ft, ft), a = a + Math.imul(m, pt) | 0, l = Math.imul(m, ft), v = v + Math.imul(Pt, ht) | 0, a = a + Math.imul(Pt, jt) | 0, a = a + Math.imul(Ct, ht) | 0, l = l + Math.imul(Ct, jt) | 0, v = v + Math.imul(Nt, Gt) | 0, a = a + Math.imul(Nt, Zt) | 0, a = a + Math.imul(Tt, Gt) | 0, l = l + Math.imul(Tt, Zt) | 0, v = v + Math.imul(Mt, Yt) | 0, a = a + Math.imul(Mt, Jt) | 0, a = a + Math.imul(qt, Yt) | 0, l = l + Math.imul(qt, Jt) | 0, v = v + Math.imul(kt, Xt) | 0, a = a + Math.imul(kt, Qt) | 0, a = a + Math.imul(_t, Xt) | 0, l = l + Math.imul(_t, Qt) | 0, v = v + Math.imul(dt, te) | 0, a = a + Math.imul(dt, ee) | 0, a = a + Math.imul(bt, te) | 0, l = l + Math.imul(bt, ee) | 0, v = v + Math.imul(rt, re) | 0, a = a + Math.imul(rt, ne) | 0, a = a + Math.imul(at, re) | 0, l = l + Math.imul(at, ne) | 0, v = v + Math.imul(S, ie) | 0, a = a + Math.imul(S, se) | 0, a = a + Math.imul(U, ie) | 0, l = l + Math.imul(U, se) | 0;
|
|
2623
|
+
var jn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2624
|
+
C = (l + (a >>> 13) | 0) + (jn >>> 26) | 0, jn &= 67108863, v = Math.imul(d, pt), a = Math.imul(d, ft), a = a + Math.imul(_, pt) | 0, l = Math.imul(_, ft), v = v + Math.imul(Ft, ht) | 0, a = a + Math.imul(Ft, jt) | 0, a = a + Math.imul(m, ht) | 0, l = l + Math.imul(m, jt) | 0, v = v + Math.imul(Pt, Gt) | 0, a = a + Math.imul(Pt, Zt) | 0, a = a + Math.imul(Ct, Gt) | 0, l = l + Math.imul(Ct, Zt) | 0, v = v + Math.imul(Nt, Yt) | 0, a = a + Math.imul(Nt, Jt) | 0, a = a + Math.imul(Tt, Yt) | 0, l = l + Math.imul(Tt, Jt) | 0, v = v + Math.imul(Mt, Xt) | 0, a = a + Math.imul(Mt, Qt) | 0, a = a + Math.imul(qt, Xt) | 0, l = l + Math.imul(qt, Qt) | 0, v = v + Math.imul(kt, te) | 0, a = a + Math.imul(kt, ee) | 0, a = a + Math.imul(_t, te) | 0, l = l + Math.imul(_t, ee) | 0, v = v + Math.imul(dt, re) | 0, a = a + Math.imul(dt, ne) | 0, a = a + Math.imul(bt, re) | 0, l = l + Math.imul(bt, ne) | 0, v = v + Math.imul(rt, ie) | 0, a = a + Math.imul(rt, se) | 0, a = a + Math.imul(at, ie) | 0, l = l + Math.imul(at, se) | 0, v = v + Math.imul(S, oe) | 0, a = a + Math.imul(S, ae) | 0, a = a + Math.imul(U, oe) | 0, l = l + Math.imul(U, ae) | 0;
|
|
2625
|
+
var Gn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2626
|
+
C = (l + (a >>> 13) | 0) + (Gn >>> 26) | 0, Gn &= 67108863, v = Math.imul(z, pt), a = Math.imul(z, ft), a = a + Math.imul(G, pt) | 0, l = Math.imul(G, ft), v = v + Math.imul(d, ht) | 0, a = a + Math.imul(d, jt) | 0, a = a + Math.imul(_, ht) | 0, l = l + Math.imul(_, jt) | 0, v = v + Math.imul(Ft, Gt) | 0, a = a + Math.imul(Ft, Zt) | 0, a = a + Math.imul(m, Gt) | 0, l = l + Math.imul(m, Zt) | 0, v = v + Math.imul(Pt, Yt) | 0, a = a + Math.imul(Pt, Jt) | 0, a = a + Math.imul(Ct, Yt) | 0, l = l + Math.imul(Ct, Jt) | 0, v = v + Math.imul(Nt, Xt) | 0, a = a + Math.imul(Nt, Qt) | 0, a = a + Math.imul(Tt, Xt) | 0, l = l + Math.imul(Tt, Qt) | 0, v = v + Math.imul(Mt, te) | 0, a = a + Math.imul(Mt, ee) | 0, a = a + Math.imul(qt, te) | 0, l = l + Math.imul(qt, ee) | 0, v = v + Math.imul(kt, re) | 0, a = a + Math.imul(kt, ne) | 0, a = a + Math.imul(_t, re) | 0, l = l + Math.imul(_t, ne) | 0, v = v + Math.imul(dt, ie) | 0, a = a + Math.imul(dt, se) | 0, a = a + Math.imul(bt, ie) | 0, l = l + Math.imul(bt, se) | 0, v = v + Math.imul(rt, oe) | 0, a = a + Math.imul(rt, ae) | 0, a = a + Math.imul(at, oe) | 0, l = l + Math.imul(at, ae) | 0, v = v + Math.imul(S, ce) | 0, a = a + Math.imul(S, ue) | 0, a = a + Math.imul(U, ce) | 0, l = l + Math.imul(U, ue) | 0;
|
|
2627
|
+
var Zn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2628
|
+
C = (l + (a >>> 13) | 0) + (Zn >>> 26) | 0, Zn &= 67108863, v = Math.imul(z, ht), a = Math.imul(z, jt), a = a + Math.imul(G, ht) | 0, l = Math.imul(G, jt), v = v + Math.imul(d, Gt) | 0, a = a + Math.imul(d, Zt) | 0, a = a + Math.imul(_, Gt) | 0, l = l + Math.imul(_, Zt) | 0, v = v + Math.imul(Ft, Yt) | 0, a = a + Math.imul(Ft, Jt) | 0, a = a + Math.imul(m, Yt) | 0, l = l + Math.imul(m, Jt) | 0, v = v + Math.imul(Pt, Xt) | 0, a = a + Math.imul(Pt, Qt) | 0, a = a + Math.imul(Ct, Xt) | 0, l = l + Math.imul(Ct, Qt) | 0, v = v + Math.imul(Nt, te) | 0, a = a + Math.imul(Nt, ee) | 0, a = a + Math.imul(Tt, te) | 0, l = l + Math.imul(Tt, ee) | 0, v = v + Math.imul(Mt, re) | 0, a = a + Math.imul(Mt, ne) | 0, a = a + Math.imul(qt, re) | 0, l = l + Math.imul(qt, ne) | 0, v = v + Math.imul(kt, ie) | 0, a = a + Math.imul(kt, se) | 0, a = a + Math.imul(_t, ie) | 0, l = l + Math.imul(_t, se) | 0, v = v + Math.imul(dt, oe) | 0, a = a + Math.imul(dt, ae) | 0, a = a + Math.imul(bt, oe) | 0, l = l + Math.imul(bt, ae) | 0, v = v + Math.imul(rt, ce) | 0, a = a + Math.imul(rt, ue) | 0, a = a + Math.imul(at, ce) | 0, l = l + Math.imul(at, ue) | 0;
|
|
2629
|
+
var Yn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2630
|
+
C = (l + (a >>> 13) | 0) + (Yn >>> 26) | 0, Yn &= 67108863, v = Math.imul(z, Gt), a = Math.imul(z, Zt), a = a + Math.imul(G, Gt) | 0, l = Math.imul(G, Zt), v = v + Math.imul(d, Yt) | 0, a = a + Math.imul(d, Jt) | 0, a = a + Math.imul(_, Yt) | 0, l = l + Math.imul(_, Jt) | 0, v = v + Math.imul(Ft, Xt) | 0, a = a + Math.imul(Ft, Qt) | 0, a = a + Math.imul(m, Xt) | 0, l = l + Math.imul(m, Qt) | 0, v = v + Math.imul(Pt, te) | 0, a = a + Math.imul(Pt, ee) | 0, a = a + Math.imul(Ct, te) | 0, l = l + Math.imul(Ct, ee) | 0, v = v + Math.imul(Nt, re) | 0, a = a + Math.imul(Nt, ne) | 0, a = a + Math.imul(Tt, re) | 0, l = l + Math.imul(Tt, ne) | 0, v = v + Math.imul(Mt, ie) | 0, a = a + Math.imul(Mt, se) | 0, a = a + Math.imul(qt, ie) | 0, l = l + Math.imul(qt, se) | 0, v = v + Math.imul(kt, oe) | 0, a = a + Math.imul(kt, ae) | 0, a = a + Math.imul(_t, oe) | 0, l = l + Math.imul(_t, ae) | 0, v = v + Math.imul(dt, ce) | 0, a = a + Math.imul(dt, ue) | 0, a = a + Math.imul(bt, ce) | 0, l = l + Math.imul(bt, ue) | 0;
|
|
2631
|
+
var Jn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2632
|
+
C = (l + (a >>> 13) | 0) + (Jn >>> 26) | 0, Jn &= 67108863, v = Math.imul(z, Yt), a = Math.imul(z, Jt), a = a + Math.imul(G, Yt) | 0, l = Math.imul(G, Jt), v = v + Math.imul(d, Xt) | 0, a = a + Math.imul(d, Qt) | 0, a = a + Math.imul(_, Xt) | 0, l = l + Math.imul(_, Qt) | 0, v = v + Math.imul(Ft, te) | 0, a = a + Math.imul(Ft, ee) | 0, a = a + Math.imul(m, te) | 0, l = l + Math.imul(m, ee) | 0, v = v + Math.imul(Pt, re) | 0, a = a + Math.imul(Pt, ne) | 0, a = a + Math.imul(Ct, re) | 0, l = l + Math.imul(Ct, ne) | 0, v = v + Math.imul(Nt, ie) | 0, a = a + Math.imul(Nt, se) | 0, a = a + Math.imul(Tt, ie) | 0, l = l + Math.imul(Tt, se) | 0, v = v + Math.imul(Mt, oe) | 0, a = a + Math.imul(Mt, ae) | 0, a = a + Math.imul(qt, oe) | 0, l = l + Math.imul(qt, ae) | 0, v = v + Math.imul(kt, ce) | 0, a = a + Math.imul(kt, ue) | 0, a = a + Math.imul(_t, ce) | 0, l = l + Math.imul(_t, ue) | 0;
|
|
2633
|
+
var Xn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2634
|
+
C = (l + (a >>> 13) | 0) + (Xn >>> 26) | 0, Xn &= 67108863, v = Math.imul(z, Xt), a = Math.imul(z, Qt), a = a + Math.imul(G, Xt) | 0, l = Math.imul(G, Qt), v = v + Math.imul(d, te) | 0, a = a + Math.imul(d, ee) | 0, a = a + Math.imul(_, te) | 0, l = l + Math.imul(_, ee) | 0, v = v + Math.imul(Ft, re) | 0, a = a + Math.imul(Ft, ne) | 0, a = a + Math.imul(m, re) | 0, l = l + Math.imul(m, ne) | 0, v = v + Math.imul(Pt, ie) | 0, a = a + Math.imul(Pt, se) | 0, a = a + Math.imul(Ct, ie) | 0, l = l + Math.imul(Ct, se) | 0, v = v + Math.imul(Nt, oe) | 0, a = a + Math.imul(Nt, ae) | 0, a = a + Math.imul(Tt, oe) | 0, l = l + Math.imul(Tt, ae) | 0, v = v + Math.imul(Mt, ce) | 0, a = a + Math.imul(Mt, ue) | 0, a = a + Math.imul(qt, ce) | 0, l = l + Math.imul(qt, ue) | 0;
|
|
2635
|
+
var Qn = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2636
|
+
C = (l + (a >>> 13) | 0) + (Qn >>> 26) | 0, Qn &= 67108863, v = Math.imul(z, te), a = Math.imul(z, ee), a = a + Math.imul(G, te) | 0, l = Math.imul(G, ee), v = v + Math.imul(d, re) | 0, a = a + Math.imul(d, ne) | 0, a = a + Math.imul(_, re) | 0, l = l + Math.imul(_, ne) | 0, v = v + Math.imul(Ft, ie) | 0, a = a + Math.imul(Ft, se) | 0, a = a + Math.imul(m, ie) | 0, l = l + Math.imul(m, se) | 0, v = v + Math.imul(Pt, oe) | 0, a = a + Math.imul(Pt, ae) | 0, a = a + Math.imul(Ct, oe) | 0, l = l + Math.imul(Ct, ae) | 0, v = v + Math.imul(Nt, ce) | 0, a = a + Math.imul(Nt, ue) | 0, a = a + Math.imul(Tt, ce) | 0, l = l + Math.imul(Tt, ue) | 0;
|
|
2637
|
+
var ti = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2638
|
+
C = (l + (a >>> 13) | 0) + (ti >>> 26) | 0, ti &= 67108863, v = Math.imul(z, re), a = Math.imul(z, ne), a = a + Math.imul(G, re) | 0, l = Math.imul(G, ne), v = v + Math.imul(d, ie) | 0, a = a + Math.imul(d, se) | 0, a = a + Math.imul(_, ie) | 0, l = l + Math.imul(_, se) | 0, v = v + Math.imul(Ft, oe) | 0, a = a + Math.imul(Ft, ae) | 0, a = a + Math.imul(m, oe) | 0, l = l + Math.imul(m, ae) | 0, v = v + Math.imul(Pt, ce) | 0, a = a + Math.imul(Pt, ue) | 0, a = a + Math.imul(Ct, ce) | 0, l = l + Math.imul(Ct, ue) | 0;
|
|
2639
|
+
var ei = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2640
|
+
C = (l + (a >>> 13) | 0) + (ei >>> 26) | 0, ei &= 67108863, v = Math.imul(z, ie), a = Math.imul(z, se), a = a + Math.imul(G, ie) | 0, l = Math.imul(G, se), v = v + Math.imul(d, oe) | 0, a = a + Math.imul(d, ae) | 0, a = a + Math.imul(_, oe) | 0, l = l + Math.imul(_, ae) | 0, v = v + Math.imul(Ft, ce) | 0, a = a + Math.imul(Ft, ue) | 0, a = a + Math.imul(m, ce) | 0, l = l + Math.imul(m, ue) | 0;
|
|
2641
|
+
var ri = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2642
|
+
C = (l + (a >>> 13) | 0) + (ri >>> 26) | 0, ri &= 67108863, v = Math.imul(z, oe), a = Math.imul(z, ae), a = a + Math.imul(G, oe) | 0, l = Math.imul(G, ae), v = v + Math.imul(d, ce) | 0, a = a + Math.imul(d, ue) | 0, a = a + Math.imul(_, ce) | 0, l = l + Math.imul(_, ue) | 0;
|
|
2643
|
+
var ni = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2644
|
+
C = (l + (a >>> 13) | 0) + (ni >>> 26) | 0, ni &= 67108863, v = Math.imul(z, ce), a = Math.imul(z, ue), a = a + Math.imul(G, ce) | 0, l = Math.imul(G, ue);
|
|
2645
|
+
var ii = (C + v | 0) + ((a & 8191) << 13) | 0;
|
|
2646
|
+
return C = (l + (a >>> 13) | 0) + (ii >>> 26) | 0, ii &= 67108863, E[0] = qn, E[1] = Kn, E[2] = Wn, E[3] = Dn, E[4] = $n, E[5] = Hn, E[6] = Vn, E[7] = jn, E[8] = Gn, E[9] = Zn, E[10] = Yn, E[11] = Jn, E[12] = Xn, E[13] = Qn, E[14] = ti, E[15] = ei, E[16] = ri, E[17] = ni, E[18] = ii, C !== 0 && (E[19] = C, y.length++), y;
|
|
2647
2647
|
};
|
|
2648
2648
|
Math.imul || ($ = O);
|
|
2649
2649
|
function q(I, c, p) {
|
|
@@ -2651,11 +2651,11 @@ function Zo() {
|
|
|
2651
2651
|
for (var y = 0, A = 0, x = 0; x < p.length - 1; x++) {
|
|
2652
2652
|
var E = A;
|
|
2653
2653
|
A = 0;
|
|
2654
|
-
for (var
|
|
2654
|
+
for (var C = y & 67108863, v = Math.min(x, c.length - 1), a = Math.max(0, x - I.length + 1); a <= v; a++) {
|
|
2655
2655
|
var l = x - a, b = I.words[l] | 0, S = c.words[a] | 0, U = b * S, j = U & 67108863;
|
|
2656
|
-
E = E + (U / 67108864 | 0) | 0, j = j +
|
|
2656
|
+
E = E + (U / 67108864 | 0) | 0, j = j + C | 0, C = j & 67108863, E = E + (j >>> 26) | 0, A += E >>> 26, E &= 67108863;
|
|
2657
2657
|
}
|
|
2658
|
-
p.words[x] =
|
|
2658
|
+
p.words[x] = C, y = E, E = A;
|
|
2659
2659
|
}
|
|
2660
2660
|
return y !== 0 ? p.words[x] = y : p.length--, p._strip();
|
|
2661
2661
|
}
|
|
@@ -2702,8 +2702,8 @@ function Zo() {
|
|
|
2702
2702
|
if (p !== 0) {
|
|
2703
2703
|
var E = 0;
|
|
2704
2704
|
for (x = 0; x < this.length; x++) {
|
|
2705
|
-
var
|
|
2706
|
-
this.words[x] = v | E, E =
|
|
2705
|
+
var C = this.words[x] & A, v = (this.words[x] | 0) - C << p;
|
|
2706
|
+
this.words[x] = v | E, E = C >>> 26 - p;
|
|
2707
2707
|
}
|
|
2708
2708
|
E && (this.words[x] = E, this.length++);
|
|
2709
2709
|
}
|
|
@@ -2721,7 +2721,7 @@ function Zo() {
|
|
|
2721
2721
|
r(typeof c == "number" && c >= 0);
|
|
2722
2722
|
var A;
|
|
2723
2723
|
p ? A = (p - p % 26) / 26 : A = 0;
|
|
2724
|
-
var x = c % 26, E = Math.min((c - x) / 26, this.length),
|
|
2724
|
+
var x = c % 26, E = Math.min((c - x) / 26, this.length), C = 67108863 ^ 67108863 >>> x << x, v = y;
|
|
2725
2725
|
if (A -= E, A = Math.max(0, A), v) {
|
|
2726
2726
|
for (var a = 0; a < E; a++)
|
|
2727
2727
|
v.words[a] = this.words[a];
|
|
@@ -2735,7 +2735,7 @@ function Zo() {
|
|
|
2735
2735
|
var l = 0;
|
|
2736
2736
|
for (a = this.length - 1; a >= 0 && (l !== 0 || a >= A); a--) {
|
|
2737
2737
|
var b = this.words[a] | 0;
|
|
2738
|
-
this.words[a] = l << 26 - x | b >>> x, l = b &
|
|
2738
|
+
this.words[a] = l << 26 - x | b >>> x, l = b & C;
|
|
2739
2739
|
}
|
|
2740
2740
|
return v && l !== 0 && (v.words[v.length++] = l), this.length === 0 && (this.words[0] = 0, this.length = 1), this._strip();
|
|
2741
2741
|
}, i.prototype.ishrn = function(c, p, y) {
|
|
@@ -2794,21 +2794,21 @@ function Zo() {
|
|
|
2794
2794
|
}, i.prototype._ishlnsubmul = function(c, p, y) {
|
|
2795
2795
|
var A = c.length + y, x;
|
|
2796
2796
|
this._expand(A);
|
|
2797
|
-
var E,
|
|
2797
|
+
var E, C = 0;
|
|
2798
2798
|
for (x = 0; x < c.length; x++) {
|
|
2799
|
-
E = (this.words[x + y] | 0) +
|
|
2799
|
+
E = (this.words[x + y] | 0) + C;
|
|
2800
2800
|
var v = (c.words[x] | 0) * p;
|
|
2801
|
-
E -= v & 67108863,
|
|
2801
|
+
E -= v & 67108863, C = (E >> 26) - (v / 67108864 | 0), this.words[x + y] = E & 67108863;
|
|
2802
2802
|
}
|
|
2803
2803
|
for (; x < this.length - y; x++)
|
|
2804
|
-
E = (this.words[x + y] | 0) +
|
|
2805
|
-
if (
|
|
2806
|
-
for (r(
|
|
2807
|
-
E = -(this.words[x] | 0) +
|
|
2804
|
+
E = (this.words[x + y] | 0) + C, C = E >> 26, this.words[x + y] = E & 67108863;
|
|
2805
|
+
if (C === 0) return this._strip();
|
|
2806
|
+
for (r(C === -1), C = 0, x = 0; x < this.length; x++)
|
|
2807
|
+
E = -(this.words[x] | 0) + C, C = E >> 26, this.words[x] = E & 67108863;
|
|
2808
2808
|
return this.negative = 1, this._strip();
|
|
2809
2809
|
}, i.prototype._wordDiv = function(c, p) {
|
|
2810
|
-
var y = this.length - c.length, A = this.clone(), x = c, E = x.words[x.length - 1] | 0,
|
|
2811
|
-
y = 26 -
|
|
2810
|
+
var y = this.length - c.length, A = this.clone(), x = c, E = x.words[x.length - 1] | 0, C = this._countBits(E);
|
|
2811
|
+
y = 26 - C, y !== 0 && (x = x.ushln(y), A.iushln(y), E = x.words[x.length - 1] | 0);
|
|
2812
2812
|
var v = A.length - x.length, a;
|
|
2813
2813
|
if (p !== "mod") {
|
|
2814
2814
|
a = new i(null), a.length = v + 1, a.words = new Array(a.length);
|
|
@@ -2889,7 +2889,7 @@ function Zo() {
|
|
|
2889
2889
|
r(c.negative === 0), r(!c.isZero());
|
|
2890
2890
|
var p = this, y = c.clone();
|
|
2891
2891
|
p.negative !== 0 ? p = p.umod(c) : p = p.clone();
|
|
2892
|
-
for (var A = new i(1), x = new i(0), E = new i(0),
|
|
2892
|
+
for (var A = new i(1), x = new i(0), E = new i(0), C = new i(1), v = 0; p.isEven() && y.isEven(); )
|
|
2893
2893
|
p.iushrn(1), y.iushrn(1), ++v;
|
|
2894
2894
|
for (var a = y.clone(), l = p.clone(); !p.isZero(); ) {
|
|
2895
2895
|
for (var b = 0, S = 1; !(p.words[0] & S) && b < 26; ++b, S <<= 1) ;
|
|
@@ -2899,12 +2899,12 @@ function Zo() {
|
|
|
2899
2899
|
for (var U = 0, j = 1; !(y.words[0] & j) && U < 26; ++U, j <<= 1) ;
|
|
2900
2900
|
if (U > 0)
|
|
2901
2901
|
for (y.iushrn(U); U-- > 0; )
|
|
2902
|
-
(E.isOdd() ||
|
|
2903
|
-
p.cmp(y) >= 0 ? (p.isub(y), A.isub(E), x.isub(
|
|
2902
|
+
(E.isOdd() || C.isOdd()) && (E.iadd(a), C.isub(l)), E.iushrn(1), C.iushrn(1);
|
|
2903
|
+
p.cmp(y) >= 0 ? (p.isub(y), A.isub(E), x.isub(C)) : (y.isub(p), E.isub(A), C.isub(x));
|
|
2904
2904
|
}
|
|
2905
2905
|
return {
|
|
2906
2906
|
a: E,
|
|
2907
|
-
b:
|
|
2907
|
+
b: C,
|
|
2908
2908
|
gcd: y.iushln(v)
|
|
2909
2909
|
};
|
|
2910
2910
|
}, i.prototype._invmp = function(c) {
|
|
@@ -2912,9 +2912,9 @@ function Zo() {
|
|
|
2912
2912
|
var p = this, y = c.clone();
|
|
2913
2913
|
p.negative !== 0 ? p = p.umod(c) : p = p.clone();
|
|
2914
2914
|
for (var A = new i(1), x = new i(0), E = y.clone(); p.cmpn(1) > 0 && y.cmpn(1) > 0; ) {
|
|
2915
|
-
for (var
|
|
2916
|
-
if (
|
|
2917
|
-
for (p.iushrn(
|
|
2915
|
+
for (var C = 0, v = 1; !(p.words[0] & v) && C < 26; ++C, v <<= 1) ;
|
|
2916
|
+
if (C > 0)
|
|
2917
|
+
for (p.iushrn(C); C-- > 0; )
|
|
2918
2918
|
A.isOdd() && A.iadd(E), A.iushrn(1);
|
|
2919
2919
|
for (var a = 0, l = 1; !(y.words[0] & l) && a < 26; ++a, l <<= 1) ;
|
|
2920
2920
|
if (a > 0)
|
|
@@ -2959,8 +2959,8 @@ function Zo() {
|
|
|
2959
2959
|
if (this.length <= y)
|
|
2960
2960
|
return this._expand(y + 1), this.words[y] |= A, this;
|
|
2961
2961
|
for (var x = A, E = y; x !== 0 && E < this.length; E++) {
|
|
2962
|
-
var
|
|
2963
|
-
|
|
2962
|
+
var C = this.words[E] | 0;
|
|
2963
|
+
C += x, x = C >>> 26, C &= 67108863, this.words[E] = C;
|
|
2964
2964
|
}
|
|
2965
2965
|
return x !== 0 && (this.words[E] = x, this.length++), this;
|
|
2966
2966
|
}, i.prototype.isZero = function() {
|
|
@@ -3092,8 +3092,8 @@ function Zo() {
|
|
|
3092
3092
|
}
|
|
3093
3093
|
var E = c.words[9];
|
|
3094
3094
|
for (p.words[p.length++] = E & y, x = 10; x < c.length; x++) {
|
|
3095
|
-
var
|
|
3096
|
-
c.words[x - 10] = (
|
|
3095
|
+
var C = c.words[x] | 0;
|
|
3096
|
+
c.words[x - 10] = (C & y) << 4 | E >>> 22, E = C;
|
|
3097
3097
|
}
|
|
3098
3098
|
E >>>= 22, c.words[x - 10] = E, E === 0 && c.length > 10 ? c.length -= 10 : c.length -= 9;
|
|
3099
3099
|
}, Y.prototype.imulK = function(c) {
|
|
@@ -3202,9 +3202,9 @@ function Zo() {
|
|
|
3202
3202
|
for (var A = this.m.subn(1), x = 0; !A.isZero() && A.andln(1) === 0; )
|
|
3203
3203
|
x++, A.iushrn(1);
|
|
3204
3204
|
r(!A.isZero());
|
|
3205
|
-
var E = new i(1).toRed(this),
|
|
3206
|
-
for (a = new i(2 * a * a).toRed(this); this.pow(a, v).cmp(
|
|
3207
|
-
a.redIAdd(
|
|
3205
|
+
var E = new i(1).toRed(this), C = E.redNeg(), v = this.m.subn(1).iushrn(1), a = this.m.bitLength();
|
|
3206
|
+
for (a = new i(2 * a * a).toRed(this); this.pow(a, v).cmp(C) !== 0; )
|
|
3207
|
+
a.redIAdd(C);
|
|
3208
3208
|
for (var l = this.pow(a, A), b = this.pow(c, A.addn(1).iushrn(1)), S = this.pow(c, A), U = x; S.cmp(E) !== 0; ) {
|
|
3209
3209
|
for (var j = S, rt = 0; j.cmp(E) !== 0; rt++)
|
|
3210
3210
|
j = j.redSqr();
|
|
@@ -3223,15 +3223,15 @@ function Zo() {
|
|
|
3223
3223
|
A[0] = new i(1).toRed(this), A[1] = c;
|
|
3224
3224
|
for (var x = 2; x < A.length; x++)
|
|
3225
3225
|
A[x] = this.mul(A[x - 1], c);
|
|
3226
|
-
var E = A[0],
|
|
3226
|
+
var E = A[0], C = 0, v = 0, a = p.bitLength() % 26;
|
|
3227
3227
|
for (a === 0 && (a = 26), x = p.length - 1; x >= 0; x--) {
|
|
3228
3228
|
for (var l = p.words[x], b = a - 1; b >= 0; b--) {
|
|
3229
3229
|
var S = l >> b & 1;
|
|
3230
|
-
if (E !== A[0] && (E = this.sqr(E)), S === 0 &&
|
|
3230
|
+
if (E !== A[0] && (E = this.sqr(E)), S === 0 && C === 0) {
|
|
3231
3231
|
v = 0;
|
|
3232
3232
|
continue;
|
|
3233
3233
|
}
|
|
3234
|
-
|
|
3234
|
+
C <<= 1, C |= S, v++, !(v !== y && (x !== 0 || b !== 0)) && (E = this.mul(E, A[C]), v = 0, C = 0);
|
|
3235
3235
|
}
|
|
3236
3236
|
a = 26;
|
|
3237
3237
|
}
|
|
@@ -3367,7 +3367,7 @@ function lu() {
|
|
|
3367
3367
|
J[K++] = X[Z++];
|
|
3368
3368
|
return J;
|
|
3369
3369
|
}
|
|
3370
|
-
function
|
|
3370
|
+
function L(B) {
|
|
3371
3371
|
var M = R(B);
|
|
3372
3372
|
if (M)
|
|
3373
3373
|
return M;
|
|
@@ -3376,7 +3376,7 @@ function lu() {
|
|
|
3376
3376
|
return {
|
|
3377
3377
|
encode: T,
|
|
3378
3378
|
decodeUnsafe: R,
|
|
3379
|
-
decode:
|
|
3379
|
+
decode: L
|
|
3380
3380
|
};
|
|
3381
3381
|
}
|
|
3382
3382
|
return li = t, li;
|
|
@@ -3464,7 +3464,7 @@ const de = /* @__PURE__ */ Yr(hu), fu = /* @__PURE__ */ new Uint32Array([
|
|
|
3464
3464
|
528734635,
|
|
3465
3465
|
1541459225
|
|
3466
3466
|
]), tr = /* @__PURE__ */ new Uint32Array(64);
|
|
3467
|
-
class du extends
|
|
3467
|
+
class du extends Co {
|
|
3468
3468
|
constructor() {
|
|
3469
3469
|
super(64, 32, 8, !1), this.A = Qe[0] | 0, this.B = Qe[1] | 0, this.C = Qe[2] | 0, this.D = Qe[3] | 0, this.E = Qe[4] | 0, this.F = Qe[5] | 0, this.G = Qe[6] | 0, this.H = Qe[7] | 0;
|
|
3470
3470
|
}
|
|
@@ -3480,8 +3480,8 @@ class du extends Lo {
|
|
|
3480
3480
|
for (let k = 0; k < 16; k++, e += 4)
|
|
3481
3481
|
tr[k] = t.getUint32(e, !1);
|
|
3482
3482
|
for (let k = 16; k < 64; k++) {
|
|
3483
|
-
const T = tr[k - 15], R = tr[k - 2],
|
|
3484
|
-
tr[k] = B + tr[k - 7] +
|
|
3483
|
+
const T = tr[k - 15], R = tr[k - 2], L = Ne(T, 7) ^ Ne(T, 18) ^ T >>> 3, B = Ne(R, 17) ^ Ne(R, 19) ^ R >>> 10;
|
|
3484
|
+
tr[k] = B + tr[k - 7] + L + tr[k - 16] | 0;
|
|
3485
3485
|
}
|
|
3486
3486
|
let { A: r, B: s, C: i, D: o, E: u, F: f, G: g, H: w } = this;
|
|
3487
3487
|
for (let k = 0; k < 64; k++) {
|
|
@@ -3772,7 +3772,7 @@ function ku() {
|
|
|
3772
3772
|
}
|
|
3773
3773
|
}
|
|
3774
3774
|
Rt.BorshError = R;
|
|
3775
|
-
class
|
|
3775
|
+
class L {
|
|
3776
3776
|
constructor() {
|
|
3777
3777
|
this.buf = Buffer.alloc(T), this.length = 0;
|
|
3778
3778
|
}
|
|
@@ -3824,7 +3824,7 @@ function ku() {
|
|
|
3824
3824
|
return this.buf.subarray(0, this.length);
|
|
3825
3825
|
}
|
|
3826
3826
|
}
|
|
3827
|
-
Rt.BinaryWriter =
|
|
3827
|
+
Rt.BinaryWriter = L;
|
|
3828
3828
|
function B(J, K, V) {
|
|
3829
3829
|
const Q = V.value;
|
|
3830
3830
|
V.value = function(...I) {
|
|
@@ -3983,7 +3983,7 @@ function ku() {
|
|
|
3983
3983
|
} else
|
|
3984
3984
|
throw new R(`Unexpected schema kind: ${Q.kind} for ${K.constructor.name}`);
|
|
3985
3985
|
}
|
|
3986
|
-
function X(J, K, V =
|
|
3986
|
+
function X(J, K, V = L) {
|
|
3987
3987
|
const Q = new V();
|
|
3988
3988
|
return q(J, K, Q), Q.toArray();
|
|
3989
3989
|
}
|
|
@@ -4304,7 +4304,7 @@ function vu() {
|
|
|
4304
4304
|
}
|
|
4305
4305
|
H.IntBE = T;
|
|
4306
4306
|
const R = Math.pow(2, 32);
|
|
4307
|
-
function
|
|
4307
|
+
function L(a) {
|
|
4308
4308
|
const l = Math.floor(a / R), b = a - l * R;
|
|
4309
4309
|
return { hi32: l, lo32: b };
|
|
4310
4310
|
}
|
|
@@ -4322,7 +4322,7 @@ function vu() {
|
|
|
4322
4322
|
}
|
|
4323
4323
|
/** @override */
|
|
4324
4324
|
encode(l, b, S = 0) {
|
|
4325
|
-
const U =
|
|
4325
|
+
const U = L(l), j = e(b);
|
|
4326
4326
|
return j.writeUInt32LE(U.lo32, S), j.writeUInt32LE(U.hi32, S + 4), 8;
|
|
4327
4327
|
}
|
|
4328
4328
|
}
|
|
@@ -4338,7 +4338,7 @@ function vu() {
|
|
|
4338
4338
|
}
|
|
4339
4339
|
/** @override */
|
|
4340
4340
|
encode(l, b, S = 0) {
|
|
4341
|
-
const U =
|
|
4341
|
+
const U = L(l), j = e(b);
|
|
4342
4342
|
return j.writeUInt32BE(U.hi32, S), j.writeUInt32BE(U.lo32, S + 4), 8;
|
|
4343
4343
|
}
|
|
4344
4344
|
}
|
|
@@ -4354,7 +4354,7 @@ function vu() {
|
|
|
4354
4354
|
}
|
|
4355
4355
|
/** @override */
|
|
4356
4356
|
encode(l, b, S = 0) {
|
|
4357
|
-
const U =
|
|
4357
|
+
const U = L(l), j = e(b);
|
|
4358
4358
|
return j.writeUInt32LE(U.lo32, S), j.writeInt32LE(U.hi32, S + 4), 8;
|
|
4359
4359
|
}
|
|
4360
4360
|
}
|
|
@@ -4370,7 +4370,7 @@ function vu() {
|
|
|
4370
4370
|
}
|
|
4371
4371
|
/** @override */
|
|
4372
4372
|
encode(l, b, S = 0) {
|
|
4373
|
-
const U =
|
|
4373
|
+
const U = L(l), j = e(b);
|
|
4374
4374
|
return j.writeInt32BE(U.hi32, S), j.writeUInt32BE(U.lo32, S + 4), 8;
|
|
4375
4375
|
}
|
|
4376
4376
|
}
|
|
@@ -5008,7 +5008,7 @@ function vu() {
|
|
|
5008
5008
|
}
|
|
5009
5009
|
}
|
|
5010
5010
|
H.CString = E;
|
|
5011
|
-
class
|
|
5011
|
+
class C extends r {
|
|
5012
5012
|
constructor(l, b) {
|
|
5013
5013
|
if (typeof l == "string" && b === void 0 && (b = l, l = void 0), l === void 0)
|
|
5014
5014
|
l = -1;
|
|
@@ -5038,7 +5038,7 @@ function vu() {
|
|
|
5038
5038
|
return U.copy(e(b), S), j;
|
|
5039
5039
|
}
|
|
5040
5040
|
}
|
|
5041
|
-
H.UTF8 =
|
|
5041
|
+
H.UTF8 = C;
|
|
5042
5042
|
class v extends r {
|
|
5043
5043
|
constructor(l, b) {
|
|
5044
5044
|
super(0, b), this.value = l;
|
|
@@ -5052,7 +5052,7 @@ function vu() {
|
|
|
5052
5052
|
return 0;
|
|
5053
5053
|
}
|
|
5054
5054
|
}
|
|
5055
|
-
return H.Constant = v, H.greedy = (a, l) => new u(a, l), H.offset = (a, l, b) => new f(a, l, b), H.u8 = (a) => new g(1, a), H.u16 = (a) => new g(2, a), H.u24 = (a) => new g(3, a), H.u32 = (a) => new g(4, a), H.u40 = (a) => new g(5, a), H.u48 = (a) => new g(6, a), H.nu64 = (a) => new M(a), H.u16be = (a) => new w(2, a), H.u24be = (a) => new w(3, a), H.u32be = (a) => new w(4, a), H.u40be = (a) => new w(5, a), H.u48be = (a) => new w(6, a), H.nu64be = (a) => new O(a), H.s8 = (a) => new k(1, a), H.s16 = (a) => new k(2, a), H.s24 = (a) => new k(3, a), H.s32 = (a) => new k(4, a), H.s40 = (a) => new k(5, a), H.s48 = (a) => new k(6, a), H.ns64 = (a) => new $(a), H.s16be = (a) => new T(2, a), H.s24be = (a) => new T(3, a), H.s32be = (a) => new T(4, a), H.s40be = (a) => new T(5, a), H.s48be = (a) => new T(6, a), H.ns64be = (a) => new q(a), H.f32 = (a) => new X(a), H.f32be = (a) => new D(a), H.f64 = (a) => new F(a), H.f64be = (a) => new Y(a), H.struct = (a, l, b) => new J(a, l, b), H.bits = (a, l, b) => new p(a, l, b), H.seq = (a, l, b) => new Z(a, l, b), H.union = (a, l, b) => new Q(a, l, b), H.unionLayoutDiscriminator = (a, l) => new V(a, l), H.blob = (a, l) => new x(a, l), H.cstr = (a) => new E(a), H.utf8 = (a, l) => new
|
|
5055
|
+
return H.Constant = v, H.greedy = (a, l) => new u(a, l), H.offset = (a, l, b) => new f(a, l, b), H.u8 = (a) => new g(1, a), H.u16 = (a) => new g(2, a), H.u24 = (a) => new g(3, a), H.u32 = (a) => new g(4, a), H.u40 = (a) => new g(5, a), H.u48 = (a) => new g(6, a), H.nu64 = (a) => new M(a), H.u16be = (a) => new w(2, a), H.u24be = (a) => new w(3, a), H.u32be = (a) => new w(4, a), H.u40be = (a) => new w(5, a), H.u48be = (a) => new w(6, a), H.nu64be = (a) => new O(a), H.s8 = (a) => new k(1, a), H.s16 = (a) => new k(2, a), H.s24 = (a) => new k(3, a), H.s32 = (a) => new k(4, a), H.s40 = (a) => new k(5, a), H.s48 = (a) => new k(6, a), H.ns64 = (a) => new $(a), H.s16be = (a) => new T(2, a), H.s24be = (a) => new T(3, a), H.s32be = (a) => new T(4, a), H.s40be = (a) => new T(5, a), H.s48be = (a) => new T(6, a), H.ns64be = (a) => new q(a), H.f32 = (a) => new X(a), H.f32be = (a) => new D(a), H.f64 = (a) => new F(a), H.f64be = (a) => new Y(a), H.struct = (a, l, b) => new J(a, l, b), H.bits = (a, l, b) => new p(a, l, b), H.seq = (a, l, b) => new Z(a, l, b), H.union = (a, l, b) => new Q(a, l, b), H.unionLayoutDiscriminator = (a, l) => new V(a, l), H.blob = (a, l) => new x(a, l), H.cstr = (a) => new E(a), H.utf8 = (a, l) => new C(a, l), H.constant = (a, l) => new v(a, l), H;
|
|
5056
5056
|
}
|
|
5057
5057
|
var P = vu(), sr = {}, Zs;
|
|
5058
5058
|
function Su() {
|
|
@@ -5089,7 +5089,7 @@ function Su() {
|
|
|
5089
5089
|
}
|
|
5090
5090
|
return sr.toBufferBE = r, sr;
|
|
5091
5091
|
}
|
|
5092
|
-
var
|
|
5092
|
+
var Li = Su();
|
|
5093
5093
|
class xu extends TypeError {
|
|
5094
5094
|
constructor(t, e) {
|
|
5095
5095
|
let r;
|
|
@@ -5106,7 +5106,7 @@ function Qr(n) {
|
|
|
5106
5106
|
function vn(n) {
|
|
5107
5107
|
return Qr(n) && !Array.isArray(n);
|
|
5108
5108
|
}
|
|
5109
|
-
function
|
|
5109
|
+
function Ce(n) {
|
|
5110
5110
|
return typeof n == "symbol" ? n.toString() : typeof n == "string" ? JSON.stringify(n) : `${n}`;
|
|
5111
5111
|
}
|
|
5112
5112
|
function Eu(n) {
|
|
@@ -5117,7 +5117,7 @@ function Au(n, t, e, r) {
|
|
|
5117
5117
|
if (n === !0)
|
|
5118
5118
|
return;
|
|
5119
5119
|
n === !1 ? n = {} : typeof n == "string" && (n = { message: n });
|
|
5120
|
-
const { path: s, branch: i } = t, { type: o } = e, { refinement: u, message: f = `Expected a value of type \`${o}\`${u ? ` with refinement \`${u}\`` : ""}, but received: \`${
|
|
5120
|
+
const { path: s, branch: i } = t, { type: o } = e, { refinement: u, message: f = `Expected a value of type \`${o}\`${u ? ` with refinement \`${u}\`` : ""}, but received: \`${Ce(r)}\`` } = n;
|
|
5121
5121
|
return {
|
|
5122
5122
|
value: r,
|
|
5123
5123
|
type: o,
|
|
@@ -5255,7 +5255,7 @@ function st(n) {
|
|
|
5255
5255
|
return Array.isArray(t) ? t.slice() : t;
|
|
5256
5256
|
},
|
|
5257
5257
|
validator(t) {
|
|
5258
|
-
return Array.isArray(t) || `Expected an array value, but received: ${
|
|
5258
|
+
return Array.isArray(t) || `Expected an array value, but received: ${Ce(t)}`;
|
|
5259
5259
|
}
|
|
5260
5260
|
});
|
|
5261
5261
|
}
|
|
@@ -5263,15 +5263,15 @@ function De() {
|
|
|
5263
5263
|
return mr("boolean", (n) => typeof n == "boolean");
|
|
5264
5264
|
}
|
|
5265
5265
|
function Qi(n) {
|
|
5266
|
-
return mr("instance", (t) => t instanceof n || `Expected a \`${n.name}\` instance, but received: ${
|
|
5266
|
+
return mr("instance", (t) => t instanceof n || `Expected a \`${n.name}\` instance, but received: ${Ce(t)}`);
|
|
5267
5267
|
}
|
|
5268
5268
|
function Wt(n) {
|
|
5269
|
-
const t =
|
|
5269
|
+
const t = Ce(n), e = typeof n;
|
|
5270
5270
|
return new $e({
|
|
5271
5271
|
type: "literal",
|
|
5272
5272
|
schema: e === "string" || e === "number" || e === "boolean" ? n : null,
|
|
5273
5273
|
validator(r) {
|
|
5274
|
-
return r === n || `Expected the literal \`${t}\`, but received: ${
|
|
5274
|
+
return r === n || `Expected the literal \`${t}\`, but received: ${Ce(r)}`;
|
|
5275
5275
|
}
|
|
5276
5276
|
});
|
|
5277
5277
|
}
|
|
@@ -5286,9 +5286,9 @@ function ot(n) {
|
|
|
5286
5286
|
});
|
|
5287
5287
|
}
|
|
5288
5288
|
function W() {
|
|
5289
|
-
return mr("number", (n) => typeof n == "number" && !isNaN(n) || `Expected a number, but received: ${
|
|
5289
|
+
return mr("number", (n) => typeof n == "number" && !isNaN(n) || `Expected a number, but received: ${Ce(n)}`);
|
|
5290
5290
|
}
|
|
5291
|
-
function
|
|
5291
|
+
function ut(n) {
|
|
5292
5292
|
return new $e({
|
|
5293
5293
|
...n,
|
|
5294
5294
|
validator: (t, e) => t === void 0 || n.validator(t, e),
|
|
@@ -5307,7 +5307,7 @@ function Qo(n, t) {
|
|
|
5307
5307
|
}
|
|
5308
5308
|
},
|
|
5309
5309
|
validator(e) {
|
|
5310
|
-
return vn(e) || `Expected an object, but received: ${
|
|
5310
|
+
return vn(e) || `Expected an object, but received: ${Ce(e)}`;
|
|
5311
5311
|
},
|
|
5312
5312
|
coercer(e) {
|
|
5313
5313
|
return vn(e) ? { ...e } : e;
|
|
@@ -5315,7 +5315,7 @@ function Qo(n, t) {
|
|
|
5315
5315
|
});
|
|
5316
5316
|
}
|
|
5317
5317
|
function et() {
|
|
5318
|
-
return mr("string", (n) => typeof n == "string" || `Expected a string, but received: ${
|
|
5318
|
+
return mr("string", (n) => typeof n == "string" || `Expected a string, but received: ${Ce(n)}`);
|
|
5319
5319
|
}
|
|
5320
5320
|
function ts(n) {
|
|
5321
5321
|
const t = Ru();
|
|
@@ -5330,7 +5330,7 @@ function ts(n) {
|
|
|
5330
5330
|
}
|
|
5331
5331
|
},
|
|
5332
5332
|
validator(e) {
|
|
5333
|
-
return Array.isArray(e) || `Expected an array, but received: ${
|
|
5333
|
+
return Array.isArray(e) || `Expected an array, but received: ${Ce(e)}`;
|
|
5334
5334
|
},
|
|
5335
5335
|
coercer(e) {
|
|
5336
5336
|
return Array.isArray(e) ? e.slice() : e;
|
|
@@ -5348,7 +5348,7 @@ function tt(n) {
|
|
|
5348
5348
|
yield [r, e[r], n[r]];
|
|
5349
5349
|
},
|
|
5350
5350
|
validator(e) {
|
|
5351
|
-
return vn(e) || `Expected an object, but received: ${
|
|
5351
|
+
return vn(e) || `Expected an object, but received: ${Ce(e)}`;
|
|
5352
5352
|
},
|
|
5353
5353
|
coercer(e) {
|
|
5354
5354
|
return vn(e) ? { ...e } : e;
|
|
@@ -5382,13 +5382,13 @@ function xe(n) {
|
|
|
5382
5382
|
return [];
|
|
5383
5383
|
}
|
|
5384
5384
|
return [
|
|
5385
|
-
`Expected the value to satisfy a union of \`${t}\`, but received: ${
|
|
5385
|
+
`Expected the value to satisfy a union of \`${t}\`, but received: ${Ce(e)}`,
|
|
5386
5386
|
...s
|
|
5387
5387
|
];
|
|
5388
5388
|
}
|
|
5389
5389
|
});
|
|
5390
5390
|
}
|
|
5391
|
-
function
|
|
5391
|
+
function Cr() {
|
|
5392
5392
|
return mr("unknown", () => !0);
|
|
5393
5393
|
}
|
|
5394
5394
|
function en(n, t, e) {
|
|
@@ -5443,16 +5443,16 @@ function ea(n) {
|
|
|
5443
5443
|
var t, e = new Uint8Array(16);
|
|
5444
5444
|
return e[0] = (t = parseInt(n.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(n.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(n.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(n.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(n.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
|
|
5445
5445
|
}
|
|
5446
|
-
function
|
|
5446
|
+
function Lu(n) {
|
|
5447
5447
|
n = unescape(encodeURIComponent(n));
|
|
5448
5448
|
for (var t = [], e = 0; e < n.length; ++e)
|
|
5449
5449
|
t.push(n.charCodeAt(e));
|
|
5450
5450
|
return t;
|
|
5451
5451
|
}
|
|
5452
|
-
var
|
|
5452
|
+
var Cu = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Ou = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
5453
5453
|
function ra(n, t, e) {
|
|
5454
5454
|
function r(s, i, o, u) {
|
|
5455
|
-
if (typeof s == "string" && (s =
|
|
5455
|
+
if (typeof s == "string" && (s = Lu(s)), typeof i == "string" && (i = ea(i)), i.length !== 16)
|
|
5456
5456
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
5457
5457
|
var f = new Uint8Array(16 + s.length);
|
|
5458
5458
|
if (f.set(i), f.set(s, i.length), f = e(f), f[6] = f[6] & 15 | t, f[8] = f[8] & 63 | 128, o) {
|
|
@@ -5467,7 +5467,7 @@ function ra(n, t, e) {
|
|
|
5467
5467
|
r.name = n;
|
|
5468
5468
|
} catch {
|
|
5469
5469
|
}
|
|
5470
|
-
return r.DNS =
|
|
5470
|
+
return r.DNS = Cu, r.URL = Ou, r;
|
|
5471
5471
|
}
|
|
5472
5472
|
function Uu(n) {
|
|
5473
5473
|
if (typeof n == "string") {
|
|
@@ -5570,8 +5570,8 @@ function $u(n) {
|
|
|
5570
5570
|
for (var k = 0; k < o; ++k) {
|
|
5571
5571
|
for (var T = new Uint32Array(80), R = 0; R < 16; ++R)
|
|
5572
5572
|
T[R] = u[k][R];
|
|
5573
|
-
for (var
|
|
5574
|
-
T[
|
|
5573
|
+
for (var L = 16; L < 80; ++L)
|
|
5574
|
+
T[L] = wi(T[L - 3] ^ T[L - 8] ^ T[L - 14] ^ T[L - 16], 1);
|
|
5575
5575
|
for (var B = e[0], M = e[1], O = e[2], $ = e[3], q = e[4], X = 0; X < 80; ++X) {
|
|
5576
5576
|
var D = Math.floor(X / 20), F = wi(B, 5) + Du(D, M, O, $) + q + t[D] + T[X] >>> 0;
|
|
5577
5577
|
q = $, $ = O, O = wi(M, 30) >>> 0, M = B, B = F;
|
|
@@ -5720,8 +5720,8 @@ function Qu() {
|
|
|
5720
5720
|
function i(f, g, w, k, T) {
|
|
5721
5721
|
if (typeof w != "function")
|
|
5722
5722
|
throw new TypeError("The listener must be a function");
|
|
5723
|
-
var R = new s(w, k || f, T),
|
|
5724
|
-
return f._events[
|
|
5723
|
+
var R = new s(w, k || f, T), L = e ? e + g : g;
|
|
5724
|
+
return f._events[L] ? f._events[L].fn ? f._events[L] = [f._events[L], R] : f._events[L].push(R) : (f._events[L] = R, f._eventsCount++), f;
|
|
5725
5725
|
}
|
|
5726
5726
|
function o(f, g) {
|
|
5727
5727
|
--f._eventsCount === 0 ? f._events = new r() : delete f._events[g];
|
|
@@ -5739,13 +5739,13 @@ function Qu() {
|
|
|
5739
5739
|
var w = e ? e + g : g, k = this._events[w];
|
|
5740
5740
|
if (!k) return [];
|
|
5741
5741
|
if (k.fn) return [k.fn];
|
|
5742
|
-
for (var T = 0, R = k.length,
|
|
5743
|
-
|
|
5744
|
-
return
|
|
5742
|
+
for (var T = 0, R = k.length, L = new Array(R); T < R; T++)
|
|
5743
|
+
L[T] = k[T].fn;
|
|
5744
|
+
return L;
|
|
5745
5745
|
}, u.prototype.listenerCount = function(g) {
|
|
5746
5746
|
var w = e ? e + g : g, k = this._events[w];
|
|
5747
5747
|
return k ? k.fn ? 1 : k.length : 0;
|
|
5748
|
-
}, u.prototype.emit = function(g, w, k, T, R,
|
|
5748
|
+
}, u.prototype.emit = function(g, w, k, T, R, L) {
|
|
5749
5749
|
var B = e ? e + g : g;
|
|
5750
5750
|
if (!this._events[B]) return !1;
|
|
5751
5751
|
var M = this._events[B], O = arguments.length, $, q;
|
|
@@ -5762,7 +5762,7 @@ function Qu() {
|
|
|
5762
5762
|
case 5:
|
|
5763
5763
|
return M.fn.call(M.context, w, k, T, R), !0;
|
|
5764
5764
|
case 6:
|
|
5765
|
-
return M.fn.call(M.context, w, k, T, R,
|
|
5765
|
+
return M.fn.call(M.context, w, k, T, R, L), !0;
|
|
5766
5766
|
}
|
|
5767
5767
|
for (q = 1, $ = new Array(O - 1); q < O; q++)
|
|
5768
5768
|
$[q - 1] = arguments[q];
|
|
@@ -5799,12 +5799,12 @@ function Qu() {
|
|
|
5799
5799
|
if (!this._events[R]) return this;
|
|
5800
5800
|
if (!w)
|
|
5801
5801
|
return o(this, R), this;
|
|
5802
|
-
var
|
|
5803
|
-
if (
|
|
5804
|
-
|
|
5802
|
+
var L = this._events[R];
|
|
5803
|
+
if (L.fn)
|
|
5804
|
+
L.fn === w && (!T || L.once) && (!k || L.context === k) && o(this, R);
|
|
5805
5805
|
else {
|
|
5806
|
-
for (var B = 0, M = [], O =
|
|
5807
|
-
(
|
|
5806
|
+
for (var B = 0, M = [], O = L.length; B < O; B++)
|
|
5807
|
+
(L[B].fn !== w || T && !L[B].once || k && L[B].context !== k) && M.push(L[B]);
|
|
5808
5808
|
M.length ? this._events[R] = M.length === 1 ? M[0] : M : o(this, R);
|
|
5809
5809
|
}
|
|
5810
5810
|
return this;
|
|
@@ -6074,7 +6074,7 @@ var nl = class {
|
|
|
6074
6074
|
clearTimeout(this.reconnect_timer_id), this.socket = this.webSocketFactory(t, e), this.socket.addEventListener("open", () => {
|
|
6075
6075
|
this.ready = !0, this.emit("open"), this.current_reconnects = 0;
|
|
6076
6076
|
}), this.socket.addEventListener("message", ({ data: r }) => {
|
|
6077
|
-
r instanceof ArrayBuffer && (r =
|
|
6077
|
+
r instanceof ArrayBuffer && (r = lt.Buffer.from(r).toString());
|
|
6078
6078
|
try {
|
|
6079
6079
|
r = this.dataPack.decode(r);
|
|
6080
6080
|
} catch {
|
|
@@ -6151,7 +6151,7 @@ class es extends Hi {
|
|
|
6151
6151
|
this.state = new Uint8Array(200), this.state32 = Xa(this.state);
|
|
6152
6152
|
}
|
|
6153
6153
|
keccak() {
|
|
6154
|
-
|
|
6154
|
+
Cs || Os(this.state32), fl(this.state32, this.rounds), Cs || Os(this.state32), this.posOut = 0, this.pos = 0;
|
|
6155
6155
|
}
|
|
6156
6156
|
update(t) {
|
|
6157
6157
|
Er(this);
|
|
@@ -6269,7 +6269,7 @@ function pl(n) {
|
|
|
6269
6269
|
}
|
|
6270
6270
|
return Object.freeze({ ...t });
|
|
6271
6271
|
}
|
|
6272
|
-
const { bytesToNumberBE: gl, hexToBytes: yl } =
|
|
6272
|
+
const { bytesToNumberBE: gl, hexToBytes: yl } = Cc, ur = {
|
|
6273
6273
|
// asn.1 DER encoding utils
|
|
6274
6274
|
Err: class extends Error {
|
|
6275
6275
|
constructor(t = "") {
|
|
@@ -6314,44 +6314,44 @@ BigInt(2);
|
|
|
6314
6314
|
const io = BigInt(3);
|
|
6315
6315
|
BigInt(4);
|
|
6316
6316
|
function ml(n) {
|
|
6317
|
-
const t = pl(n), { Fp: e } = t, r = t.toBytes || ((
|
|
6317
|
+
const t = pl(n), { Fp: e } = t, r = t.toBytes || ((L, B, M) => {
|
|
6318
6318
|
const O = B.toAffine();
|
|
6319
6319
|
return pr(Uint8Array.from([4]), e.toBytes(O.x), e.toBytes(O.y));
|
|
6320
|
-
}), s = t.fromBytes || ((
|
|
6321
|
-
const B =
|
|
6320
|
+
}), s = t.fromBytes || ((L) => {
|
|
6321
|
+
const B = L.subarray(1), M = e.fromBytes(B.subarray(0, e.BYTES)), O = e.fromBytes(B.subarray(e.BYTES, 2 * e.BYTES));
|
|
6322
6322
|
return { x: M, y: O };
|
|
6323
6323
|
});
|
|
6324
|
-
function i(
|
|
6325
|
-
const { a: B, b: M } = t, O = e.sqr(
|
|
6326
|
-
return e.add(e.add($, e.mul(
|
|
6324
|
+
function i(L) {
|
|
6325
|
+
const { a: B, b: M } = t, O = e.sqr(L), $ = e.mul(O, L);
|
|
6326
|
+
return e.add(e.add($, e.mul(L, B)), M);
|
|
6327
6327
|
}
|
|
6328
6328
|
if (!e.eql(e.sqr(t.Gy), i(t.Gx)))
|
|
6329
6329
|
throw new Error("bad generator point: equation left != right");
|
|
6330
|
-
function o(
|
|
6331
|
-
return typeof
|
|
6330
|
+
function o(L) {
|
|
6331
|
+
return typeof L == "bigint" && Ge < L && L < t.n;
|
|
6332
6332
|
}
|
|
6333
|
-
function u(
|
|
6334
|
-
if (!o(
|
|
6333
|
+
function u(L) {
|
|
6334
|
+
if (!o(L))
|
|
6335
6335
|
throw new Error("Expected valid bigint: 0 < bigint < curve.n");
|
|
6336
6336
|
}
|
|
6337
|
-
function f(
|
|
6337
|
+
function f(L) {
|
|
6338
6338
|
const { allowedPrivateKeyLengths: B, nByteLength: M, wrapPrivateKey: O, n: $ } = t;
|
|
6339
|
-
if (B && typeof
|
|
6340
|
-
if (fr(
|
|
6339
|
+
if (B && typeof L != "bigint") {
|
|
6340
|
+
if (fr(L) && (L = dr(L)), typeof L != "string" || !B.includes(L.length))
|
|
6341
6341
|
throw new Error("Invalid key");
|
|
6342
|
-
|
|
6342
|
+
L = L.padStart(M * 2, "0");
|
|
6343
6343
|
}
|
|
6344
6344
|
let q;
|
|
6345
6345
|
try {
|
|
6346
|
-
q = typeof
|
|
6346
|
+
q = typeof L == "bigint" ? L : hr(he("private key", L, M));
|
|
6347
6347
|
} catch {
|
|
6348
|
-
throw new Error(`private key must be ${M} bytes, hex or bigint, not ${typeof
|
|
6348
|
+
throw new Error(`private key must be ${M} bytes, hex or bigint, not ${typeof L}`);
|
|
6349
6349
|
}
|
|
6350
6350
|
return O && (q = Kt(q, $)), u(q), q;
|
|
6351
6351
|
}
|
|
6352
6352
|
const g = /* @__PURE__ */ new Map();
|
|
6353
|
-
function w(
|
|
6354
|
-
if (!(
|
|
6353
|
+
function w(L) {
|
|
6354
|
+
if (!(L instanceof k))
|
|
6355
6355
|
throw new Error("ProjectivePoint expected");
|
|
6356
6356
|
}
|
|
6357
6357
|
class k {
|
|
@@ -6597,8 +6597,8 @@ function bl(n) {
|
|
|
6597
6597
|
const { ProjectivePoint: g, normPrivateKeyToScalar: w, weierstrassEquation: k, isWithinCurveOrder: T } = ml({
|
|
6598
6598
|
...t,
|
|
6599
6599
|
toBytes(p, y, A) {
|
|
6600
|
-
const x = y.toAffine(), E = e.toBytes(x.x),
|
|
6601
|
-
return A ?
|
|
6600
|
+
const x = y.toAffine(), E = e.toBytes(x.x), C = pr;
|
|
6601
|
+
return A ? C(Uint8Array.from([y.hasEvenY() ? 2 : 3]), E) : C(Uint8Array.from([4]), E, e.toBytes(x.y));
|
|
6602
6602
|
},
|
|
6603
6603
|
fromBytes(p) {
|
|
6604
6604
|
const y = p.length, A = p[0], x = p.subarray(1);
|
|
@@ -6606,10 +6606,10 @@ function bl(n) {
|
|
|
6606
6606
|
const E = hr(x);
|
|
6607
6607
|
if (!o(E))
|
|
6608
6608
|
throw new Error("Point is not on curve");
|
|
6609
|
-
const
|
|
6609
|
+
const C = k(E);
|
|
6610
6610
|
let v;
|
|
6611
6611
|
try {
|
|
6612
|
-
v = e.sqrt(
|
|
6612
|
+
v = e.sqrt(C);
|
|
6613
6613
|
} catch (b) {
|
|
6614
6614
|
const S = b instanceof Error ? ": " + b.message : "";
|
|
6615
6615
|
throw new Error("Point is not on curve" + S);
|
|
@@ -6617,18 +6617,18 @@ function bl(n) {
|
|
|
6617
6617
|
const a = (v & Me) === Me;
|
|
6618
6618
|
return (A & 1) === 1 !== a && (v = e.neg(v)), { x: E, y: v };
|
|
6619
6619
|
} else if (y === i && A === 4) {
|
|
6620
|
-
const E = e.fromBytes(x.subarray(0, e.BYTES)),
|
|
6621
|
-
return { x: E, y:
|
|
6620
|
+
const E = e.fromBytes(x.subarray(0, e.BYTES)), C = e.fromBytes(x.subarray(e.BYTES, 2 * e.BYTES));
|
|
6621
|
+
return { x: E, y: C };
|
|
6622
6622
|
} else
|
|
6623
6623
|
throw new Error(`Point of length ${y} was invalid. Expected ${s} compressed bytes or ${i} uncompressed bytes`);
|
|
6624
6624
|
}
|
|
6625
6625
|
}), R = (p) => dr(_r(p, t.nByteLength));
|
|
6626
|
-
function
|
|
6626
|
+
function L(p) {
|
|
6627
6627
|
const y = r >> Me;
|
|
6628
6628
|
return p > y;
|
|
6629
6629
|
}
|
|
6630
6630
|
function B(p) {
|
|
6631
|
-
return
|
|
6631
|
+
return L(p) ? u(-p) : p;
|
|
6632
6632
|
}
|
|
6633
6633
|
const M = (p, y, A) => hr(p.slice(y, A));
|
|
6634
6634
|
class O {
|
|
@@ -6656,20 +6656,20 @@ function bl(n) {
|
|
|
6656
6656
|
return new O(this.r, this.s, y);
|
|
6657
6657
|
}
|
|
6658
6658
|
recoverPublicKey(y) {
|
|
6659
|
-
const { r: A, s: x, recovery: E } = this,
|
|
6659
|
+
const { r: A, s: x, recovery: E } = this, C = Y(he("msgHash", y));
|
|
6660
6660
|
if (E == null || ![0, 1, 2, 3].includes(E))
|
|
6661
6661
|
throw new Error("recovery id invalid");
|
|
6662
6662
|
const v = E === 2 || E === 3 ? A + t.n : A;
|
|
6663
6663
|
if (v >= e.ORDER)
|
|
6664
6664
|
throw new Error("recovery id 2 or 3 invalid");
|
|
6665
|
-
const a = E & 1 ? "03" : "02", l = g.fromHex(a + R(v)), b = f(v), S = u(-
|
|
6665
|
+
const a = E & 1 ? "03" : "02", l = g.fromHex(a + R(v)), b = f(v), S = u(-C * b), U = u(x * b), j = g.BASE.multiplyAndAddUnsafe(l, S, U);
|
|
6666
6666
|
if (!j)
|
|
6667
6667
|
throw new Error("point at infinify");
|
|
6668
6668
|
return j.assertValidity(), j;
|
|
6669
6669
|
}
|
|
6670
6670
|
// Signatures should be low-s, to prevent malleability.
|
|
6671
6671
|
hasHighS() {
|
|
6672
|
-
return
|
|
6672
|
+
return L(this.s);
|
|
6673
6673
|
}
|
|
6674
6674
|
normalizeS() {
|
|
6675
6675
|
return this.hasHighS() ? new O(this.r, u(-this.s), this.recovery) : this;
|
|
@@ -6749,8 +6749,8 @@ function bl(n) {
|
|
|
6749
6749
|
if (["recovered", "canonical"].some((at) => at in A))
|
|
6750
6750
|
throw new Error("sign() legacy options not supported");
|
|
6751
6751
|
const { hash: x, randomBytes: E } = t;
|
|
6752
|
-
let { lowS:
|
|
6753
|
-
|
|
6752
|
+
let { lowS: C, prehash: v, extraEntropy: a } = A;
|
|
6753
|
+
C == null && (C = !0), p = he("msgHash", p), v && (p = he("prehashed msgHash", x(p)));
|
|
6754
6754
|
const l = Y(p), b = w(y), S = [J(b), J(l)];
|
|
6755
6755
|
if (a != null && a !== !1) {
|
|
6756
6756
|
const at = a === !0 ? E(e.BYTES) : a;
|
|
@@ -6768,14 +6768,14 @@ function bl(n) {
|
|
|
6768
6768
|
if (kt === Ge)
|
|
6769
6769
|
return;
|
|
6770
6770
|
let _t = (bt.x === Et ? 0 : 2) | Number(bt.y & Me), Ue = kt;
|
|
6771
|
-
return
|
|
6771
|
+
return C && L(kt) && (Ue = B(kt), _t ^= 1), new O(Et, Ue, _t);
|
|
6772
6772
|
}
|
|
6773
6773
|
return { seed: U, k2sig: rt };
|
|
6774
6774
|
}
|
|
6775
6775
|
const V = { lowS: t.lowS, prehash: !1 }, Q = { lowS: t.lowS, prehash: !1 };
|
|
6776
6776
|
function I(p, y, A = V) {
|
|
6777
|
-
const { seed: x, k2sig: E } = K(p, y, A),
|
|
6778
|
-
return Do(
|
|
6777
|
+
const { seed: x, k2sig: E } = K(p, y, A), C = t;
|
|
6778
|
+
return Do(C.hash.outputLen, C.nByteLength, C.hmac)(x, E);
|
|
6779
6779
|
}
|
|
6780
6780
|
g.BASE._setWindowSize(8);
|
|
6781
6781
|
function c(p, y, A, x = Q) {
|
|
@@ -6783,7 +6783,7 @@ function bl(n) {
|
|
|
6783
6783
|
const E = p;
|
|
6784
6784
|
if (y = he("msgHash", y), A = he("publicKey", A), "strict" in x)
|
|
6785
6785
|
throw new Error("options.strict was renamed to lowS");
|
|
6786
|
-
const { lowS:
|
|
6786
|
+
const { lowS: C, prehash: v } = x;
|
|
6787
6787
|
let a, l;
|
|
6788
6788
|
try {
|
|
6789
6789
|
if (typeof E == "string" || fr(E))
|
|
@@ -6805,7 +6805,7 @@ function bl(n) {
|
|
|
6805
6805
|
throw new Error("signature must be Signature instance, Uint8Array or hex string");
|
|
6806
6806
|
return !1;
|
|
6807
6807
|
}
|
|
6808
|
-
if (
|
|
6808
|
+
if (C && a.hasHighS())
|
|
6809
6809
|
return !1;
|
|
6810
6810
|
v && (y = t.hash(y));
|
|
6811
6811
|
const { r: b, s: S } = a, U = Y(y), j = f(S), rt = u(U * j), at = u(b * j), xt = (bt = g.BASE.multiplyAndAddUnsafe(l, rt, at)) == null ? void 0 : bt.toAffine();
|
|
@@ -6827,7 +6827,7 @@ function kl(n) {
|
|
|
6827
6827
|
return {
|
|
6828
6828
|
hash: n,
|
|
6829
6829
|
hmac: (t, ...e) => la(n, t, ec(...e)),
|
|
6830
|
-
randomBytes:
|
|
6830
|
+
randomBytes: Lo
|
|
6831
6831
|
};
|
|
6832
6832
|
}
|
|
6833
6833
|
function vl(n, t) {
|
|
@@ -6835,9 +6835,9 @@ function vl(n, t) {
|
|
|
6835
6835
|
return Object.freeze({ ...e(t), create: e });
|
|
6836
6836
|
}
|
|
6837
6837
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
6838
|
-
const ha = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), so = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), Sl = BigInt(1),
|
|
6838
|
+
const ha = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), so = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), Sl = BigInt(1), Ci = BigInt(2), oo = (n, t) => (n + t / Ci) / t;
|
|
6839
6839
|
function xl(n) {
|
|
6840
|
-
const t = ha, e = BigInt(3), r = BigInt(6), s = BigInt(11), i = BigInt(22), o = BigInt(23), u = BigInt(44), f = BigInt(88), g = n * n * n % t, w = g * g * n % t, k = Ht(w, e, t) * w % t, T = Ht(k, e, t) * w % t, R = Ht(T,
|
|
6840
|
+
const t = ha, e = BigInt(3), r = BigInt(6), s = BigInt(11), i = BigInt(22), o = BigInt(23), u = BigInt(44), f = BigInt(88), g = n * n * n % t, w = g * g * n % t, k = Ht(w, e, t) * w % t, T = Ht(k, e, t) * w % t, R = Ht(T, Ci, t) * g % t, L = Ht(R, s, t) * R % t, B = Ht(L, i, t) * L % t, M = Ht(B, u, t) * B % t, O = Ht(M, f, t) * M % t, $ = Ht(O, u, t) * B % t, q = Ht($, e, t) * w % t, X = Ht(q, o, t) * L % t, D = Ht(X, r, t) * g % t, F = Ht(D, Ci, t);
|
|
6841
6841
|
if (!Oi.eql(Oi.sqr(F), n))
|
|
6842
6842
|
throw new Error("Cannot find square root");
|
|
6843
6843
|
return F;
|
|
@@ -6878,27 +6878,27 @@ const Oi = Ho(ha, void 0, void 0, { sqrt: xl }), Tn = vl({
|
|
|
6878
6878
|
}, Pi);
|
|
6879
6879
|
BigInt(0);
|
|
6880
6880
|
Tn.ProjectivePoint;
|
|
6881
|
-
const Il =
|
|
6882
|
-
const n =
|
|
6881
|
+
const Il = Lr.utils.randomPrivateKey, ao = () => {
|
|
6882
|
+
const n = Lr.utils.randomPrivateKey(), t = Sn(n), e = new Uint8Array(64);
|
|
6883
6883
|
return e.set(n), e.set(t, 32), {
|
|
6884
6884
|
publicKey: t,
|
|
6885
6885
|
secretKey: e
|
|
6886
6886
|
};
|
|
6887
|
-
}, Sn =
|
|
6887
|
+
}, Sn = Lr.getPublicKey;
|
|
6888
6888
|
function co(n) {
|
|
6889
6889
|
try {
|
|
6890
|
-
return
|
|
6890
|
+
return Lr.ExtendedPoint.fromHex(n), !0;
|
|
6891
6891
|
} catch {
|
|
6892
6892
|
return !1;
|
|
6893
6893
|
}
|
|
6894
6894
|
}
|
|
6895
|
-
const rs = (n, t) =>
|
|
6895
|
+
const rs = (n, t) => Lr.sign(n, t.slice(0, 32)), El = Lr.verify, wt = (n) => lt.Buffer.isBuffer(n) ? n : n instanceof Uint8Array ? lt.Buffer.from(n.buffer, n.byteOffset, n.byteLength) : lt.Buffer.from(n);
|
|
6896
6896
|
class ns {
|
|
6897
6897
|
constructor(t) {
|
|
6898
6898
|
Object.assign(this, t);
|
|
6899
6899
|
}
|
|
6900
6900
|
encode() {
|
|
6901
|
-
return
|
|
6901
|
+
return lt.Buffer.from(di.serialize(Wr, this));
|
|
6902
6902
|
}
|
|
6903
6903
|
static decode(t) {
|
|
6904
6904
|
return di.deserialize(Wr, this, t);
|
|
@@ -6980,10 +6980,10 @@ class nt extends ns {
|
|
|
6980
6980
|
* Return the Buffer representation of the public key in big endian
|
|
6981
6981
|
*/
|
|
6982
6982
|
toBuffer() {
|
|
6983
|
-
const t = this._bn.toArrayLike(
|
|
6983
|
+
const t = this._bn.toArrayLike(lt.Buffer);
|
|
6984
6984
|
if (t.length === We)
|
|
6985
6985
|
return t;
|
|
6986
|
-
const e =
|
|
6986
|
+
const e = lt.Buffer.alloc(32);
|
|
6987
6987
|
return t.copy(e, 32 - t.length), e;
|
|
6988
6988
|
}
|
|
6989
6989
|
get [Symbol.toStringTag]() {
|
|
@@ -7002,7 +7002,7 @@ class nt extends ns {
|
|
|
7002
7002
|
*/
|
|
7003
7003
|
/* eslint-disable require-await */
|
|
7004
7004
|
static async createWithSeed(t, e, r) {
|
|
7005
|
-
const s =
|
|
7005
|
+
const s = lt.Buffer.concat([t.toBuffer(), lt.Buffer.from(e), r.toBuffer()]), i = Pi(s);
|
|
7006
7006
|
return new nt(i);
|
|
7007
7007
|
}
|
|
7008
7008
|
/**
|
|
@@ -7010,12 +7010,12 @@ class nt extends ns {
|
|
|
7010
7010
|
*/
|
|
7011
7011
|
/* eslint-disable require-await */
|
|
7012
7012
|
static createProgramAddressSync(t, e) {
|
|
7013
|
-
let r =
|
|
7013
|
+
let r = lt.Buffer.alloc(0);
|
|
7014
7014
|
t.forEach(function(i) {
|
|
7015
7015
|
if (i.length > da)
|
|
7016
7016
|
throw new TypeError("Max seed length exceeded");
|
|
7017
|
-
r =
|
|
7018
|
-
}), r =
|
|
7017
|
+
r = lt.Buffer.concat([r, wt(i)]);
|
|
7018
|
+
}), r = lt.Buffer.concat([r, e.toBuffer(), lt.Buffer.from("ProgramDerivedAddress")]);
|
|
7019
7019
|
const s = Pi(r);
|
|
7020
7020
|
if (co(s))
|
|
7021
7021
|
throw new Error("Invalid seeds, address must fall off the curve");
|
|
@@ -7042,7 +7042,7 @@ class nt extends ns {
|
|
|
7042
7042
|
let r = 255, s;
|
|
7043
7043
|
for (; r != 0; ) {
|
|
7044
7044
|
try {
|
|
7045
|
-
const i = t.concat(
|
|
7045
|
+
const i = t.concat(lt.Buffer.from([r]));
|
|
7046
7046
|
s = this.createProgramAddressSync(i, e);
|
|
7047
7047
|
} catch (i) {
|
|
7048
7048
|
if (i instanceof TypeError)
|
|
@@ -7107,7 +7107,7 @@ class Bl {
|
|
|
7107
7107
|
* Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/
|
|
7108
7108
|
*/
|
|
7109
7109
|
get secretKey() {
|
|
7110
|
-
return
|
|
7110
|
+
return lt.Buffer.concat([this._secretKey, this._publicKey], 64);
|
|
7111
7111
|
}
|
|
7112
7112
|
}
|
|
7113
7113
|
const Rl = new nt("BPFLoader1111111111111111111111111111111111"), ir = 1232, Pn = 127, $r = 64;
|
|
@@ -7176,11 +7176,11 @@ const vt = (n = "publicKey") => P.blob(32, n), Ml = (n = "signature") => P.blob(
|
|
|
7176
7176
|
const t = P.struct([P.u32("length"), P.u32("lengthPadding"), P.blob(P.offset(P.u32(), -8), "chars")], n), e = t.decode.bind(t), r = t.encode.bind(t), s = t;
|
|
7177
7177
|
return s.decode = (i, o) => e(i, o).chars.toString(), s.encode = (i, o, u) => {
|
|
7178
7178
|
const f = {
|
|
7179
|
-
chars:
|
|
7179
|
+
chars: lt.Buffer.from(i, "utf8")
|
|
7180
7180
|
};
|
|
7181
7181
|
return r(f, o, u);
|
|
7182
|
-
}, s.alloc = (i) => P.u32().span + P.u32().span +
|
|
7183
|
-
}, Tl = (n = "authorized") => P.struct([vt("staker"), vt("withdrawer")], n), Pl = (n = "lockup") => P.struct([P.ns64("unixTimestamp"), P.ns64("epoch"), vt("custodian")], n),
|
|
7182
|
+
}, s.alloc = (i) => P.u32().span + P.u32().span + lt.Buffer.from(i, "utf8").length, s;
|
|
7183
|
+
}, Tl = (n = "authorized") => P.struct([vt("staker"), vt("withdrawer")], n), Pl = (n = "lockup") => P.struct([P.ns64("unixTimestamp"), P.ns64("epoch"), vt("custodian")], n), Ll = (n = "voteInit") => P.struct([vt("nodePubkey"), vt("authorizedVoter"), vt("authorizedWithdrawer"), P.u8("commission")], n), Cl = (n = "voteAuthorizeWithSeedArgs") => P.struct([P.u32("voteAuthorizationType"), vt("currentAuthorityDerivedKeyOwnerPubkey"), lr("currentAuthorityDerivedKeySeed"), vt("newAuthorized")], n);
|
|
7184
7184
|
function pa(n, t) {
|
|
7185
7185
|
const e = (s) => {
|
|
7186
7186
|
if (s.span >= 0)
|
|
@@ -7226,7 +7226,7 @@ function It(n, t) {
|
|
|
7226
7226
|
if (!n)
|
|
7227
7227
|
throw new Error(t || "Assertion failed");
|
|
7228
7228
|
}
|
|
7229
|
-
class
|
|
7229
|
+
class Ln {
|
|
7230
7230
|
constructor(t, e) {
|
|
7231
7231
|
this.payer = void 0, this.keyMetaMap = void 0, this.payer = t, this.keyMetaMap = e;
|
|
7232
7232
|
}
|
|
@@ -7248,7 +7248,7 @@ class Cn {
|
|
|
7248
7248
|
f.isSigner || (f.isSigner = u.isSigner), f.isWritable || (f.isWritable = u.isWritable);
|
|
7249
7249
|
}
|
|
7250
7250
|
}
|
|
7251
|
-
return new
|
|
7251
|
+
return new Ln(e, r);
|
|
7252
7252
|
}
|
|
7253
7253
|
getMessageComponents() {
|
|
7254
7254
|
const t = [...this.keyMetaMap.entries()];
|
|
@@ -7325,7 +7325,7 @@ class Oe {
|
|
|
7325
7325
|
return new Hr(this.staticAccountKeys);
|
|
7326
7326
|
}
|
|
7327
7327
|
static compile(t) {
|
|
7328
|
-
const e =
|
|
7328
|
+
const e = Ln.compile(t.instructions, t.payerKey), [r, s] = e.getMessageComponents(), o = new Hr(s).compileInstructions(t.instructions).map((u) => ({
|
|
7329
7329
|
programIdIndex: u.programIdIndex,
|
|
7330
7330
|
accounts: u.accountKeyIndexes,
|
|
7331
7331
|
data: de.encode(u.data)
|
|
@@ -7367,36 +7367,36 @@ class Oe {
|
|
|
7367
7367
|
const {
|
|
7368
7368
|
accounts: T,
|
|
7369
7369
|
programIdIndex: R
|
|
7370
|
-
} = k,
|
|
7370
|
+
} = k, L = Array.from(de.decode(k.data));
|
|
7371
7371
|
let B = [];
|
|
7372
7372
|
Be(B, T.length);
|
|
7373
7373
|
let M = [];
|
|
7374
|
-
return Be(M,
|
|
7374
|
+
return Be(M, L.length), {
|
|
7375
7375
|
programIdIndex: R,
|
|
7376
|
-
keyIndicesCount:
|
|
7376
|
+
keyIndicesCount: lt.Buffer.from(B),
|
|
7377
7377
|
keyIndices: T,
|
|
7378
|
-
dataLength:
|
|
7379
|
-
data:
|
|
7378
|
+
dataLength: lt.Buffer.from(M),
|
|
7379
|
+
data: L
|
|
7380
7380
|
};
|
|
7381
7381
|
});
|
|
7382
7382
|
let s = [];
|
|
7383
7383
|
Be(s, r.length);
|
|
7384
|
-
let i =
|
|
7385
|
-
|
|
7384
|
+
let i = lt.Buffer.alloc(ir);
|
|
7385
|
+
lt.Buffer.from(s).copy(i);
|
|
7386
7386
|
let o = s.length;
|
|
7387
7387
|
r.forEach((k) => {
|
|
7388
7388
|
const R = P.struct([P.u8("programIdIndex"), P.blob(k.keyIndicesCount.length, "keyIndicesCount"), P.seq(P.u8("keyIndex"), k.keyIndices.length, "keyIndices"), P.blob(k.dataLength.length, "dataLength"), P.seq(P.u8("userdatum"), k.data.length, "data")]).encode(k, i, o);
|
|
7389
7389
|
o += R;
|
|
7390
7390
|
}), i = i.slice(0, o);
|
|
7391
7391
|
const u = P.struct([P.blob(1, "numRequiredSignatures"), P.blob(1, "numReadonlySignedAccounts"), P.blob(1, "numReadonlyUnsignedAccounts"), P.blob(e.length, "keyCount"), P.seq(vt("key"), t, "keys"), vt("recentBlockhash")]), f = {
|
|
7392
|
-
numRequiredSignatures:
|
|
7393
|
-
numReadonlySignedAccounts:
|
|
7394
|
-
numReadonlyUnsignedAccounts:
|
|
7395
|
-
keyCount:
|
|
7392
|
+
numRequiredSignatures: lt.Buffer.from([this.header.numRequiredSignatures]),
|
|
7393
|
+
numReadonlySignedAccounts: lt.Buffer.from([this.header.numReadonlySignedAccounts]),
|
|
7394
|
+
numReadonlyUnsignedAccounts: lt.Buffer.from([this.header.numReadonlyUnsignedAccounts]),
|
|
7395
|
+
keyCount: lt.Buffer.from(e),
|
|
7396
7396
|
keys: this.accountKeys.map((k) => wt(k.toBytes())),
|
|
7397
7397
|
recentBlockhash: de.decode(this.recentBlockhash)
|
|
7398
7398
|
};
|
|
7399
|
-
let g =
|
|
7399
|
+
let g = lt.Buffer.alloc(2048);
|
|
7400
7400
|
const w = u.encode(f, g);
|
|
7401
7401
|
return i.copy(g, w), g.slice(0, w + i.length);
|
|
7402
7402
|
}
|
|
@@ -7412,12 +7412,12 @@ class Oe {
|
|
|
7412
7412
|
let u = [];
|
|
7413
7413
|
for (let T = 0; T < o; T++) {
|
|
7414
7414
|
const R = Ae(e, 0, We);
|
|
7415
|
-
u.push(new nt(
|
|
7415
|
+
u.push(new nt(lt.Buffer.from(R)));
|
|
7416
7416
|
}
|
|
7417
7417
|
const f = Ae(e, 0, We), g = Ee(e);
|
|
7418
7418
|
let w = [];
|
|
7419
7419
|
for (let T = 0; T < g; T++) {
|
|
7420
|
-
const R = ze(e),
|
|
7420
|
+
const R = ze(e), L = Ee(e), B = Ae(e, 0, L), M = Ee(e), O = Ae(e, 0, M), $ = de.encode(lt.Buffer.from(O));
|
|
7421
7421
|
w.push({
|
|
7422
7422
|
programIdIndex: R,
|
|
7423
7423
|
accounts: B,
|
|
@@ -7430,7 +7430,7 @@ class Oe {
|
|
|
7430
7430
|
numReadonlySignedAccounts: s,
|
|
7431
7431
|
numReadonlyUnsignedAccounts: i
|
|
7432
7432
|
},
|
|
7433
|
-
recentBlockhash: de.encode(
|
|
7433
|
+
recentBlockhash: de.encode(lt.Buffer.from(f)),
|
|
7434
7434
|
accountKeys: u,
|
|
7435
7435
|
instructions: w
|
|
7436
7436
|
};
|
|
@@ -7501,7 +7501,7 @@ class gr {
|
|
|
7501
7501
|
return e;
|
|
7502
7502
|
}
|
|
7503
7503
|
static compile(t) {
|
|
7504
|
-
const e =
|
|
7504
|
+
const e = Ln.compile(t.instructions, t.payerKey), r = new Array(), s = {
|
|
7505
7505
|
writable: new Array(),
|
|
7506
7506
|
readonly: new Array()
|
|
7507
7507
|
}, i = t.addressLookupTableAccounts || [];
|
|
@@ -7510,9 +7510,9 @@ class gr {
|
|
|
7510
7510
|
if (k !== void 0) {
|
|
7511
7511
|
const [T, {
|
|
7512
7512
|
writable: R,
|
|
7513
|
-
readonly:
|
|
7513
|
+
readonly: L
|
|
7514
7514
|
}] = k;
|
|
7515
|
-
r.push(T), s.writable.push(...R), s.readonly.push(...
|
|
7515
|
+
r.push(T), s.writable.push(...R), s.readonly.push(...L);
|
|
7516
7516
|
}
|
|
7517
7517
|
}
|
|
7518
7518
|
const [o, u] = e.getMessageComponents(), g = new Hr(u, s).compileInstructions(t.instructions);
|
|
@@ -7593,10 +7593,10 @@ class gr {
|
|
|
7593
7593
|
numReadonlySignedAccounts: ze(e),
|
|
7594
7594
|
numReadonlyUnsignedAccounts: ze(e)
|
|
7595
7595
|
}, u = [], f = Ee(e);
|
|
7596
|
-
for (let
|
|
7596
|
+
for (let L = 0; L < f; L++)
|
|
7597
7597
|
u.push(new nt(Ae(e, 0, We)));
|
|
7598
7598
|
const g = de.encode(Ae(e, 0, We)), w = Ee(e), k = [];
|
|
7599
|
-
for (let
|
|
7599
|
+
for (let L = 0; L < w; L++) {
|
|
7600
7600
|
const B = ze(e), M = Ee(e), O = Ae(e, 0, M), $ = Ee(e), q = new Uint8Array(Ae(e, 0, $));
|
|
7601
7601
|
k.push({
|
|
7602
7602
|
programIdIndex: B,
|
|
@@ -7605,7 +7605,7 @@ class gr {
|
|
|
7605
7605
|
});
|
|
7606
7606
|
}
|
|
7607
7607
|
const T = Ee(e), R = [];
|
|
7608
|
-
for (let
|
|
7608
|
+
for (let L = 0; L < T; L++) {
|
|
7609
7609
|
const B = new nt(Ae(e, 0, We)), M = Ee(e), O = Ae(e, 0, M), $ = Ee(e), q = Ae(e, 0, $);
|
|
7610
7610
|
R.push({
|
|
7611
7611
|
accountKey: B,
|
|
@@ -7639,10 +7639,10 @@ const os = {
|
|
|
7639
7639
|
let Ve = /* @__PURE__ */ function(n) {
|
|
7640
7640
|
return n[n.BLOCKHEIGHT_EXCEEDED = 0] = "BLOCKHEIGHT_EXCEEDED", n[n.PROCESSED = 1] = "PROCESSED", n[n.TIMED_OUT = 2] = "TIMED_OUT", n[n.NONCE_INVALID = 3] = "NONCE_INVALID", n;
|
|
7641
7641
|
}({});
|
|
7642
|
-
const Ol =
|
|
7643
|
-
class
|
|
7642
|
+
const Ol = lt.Buffer.alloc($r).fill(0);
|
|
7643
|
+
class Lt {
|
|
7644
7644
|
constructor(t) {
|
|
7645
|
-
this.keys = void 0, this.programId = void 0, this.data =
|
|
7645
|
+
this.keys = void 0, this.programId = void 0, this.data = lt.Buffer.alloc(0), this.programId = t.programId, this.keys = t.keys, t.data && (this.data = t.data);
|
|
7646
7646
|
}
|
|
7647
7647
|
/**
|
|
7648
7648
|
* @internal
|
|
@@ -7732,7 +7732,7 @@ class At {
|
|
|
7732
7732
|
if (t.length === 0)
|
|
7733
7733
|
throw new Error("No instructions");
|
|
7734
7734
|
return t.forEach((e) => {
|
|
7735
|
-
"instructions" in e ? this.instructions = this.instructions.concat(e.instructions) : "data" in e && "programId" in e && "keys" in e ? this.instructions.push(e) : this.instructions.push(new
|
|
7735
|
+
"instructions" in e ? this.instructions = this.instructions.concat(e.instructions) : "data" in e && "programId" in e && "keys" in e ? this.instructions.push(e) : this.instructions.push(new Lt(e));
|
|
7736
7736
|
}), this;
|
|
7737
7737
|
}
|
|
7738
7738
|
/**
|
|
@@ -7816,7 +7816,7 @@ class At {
|
|
|
7816
7816
|
}) => {
|
|
7817
7817
|
M ? (k.push(B.toString()), f += 1, O || (g += 1)) : (T.push(B.toString()), O || (w += 1));
|
|
7818
7818
|
});
|
|
7819
|
-
const R = k.concat(T),
|
|
7819
|
+
const R = k.concat(T), L = e.map((B) => {
|
|
7820
7820
|
const {
|
|
7821
7821
|
data: M,
|
|
7822
7822
|
programId: O
|
|
@@ -7827,7 +7827,7 @@ class At {
|
|
|
7827
7827
|
data: de.encode(M)
|
|
7828
7828
|
};
|
|
7829
7829
|
});
|
|
7830
|
-
return
|
|
7830
|
+
return L.forEach((B) => {
|
|
7831
7831
|
It(B.programIdIndex >= 0), B.accounts.forEach((M) => It(M >= 0));
|
|
7832
7832
|
}), new Oe({
|
|
7833
7833
|
header: {
|
|
@@ -7837,7 +7837,7 @@ class At {
|
|
|
7837
7837
|
},
|
|
7838
7838
|
accountKeys: R,
|
|
7839
7839
|
recentBlockhash: t,
|
|
7840
|
-
instructions:
|
|
7840
|
+
instructions: L
|
|
7841
7841
|
});
|
|
7842
7842
|
}
|
|
7843
7843
|
/**
|
|
@@ -7968,7 +7968,7 @@ class At {
|
|
|
7968
7968
|
const r = this.signatures.findIndex((s) => t.equals(s.publicKey));
|
|
7969
7969
|
if (r < 0)
|
|
7970
7970
|
throw new Error(`unknown signer: ${t.toString()}`);
|
|
7971
|
-
this.signatures[r].signature =
|
|
7971
|
+
this.signatures[r].signature = lt.Buffer.from(e);
|
|
7972
7972
|
}
|
|
7973
7973
|
/**
|
|
7974
7974
|
* Verify signatures of a Transaction
|
|
@@ -8026,11 +8026,11 @@ Missing signature for public key${i.missing.length === 1 ? "" : "(s)"} [\`${i.mi
|
|
|
8026
8026
|
signatures: e
|
|
8027
8027
|
} = this, r = [];
|
|
8028
8028
|
Be(r, e.length);
|
|
8029
|
-
const s = r.length + e.length * 64 + t.length, i =
|
|
8030
|
-
return It(e.length < 256),
|
|
8029
|
+
const s = r.length + e.length * 64 + t.length, i = lt.Buffer.alloc(s);
|
|
8030
|
+
return It(e.length < 256), lt.Buffer.from(r).copy(i, 0), e.forEach(({
|
|
8031
8031
|
signature: o
|
|
8032
8032
|
}, u) => {
|
|
8033
|
-
o !== null && (It(o.length === 64, "signature has invalid length"),
|
|
8033
|
+
o !== null && (It(o.length === 64, "signature has invalid length"), lt.Buffer.from(o).copy(i, r.length + u * 64));
|
|
8034
8034
|
}), t.copy(i, r.length + e.length * 64), It(i.length <= ir, `Transaction too large: ${i.length} > ${ir}`), i;
|
|
8035
8035
|
}
|
|
8036
8036
|
/**
|
|
@@ -8067,7 +8067,7 @@ Missing signature for public key${i.missing.length === 1 ? "" : "(s)"} [\`${i.mi
|
|
|
8067
8067
|
let s = [];
|
|
8068
8068
|
for (let i = 0; i < r; i++) {
|
|
8069
8069
|
const o = Ae(e, 0, $r);
|
|
8070
|
-
s.push(de.encode(
|
|
8070
|
+
s.push(de.encode(lt.Buffer.from(o)));
|
|
8071
8071
|
}
|
|
8072
8072
|
return At.populate(Oe.from(e), s);
|
|
8073
8073
|
}
|
|
@@ -8096,7 +8096,7 @@ Missing signature for public key${i.missing.length === 1 ? "" : "(s)"} [\`${i.mi
|
|
|
8096
8096
|
isWritable: t.isAccountWritable(o)
|
|
8097
8097
|
};
|
|
8098
8098
|
});
|
|
8099
|
-
r.instructions.push(new
|
|
8099
|
+
r.instructions.push(new Lt({
|
|
8100
8100
|
keys: i,
|
|
8101
8101
|
programId: t.accountKeys[s.programIdIndex],
|
|
8102
8102
|
data: de.decode(s.data)
|
|
@@ -8125,9 +8125,9 @@ class as {
|
|
|
8125
8125
|
if (T === void 0)
|
|
8126
8126
|
throw new Error("Failed to decompile message because no account keys were found");
|
|
8127
8127
|
const R = [];
|
|
8128
|
-
for (const
|
|
8128
|
+
for (const L of s) {
|
|
8129
8129
|
const B = [];
|
|
8130
|
-
for (const O of
|
|
8130
|
+
for (const O of L.accountKeyIndexes) {
|
|
8131
8131
|
const $ = k.get(O);
|
|
8132
8132
|
if ($ === void 0)
|
|
8133
8133
|
throw new Error(`Failed to find key for account key index ${O}`);
|
|
@@ -8140,12 +8140,12 @@ class as {
|
|
|
8140
8140
|
isWritable: X
|
|
8141
8141
|
});
|
|
8142
8142
|
}
|
|
8143
|
-
const M = k.get(
|
|
8143
|
+
const M = k.get(L.programIdIndex);
|
|
8144
8144
|
if (M === void 0)
|
|
8145
|
-
throw new Error(`Failed to find program id for program id index ${
|
|
8146
|
-
R.push(new
|
|
8145
|
+
throw new Error(`Failed to find program id for program id index ${L.programIdIndex}`);
|
|
8146
|
+
R.push(new Lt({
|
|
8147
8147
|
programId: M,
|
|
8148
|
-
data: wt(
|
|
8148
|
+
data: wt(L.data),
|
|
8149
8149
|
keys: B
|
|
8150
8150
|
}));
|
|
8151
8151
|
}
|
|
@@ -8334,7 +8334,7 @@ function ar(n) {
|
|
|
8334
8334
|
return new Promise((t) => setTimeout(t, n));
|
|
8335
8335
|
}
|
|
8336
8336
|
function St(n, t) {
|
|
8337
|
-
const e = n.layout.span >= 0 ? n.layout.span : pa(n, t), r =
|
|
8337
|
+
const e = n.layout.span >= 0 ? n.layout.span : pa(n, t), r = lt.Buffer.alloc(e), s = Object.assign({
|
|
8338
8338
|
instruction: n.index
|
|
8339
8339
|
}, t);
|
|
8340
8340
|
return n.layout.encode(s, r), r;
|
|
@@ -8351,7 +8351,7 @@ function Bt(n, t) {
|
|
|
8351
8351
|
return e;
|
|
8352
8352
|
}
|
|
8353
8353
|
const ma = P.nu64("lamportsPerSignature"), wa = P.struct([P.u32("version"), P.u32("state"), vt("authorizedPubkey"), vt("nonce"), P.struct([ma], "feeCalculator")]), Ni = wa.span;
|
|
8354
|
-
class
|
|
8354
|
+
class Cn {
|
|
8355
8355
|
/**
|
|
8356
8356
|
* @internal
|
|
8357
8357
|
*/
|
|
@@ -8366,7 +8366,7 @@ class Ln {
|
|
|
8366
8366
|
*/
|
|
8367
8367
|
static fromAccountData(t) {
|
|
8368
8368
|
const e = wa.decode(wt(t), 0);
|
|
8369
|
-
return new
|
|
8369
|
+
return new Cn({
|
|
8370
8370
|
authorizedPubkey: new nt(e.authorizedPubkey),
|
|
8371
8371
|
nonce: new nt(e.nonce).toString(),
|
|
8372
8372
|
feeCalculator: e.feeCalculator
|
|
@@ -8386,9 +8386,9 @@ const Hl = (n) => {
|
|
|
8386
8386
|
} = Hl(e), i = e;
|
|
8387
8387
|
return i.decode = (o, u) => {
|
|
8388
8388
|
const f = s(o, u);
|
|
8389
|
-
return
|
|
8389
|
+
return Li.toBigIntLE(lt.Buffer.from(f));
|
|
8390
8390
|
}, i.encode = (o, u, f) => {
|
|
8391
|
-
const g =
|
|
8391
|
+
const g = Li.toBufferLE(o, n);
|
|
8392
8392
|
return r(g, u, f);
|
|
8393
8393
|
}, i;
|
|
8394
8394
|
}, Mr = Vl(8);
|
|
@@ -8687,7 +8687,7 @@ class pe {
|
|
|
8687
8687
|
space: t.space,
|
|
8688
8688
|
programId: wt(t.programId.toBuffer())
|
|
8689
8689
|
});
|
|
8690
|
-
return new
|
|
8690
|
+
return new Lt({
|
|
8691
8691
|
keys: [{
|
|
8692
8692
|
pubkey: t.fromPubkey,
|
|
8693
8693
|
isSigner: !0,
|
|
@@ -8739,7 +8739,7 @@ class pe {
|
|
|
8739
8739
|
isWritable: !0
|
|
8740
8740
|
}];
|
|
8741
8741
|
}
|
|
8742
|
-
return new
|
|
8742
|
+
return new Lt({
|
|
8743
8743
|
keys: r,
|
|
8744
8744
|
programId: this.programId,
|
|
8745
8745
|
data: e
|
|
@@ -8775,7 +8775,7 @@ class pe {
|
|
|
8775
8775
|
isWritable: !0
|
|
8776
8776
|
}];
|
|
8777
8777
|
}
|
|
8778
|
-
return new
|
|
8778
|
+
return new Lt({
|
|
8779
8779
|
keys: r,
|
|
8780
8780
|
programId: this.programId,
|
|
8781
8781
|
data: e
|
|
@@ -8806,7 +8806,7 @@ class pe {
|
|
|
8806
8806
|
pubkey: t.basePubkey,
|
|
8807
8807
|
isSigner: !0,
|
|
8808
8808
|
isWritable: !1
|
|
8809
|
-
}), new
|
|
8809
|
+
}), new Lt({
|
|
8810
8810
|
keys: s,
|
|
8811
8811
|
programId: this.programId,
|
|
8812
8812
|
data: r
|
|
@@ -8861,7 +8861,7 @@ class pe {
|
|
|
8861
8861
|
programId: this.programId,
|
|
8862
8862
|
data: r
|
|
8863
8863
|
};
|
|
8864
|
-
return new
|
|
8864
|
+
return new Lt(s);
|
|
8865
8865
|
}
|
|
8866
8866
|
/**
|
|
8867
8867
|
* Generate an instruction to advance the nonce in a Nonce account
|
|
@@ -8884,7 +8884,7 @@ class pe {
|
|
|
8884
8884
|
programId: this.programId,
|
|
8885
8885
|
data: r
|
|
8886
8886
|
};
|
|
8887
|
-
return new
|
|
8887
|
+
return new Lt(s);
|
|
8888
8888
|
}
|
|
8889
8889
|
/**
|
|
8890
8890
|
* Generate a transaction instruction that withdraws lamports from a Nonce account
|
|
@@ -8893,7 +8893,7 @@ class pe {
|
|
|
8893
8893
|
const e = Ut.WithdrawNonceAccount, r = St(e, {
|
|
8894
8894
|
lamports: t.lamports
|
|
8895
8895
|
});
|
|
8896
|
-
return new
|
|
8896
|
+
return new Lt({
|
|
8897
8897
|
keys: [{
|
|
8898
8898
|
pubkey: t.noncePubkey,
|
|
8899
8899
|
isSigner: !1,
|
|
@@ -8927,7 +8927,7 @@ class pe {
|
|
|
8927
8927
|
const e = Ut.AuthorizeNonceAccount, r = St(e, {
|
|
8928
8928
|
authorized: wt(t.newAuthorizedPubkey.toBuffer())
|
|
8929
8929
|
});
|
|
8930
|
-
return new
|
|
8930
|
+
return new Lt({
|
|
8931
8931
|
keys: [{
|
|
8932
8932
|
pubkey: t.noncePubkey,
|
|
8933
8933
|
isSigner: !1,
|
|
@@ -8972,7 +8972,7 @@ class pe {
|
|
|
8972
8972
|
isWritable: !0
|
|
8973
8973
|
}];
|
|
8974
8974
|
}
|
|
8975
|
-
return new
|
|
8975
|
+
return new Lt({
|
|
8976
8976
|
keys: r,
|
|
8977
8977
|
programId: this.programId,
|
|
8978
8978
|
data: e
|
|
@@ -9044,7 +9044,7 @@ class yr {
|
|
|
9044
9044
|
const o = P.struct([P.u32("instruction"), P.u32("offset"), P.u32("bytesLength"), P.u32("bytesLengthPadding"), P.seq(P.u8("byte"), P.offset(P.u32(), -8), "bytes")]), u = yr.chunkSize;
|
|
9045
9045
|
let f = 0, g = i, w = [];
|
|
9046
9046
|
for (; g.length > 0; ) {
|
|
9047
|
-
const k = g.slice(0, u), T =
|
|
9047
|
+
const k = g.slice(0, u), T = lt.Buffer.alloc(u + 16);
|
|
9048
9048
|
o.encode({
|
|
9049
9049
|
instruction: 0,
|
|
9050
9050
|
// Load instruction
|
|
@@ -9068,7 +9068,7 @@ class yr {
|
|
|
9068
9068
|
}
|
|
9069
9069
|
await Promise.all(w);
|
|
9070
9070
|
{
|
|
9071
|
-
const k = P.struct([P.u32("instruction")]), T =
|
|
9071
|
+
const k = P.struct([P.u32("instruction")]), T = lt.Buffer.alloc(k.span);
|
|
9072
9072
|
k.encode({
|
|
9073
9073
|
instruction: 1
|
|
9074
9074
|
// Finalize instruction
|
|
@@ -9085,8 +9085,8 @@ class yr {
|
|
|
9085
9085
|
}],
|
|
9086
9086
|
programId: s,
|
|
9087
9087
|
data: T
|
|
9088
|
-
}),
|
|
9089
|
-
preflightCommitment:
|
|
9088
|
+
}), L = "processed", B = await t.sendTransaction(R, [e, r], {
|
|
9089
|
+
preflightCommitment: L
|
|
9090
9090
|
}), {
|
|
9091
9091
|
context: M,
|
|
9092
9092
|
value: O
|
|
@@ -9094,13 +9094,13 @@ class yr {
|
|
|
9094
9094
|
signature: B,
|
|
9095
9095
|
lastValidBlockHeight: R.lastValidBlockHeight,
|
|
9096
9096
|
blockhash: R.recentBlockhash
|
|
9097
|
-
},
|
|
9097
|
+
}, L);
|
|
9098
9098
|
if (O.err)
|
|
9099
9099
|
throw new Error(`Transaction ${B} failed (${JSON.stringify(O)})`);
|
|
9100
9100
|
for (; ; ) {
|
|
9101
9101
|
try {
|
|
9102
9102
|
if (await t.getSlot({
|
|
9103
|
-
commitment:
|
|
9103
|
+
commitment: L
|
|
9104
9104
|
}) > M.slot)
|
|
9105
9105
|
break;
|
|
9106
9106
|
} catch {
|
|
@@ -9318,7 +9318,7 @@ function oh(n) {
|
|
|
9318
9318
|
);
|
|
9319
9319
|
return `${o}//${r}${f}${i}`;
|
|
9320
9320
|
}
|
|
9321
|
-
const $t = en(Qi(nt), et(), (n) => new nt(n)), ka = ts([et(), Wt("base64")]), us = en(Qi(
|
|
9321
|
+
const $t = en(Qi(nt), et(), (n) => new nt(n)), ka = ts([et(), Wt("base64")]), us = en(Qi(lt.Buffer), ka, (n) => lt.Buffer.from(n[0], "base64")), va = 30 * 1e3;
|
|
9322
9322
|
function ah(n) {
|
|
9323
9323
|
if (/^https?:/.test(n) === !1)
|
|
9324
9324
|
throw new TypeError("Endpoint URL must start with `http:` or `https:`.");
|
|
@@ -9358,13 +9358,13 @@ function Sa(n) {
|
|
|
9358
9358
|
jsonrpc: Wt("2.0"),
|
|
9359
9359
|
id: et(),
|
|
9360
9360
|
error: tt({
|
|
9361
|
-
code:
|
|
9361
|
+
code: Cr(),
|
|
9362
9362
|
message: et(),
|
|
9363
|
-
data:
|
|
9363
|
+
data: ut(Bu())
|
|
9364
9364
|
})
|
|
9365
9365
|
})]);
|
|
9366
9366
|
}
|
|
9367
|
-
const ch = Sa(
|
|
9367
|
+
const ch = Sa(Cr());
|
|
9368
9368
|
function mt(n) {
|
|
9369
9369
|
return en(Sa(n), ch, (t) => "error" in t ? t : {
|
|
9370
9370
|
...t,
|
|
@@ -9411,7 +9411,7 @@ const uh = tt({
|
|
|
9411
9411
|
effectiveSlot: W(),
|
|
9412
9412
|
amount: W(),
|
|
9413
9413
|
postBalance: W(),
|
|
9414
|
-
commission:
|
|
9414
|
+
commission: ut(ot(W()))
|
|
9415
9415
|
})))), hh = st(tt({
|
|
9416
9416
|
slot: W(),
|
|
9417
9417
|
prioritizationFee: W()
|
|
@@ -9425,8 +9425,8 @@ const uh = tt({
|
|
|
9425
9425
|
slotIndex: W(),
|
|
9426
9426
|
slotsInEpoch: W(),
|
|
9427
9427
|
absoluteSlot: W(),
|
|
9428
|
-
blockHeight:
|
|
9429
|
-
transactionCount:
|
|
9428
|
+
blockHeight: ut(W()),
|
|
9429
|
+
transactionCount: ut(W())
|
|
9430
9430
|
}), ph = tt({
|
|
9431
9431
|
slotsPerEpoch: W(),
|
|
9432
9432
|
leaderScheduleSlotOffset: W(),
|
|
@@ -9437,11 +9437,11 @@ const uh = tt({
|
|
|
9437
9437
|
err: wr
|
|
9438
9438
|
}), mh = Wt("receivedSignature"), wh = tt({
|
|
9439
9439
|
"solana-core": et(),
|
|
9440
|
-
"feature-set":
|
|
9440
|
+
"feature-set": ut(W())
|
|
9441
9441
|
}), bh = tt({
|
|
9442
9442
|
program: et(),
|
|
9443
9443
|
programId: $t,
|
|
9444
|
-
parsed:
|
|
9444
|
+
parsed: Cr()
|
|
9445
9445
|
}), kh = tt({
|
|
9446
9446
|
programId: $t,
|
|
9447
9447
|
accounts: st($t),
|
|
@@ -9449,19 +9449,19 @@ const uh = tt({
|
|
|
9449
9449
|
}), go = Vt(tt({
|
|
9450
9450
|
err: ot(xe([tt({}), et()])),
|
|
9451
9451
|
logs: ot(st(et())),
|
|
9452
|
-
accounts:
|
|
9452
|
+
accounts: ut(ot(st(ot(tt({
|
|
9453
9453
|
executable: De(),
|
|
9454
9454
|
owner: et(),
|
|
9455
9455
|
lamports: W(),
|
|
9456
9456
|
data: st(et()),
|
|
9457
|
-
rentEpoch:
|
|
9457
|
+
rentEpoch: ut(W())
|
|
9458
9458
|
}))))),
|
|
9459
|
-
unitsConsumed:
|
|
9460
|
-
returnData:
|
|
9459
|
+
unitsConsumed: ut(W()),
|
|
9460
|
+
returnData: ut(ot(tt({
|
|
9461
9461
|
programId: et(),
|
|
9462
9462
|
data: ts([et(), Wt("base64")])
|
|
9463
9463
|
}))),
|
|
9464
|
-
innerInstructions:
|
|
9464
|
+
innerInstructions: ut(ot(st(tt({
|
|
9465
9465
|
index: W(),
|
|
9466
9466
|
instructions: st(xe([bh, kh]))
|
|
9467
9467
|
}))))
|
|
@@ -9478,11 +9478,11 @@ function Sh(n, t, e, r, s, i) {
|
|
|
9478
9478
|
i != null && console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.");
|
|
9479
9479
|
let f;
|
|
9480
9480
|
return r && (f = async (w, k) => {
|
|
9481
|
-
const T = await new Promise((R,
|
|
9481
|
+
const T = await new Promise((R, L) => {
|
|
9482
9482
|
try {
|
|
9483
9483
|
r(w, k, (B, M) => R([B, M]));
|
|
9484
9484
|
} catch (B) {
|
|
9485
|
-
|
|
9485
|
+
L(B);
|
|
9486
9486
|
}
|
|
9487
9487
|
});
|
|
9488
9488
|
return await o(...T);
|
|
@@ -9493,14 +9493,14 @@ function Sh(n, t, e, r, s, i) {
|
|
|
9493
9493
|
agent: u,
|
|
9494
9494
|
headers: Object.assign({
|
|
9495
9495
|
"Content-Type": "application/json"
|
|
9496
|
-
}, t || {},
|
|
9496
|
+
}, t || {}, xf)
|
|
9497
9497
|
};
|
|
9498
9498
|
try {
|
|
9499
|
-
let R = 5,
|
|
9500
|
-
for (; f ?
|
|
9501
|
-
console.error(`Server responded with ${
|
|
9502
|
-
const M = await
|
|
9503
|
-
|
|
9499
|
+
let R = 5, L, B = 500;
|
|
9500
|
+
for (; f ? L = await f(n, T) : L = await o(n, T), !(L.status !== 429 || s === !0 || (R -= 1, R === 0)); )
|
|
9501
|
+
console.error(`Server responded with ${L.status} ${L.statusText}. Retrying after ${B}ms delay...`), await ar(B), B *= 2;
|
|
9502
|
+
const M = await L.text();
|
|
9503
|
+
L.ok ? k(null, M) : k(new Error(`${L.status} ${L.statusText}: ${M}`));
|
|
9504
9504
|
} catch (R) {
|
|
9505
9505
|
R instanceof Error && k(R);
|
|
9506
9506
|
}
|
|
@@ -9539,14 +9539,14 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9539
9539
|
amount: et(),
|
|
9540
9540
|
uiAmount: ot(W()),
|
|
9541
9541
|
decimals: W(),
|
|
9542
|
-
uiAmountString:
|
|
9543
|
-
}),
|
|
9542
|
+
uiAmountString: ut(et())
|
|
9543
|
+
}), Lh = Vt(st(tt({
|
|
9544
9544
|
address: $t,
|
|
9545
9545
|
amount: et(),
|
|
9546
9546
|
uiAmount: ot(W()),
|
|
9547
9547
|
decimals: W(),
|
|
9548
|
-
uiAmountString:
|
|
9549
|
-
}))),
|
|
9548
|
+
uiAmountString: ut(et())
|
|
9549
|
+
}))), Ch = Vt(st(tt({
|
|
9550
9550
|
pubkey: $t,
|
|
9551
9551
|
account: tt({
|
|
9552
9552
|
executable: De(),
|
|
@@ -9557,7 +9557,7 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9557
9557
|
})
|
|
9558
9558
|
}))), qi = tt({
|
|
9559
9559
|
program: et(),
|
|
9560
|
-
parsed:
|
|
9560
|
+
parsed: Cr(),
|
|
9561
9561
|
space: W()
|
|
9562
9562
|
}), Oh = Vt(st(tt({
|
|
9563
9563
|
pubkey: $t,
|
|
@@ -9580,7 +9580,7 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9580
9580
|
}), Nh = tt({
|
|
9581
9581
|
pubkey: $t,
|
|
9582
9582
|
account: jr
|
|
9583
|
-
}), Fh = en(xe([Qi(
|
|
9583
|
+
}), Fh = en(xe([Qi(lt.Buffer), qi]), xe([ka, qi]), (n) => Array.isArray(n) ? it(n, us) : n), Ki = tt({
|
|
9584
9584
|
executable: De(),
|
|
9585
9585
|
owner: $t,
|
|
9586
9586
|
lamports: W(),
|
|
@@ -9598,13 +9598,13 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9598
9598
|
slot: W(),
|
|
9599
9599
|
err: wr,
|
|
9600
9600
|
memo: ot(et()),
|
|
9601
|
-
blockTime:
|
|
9601
|
+
blockTime: ut(ot(W()))
|
|
9602
9602
|
}))), Wh = mt(st(tt({
|
|
9603
9603
|
signature: et(),
|
|
9604
9604
|
slot: W(),
|
|
9605
9605
|
err: wr,
|
|
9606
9606
|
memo: ot(et()),
|
|
9607
|
-
blockTime:
|
|
9607
|
+
blockTime: ut(ot(W()))
|
|
9608
9608
|
}))), Dh = tt({
|
|
9609
9609
|
subscription: W(),
|
|
9610
9610
|
result: On(jr)
|
|
@@ -9676,7 +9676,7 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9676
9676
|
slot: W(),
|
|
9677
9677
|
confirmations: ot(W()),
|
|
9678
9678
|
err: wr,
|
|
9679
|
-
confirmationStatus:
|
|
9679
|
+
confirmationStatus: ut(tf)
|
|
9680
9680
|
}), rf = Vt(st(ot(ef))), nf = mt(W()), xa = tt({
|
|
9681
9681
|
accountKey: $t,
|
|
9682
9682
|
writableIndexes: st(W()),
|
|
@@ -9696,18 +9696,18 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9696
9696
|
programIdIndex: W()
|
|
9697
9697
|
})),
|
|
9698
9698
|
recentBlockhash: et(),
|
|
9699
|
-
addressTableLookups:
|
|
9699
|
+
addressTableLookups: ut(st(xa))
|
|
9700
9700
|
})
|
|
9701
9701
|
}), Ia = tt({
|
|
9702
9702
|
pubkey: $t,
|
|
9703
9703
|
signer: De(),
|
|
9704
9704
|
writable: De(),
|
|
9705
|
-
source:
|
|
9705
|
+
source: ut(xe([Wt("transaction"), Wt("lookupTable")]))
|
|
9706
9706
|
}), Ea = tt({
|
|
9707
9707
|
accountKeys: st(Ia),
|
|
9708
9708
|
signatures: st(et())
|
|
9709
9709
|
}), Aa = tt({
|
|
9710
|
-
parsed:
|
|
9710
|
+
parsed: Cr(),
|
|
9711
9711
|
program: et(),
|
|
9712
9712
|
programId: $t
|
|
9713
9713
|
}), _a = tt({
|
|
@@ -9715,7 +9715,7 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9715
9715
|
data: et(),
|
|
9716
9716
|
programId: $t
|
|
9717
9717
|
}), sf = xe([_a, Aa]), of = xe([tt({
|
|
9718
|
-
parsed:
|
|
9718
|
+
parsed: Cr(),
|
|
9719
9719
|
program: et(),
|
|
9720
9720
|
programId: et()
|
|
9721
9721
|
}), tt({
|
|
@@ -9728,12 +9728,13 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9728
9728
|
accountKeys: st(Ia),
|
|
9729
9729
|
instructions: st(Ba),
|
|
9730
9730
|
recentBlockhash: et(),
|
|
9731
|
-
addressTableLookups:
|
|
9731
|
+
addressTableLookups: ut(ot(st(xa)))
|
|
9732
9732
|
})
|
|
9733
9733
|
}), xn = tt({
|
|
9734
9734
|
accountIndex: W(),
|
|
9735
9735
|
mint: et(),
|
|
9736
|
-
owner:
|
|
9736
|
+
owner: ut(et()),
|
|
9737
|
+
programId: ut(et()),
|
|
9737
9738
|
uiTokenAmount: zi
|
|
9738
9739
|
}), Ma = tt({
|
|
9739
9740
|
writable: st($t),
|
|
@@ -9741,7 +9742,7 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9741
9742
|
}), Un = tt({
|
|
9742
9743
|
err: wr,
|
|
9743
9744
|
fee: W(),
|
|
9744
|
-
innerInstructions:
|
|
9745
|
+
innerInstructions: ut(ot(st(tt({
|
|
9745
9746
|
index: W(),
|
|
9746
9747
|
instructions: st(tt({
|
|
9747
9748
|
accounts: st(W()),
|
|
@@ -9751,31 +9752,31 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9751
9752
|
})))),
|
|
9752
9753
|
preBalances: st(W()),
|
|
9753
9754
|
postBalances: st(W()),
|
|
9754
|
-
logMessages:
|
|
9755
|
-
preTokenBalances:
|
|
9756
|
-
postTokenBalances:
|
|
9757
|
-
loadedAddresses:
|
|
9758
|
-
computeUnitsConsumed:
|
|
9755
|
+
logMessages: ut(ot(st(et()))),
|
|
9756
|
+
preTokenBalances: ut(ot(st(xn))),
|
|
9757
|
+
postTokenBalances: ut(ot(st(xn))),
|
|
9758
|
+
loadedAddresses: ut(Ma),
|
|
9759
|
+
computeUnitsConsumed: ut(W())
|
|
9759
9760
|
}), hs = tt({
|
|
9760
9761
|
err: wr,
|
|
9761
9762
|
fee: W(),
|
|
9762
|
-
innerInstructions:
|
|
9763
|
+
innerInstructions: ut(ot(st(tt({
|
|
9763
9764
|
index: W(),
|
|
9764
9765
|
instructions: st(Ba)
|
|
9765
9766
|
})))),
|
|
9766
9767
|
preBalances: st(W()),
|
|
9767
9768
|
postBalances: st(W()),
|
|
9768
|
-
logMessages:
|
|
9769
|
-
preTokenBalances:
|
|
9770
|
-
postTokenBalances:
|
|
9771
|
-
loadedAddresses:
|
|
9772
|
-
computeUnitsConsumed:
|
|
9769
|
+
logMessages: ut(ot(st(et()))),
|
|
9770
|
+
preTokenBalances: ut(ot(st(xn))),
|
|
9771
|
+
postTokenBalances: ut(ot(st(xn))),
|
|
9772
|
+
loadedAddresses: ut(Ma),
|
|
9773
|
+
computeUnitsConsumed: ut(W())
|
|
9773
9774
|
}), Or = xe([Wt(0), Wt("legacy")]), br = tt({
|
|
9774
9775
|
pubkey: et(),
|
|
9775
9776
|
lamports: W(),
|
|
9776
9777
|
postBalance: ot(W()),
|
|
9777
9778
|
rewardType: ot(et()),
|
|
9778
|
-
commission:
|
|
9779
|
+
commission: ut(ot(W()))
|
|
9779
9780
|
}), af = mt(ot(tt({
|
|
9780
9781
|
blockhash: et(),
|
|
9781
9782
|
previousBlockhash: et(),
|
|
@@ -9783,16 +9784,16 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9783
9784
|
transactions: st(tt({
|
|
9784
9785
|
transaction: ls,
|
|
9785
9786
|
meta: ot(Un),
|
|
9786
|
-
version:
|
|
9787
|
+
version: ut(Or)
|
|
9787
9788
|
})),
|
|
9788
|
-
rewards:
|
|
9789
|
+
rewards: ut(st(br)),
|
|
9789
9790
|
blockTime: ot(W()),
|
|
9790
9791
|
blockHeight: ot(W())
|
|
9791
9792
|
}))), cf = mt(ot(tt({
|
|
9792
9793
|
blockhash: et(),
|
|
9793
9794
|
previousBlockhash: et(),
|
|
9794
9795
|
parentSlot: W(),
|
|
9795
|
-
rewards:
|
|
9796
|
+
rewards: ut(st(br)),
|
|
9796
9797
|
blockTime: ot(W()),
|
|
9797
9798
|
blockHeight: ot(W())
|
|
9798
9799
|
}))), uf = mt(ot(tt({
|
|
@@ -9802,9 +9803,9 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9802
9803
|
transactions: st(tt({
|
|
9803
9804
|
transaction: Ea,
|
|
9804
9805
|
meta: ot(Un),
|
|
9805
|
-
version:
|
|
9806
|
+
version: ut(Or)
|
|
9806
9807
|
})),
|
|
9807
|
-
rewards:
|
|
9808
|
+
rewards: ut(st(br)),
|
|
9808
9809
|
blockTime: ot(W()),
|
|
9809
9810
|
blockHeight: ot(W())
|
|
9810
9811
|
}))), lf = mt(ot(tt({
|
|
@@ -9814,9 +9815,9 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9814
9815
|
transactions: st(tt({
|
|
9815
9816
|
transaction: Ra,
|
|
9816
9817
|
meta: ot(hs),
|
|
9817
|
-
version:
|
|
9818
|
+
version: ut(Or)
|
|
9818
9819
|
})),
|
|
9819
|
-
rewards:
|
|
9820
|
+
rewards: ut(st(br)),
|
|
9820
9821
|
blockTime: ot(W()),
|
|
9821
9822
|
blockHeight: ot(W())
|
|
9822
9823
|
}))), hf = mt(ot(tt({
|
|
@@ -9826,16 +9827,16 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9826
9827
|
transactions: st(tt({
|
|
9827
9828
|
transaction: Ea,
|
|
9828
9829
|
meta: ot(hs),
|
|
9829
|
-
version:
|
|
9830
|
+
version: ut(Or)
|
|
9830
9831
|
})),
|
|
9831
|
-
rewards:
|
|
9832
|
+
rewards: ut(st(br)),
|
|
9832
9833
|
blockTime: ot(W()),
|
|
9833
9834
|
blockHeight: ot(W())
|
|
9834
9835
|
}))), ff = mt(ot(tt({
|
|
9835
9836
|
blockhash: et(),
|
|
9836
9837
|
previousBlockhash: et(),
|
|
9837
9838
|
parentSlot: W(),
|
|
9838
|
-
rewards:
|
|
9839
|
+
rewards: ut(st(br)),
|
|
9839
9840
|
blockTime: ot(W()),
|
|
9840
9841
|
blockHeight: ot(W())
|
|
9841
9842
|
}))), df = mt(ot(tt({
|
|
@@ -9846,7 +9847,7 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9846
9847
|
transaction: ls,
|
|
9847
9848
|
meta: ot(Un)
|
|
9848
9849
|
})),
|
|
9849
|
-
rewards:
|
|
9850
|
+
rewards: ut(st(br)),
|
|
9850
9851
|
blockTime: ot(W())
|
|
9851
9852
|
}))), mo = mt(ot(tt({
|
|
9852
9853
|
blockhash: et(),
|
|
@@ -9857,43 +9858,38 @@ const Eh = mt(uh), Ah = mt(fh), _h = mt(hh), Bh = mt(dh), Rh = mt(ph), Mh = mt(g
|
|
|
9857
9858
|
}))), Ei = mt(ot(tt({
|
|
9858
9859
|
slot: W(),
|
|
9859
9860
|
meta: ot(Un),
|
|
9860
|
-
blockTime:
|
|
9861
|
+
blockTime: ut(ot(W())),
|
|
9861
9862
|
transaction: ls,
|
|
9862
|
-
version:
|
|
9863
|
+
version: ut(Or)
|
|
9863
9864
|
}))), un = mt(ot(tt({
|
|
9864
9865
|
slot: W(),
|
|
9865
9866
|
transaction: Ra,
|
|
9866
9867
|
meta: ot(hs),
|
|
9867
|
-
blockTime:
|
|
9868
|
-
version:
|
|
9868
|
+
blockTime: ut(ot(W())),
|
|
9869
|
+
version: ut(Or)
|
|
9869
9870
|
}))), pf = Vt(tt({
|
|
9870
|
-
blockhash: et(),
|
|
9871
|
-
feeCalculator: tt({
|
|
9872
|
-
lamportsPerSignature: W()
|
|
9873
|
-
})
|
|
9874
|
-
})), gf = Vt(tt({
|
|
9875
9871
|
blockhash: et(),
|
|
9876
9872
|
lastValidBlockHeight: W()
|
|
9877
|
-
})),
|
|
9873
|
+
})), gf = Vt(De()), yf = tt({
|
|
9878
9874
|
slot: W(),
|
|
9879
9875
|
numTransactions: W(),
|
|
9880
9876
|
numSlots: W(),
|
|
9881
9877
|
samplePeriodSecs: W()
|
|
9882
|
-
}),
|
|
9878
|
+
}), mf = mt(st(yf)), wf = Vt(ot(tt({
|
|
9883
9879
|
feeCalculator: tt({
|
|
9884
9880
|
lamportsPerSignature: W()
|
|
9885
9881
|
})
|
|
9886
|
-
}))),
|
|
9882
|
+
}))), bf = mt(et()), kf = mt(et()), vf = tt({
|
|
9887
9883
|
err: wr,
|
|
9888
9884
|
logs: st(et()),
|
|
9889
9885
|
signature: et()
|
|
9890
|
-
}),
|
|
9891
|
-
result: On(
|
|
9886
|
+
}), Sf = tt({
|
|
9887
|
+
result: On(vf),
|
|
9892
9888
|
subscription: W()
|
|
9893
|
-
}),
|
|
9889
|
+
}), xf = {
|
|
9894
9890
|
"solana-client": "js/1.0.0-maintenance"
|
|
9895
9891
|
};
|
|
9896
|
-
class
|
|
9892
|
+
class If {
|
|
9897
9893
|
/**
|
|
9898
9894
|
* Establish a JSON RPC connection
|
|
9899
9895
|
*
|
|
@@ -9912,17 +9908,17 @@ class Ef {
|
|
|
9912
9908
|
const {
|
|
9913
9909
|
commitment: k,
|
|
9914
9910
|
config: T
|
|
9915
|
-
} = Ot(w), R = this._buildArgs([], k, void 0, T),
|
|
9916
|
-
return g[
|
|
9911
|
+
} = Ot(w), R = this._buildArgs([], k, void 0, T), L = ho(R);
|
|
9912
|
+
return g[L] = g[L] ?? (async () => {
|
|
9917
9913
|
try {
|
|
9918
9914
|
const B = await this._rpcRequest("getBlockHeight", R), M = it(B, mt(W()));
|
|
9919
9915
|
if ("error" in M)
|
|
9920
9916
|
throw new ct(M.error, "failed to get block height information");
|
|
9921
9917
|
return M.result;
|
|
9922
9918
|
} finally {
|
|
9923
|
-
delete g[
|
|
9919
|
+
delete g[L];
|
|
9924
9920
|
}
|
|
9925
|
-
})(), await g[
|
|
9921
|
+
})(), await g[L];
|
|
9926
9922
|
};
|
|
9927
9923
|
})();
|
|
9928
9924
|
let r, s, i, o, u, f;
|
|
@@ -10043,7 +10039,7 @@ class Ef {
|
|
|
10043
10039
|
}) : o.push({
|
|
10044
10040
|
programId: e.programId.toBase58()
|
|
10045
10041
|
});
|
|
10046
|
-
const u = this._buildArgs(o, s, "base64", i), f = await this._rpcRequest("getTokenAccountsByOwner", u), g = it(f,
|
|
10042
|
+
const u = this._buildArgs(o, s, "base64", i), f = await this._rpcRequest("getTokenAccountsByOwner", u), g = it(f, Ch);
|
|
10047
10043
|
if ("error" in g)
|
|
10048
10044
|
throw new ct(g.error, `failed to get token accounts owned by account ${t.toBase58()}`);
|
|
10049
10045
|
return g.result;
|
|
@@ -10082,7 +10078,7 @@ class Ef {
|
|
|
10082
10078
|
* for a given mint.
|
|
10083
10079
|
*/
|
|
10084
10080
|
async getTokenLargestAccounts(t, e) {
|
|
10085
|
-
const r = this._buildArgs([t.toBase58()], e), s = await this._rpcRequest("getTokenLargestAccounts", r), i = it(s,
|
|
10081
|
+
const r = this._buildArgs([t.toBase58()], e), s = await this._rpcRequest("getTokenLargestAccounts", r), i = it(s, Lh);
|
|
10086
10082
|
if ("error" in i)
|
|
10087
10083
|
throw new ct(i.error, "failed to get token largest accounts");
|
|
10088
10084
|
return i.result;
|
|
@@ -10377,7 +10373,7 @@ class Ef {
|
|
|
10377
10373
|
}) {
|
|
10378
10374
|
let u = !1;
|
|
10379
10375
|
const f = new Promise((R) => {
|
|
10380
|
-
let
|
|
10376
|
+
let L = i, B = null;
|
|
10381
10377
|
const M = async () => {
|
|
10382
10378
|
try {
|
|
10383
10379
|
const {
|
|
@@ -10389,20 +10385,20 @@ class Ef {
|
|
|
10389
10385
|
});
|
|
10390
10386
|
return B = O.slot, $ == null ? void 0 : $.nonce;
|
|
10391
10387
|
} catch {
|
|
10392
|
-
return
|
|
10388
|
+
return L;
|
|
10393
10389
|
}
|
|
10394
10390
|
};
|
|
10395
10391
|
(async () => {
|
|
10396
|
-
if (
|
|
10392
|
+
if (L = await M(), !u)
|
|
10397
10393
|
for (; ; ) {
|
|
10398
|
-
if (i !==
|
|
10394
|
+
if (i !== L) {
|
|
10399
10395
|
R({
|
|
10400
10396
|
__type: Ve.NONCE_INVALID,
|
|
10401
10397
|
slotInWhichNonceDidAdvance: B
|
|
10402
10398
|
});
|
|
10403
10399
|
return;
|
|
10404
10400
|
}
|
|
10405
|
-
if (await ar(2e3), u || (
|
|
10401
|
+
if (await ar(2e3), u || (L = await M(), u)) return;
|
|
10406
10402
|
}
|
|
10407
10403
|
})();
|
|
10408
10404
|
}), {
|
|
@@ -10418,7 +10414,7 @@ class Ef {
|
|
|
10418
10414
|
if (R.__type === Ve.PROCESSED)
|
|
10419
10415
|
T = R.response;
|
|
10420
10416
|
else {
|
|
10421
|
-
let
|
|
10417
|
+
let L;
|
|
10422
10418
|
for (; ; ) {
|
|
10423
10419
|
const B = await this.getSignatureStatus(o);
|
|
10424
10420
|
if (B == null)
|
|
@@ -10427,13 +10423,13 @@ class Ef {
|
|
|
10427
10423
|
await ar(400);
|
|
10428
10424
|
continue;
|
|
10429
10425
|
}
|
|
10430
|
-
|
|
10426
|
+
L = B;
|
|
10431
10427
|
break;
|
|
10432
10428
|
}
|
|
10433
|
-
if (
|
|
10429
|
+
if (L != null && L.value) {
|
|
10434
10430
|
const B = t || "finalized", {
|
|
10435
10431
|
confirmationStatus: M
|
|
10436
|
-
} =
|
|
10432
|
+
} = L.value;
|
|
10437
10433
|
switch (B) {
|
|
10438
10434
|
case "processed":
|
|
10439
10435
|
case "recent":
|
|
@@ -10455,9 +10451,9 @@ class Ef {
|
|
|
10455
10451
|
default:
|
|
10456
10452
|
}
|
|
10457
10453
|
T = {
|
|
10458
|
-
context:
|
|
10454
|
+
context: L.context,
|
|
10459
10455
|
value: {
|
|
10460
|
-
err:
|
|
10456
|
+
err: L.value.err
|
|
10461
10457
|
}
|
|
10462
10458
|
};
|
|
10463
10459
|
} else
|
|
@@ -10691,17 +10687,33 @@ class Ef {
|
|
|
10691
10687
|
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
10692
10688
|
*/
|
|
10693
10689
|
async getRecentBlockhashAndContext(t) {
|
|
10694
|
-
const
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10690
|
+
const {
|
|
10691
|
+
context: e,
|
|
10692
|
+
value: {
|
|
10693
|
+
blockhash: r
|
|
10694
|
+
}
|
|
10695
|
+
} = await this.getLatestBlockhashAndContext(t);
|
|
10696
|
+
return {
|
|
10697
|
+
context: e,
|
|
10698
|
+
value: {
|
|
10699
|
+
blockhash: r,
|
|
10700
|
+
feeCalculator: {
|
|
10701
|
+
get lamportsPerSignature() {
|
|
10702
|
+
throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.");
|
|
10703
|
+
},
|
|
10704
|
+
toJSON() {
|
|
10705
|
+
return {};
|
|
10706
|
+
}
|
|
10707
|
+
}
|
|
10708
|
+
}
|
|
10709
|
+
};
|
|
10698
10710
|
}
|
|
10699
10711
|
/**
|
|
10700
10712
|
* Fetch recent performance samples
|
|
10701
10713
|
* @return {Promise<Array<PerfSample>>}
|
|
10702
10714
|
*/
|
|
10703
10715
|
async getRecentPerformanceSamples(t) {
|
|
10704
|
-
const e = await this._rpcRequest("getRecentPerformanceSamples", t ? [t] : []), r = it(e,
|
|
10716
|
+
const e = await this._rpcRequest("getRecentPerformanceSamples", t ? [t] : []), r = it(e, mf);
|
|
10705
10717
|
if ("error" in r)
|
|
10706
10718
|
throw new ct(r.error, "failed to get recent performance samples");
|
|
10707
10719
|
return r.result;
|
|
@@ -10712,7 +10724,7 @@ class Ef {
|
|
|
10712
10724
|
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.
|
|
10713
10725
|
*/
|
|
10714
10726
|
async getFeeCalculatorForBlockhash(t, e) {
|
|
10715
|
-
const r = this._buildArgs([t], e), s = await this._rpcRequest("getFeeCalculatorForBlockhash", r), i = it(s,
|
|
10727
|
+
const r = this._buildArgs([t], e), s = await this._rpcRequest("getFeeCalculatorForBlockhash", r), i = it(s, wf);
|
|
10716
10728
|
if ("error" in i)
|
|
10717
10729
|
throw new ct(i.error, "failed to get fee calculator");
|
|
10718
10730
|
const {
|
|
@@ -10777,7 +10789,7 @@ class Ef {
|
|
|
10777
10789
|
const {
|
|
10778
10790
|
commitment: e,
|
|
10779
10791
|
config: r
|
|
10780
|
-
} = Ot(t), s = this._buildArgs([], e, void 0, r), i = await this._rpcRequest("getLatestBlockhash", s), o = it(i,
|
|
10792
|
+
} = Ot(t), s = this._buildArgs([], e, void 0, r), i = await this._rpcRequest("getLatestBlockhash", s), o = it(i, pf);
|
|
10781
10793
|
if ("error" in o)
|
|
10782
10794
|
throw new ct(o.error, "failed to get latest blockhash");
|
|
10783
10795
|
return o.result;
|
|
@@ -10789,7 +10801,7 @@ class Ef {
|
|
|
10789
10801
|
const {
|
|
10790
10802
|
commitment: r,
|
|
10791
10803
|
config: s
|
|
10792
|
-
} = Ot(e), i = this._buildArgs([t], r, void 0, s), o = await this._rpcRequest("isBlockhashValid", i), u = it(o,
|
|
10804
|
+
} = Ot(e), i = this._buildArgs([t], r, void 0, s), o = await this._rpcRequest("isBlockhashValid", i), u = it(o, gf);
|
|
10793
10805
|
if ("error" in u)
|
|
10794
10806
|
throw new ct(u.error, "failed to determine if the blockhash `" + t + "`is valid");
|
|
10795
10807
|
return u.result;
|
|
@@ -11050,7 +11062,7 @@ class Ef {
|
|
|
11050
11062
|
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.
|
|
11051
11063
|
*/
|
|
11052
11064
|
async getConfirmedBlock(t, e) {
|
|
11053
|
-
const r = this._buildArgsAtLeastConfirmed([t], e), s = await this._rpcRequest("
|
|
11065
|
+
const r = this._buildArgsAtLeastConfirmed([t], e), s = await this._rpcRequest("getBlock", r), i = it(s, df);
|
|
11054
11066
|
if ("error" in i)
|
|
11055
11067
|
throw new ct(i.error, "failed to get confirmed block");
|
|
11056
11068
|
const o = i.result;
|
|
@@ -11116,7 +11128,7 @@ class Ef {
|
|
|
11116
11128
|
const r = this._buildArgsAtLeastConfirmed([t], e, void 0, {
|
|
11117
11129
|
transactionDetails: "signatures",
|
|
11118
11130
|
rewards: !1
|
|
11119
|
-
}), s = await this._rpcRequest("
|
|
11131
|
+
}), s = await this._rpcRequest("getBlock", r), i = it(s, mo);
|
|
11120
11132
|
if ("error" in i)
|
|
11121
11133
|
throw new ct(i.error, "failed to get confirmed block");
|
|
11122
11134
|
const o = i.result;
|
|
@@ -11130,7 +11142,7 @@ class Ef {
|
|
|
11130
11142
|
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.
|
|
11131
11143
|
*/
|
|
11132
11144
|
async getConfirmedTransaction(t, e) {
|
|
11133
|
-
const r = this._buildArgsAtLeastConfirmed([t], e), s = await this._rpcRequest("
|
|
11145
|
+
const r = this._buildArgsAtLeastConfirmed([t], e), s = await this._rpcRequest("getTransaction", r), i = it(s, Ei);
|
|
11134
11146
|
if ("error" in i)
|
|
11135
11147
|
throw new ct(i.error, "failed to get transaction");
|
|
11136
11148
|
const o = i.result;
|
|
@@ -11147,7 +11159,7 @@ class Ef {
|
|
|
11147
11159
|
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.
|
|
11148
11160
|
*/
|
|
11149
11161
|
async getParsedConfirmedTransaction(t, e) {
|
|
11150
|
-
const r = this._buildArgsAtLeastConfirmed([t], e, "jsonParsed"), s = await this._rpcRequest("
|
|
11162
|
+
const r = this._buildArgsAtLeastConfirmed([t], e, "jsonParsed"), s = await this._rpcRequest("getTransaction", r), i = it(s, un);
|
|
11151
11163
|
if ("error" in i)
|
|
11152
11164
|
throw new ct(i.error, "failed to get confirmed transaction");
|
|
11153
11165
|
return i.result;
|
|
@@ -11159,7 +11171,7 @@ class Ef {
|
|
|
11159
11171
|
*/
|
|
11160
11172
|
async getParsedConfirmedTransactions(t, e) {
|
|
11161
11173
|
const r = t.map((o) => ({
|
|
11162
|
-
methodName: "
|
|
11174
|
+
methodName: "getTransaction",
|
|
11163
11175
|
args: this._buildArgsAtLeastConfirmed([o], e, "jsonParsed")
|
|
11164
11176
|
}));
|
|
11165
11177
|
return (await this._rpcBatchRequest(r)).map((o) => {
|
|
@@ -11251,7 +11263,7 @@ class Ef {
|
|
|
11251
11263
|
value: s
|
|
11252
11264
|
} = await this.getAccountInfoAndContext(t, e);
|
|
11253
11265
|
let i = null;
|
|
11254
|
-
return s !== null && (i =
|
|
11266
|
+
return s !== null && (i = Cn.fromAccountData(s.data)), {
|
|
11255
11267
|
context: r,
|
|
11256
11268
|
value: i
|
|
11257
11269
|
};
|
|
@@ -11279,7 +11291,7 @@ class Ef {
|
|
|
11279
11291
|
* ```
|
|
11280
11292
|
*/
|
|
11281
11293
|
async requestAirdrop(t, e) {
|
|
11282
|
-
const r = await this._rpcRequest("requestAirdrop", [t.toBase58(), e]), s = it(r,
|
|
11294
|
+
const r = await this._rpcRequest("requestAirdrop", [t.toBase58(), e]), s = it(r, bf);
|
|
11283
11295
|
if ("error" in s)
|
|
11284
11296
|
throw new ct(s.error, `airdrop to ${t.toBase58()} failed`);
|
|
11285
11297
|
return s.result;
|
|
@@ -11348,7 +11360,7 @@ class Ef {
|
|
|
11348
11360
|
// eslint-disable-next-line no-dupe-class-members
|
|
11349
11361
|
async simulateTransaction(t, e, r) {
|
|
11350
11362
|
if ("message" in t) {
|
|
11351
|
-
const B = t.serialize(), M =
|
|
11363
|
+
const B = t.serialize(), M = lt.Buffer.from(B).toString("base64");
|
|
11352
11364
|
if (Array.isArray(e) || r !== void 0)
|
|
11353
11365
|
throw new Error("Invalid arguments");
|
|
11354
11366
|
const O = e || {};
|
|
@@ -11360,8 +11372,8 @@ class Ef {
|
|
|
11360
11372
|
}
|
|
11361
11373
|
let s;
|
|
11362
11374
|
if (t instanceof At) {
|
|
11363
|
-
let
|
|
11364
|
-
s = new At(), s.feePayer =
|
|
11375
|
+
let L = t;
|
|
11376
|
+
s = new At(), s.feePayer = L.feePayer, s.instructions = t.instructions, s.nonceInfo = L.nonceInfo, s.signatures = L.signatures;
|
|
11365
11377
|
} else
|
|
11366
11378
|
s = At.populate(t), s._message = s._json = void 0;
|
|
11367
11379
|
if (e !== void 0 && !Array.isArray(e))
|
|
@@ -11370,9 +11382,9 @@ class Ef {
|
|
|
11370
11382
|
if (s.nonceInfo && i)
|
|
11371
11383
|
s.sign(...i);
|
|
11372
11384
|
else {
|
|
11373
|
-
let
|
|
11385
|
+
let L = this._disableBlockhashCaching;
|
|
11374
11386
|
for (; ; ) {
|
|
11375
|
-
const B = await this._blockhashWithExpiryBlockHeight(
|
|
11387
|
+
const B = await this._blockhashWithExpiryBlockHeight(L);
|
|
11376
11388
|
if (s.lastValidBlockHeight = B.lastValidBlockHeight, s.recentBlockhash = B.blockhash, !i) break;
|
|
11377
11389
|
if (s.sign(...i), !s.signature)
|
|
11378
11390
|
throw new Error("!signature");
|
|
@@ -11381,7 +11393,7 @@ class Ef {
|
|
|
11381
11393
|
this._blockhashInfo.simulatedSignatures.push(M);
|
|
11382
11394
|
break;
|
|
11383
11395
|
} else
|
|
11384
|
-
|
|
11396
|
+
L = !0;
|
|
11385
11397
|
}
|
|
11386
11398
|
}
|
|
11387
11399
|
const o = s._compile(), u = o.serialize(), g = s._serialize(u).toString("base64"), w = {
|
|
@@ -11389,26 +11401,26 @@ class Ef {
|
|
|
11389
11401
|
commitment: this.commitment
|
|
11390
11402
|
};
|
|
11391
11403
|
if (r) {
|
|
11392
|
-
const
|
|
11404
|
+
const L = (Array.isArray(r) ? r : o.nonProgramIds()).map((B) => B.toBase58());
|
|
11393
11405
|
w.accounts = {
|
|
11394
11406
|
encoding: "base64",
|
|
11395
|
-
addresses:
|
|
11407
|
+
addresses: L
|
|
11396
11408
|
};
|
|
11397
11409
|
}
|
|
11398
11410
|
i && (w.sigVerify = !0), e && typeof e == "object" && "innerInstructions" in e && (w.innerInstructions = e.innerInstructions);
|
|
11399
11411
|
const k = [g, w], T = await this._rpcRequest("simulateTransaction", k), R = it(T, go);
|
|
11400
11412
|
if ("error" in R) {
|
|
11401
|
-
let
|
|
11402
|
-
if ("data" in R.error && (
|
|
11413
|
+
let L;
|
|
11414
|
+
if ("data" in R.error && (L = R.error.data.logs, L && Array.isArray(L))) {
|
|
11403
11415
|
const B = `
|
|
11404
|
-
`, M = B +
|
|
11416
|
+
`, M = B + L.join(B);
|
|
11405
11417
|
console.error(R.error.message, M);
|
|
11406
11418
|
}
|
|
11407
11419
|
throw new Vr({
|
|
11408
11420
|
action: "simulate",
|
|
11409
11421
|
signature: "",
|
|
11410
11422
|
transactionMessage: R.error.message,
|
|
11411
|
-
logs:
|
|
11423
|
+
logs: L
|
|
11412
11424
|
});
|
|
11413
11425
|
}
|
|
11414
11426
|
return R.result;
|
|
@@ -11474,7 +11486,7 @@ class Ef {
|
|
|
11474
11486
|
encoding: "base64"
|
|
11475
11487
|
}, s = e && e.skipPreflight, i = s === !0 ? "processed" : e && e.preflightCommitment || this.commitment;
|
|
11476
11488
|
e && e.maxRetries != null && (r.maxRetries = e.maxRetries), e && e.minContextSlot != null && (r.minContextSlot = e.minContextSlot), s && (r.skipPreflight = s), i && (r.preflightCommitment = i);
|
|
11477
|
-
const o = [t, r], u = await this._rpcRequest("sendTransaction", o), f = it(u,
|
|
11489
|
+
const o = [t, r], u = await this._rpcRequest("sendTransaction", o), f = it(u, kf);
|
|
11478
11490
|
if ("error" in f) {
|
|
11479
11491
|
let g;
|
|
11480
11492
|
throw "data" in f.error && (g = f.error.data.logs), new Vr({
|
|
@@ -11814,7 +11826,7 @@ class Ef {
|
|
|
11814
11826
|
const {
|
|
11815
11827
|
result: e,
|
|
11816
11828
|
subscription: r
|
|
11817
|
-
} = it(t,
|
|
11829
|
+
} = it(t, Sf);
|
|
11818
11830
|
this._handleServerNotification(r, [e.value, e.context]);
|
|
11819
11831
|
}
|
|
11820
11832
|
/**
|
|
@@ -12129,7 +12141,7 @@ const Ze = Object.freeze({
|
|
|
12129
12141
|
layout: P.struct([P.u32("instruction")])
|
|
12130
12142
|
}
|
|
12131
12143
|
});
|
|
12132
|
-
class
|
|
12144
|
+
class Ef {
|
|
12133
12145
|
/**
|
|
12134
12146
|
* @internal
|
|
12135
12147
|
*/
|
|
@@ -12213,7 +12225,7 @@ class fs {
|
|
|
12213
12225
|
constructor() {
|
|
12214
12226
|
}
|
|
12215
12227
|
static createLookupTable(t) {
|
|
12216
|
-
const [e, r] = nt.findProgramAddressSync([t.authority.toBuffer(),
|
|
12228
|
+
const [e, r] = nt.findProgramAddressSync([t.authority.toBuffer(), Li.toBufferLE(BigInt(t.recentSlot), 8)], this.programId), s = Ze.CreateLookupTable, i = St(s, {
|
|
12217
12229
|
recentSlot: BigInt(t.recentSlot),
|
|
12218
12230
|
bumpSeed: r
|
|
12219
12231
|
}), o = [{
|
|
@@ -12233,7 +12245,7 @@ class fs {
|
|
|
12233
12245
|
isSigner: !1,
|
|
12234
12246
|
isWritable: !1
|
|
12235
12247
|
}];
|
|
12236
|
-
return [new
|
|
12248
|
+
return [new Lt({
|
|
12237
12249
|
programId: this.programId,
|
|
12238
12250
|
keys: o,
|
|
12239
12251
|
data: i
|
|
@@ -12249,7 +12261,7 @@ class fs {
|
|
|
12249
12261
|
isSigner: !0,
|
|
12250
12262
|
isWritable: !1
|
|
12251
12263
|
}];
|
|
12252
|
-
return new
|
|
12264
|
+
return new Lt({
|
|
12253
12265
|
programId: this.programId,
|
|
12254
12266
|
keys: s,
|
|
12255
12267
|
data: r
|
|
@@ -12275,7 +12287,7 @@ class fs {
|
|
|
12275
12287
|
pubkey: pe.programId,
|
|
12276
12288
|
isSigner: !1,
|
|
12277
12289
|
isWritable: !1
|
|
12278
|
-
}), new
|
|
12290
|
+
}), new Lt({
|
|
12279
12291
|
programId: this.programId,
|
|
12280
12292
|
keys: s,
|
|
12281
12293
|
data: r
|
|
@@ -12291,7 +12303,7 @@ class fs {
|
|
|
12291
12303
|
isSigner: !0,
|
|
12292
12304
|
isWritable: !1
|
|
12293
12305
|
}];
|
|
12294
|
-
return new
|
|
12306
|
+
return new Lt({
|
|
12295
12307
|
programId: this.programId,
|
|
12296
12308
|
keys: s,
|
|
12297
12309
|
data: r
|
|
@@ -12311,7 +12323,7 @@ class fs {
|
|
|
12311
12323
|
isSigner: !1,
|
|
12312
12324
|
isWritable: !0
|
|
12313
12325
|
}];
|
|
12314
|
-
return new
|
|
12326
|
+
return new Lt({
|
|
12315
12327
|
programId: this.programId,
|
|
12316
12328
|
keys: s,
|
|
12317
12329
|
data: r
|
|
@@ -12319,7 +12331,7 @@ class fs {
|
|
|
12319
12331
|
}
|
|
12320
12332
|
}
|
|
12321
12333
|
fs.programId = new nt("AddressLookupTab1e1111111111111111111111111");
|
|
12322
|
-
class
|
|
12334
|
+
class Af {
|
|
12323
12335
|
/**
|
|
12324
12336
|
* @internal
|
|
12325
12337
|
*/
|
|
@@ -12431,7 +12443,7 @@ class ds {
|
|
|
12431
12443
|
*/
|
|
12432
12444
|
static requestUnits(t) {
|
|
12433
12445
|
const e = qe.RequestUnits, r = St(e, t);
|
|
12434
|
-
return new
|
|
12446
|
+
return new Lt({
|
|
12435
12447
|
keys: [],
|
|
12436
12448
|
programId: this.programId,
|
|
12437
12449
|
data: r
|
|
@@ -12439,7 +12451,7 @@ class ds {
|
|
|
12439
12451
|
}
|
|
12440
12452
|
static requestHeapFrame(t) {
|
|
12441
12453
|
const e = qe.RequestHeapFrame, r = St(e, t);
|
|
12442
|
-
return new
|
|
12454
|
+
return new Lt({
|
|
12443
12455
|
keys: [],
|
|
12444
12456
|
programId: this.programId,
|
|
12445
12457
|
data: r
|
|
@@ -12447,7 +12459,7 @@ class ds {
|
|
|
12447
12459
|
}
|
|
12448
12460
|
static setComputeUnitLimit(t) {
|
|
12449
12461
|
const e = qe.SetComputeUnitLimit, r = St(e, t);
|
|
12450
|
-
return new
|
|
12462
|
+
return new Lt({
|
|
12451
12463
|
keys: [],
|
|
12452
12464
|
programId: this.programId,
|
|
12453
12465
|
data: r
|
|
@@ -12457,7 +12469,7 @@ class ds {
|
|
|
12457
12469
|
const e = qe.SetComputeUnitPrice, r = St(e, {
|
|
12458
12470
|
microLamports: BigInt(t.microLamports)
|
|
12459
12471
|
});
|
|
12460
|
-
return new
|
|
12472
|
+
return new Lt({
|
|
12461
12473
|
keys: [],
|
|
12462
12474
|
programId: this.programId,
|
|
12463
12475
|
data: r
|
|
@@ -12488,7 +12500,7 @@ class Nn {
|
|
|
12488
12500
|
instructionIndex: i
|
|
12489
12501
|
} = t;
|
|
12490
12502
|
It(e.length === bo, `Public Key must be ${bo} bytes but received ${e.length} bytes`), It(s.length === ko, `Signature must be ${ko} bytes but received ${s.length} bytes`);
|
|
12491
|
-
const o = vo.span, u = o + e.length, f = u + s.length, g = 1, w =
|
|
12503
|
+
const o = vo.span, u = o + e.length, f = u + s.length, g = 1, w = lt.Buffer.alloc(f + r.length), k = i ?? 65535;
|
|
12492
12504
|
return vo.encode({
|
|
12493
12505
|
numSignatures: g,
|
|
12494
12506
|
padding: 0,
|
|
@@ -12499,7 +12511,7 @@ class Nn {
|
|
|
12499
12511
|
messageDataOffset: f,
|
|
12500
12512
|
messageDataSize: r.length,
|
|
12501
12513
|
messageInstructionIndex: k
|
|
12502
|
-
}, w), w.fill(e, o), w.fill(s, u), w.fill(r, f), new
|
|
12514
|
+
}, w), w.fill(e, o), w.fill(s, u), w.fill(r, f), new Lt({
|
|
12503
12515
|
keys: [],
|
|
12504
12516
|
programId: Nn.programId,
|
|
12505
12517
|
data: w
|
|
@@ -12530,12 +12542,12 @@ class Nn {
|
|
|
12530
12542
|
}
|
|
12531
12543
|
}
|
|
12532
12544
|
Nn.programId = new nt("Ed25519SigVerify111111111111111111111111111");
|
|
12533
|
-
const
|
|
12545
|
+
const _f = (n, t) => {
|
|
12534
12546
|
const e = Tn.sign(n, t);
|
|
12535
12547
|
return [e.toCompactRawBytes(), e.recovery];
|
|
12536
12548
|
};
|
|
12537
12549
|
Tn.utils.isValidPrivateKey;
|
|
12538
|
-
const
|
|
12550
|
+
const Bf = Tn.getPublicKey, So = 32, Ai = 20, xo = 64, Rf = 11, _i = P.struct([P.u8("numSignatures"), P.u16("signatureOffset"), P.u8("signatureInstructionIndex"), P.u16("ethAddressOffset"), P.u8("ethAddressInstructionIndex"), P.u16("messageDataOffset"), P.u16("messageDataSize"), P.u8("messageInstructionIndex"), P.blob(20, "ethAddress"), P.blob(64, "signature"), P.u8("recoveryId")]);
|
|
12539
12551
|
class Ir {
|
|
12540
12552
|
/**
|
|
12541
12553
|
* @internal
|
|
@@ -12552,7 +12564,7 @@ class Ir {
|
|
|
12552
12564
|
static publicKeyToEthAddress(t) {
|
|
12553
12565
|
It(t.length === xo, `Public key must be ${xo} bytes but received ${t.length} bytes`);
|
|
12554
12566
|
try {
|
|
12555
|
-
return
|
|
12567
|
+
return lt.Buffer.from(no(wt(t))).slice(-Ai);
|
|
12556
12568
|
} catch (e) {
|
|
12557
12569
|
throw new Error(`Error constructing Ethereum address: ${e}`);
|
|
12558
12570
|
}
|
|
@@ -12590,8 +12602,8 @@ class Ir {
|
|
|
12590
12602
|
instructionIndex: o = 0
|
|
12591
12603
|
} = t;
|
|
12592
12604
|
let u;
|
|
12593
|
-
typeof e == "string" ? e.startsWith("0x") ? u =
|
|
12594
|
-
const f = 1 +
|
|
12605
|
+
typeof e == "string" ? e.startsWith("0x") ? u = lt.Buffer.from(e.substr(2), "hex") : u = lt.Buffer.from(e, "hex") : u = e, It(u.length === Ai, `Address must be ${Ai} bytes but received ${u.length} bytes`);
|
|
12606
|
+
const f = 1 + Rf, g = f, w = f + u.length, k = w + s.length + 1, T = 1, R = lt.Buffer.alloc(_i.span + r.length);
|
|
12595
12607
|
return _i.encode({
|
|
12596
12608
|
numSignatures: T,
|
|
12597
12609
|
signatureOffset: w,
|
|
@@ -12604,7 +12616,7 @@ class Ir {
|
|
|
12604
12616
|
signature: wt(s),
|
|
12605
12617
|
ethAddress: wt(u),
|
|
12606
12618
|
recoveryId: i
|
|
12607
|
-
}, R), R.fill(wt(r), _i.span), new
|
|
12619
|
+
}, R), R.fill(wt(r), _i.span), new Lt({
|
|
12608
12620
|
keys: [],
|
|
12609
12621
|
programId: Ir.programId,
|
|
12610
12622
|
data: R
|
|
@@ -12622,11 +12634,11 @@ class Ir {
|
|
|
12622
12634
|
} = t;
|
|
12623
12635
|
It(e.length === So, `Private key must be ${So} bytes but received ${e.length} bytes`);
|
|
12624
12636
|
try {
|
|
12625
|
-
const i = wt(e), o =
|
|
12637
|
+
const i = wt(e), o = Bf(
|
|
12626
12638
|
i,
|
|
12627
12639
|
!1
|
|
12628
12640
|
/* isCompressed */
|
|
12629
|
-
).slice(1), u =
|
|
12641
|
+
).slice(1), u = lt.Buffer.from(no(wt(r))), [f, g] = _f(u, i);
|
|
12630
12642
|
return this.createInstructionWithPublicKey({
|
|
12631
12643
|
publicKey: o,
|
|
12632
12644
|
message: r,
|
|
@@ -12642,7 +12654,7 @@ class Ir {
|
|
|
12642
12654
|
Ir.programId = new nt("KeccakSecp256k11111111111111111111111111111");
|
|
12643
12655
|
var Ta;
|
|
12644
12656
|
const Pa = new nt("StakeConfig11111111111111111111111111111111");
|
|
12645
|
-
class
|
|
12657
|
+
class La {
|
|
12646
12658
|
/**
|
|
12647
12659
|
* Create a new Authorized object
|
|
12648
12660
|
* @param staker the stake authority
|
|
@@ -12665,7 +12677,7 @@ class rn {
|
|
|
12665
12677
|
}
|
|
12666
12678
|
Ta = rn;
|
|
12667
12679
|
rn.default = new Ta(0, 0, nt.default);
|
|
12668
|
-
class
|
|
12680
|
+
class Mf {
|
|
12669
12681
|
/**
|
|
12670
12682
|
* @internal
|
|
12671
12683
|
*/
|
|
@@ -12698,7 +12710,7 @@ class Tf {
|
|
|
12698
12710
|
} = Bt(fe.Initialize, t.data);
|
|
12699
12711
|
return {
|
|
12700
12712
|
stakePubkey: t.keys[0].pubkey,
|
|
12701
|
-
authorized: new
|
|
12713
|
+
authorized: new La(new nt(e.staker), new nt(e.withdrawer)),
|
|
12702
12714
|
lockup: new rn(r.unixTimestamp, r.epoch, new nt(r.custodian))
|
|
12703
12715
|
};
|
|
12704
12716
|
}
|
|
@@ -12849,7 +12861,7 @@ const fe = Object.freeze({
|
|
|
12849
12861
|
index: 8,
|
|
12850
12862
|
layout: P.struct([P.u32("instruction"), vt("newAuthorized"), P.u32("stakeAuthorizationType"), lr("authoritySeed"), vt("authorityOwner")])
|
|
12851
12863
|
}
|
|
12852
|
-
}),
|
|
12864
|
+
}), Tf = Object.freeze({
|
|
12853
12865
|
Staker: {
|
|
12854
12866
|
index: 0
|
|
12855
12867
|
},
|
|
@@ -12897,7 +12909,7 @@ class Fn {
|
|
|
12897
12909
|
programId: this.programId,
|
|
12898
12910
|
data: u
|
|
12899
12911
|
};
|
|
12900
|
-
return new
|
|
12912
|
+
return new Lt(f);
|
|
12901
12913
|
}
|
|
12902
12914
|
/**
|
|
12903
12915
|
* Generate a Transaction that creates a new Stake account at
|
|
@@ -13079,7 +13091,7 @@ class Fn {
|
|
|
13079
13091
|
} = t, o = fe.Split, u = St(o, {
|
|
13080
13092
|
lamports: i
|
|
13081
13093
|
});
|
|
13082
|
-
return new
|
|
13094
|
+
return new Lt({
|
|
13083
13095
|
keys: [{
|
|
13084
13096
|
pubkey: e,
|
|
13085
13097
|
isSigner: !1,
|
|
@@ -13247,13 +13259,13 @@ class Fn {
|
|
|
13247
13259
|
}
|
|
13248
13260
|
Fn.programId = new nt("Stake11111111111111111111111111111111111111");
|
|
13249
13261
|
Fn.space = 200;
|
|
13250
|
-
class
|
|
13262
|
+
class Ca {
|
|
13251
13263
|
/** [0, 100] */
|
|
13252
13264
|
constructor(t, e, r, s) {
|
|
13253
13265
|
this.nodePubkey = void 0, this.authorizedVoter = void 0, this.authorizedWithdrawer = void 0, this.commission = void 0, this.nodePubkey = t, this.authorizedVoter = e, this.authorizedWithdrawer = r, this.commission = s;
|
|
13254
13266
|
}
|
|
13255
13267
|
}
|
|
13256
|
-
class
|
|
13268
|
+
class Pf {
|
|
13257
13269
|
/**
|
|
13258
13270
|
* @internal
|
|
13259
13271
|
*/
|
|
@@ -13286,7 +13298,7 @@ class Cf {
|
|
|
13286
13298
|
return {
|
|
13287
13299
|
votePubkey: t.keys[0].pubkey,
|
|
13288
13300
|
nodePubkey: t.keys[3].pubkey,
|
|
13289
|
-
voteInit: new
|
|
13301
|
+
voteInit: new Ca(new nt(e.nodePubkey), new nt(e.authorizedVoter), new nt(e.authorizedWithdrawer), e.commission)
|
|
13290
13302
|
};
|
|
13291
13303
|
}
|
|
13292
13304
|
/**
|
|
@@ -13364,7 +13376,7 @@ class Cf {
|
|
|
13364
13376
|
const Ke = Object.freeze({
|
|
13365
13377
|
InitializeAccount: {
|
|
13366
13378
|
index: 0,
|
|
13367
|
-
layout: P.struct([P.u32("instruction"),
|
|
13379
|
+
layout: P.struct([P.u32("instruction"), Ll()])
|
|
13368
13380
|
},
|
|
13369
13381
|
Authorize: {
|
|
13370
13382
|
index: 1,
|
|
@@ -13380,7 +13392,7 @@ const Ke = Object.freeze({
|
|
|
13380
13392
|
},
|
|
13381
13393
|
AuthorizeWithSeed: {
|
|
13382
13394
|
index: 10,
|
|
13383
|
-
layout: P.struct([P.u32("instruction"),
|
|
13395
|
+
layout: P.struct([P.u32("instruction"), Cl()])
|
|
13384
13396
|
}
|
|
13385
13397
|
}), Lf = Object.freeze({
|
|
13386
13398
|
Voter: {
|
|
@@ -13435,7 +13447,7 @@ class Ur {
|
|
|
13435
13447
|
programId: this.programId,
|
|
13436
13448
|
data: o
|
|
13437
13449
|
};
|
|
13438
|
-
return new
|
|
13450
|
+
return new Lt(u);
|
|
13439
13451
|
}
|
|
13440
13452
|
/**
|
|
13441
13453
|
* Generate a transaction that creates a new Vote account.
|
|
@@ -13596,12 +13608,12 @@ class Ur {
|
|
|
13596
13608
|
}
|
|
13597
13609
|
Ur.programId = new nt("Vote111111111111111111111111111111111111111");
|
|
13598
13610
|
Ur.space = 3762;
|
|
13599
|
-
const Oa = new nt("Va1idator1nfo111111111111111111111111111111"),
|
|
13611
|
+
const Oa = new nt("Va1idator1nfo111111111111111111111111111111"), Cf = tt({
|
|
13600
13612
|
name: et(),
|
|
13601
|
-
website:
|
|
13602
|
-
details:
|
|
13603
|
-
iconUrl:
|
|
13604
|
-
keybaseUsername:
|
|
13613
|
+
website: ut(et()),
|
|
13614
|
+
details: ut(et()),
|
|
13615
|
+
iconUrl: ut(et()),
|
|
13616
|
+
keybaseUsername: ut(et())
|
|
13605
13617
|
});
|
|
13606
13618
|
class ps {
|
|
13607
13619
|
/**
|
|
@@ -13632,13 +13644,13 @@ class ps {
|
|
|
13632
13644
|
});
|
|
13633
13645
|
}
|
|
13634
13646
|
if (s[0].publicKey.equals(Oa) && s[1].isSigner) {
|
|
13635
|
-
const i = lr().decode(
|
|
13636
|
-
return Jo(o,
|
|
13647
|
+
const i = lr().decode(lt.Buffer.from(e)), o = JSON.parse(i);
|
|
13648
|
+
return Jo(o, Cf), new ps(s[1].publicKey, o);
|
|
13637
13649
|
}
|
|
13638
13650
|
return null;
|
|
13639
13651
|
}
|
|
13640
13652
|
}
|
|
13641
|
-
const
|
|
13653
|
+
const Of = new nt("Vote111111111111111111111111111111111111111"), Uf = P.struct([
|
|
13642
13654
|
vt("nodePubkey"),
|
|
13643
13655
|
vt("authorizedWithdrawer"),
|
|
13644
13656
|
P.u8("commission"),
|
|
@@ -13670,7 +13682,7 @@ class gs {
|
|
|
13670
13682
|
* @return VoteAccount
|
|
13671
13683
|
*/
|
|
13672
13684
|
static fromAccountData(t) {
|
|
13673
|
-
const r =
|
|
13685
|
+
const r = Uf.decode(wt(t), 4);
|
|
13674
13686
|
let s = r.rootSlot;
|
|
13675
13687
|
return r.rootSlotValid || (s = null), new gs({
|
|
13676
13688
|
nodePubkey: new nt(r.nodePubkey),
|
|
@@ -13678,14 +13690,14 @@ class gs {
|
|
|
13678
13690
|
commission: r.commission,
|
|
13679
13691
|
votes: r.votes,
|
|
13680
13692
|
rootSlot: s,
|
|
13681
|
-
authorizedVoters: r.authorizedVoters.map(
|
|
13682
|
-
priorVoters:
|
|
13693
|
+
authorizedVoters: r.authorizedVoters.map(Nf),
|
|
13694
|
+
priorVoters: Ff(r.priorVoters),
|
|
13683
13695
|
epochCredits: r.epochCredits,
|
|
13684
13696
|
lastTimestamp: r.lastTimestamp
|
|
13685
13697
|
});
|
|
13686
13698
|
}
|
|
13687
13699
|
}
|
|
13688
|
-
function
|
|
13700
|
+
function Nf({
|
|
13689
13701
|
authorizedVoter: n,
|
|
13690
13702
|
epoch: t
|
|
13691
13703
|
}) {
|
|
@@ -13705,7 +13717,7 @@ function Io({
|
|
|
13705
13717
|
targetEpoch: e
|
|
13706
13718
|
};
|
|
13707
13719
|
}
|
|
13708
|
-
function
|
|
13720
|
+
function Ff({
|
|
13709
13721
|
buf: n,
|
|
13710
13722
|
idx: t,
|
|
13711
13723
|
isEmpty: e
|
|
@@ -13724,7 +13736,7 @@ const Eo = {
|
|
|
13724
13736
|
"mainnet-beta": "https://api.mainnet-beta.solana.com/"
|
|
13725
13737
|
}
|
|
13726
13738
|
};
|
|
13727
|
-
function
|
|
13739
|
+
function zf(n, t) {
|
|
13728
13740
|
const e = t === !1 ? "http" : "https";
|
|
13729
13741
|
if (!n)
|
|
13730
13742
|
return Eo[e].devnet;
|
|
@@ -13733,7 +13745,7 @@ function qf(n, t) {
|
|
|
13733
13745
|
throw new Error(`Unknown ${e} cluster: ${n}`);
|
|
13734
13746
|
return r;
|
|
13735
13747
|
}
|
|
13736
|
-
async function
|
|
13748
|
+
async function qf(n, t, e, r) {
|
|
13737
13749
|
let s, i;
|
|
13738
13750
|
e && Object.prototype.hasOwnProperty.call(e, "lastValidBlockHeight") || e && Object.prototype.hasOwnProperty.call(e, "nonceValue") ? (s = e, i = r) : i = e;
|
|
13739
13751
|
const o = i && {
|
|
@@ -13749,27 +13761,27 @@ async function Kf(n, t, e, r) {
|
|
|
13749
13761
|
}) : new Error(`Raw transaction ${u} failed (${JSON.stringify(w)})`);
|
|
13750
13762
|
return u;
|
|
13751
13763
|
}
|
|
13752
|
-
const
|
|
13764
|
+
const Kf = 1e9, Wf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13753
13765
|
__proto__: null,
|
|
13754
13766
|
Account: Bl,
|
|
13755
13767
|
AddressLookupTableAccount: Fi,
|
|
13756
|
-
AddressLookupTableInstruction:
|
|
13768
|
+
AddressLookupTableInstruction: Ef,
|
|
13757
13769
|
AddressLookupTableProgram: fs,
|
|
13758
|
-
Authorized:
|
|
13770
|
+
Authorized: La,
|
|
13759
13771
|
BLOCKHASH_CACHE_TIMEOUT_MS: va,
|
|
13760
13772
|
BPF_LOADER_DEPRECATED_PROGRAM_ID: Rl,
|
|
13761
13773
|
BPF_LOADER_PROGRAM_ID: Zl,
|
|
13762
13774
|
BpfLoader: Yl,
|
|
13763
13775
|
COMPUTE_BUDGET_INSTRUCTION_LAYOUTS: qe,
|
|
13764
|
-
ComputeBudgetInstruction:
|
|
13776
|
+
ComputeBudgetInstruction: Af,
|
|
13765
13777
|
ComputeBudgetProgram: ds,
|
|
13766
|
-
Connection:
|
|
13778
|
+
Connection: If,
|
|
13767
13779
|
Ed25519Program: Nn,
|
|
13768
13780
|
Enum: Al,
|
|
13769
13781
|
EpochSchedule: ba,
|
|
13770
13782
|
FeeCalculatorLayout: ma,
|
|
13771
13783
|
Keypair: xr,
|
|
13772
|
-
LAMPORTS_PER_SOL:
|
|
13784
|
+
LAMPORTS_PER_SOL: Kf,
|
|
13773
13785
|
LOOKUP_TABLE_INSTRUCTION_LAYOUTS: Ze,
|
|
13774
13786
|
Loader: yr,
|
|
13775
13787
|
Lockup: rn,
|
|
@@ -13778,7 +13790,7 @@ const Wf = 1e9, Df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
13778
13790
|
MessageAccountKeys: Hr,
|
|
13779
13791
|
MessageV0: gr,
|
|
13780
13792
|
NONCE_ACCOUNT_LENGTH: Ni,
|
|
13781
|
-
NonceAccount:
|
|
13793
|
+
NonceAccount: Cn,
|
|
13782
13794
|
PACKET_DATA_SIZE: ir,
|
|
13783
13795
|
PUBLIC_KEY_LENGTH: We,
|
|
13784
13796
|
PublicKey: nt,
|
|
@@ -13800,8 +13812,8 @@ const Wf = 1e9, Df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
13800
13812
|
SendTransactionError: Vr,
|
|
13801
13813
|
SolanaJSONRPCError: ct,
|
|
13802
13814
|
SolanaJSONRPCErrorCode: $l,
|
|
13803
|
-
StakeAuthorizationLayout:
|
|
13804
|
-
StakeInstruction:
|
|
13815
|
+
StakeAuthorizationLayout: Tf,
|
|
13816
|
+
StakeInstruction: Mf,
|
|
13805
13817
|
StakeProgram: Fn,
|
|
13806
13818
|
Struct: ns,
|
|
13807
13819
|
SystemInstruction: jl,
|
|
@@ -13810,28 +13822,28 @@ const Wf = 1e9, Df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
13810
13822
|
TransactionExpiredBlockheightExceededError: is,
|
|
13811
13823
|
TransactionExpiredNonceInvalidError: vr,
|
|
13812
13824
|
TransactionExpiredTimeoutError: ss,
|
|
13813
|
-
TransactionInstruction:
|
|
13825
|
+
TransactionInstruction: Lt,
|
|
13814
13826
|
TransactionMessage: as,
|
|
13815
13827
|
TransactionStatus: Ve,
|
|
13816
13828
|
VALIDATOR_INFO_KEY: Oa,
|
|
13817
13829
|
VERSION_PREFIX_MASK: Pn,
|
|
13818
|
-
VOTE_PROGRAM_ID:
|
|
13830
|
+
VOTE_PROGRAM_ID: Of,
|
|
13819
13831
|
ValidatorInfo: ps,
|
|
13820
13832
|
VersionedMessage: os,
|
|
13821
13833
|
VersionedTransaction: cs,
|
|
13822
13834
|
VoteAccount: gs,
|
|
13823
13835
|
VoteAuthorizationLayout: Lf,
|
|
13824
|
-
VoteInit:
|
|
13825
|
-
VoteInstruction:
|
|
13836
|
+
VoteInit: Ca,
|
|
13837
|
+
VoteInstruction: Pf,
|
|
13826
13838
|
VoteProgram: Ur,
|
|
13827
|
-
clusterApiUrl:
|
|
13828
|
-
sendAndConfirmRawTransaction:
|
|
13839
|
+
clusterApiUrl: zf,
|
|
13840
|
+
sendAndConfirmRawTransaction: qf,
|
|
13829
13841
|
sendAndConfirmTransaction: Ui
|
|
13830
|
-
}, Symbol.toStringTag, { value: "Module" })), pn =
|
|
13842
|
+
}, Symbol.toStringTag, { value: "Module" })), pn = Wf, nr = de;
|
|
13831
13843
|
var gn = { exports: {} };
|
|
13832
13844
|
gn.exports;
|
|
13833
13845
|
var Ao;
|
|
13834
|
-
function
|
|
13846
|
+
function Df() {
|
|
13835
13847
|
return Ao || (Ao = 1, function(n) {
|
|
13836
13848
|
var t = function() {
|
|
13837
13849
|
var e = String.fromCharCode, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", i = {};
|
|
@@ -13916,12 +13928,12 @@ function $f() {
|
|
|
13916
13928
|
},
|
|
13917
13929
|
_compress: function(f, g, w) {
|
|
13918
13930
|
if (f == null) return "";
|
|
13919
|
-
var k, T, R = {},
|
|
13931
|
+
var k, T, R = {}, L = {}, B = "", M = "", O = "", $ = 2, q = 3, X = 2, D = [], F = 0, Y = 0, Z;
|
|
13920
13932
|
for (Z = 0; Z < f.length; Z += 1)
|
|
13921
|
-
if (B = f.charAt(Z), Object.prototype.hasOwnProperty.call(R, B) || (R[B] = q++,
|
|
13933
|
+
if (B = f.charAt(Z), Object.prototype.hasOwnProperty.call(R, B) || (R[B] = q++, L[B] = !0), M = O + B, Object.prototype.hasOwnProperty.call(R, M))
|
|
13922
13934
|
O = M;
|
|
13923
13935
|
else {
|
|
13924
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
13936
|
+
if (Object.prototype.hasOwnProperty.call(L, O)) {
|
|
13925
13937
|
if (O.charCodeAt(0) < 256) {
|
|
13926
13938
|
for (k = 0; k < X; k++)
|
|
13927
13939
|
F = F << 1, Y == g - 1 ? (Y = 0, D.push(w(F)), F = 0) : Y++;
|
|
@@ -13933,14 +13945,14 @@ function $f() {
|
|
|
13933
13945
|
for (T = O.charCodeAt(0), k = 0; k < 16; k++)
|
|
13934
13946
|
F = F << 1 | T & 1, Y == g - 1 ? (Y = 0, D.push(w(F)), F = 0) : Y++, T = T >> 1;
|
|
13935
13947
|
}
|
|
13936
|
-
$--, $ == 0 && ($ = Math.pow(2, X), X++), delete
|
|
13948
|
+
$--, $ == 0 && ($ = Math.pow(2, X), X++), delete L[O];
|
|
13937
13949
|
} else
|
|
13938
13950
|
for (T = R[O], k = 0; k < X; k++)
|
|
13939
13951
|
F = F << 1 | T & 1, Y == g - 1 ? (Y = 0, D.push(w(F)), F = 0) : Y++, T = T >> 1;
|
|
13940
13952
|
$--, $ == 0 && ($ = Math.pow(2, X), X++), R[M] = q++, O = String(B);
|
|
13941
13953
|
}
|
|
13942
13954
|
if (O !== "") {
|
|
13943
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
13955
|
+
if (Object.prototype.hasOwnProperty.call(L, O)) {
|
|
13944
13956
|
if (O.charCodeAt(0) < 256) {
|
|
13945
13957
|
for (k = 0; k < X; k++)
|
|
13946
13958
|
F = F << 1, Y == g - 1 ? (Y = 0, D.push(w(F)), F = 0) : Y++;
|
|
@@ -13952,7 +13964,7 @@ function $f() {
|
|
|
13952
13964
|
for (T = O.charCodeAt(0), k = 0; k < 16; k++)
|
|
13953
13965
|
F = F << 1 | T & 1, Y == g - 1 ? (Y = 0, D.push(w(F)), F = 0) : Y++, T = T >> 1;
|
|
13954
13966
|
}
|
|
13955
|
-
$--, $ == 0 && ($ = Math.pow(2, X), X++), delete
|
|
13967
|
+
$--, $ == 0 && ($ = Math.pow(2, X), X++), delete L[O];
|
|
13956
13968
|
} else
|
|
13957
13969
|
for (T = R[O], k = 0; k < X; k++)
|
|
13958
13970
|
F = F << 1 | T & 1, Y == g - 1 ? (Y = 0, D.push(w(F)), F = 0) : Y++, T = T >> 1;
|
|
@@ -13973,7 +13985,7 @@ function $f() {
|
|
|
13973
13985
|
});
|
|
13974
13986
|
},
|
|
13975
13987
|
_decompress: function(f, g, w) {
|
|
13976
|
-
var k = [], T = 4, R = 4,
|
|
13988
|
+
var k = [], T = 4, R = 4, L = 3, B = "", M = [], O, $, q, X, D, F, Y, Z = { val: w(0), position: g, index: 1 };
|
|
13977
13989
|
for (O = 0; O < 3; O += 1)
|
|
13978
13990
|
k[O] = O;
|
|
13979
13991
|
for (q = 0, D = Math.pow(2, 2), F = 1; F != D; )
|
|
@@ -13995,7 +14007,7 @@ function $f() {
|
|
|
13995
14007
|
for (k[3] = Y, $ = Y, M.push(Y); ; ) {
|
|
13996
14008
|
if (Z.index > f)
|
|
13997
14009
|
return "";
|
|
13998
|
-
for (q = 0, D = Math.pow(2,
|
|
14010
|
+
for (q = 0, D = Math.pow(2, L), F = 1; F != D; )
|
|
13999
14011
|
X = Z.val & Z.position, Z.position >>= 1, Z.position == 0 && (Z.position = g, Z.val = w(Z.index++)), q |= (X > 0 ? 1 : 0) * F, F <<= 1;
|
|
14000
14012
|
switch (Y = q) {
|
|
14001
14013
|
case 0:
|
|
@@ -14011,13 +14023,13 @@ function $f() {
|
|
|
14011
14023
|
case 2:
|
|
14012
14024
|
return M.join("");
|
|
14013
14025
|
}
|
|
14014
|
-
if (T == 0 && (T = Math.pow(2,
|
|
14026
|
+
if (T == 0 && (T = Math.pow(2, L), L++), k[Y])
|
|
14015
14027
|
B = k[Y];
|
|
14016
14028
|
else if (Y === R)
|
|
14017
14029
|
B = $ + $.charAt(0);
|
|
14018
14030
|
else
|
|
14019
14031
|
return null;
|
|
14020
|
-
M.push(B), k[R++] = $ + B.charAt(0), T--, $ = B, T == 0 && (T = Math.pow(2,
|
|
14032
|
+
M.push(B), k[R++] = $ + B.charAt(0), T--, $ = B, T == 0 && (T = Math.pow(2, L), L++);
|
|
14021
14033
|
}
|
|
14022
14034
|
}
|
|
14023
14035
|
};
|
|
@@ -14028,8 +14040,8 @@ function $f() {
|
|
|
14028
14040
|
});
|
|
14029
14041
|
}(gn)), gn.exports;
|
|
14030
14042
|
}
|
|
14031
|
-
var
|
|
14032
|
-
const Pe = /* @__PURE__ */ Yr(
|
|
14043
|
+
var $f = Df();
|
|
14044
|
+
const Pe = /* @__PURE__ */ Yr($f);
|
|
14033
14045
|
var Ua = /* @__PURE__ */ ((n) => (n.USD = "USD", n.EUR = "EUR", n.GBP = "GBP", n.BRL = "BRL", n))(Ua || {});
|
|
14034
14046
|
class Ye {
|
|
14035
14047
|
constructor(t) {
|
|
@@ -14067,7 +14079,7 @@ class Ye {
|
|
|
14067
14079
|
loaderBackground: k,
|
|
14068
14080
|
handleHeightChangeId: T,
|
|
14069
14081
|
bankAccountLinkRedirect: R,
|
|
14070
|
-
additionalWallets:
|
|
14082
|
+
additionalWallets: L,
|
|
14071
14083
|
nearDeposit: B,
|
|
14072
14084
|
chargebackProtectionData: M,
|
|
14073
14085
|
merchantCss: O,
|
|
@@ -14089,7 +14101,7 @@ class Ye {
|
|
|
14089
14101
|
deviceId: A,
|
|
14090
14102
|
jwtToken: x,
|
|
14091
14103
|
origins: E,
|
|
14092
|
-
threeDsChallengePreference:
|
|
14104
|
+
threeDsChallengePreference: C,
|
|
14093
14105
|
supportEmail: v,
|
|
14094
14106
|
destinationAuthKey: a,
|
|
14095
14107
|
allowedPaymentMethods: l
|
|
@@ -14111,10 +14123,10 @@ class Ye {
|
|
|
14111
14123
|
), R && S.searchParams.append(
|
|
14112
14124
|
"bankAccountLinkRedirect",
|
|
14113
14125
|
R
|
|
14114
|
-
),
|
|
14126
|
+
), L && S.searchParams.append(
|
|
14115
14127
|
"additionalWallets",
|
|
14116
14128
|
Pe.compressToEncodedURIComponent(
|
|
14117
|
-
JSON.stringify(
|
|
14129
|
+
JSON.stringify(L)
|
|
14118
14130
|
)
|
|
14119
14131
|
), B && S.searchParams.append("nearDeposit", B), M && S.searchParams.append(
|
|
14120
14132
|
"chargebackProtectionData",
|
|
@@ -14136,9 +14148,9 @@ class Ye {
|
|
|
14136
14148
|
), l && S.searchParams.append(
|
|
14137
14149
|
"allowedPaymentMethods",
|
|
14138
14150
|
l.join(",")
|
|
14139
|
-
),
|
|
14151
|
+
), C && S.searchParams.append(
|
|
14140
14152
|
"threeDsChallengePreference",
|
|
14141
|
-
|
|
14153
|
+
C
|
|
14142
14154
|
), a && S.searchParams.append("destinationAuthKey", a), S.toString();
|
|
14143
14155
|
}
|
|
14144
14156
|
static getTransaction(t) {
|
|
@@ -14216,7 +14228,7 @@ class Ye {
|
|
|
14216
14228
|
}
|
|
14217
14229
|
}
|
|
14218
14230
|
}
|
|
14219
|
-
function
|
|
14231
|
+
function Rd(n) {
|
|
14220
14232
|
if (!n) return;
|
|
14221
14233
|
let t, e;
|
|
14222
14234
|
if ("name" in n && n.name && (t = n.name.split(" ")[0], e = n.name.split(" ").slice(1).join(" ")), "firstName" in n && n.firstName && (t = n.firstName), "lastName" in n && n.lastName && (e = n.lastName), t && e)
|
|
@@ -14241,7 +14253,7 @@ function ys(n) {
|
|
|
14241
14253
|
return null;
|
|
14242
14254
|
}
|
|
14243
14255
|
}
|
|
14244
|
-
function
|
|
14256
|
+
function Hf(n, t, e) {
|
|
14245
14257
|
let r;
|
|
14246
14258
|
try {
|
|
14247
14259
|
if (r = JSON.parse(n), !("method" in r) || !("data" in r)) return;
|
|
@@ -14273,11 +14285,11 @@ function Vf(n, t, e) {
|
|
|
14273
14285
|
function ms(n) {
|
|
14274
14286
|
let t, e;
|
|
14275
14287
|
return "signer" in n && typeof n.signer == "object" && n.signer && "blockchain" in n.signer && "wallet" in n.signer ? (t = n.signer.blockchain, e = n.signer.wallet) : "blockchain" in n && n.blockchain && (t = n.blockchain, e = n.wallet), t ? Ye.byBlockchain(t, {
|
|
14276
|
-
solana: () =>
|
|
14288
|
+
solana: () => Vf({
|
|
14277
14289
|
wallet: e,
|
|
14278
14290
|
onSuccess: n.onSuccess
|
|
14279
14291
|
}),
|
|
14280
|
-
near: () =>
|
|
14292
|
+
near: () => jf({
|
|
14281
14293
|
wallet: e,
|
|
14282
14294
|
onSuccess: n.onSuccess
|
|
14283
14295
|
}),
|
|
@@ -14297,7 +14309,7 @@ function ms(n) {
|
|
|
14297
14309
|
wallet: e,
|
|
14298
14310
|
onSuccess: n.onSuccess
|
|
14299
14311
|
}),
|
|
14300
|
-
user: () =>
|
|
14312
|
+
user: () => Gf(n)
|
|
14301
14313
|
})() : {
|
|
14302
14314
|
handleSendTransaction: () => {
|
|
14303
14315
|
throw new Error("handleSendTransaction Not Implemented");
|
|
@@ -14311,7 +14323,7 @@ function ms(n) {
|
|
|
14311
14323
|
onSuccess: n.onSuccess
|
|
14312
14324
|
};
|
|
14313
14325
|
}
|
|
14314
|
-
function
|
|
14326
|
+
function Vf({
|
|
14315
14327
|
wallet: n,
|
|
14316
14328
|
onSuccess: t
|
|
14317
14329
|
}) {
|
|
@@ -14358,7 +14370,7 @@ function _o(n) {
|
|
|
14358
14370
|
const t = nr.decode(n), e = pn.VersionedTransaction.deserialize(t);
|
|
14359
14371
|
return e.version === "legacy" ? pn.Transaction.from(t) : e;
|
|
14360
14372
|
}
|
|
14361
|
-
function
|
|
14373
|
+
function jf({
|
|
14362
14374
|
wallet: n,
|
|
14363
14375
|
onSuccess: t
|
|
14364
14376
|
}) {
|
|
@@ -14385,7 +14397,7 @@ function ln({
|
|
|
14385
14397
|
onSuccess: t
|
|
14386
14398
|
};
|
|
14387
14399
|
}
|
|
14388
|
-
function
|
|
14400
|
+
function Gf({
|
|
14389
14401
|
onSuccess: n
|
|
14390
14402
|
}) {
|
|
14391
14403
|
return {
|
|
@@ -14393,13 +14405,13 @@ function Zf({
|
|
|
14393
14405
|
onSuccess: n
|
|
14394
14406
|
};
|
|
14395
14407
|
}
|
|
14396
|
-
const zn = "tokenExCardNumber", Gr = "tokenExCardCvv",
|
|
14408
|
+
const zn = "tokenExCardNumber", Gr = "tokenExCardCvv", Zf = {
|
|
14397
14409
|
[qr.VISA]: "visa",
|
|
14398
14410
|
[qr.MASTERCARD]: "masterCard",
|
|
14399
14411
|
[qr.AMEX]: "americanExpress",
|
|
14400
14412
|
[qr.DISCOVER]: "discover"
|
|
14401
14413
|
};
|
|
14402
|
-
async function
|
|
14414
|
+
async function Yf(n) {
|
|
14403
14415
|
const { token: t, origins: e, env: r } = n;
|
|
14404
14416
|
return new Promise((s, i) => {
|
|
14405
14417
|
fetch(new Ye(r).url + "/api/checkout/v2/authentication-key", {
|
|
@@ -14429,7 +14441,7 @@ function Bo({
|
|
|
14429
14441
|
console.log("Setting tokenExScriptLoaded to true!"), t(!0);
|
|
14430
14442
|
});
|
|
14431
14443
|
}
|
|
14432
|
-
function
|
|
14444
|
+
function Jf({
|
|
14433
14445
|
iframe: n,
|
|
14434
14446
|
setCachedToken: t,
|
|
14435
14447
|
setLoaded: e
|
|
@@ -14453,7 +14465,7 @@ function Xf({
|
|
|
14453
14465
|
n.cvvFocus();
|
|
14454
14466
|
}), e(!1), n.load(), { ...n, tokenize: r };
|
|
14455
14467
|
}
|
|
14456
|
-
async function
|
|
14468
|
+
async function Xf(n) {
|
|
14457
14469
|
const { token: t, cardType: e } = n;
|
|
14458
14470
|
return await ws(Gr, n, {
|
|
14459
14471
|
cvvOnly: !0,
|
|
@@ -14461,17 +14473,17 @@ async function Qf(n) {
|
|
|
14461
14473
|
cvvContainerID: Gr,
|
|
14462
14474
|
placeholder: "CVV",
|
|
14463
14475
|
token: t,
|
|
14464
|
-
cardType:
|
|
14476
|
+
cardType: Zf[e]
|
|
14465
14477
|
});
|
|
14466
14478
|
}
|
|
14467
|
-
async function
|
|
14479
|
+
async function Qf(n) {
|
|
14468
14480
|
return await ws(zn, n, {
|
|
14469
14481
|
cvv: !0,
|
|
14470
14482
|
cvvContainerID: Gr,
|
|
14471
14483
|
cvvPlaceholder: "CVV"
|
|
14472
14484
|
});
|
|
14473
14485
|
}
|
|
14474
|
-
async function
|
|
14486
|
+
async function td(n) {
|
|
14475
14487
|
return await ws(zn, n, { cvv: !1 });
|
|
14476
14488
|
}
|
|
14477
14489
|
async function ws(n, t, e) {
|
|
@@ -14482,10 +14494,10 @@ async function ws(n, t, e) {
|
|
|
14482
14494
|
);
|
|
14483
14495
|
return;
|
|
14484
14496
|
}
|
|
14485
|
-
const g = await
|
|
14497
|
+
const g = await Yf({
|
|
14486
14498
|
...t,
|
|
14487
14499
|
token: e.token
|
|
14488
|
-
}), { styles: w } =
|
|
14500
|
+
}), { styles: w } = ed(s), k = {
|
|
14489
14501
|
...g,
|
|
14490
14502
|
placeholder: "0000 0000 0000 0000",
|
|
14491
14503
|
enablePrettyFormat: !0,
|
|
@@ -14494,9 +14506,9 @@ async function ws(n, t, e) {
|
|
|
14494
14506
|
debug: i ?? !1,
|
|
14495
14507
|
...e
|
|
14496
14508
|
}, T = TokenEx.Iframe(n, k);
|
|
14497
|
-
return
|
|
14509
|
+
return Jf({ iframe: T, setCachedToken: u, setLoaded: f });
|
|
14498
14510
|
}
|
|
14499
|
-
function
|
|
14511
|
+
function ed(n) {
|
|
14500
14512
|
var r, s, i;
|
|
14501
14513
|
const t = JSON.parse(n);
|
|
14502
14514
|
return { styles: {
|
|
@@ -14524,7 +14536,7 @@ function er(n) {
|
|
|
14524
14536
|
}
|
|
14525
14537
|
return t;
|
|
14526
14538
|
}
|
|
14527
|
-
const
|
|
14539
|
+
const rd = Re({
|
|
14528
14540
|
name: "CoinflowIFrame",
|
|
14529
14541
|
props: {
|
|
14530
14542
|
args: {
|
|
@@ -14552,7 +14564,7 @@ const nd = Re({
|
|
|
14552
14564
|
if (!t.includes(Ye.getCoinflowBaseUrl(this.args.env)))
|
|
14553
14565
|
return;
|
|
14554
14566
|
this.$emit("onMessage", { data: n, origin: t });
|
|
14555
|
-
const e =
|
|
14567
|
+
const e = Hf(
|
|
14556
14568
|
n,
|
|
14557
14569
|
this.args,
|
|
14558
14570
|
this.args.handleHeightChangeId
|
|
@@ -14593,9 +14605,9 @@ const nd = Re({
|
|
|
14593
14605
|
for (const [r, s] of t)
|
|
14594
14606
|
e[r] = s;
|
|
14595
14607
|
return e;
|
|
14596
|
-
},
|
|
14597
|
-
function
|
|
14598
|
-
return Se(),
|
|
14608
|
+
}, nd = ["src", "scrolling"];
|
|
14609
|
+
function id(n, t, e, r, s, i) {
|
|
14610
|
+
return Se(), Le("iframe", {
|
|
14599
14611
|
style: { height: "100%", width: "100%" },
|
|
14600
14612
|
ref: "iframeRef",
|
|
14601
14613
|
allow: "payment;camera;clipboard-write",
|
|
@@ -14607,9 +14619,9 @@ function sd(n, t, e, r, s, i) {
|
|
|
14607
14619
|
const o = n.$refs.iframeRef;
|
|
14608
14620
|
o && (o.style.opacity = "1");
|
|
14609
14621
|
})
|
|
14610
|
-
}, null, 40,
|
|
14622
|
+
}, null, 40, nd);
|
|
14611
14623
|
}
|
|
14612
|
-
const ks = /* @__PURE__ */ bs(
|
|
14624
|
+
const ks = /* @__PURE__ */ bs(rd, [["render", id]]), sd = Re({
|
|
14613
14625
|
name: "CoinflowWithdraw",
|
|
14614
14626
|
components: { CoinflowIFrame: ks },
|
|
14615
14627
|
props: {
|
|
@@ -14639,13 +14651,13 @@ const ks = /* @__PURE__ */ bs(nd, [["render", sd]]), od = Re({
|
|
|
14639
14651
|
}
|
|
14640
14652
|
}
|
|
14641
14653
|
});
|
|
14642
|
-
function
|
|
14654
|
+
function od(n, t, e, r, s, i) {
|
|
14643
14655
|
const o = Ro("coinflow-i-frame");
|
|
14644
14656
|
return Se(), In(o, {
|
|
14645
14657
|
args: { ...n.iframeProps, ...n.messageHandlers, handleHeightChangeId: n.handleHeightChangeId }
|
|
14646
14658
|
}, null, 8, ["args"]);
|
|
14647
14659
|
}
|
|
14648
|
-
const
|
|
14660
|
+
const Md = /* @__PURE__ */ bs(sd, [["render", od]]), ad = Re({
|
|
14649
14661
|
name: "CoinflowPurchase",
|
|
14650
14662
|
components: { CoinflowIFrame: ks },
|
|
14651
14663
|
props: {
|
|
@@ -14675,13 +14687,13 @@ const Td = /* @__PURE__ */ bs(od, [["render", ad]]), cd = Re({
|
|
|
14675
14687
|
}
|
|
14676
14688
|
}
|
|
14677
14689
|
});
|
|
14678
|
-
function
|
|
14690
|
+
function cd(n, t, e, r, s, i) {
|
|
14679
14691
|
const o = Ro("coinflow-i-frame");
|
|
14680
14692
|
return Se(), In(o, {
|
|
14681
14693
|
args: { ...n.iframeProps, ...n.messageHandlers, handleHeightChangeId: n.handleHeightChangeId }
|
|
14682
14694
|
}, null, 8, ["args"]);
|
|
14683
14695
|
}
|
|
14684
|
-
const
|
|
14696
|
+
const Td = /* @__PURE__ */ bs(ad, [["render", cd]]), vs = (n) => {
|
|
14685
14697
|
const t = cr(!1), e = cr(!1), r = cr(void 0), s = cr(void 0);
|
|
14686
14698
|
Mo(() => {
|
|
14687
14699
|
Bo({
|
|
@@ -14692,7 +14704,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14692
14704
|
});
|
|
14693
14705
|
});
|
|
14694
14706
|
const i = (k) => s.value = k, o = () => t.value = !0, u = (k) => r.value = k, f = async (k) => {
|
|
14695
|
-
const T = await
|
|
14707
|
+
const T = await Xf({
|
|
14696
14708
|
...n,
|
|
14697
14709
|
...k,
|
|
14698
14710
|
tokenExScriptLoaded: e.value,
|
|
@@ -14701,7 +14713,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14701
14713
|
});
|
|
14702
14714
|
return u(T), T;
|
|
14703
14715
|
}, g = async (k) => {
|
|
14704
|
-
const T = await
|
|
14716
|
+
const T = await Qf({
|
|
14705
14717
|
...n,
|
|
14706
14718
|
...k,
|
|
14707
14719
|
tokenExScriptLoaded: e.value,
|
|
@@ -14710,7 +14722,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14710
14722
|
});
|
|
14711
14723
|
return u(T), T;
|
|
14712
14724
|
}, w = async (k) => {
|
|
14713
|
-
const T = await
|
|
14725
|
+
const T = await td({
|
|
14714
14726
|
...n,
|
|
14715
14727
|
...k,
|
|
14716
14728
|
tokenExScriptLoaded: e.value,
|
|
@@ -14734,7 +14746,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14734
14746
|
setTokenExScriptTag: Bo,
|
|
14735
14747
|
tokenExScriptLoaded: e
|
|
14736
14748
|
};
|
|
14737
|
-
},
|
|
14749
|
+
}, ud = ["id"], Pd = /* @__PURE__ */ Re({
|
|
14738
14750
|
__name: "CoinflowCardNumberInput",
|
|
14739
14751
|
props: {
|
|
14740
14752
|
args: {
|
|
@@ -14761,14 +14773,14 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14761
14773
|
origins: n.args.origins,
|
|
14762
14774
|
font: n.args.font
|
|
14763
14775
|
});
|
|
14764
|
-
}, {}), (o, u) => (Se(),
|
|
14776
|
+
}, {}), (o, u) => (Se(), Le("div", { id: Tr(zn) }, null, 8, ud));
|
|
14765
14777
|
}
|
|
14766
|
-
}),
|
|
14778
|
+
}), ld = ["id"], Ld = /* @__PURE__ */ Re({
|
|
14767
14779
|
__name: "CoinflowCvvInput",
|
|
14768
14780
|
setup(n) {
|
|
14769
|
-
return (t, e) => (Se(),
|
|
14781
|
+
return (t, e) => (Se(), Le("div", { id: Tr(Gr) }, null, 8, ld));
|
|
14770
14782
|
}
|
|
14771
|
-
}),
|
|
14783
|
+
}), hd = ["id"], Cd = /* @__PURE__ */ Re({
|
|
14772
14784
|
__name: "CoinflowCvvOnlyInput",
|
|
14773
14785
|
props: {
|
|
14774
14786
|
args: {
|
|
@@ -14795,9 +14807,9 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14795
14807
|
css: i(),
|
|
14796
14808
|
font: n.args.font
|
|
14797
14809
|
});
|
|
14798
|
-
}, {}), (o, u) => (Se(),
|
|
14810
|
+
}, {}), (o, u) => (Se(), Le("div", { id: Tr(Gr) }, null, 8, hd));
|
|
14799
14811
|
}
|
|
14800
|
-
}),
|
|
14812
|
+
}), Od = /* @__PURE__ */ Re({
|
|
14801
14813
|
__name: "CoinflowPurchaseProtection",
|
|
14802
14814
|
props: {
|
|
14803
14815
|
args: {
|
|
@@ -14829,7 +14841,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14829
14841
|
});
|
|
14830
14842
|
}), (s, i) => null;
|
|
14831
14843
|
}
|
|
14832
|
-
}),
|
|
14844
|
+
}), fd = ["id"], Ud = /* @__PURE__ */ Re({
|
|
14833
14845
|
__name: "CoinflowCardNumberOnlyInput",
|
|
14834
14846
|
props: {
|
|
14835
14847
|
args: {
|
|
@@ -14856,12 +14868,12 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14856
14868
|
origins: n.args.origins,
|
|
14857
14869
|
font: n.args.font
|
|
14858
14870
|
});
|
|
14859
|
-
}, {}), (o, u) => (Se(),
|
|
14871
|
+
}, {}), (o, u) => (Se(), Le("div", { id: Tr(zn) }, null, 8, fd));
|
|
14860
14872
|
}
|
|
14861
|
-
}),
|
|
14873
|
+
}), dd = { style: {
|
|
14862
14874
|
position: "relative",
|
|
14863
14875
|
height: "100%"
|
|
14864
|
-
} },
|
|
14876
|
+
} }, pd = { style: {
|
|
14865
14877
|
position: "relative",
|
|
14866
14878
|
zIndex: 10,
|
|
14867
14879
|
height: "100%"
|
|
@@ -14919,7 +14931,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14919
14931
|
}
|
|
14920
14932
|
t == null || t(f);
|
|
14921
14933
|
}
|
|
14922
|
-
return (f, g) => (Se(),
|
|
14934
|
+
return (f, g) => (Se(), Le("div", dd, [
|
|
14923
14935
|
Kr("div", {
|
|
14924
14936
|
style: Ka({
|
|
14925
14937
|
backgroundColor: n.args.color,
|
|
@@ -14939,7 +14951,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14939
14951
|
}, [
|
|
14940
14952
|
Wa(f.$slots, "default")
|
|
14941
14953
|
], 4),
|
|
14942
|
-
Kr("div",
|
|
14954
|
+
Kr("div", pd, [
|
|
14943
14955
|
Wi(ks, {
|
|
14944
14956
|
onOnMessage: u,
|
|
14945
14957
|
args: { ...e(), ...r(), handleHeightChangeId: Tr(o) }
|
|
@@ -14947,10 +14959,10 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14947
14959
|
])
|
|
14948
14960
|
]));
|
|
14949
14961
|
}
|
|
14950
|
-
}),
|
|
14962
|
+
}), gd = {
|
|
14951
14963
|
id: "svg-logo",
|
|
14952
14964
|
viewBox: "0 0 35 15"
|
|
14953
|
-
},
|
|
14965
|
+
}, yd = {
|
|
14954
14966
|
id: "svg-logo",
|
|
14955
14967
|
x: "0",
|
|
14956
14968
|
y: "3.85",
|
|
@@ -14961,12 +14973,12 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14961
14973
|
version: "1.1",
|
|
14962
14974
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14963
14975
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
14964
|
-
},
|
|
14976
|
+
}, md = {
|
|
14965
14977
|
stroke: "none",
|
|
14966
14978
|
"stroke-width": "1",
|
|
14967
14979
|
fill: "none",
|
|
14968
14980
|
"fill-rule": "evenodd"
|
|
14969
|
-
},
|
|
14981
|
+
}, wd = ["fill"], bd = /* @__PURE__ */ Re({
|
|
14970
14982
|
__name: "ApplePayOverlay",
|
|
14971
14983
|
props: {
|
|
14972
14984
|
color: {
|
|
@@ -14976,18 +14988,18 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
14976
14988
|
},
|
|
14977
14989
|
setup(n) {
|
|
14978
14990
|
const t = n.color === "white" ? "#000" : "#FFF";
|
|
14979
|
-
return (e, r) => (Se(),
|
|
14980
|
-
(Se(),
|
|
14991
|
+
return (e, r) => (Se(), Le("svg", gd, [
|
|
14992
|
+
(Se(), Le("svg", yd, [
|
|
14981
14993
|
r[1] || (r[1] = Kr("title", null, "Apple Logo", -1)),
|
|
14982
|
-
Kr("g",
|
|
14994
|
+
Kr("g", md, [
|
|
14983
14995
|
Kr("g", { fill: Tr(t) }, r[0] || (r[0] = [
|
|
14984
14996
|
Bi('<path d="M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674"></path><path d="M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926"></path><path d="M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381"></path><path d="M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z"></path><path d="M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345"></path>', 5)
|
|
14985
|
-
]), 8,
|
|
14997
|
+
]), 8, wd)
|
|
14986
14998
|
])
|
|
14987
14999
|
]))
|
|
14988
15000
|
]));
|
|
14989
15001
|
}
|
|
14990
|
-
}),
|
|
15002
|
+
}), Nd = /* @__PURE__ */ Re({
|
|
14991
15003
|
__name: "CoinflowApplePayButton",
|
|
14992
15004
|
props: {
|
|
14993
15005
|
args: {
|
|
@@ -15001,24 +15013,24 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
15001
15013
|
args: n.args
|
|
15002
15014
|
}, {
|
|
15003
15015
|
default: To(() => [
|
|
15004
|
-
Wi(
|
|
15016
|
+
Wi(bd, {
|
|
15005
15017
|
color: n.args.color
|
|
15006
15018
|
}, null, 8, ["color"])
|
|
15007
15019
|
]),
|
|
15008
15020
|
_: 1
|
|
15009
15021
|
}, 8, ["args"]));
|
|
15010
15022
|
}
|
|
15011
|
-
}),
|
|
15023
|
+
}), kd = {
|
|
15012
15024
|
key: 0,
|
|
15013
15025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15014
15026
|
width: "41",
|
|
15015
15027
|
height: "17"
|
|
15016
|
-
},
|
|
15028
|
+
}, vd = {
|
|
15017
15029
|
key: 1,
|
|
15018
15030
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15019
15031
|
width: "41",
|
|
15020
15032
|
height: "17"
|
|
15021
|
-
},
|
|
15033
|
+
}, Sd = /* @__PURE__ */ Re({
|
|
15022
15034
|
__name: "GooglePayOverlay",
|
|
15023
15035
|
props: {
|
|
15024
15036
|
color: {
|
|
@@ -15027,16 +15039,16 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
15027
15039
|
}
|
|
15028
15040
|
},
|
|
15029
15041
|
setup(n) {
|
|
15030
|
-
return (t, e) => (Se(),
|
|
15031
|
-
n.color === "white" ? (Se(),
|
|
15042
|
+
return (t, e) => (Se(), Le(Da, null, [
|
|
15043
|
+
n.color === "white" ? (Se(), Le("svg", kd, e[0] || (e[0] = [
|
|
15032
15044
|
Bi('<g fill="none" fill-rule="evenodd"><path d="M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z" fill="#5F6368"></path><path d="M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944" fill="#4285F4"></path><path d="M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703" fill="#34A853"></path><path d="M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z" fill="#FABB05"></path><path d="M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774" fill="#E94235"></path><path d="M0 0h41.285v18H0z"></path></g>', 1)
|
|
15033
15045
|
]))) : Ms("", !0),
|
|
15034
|
-
n.color === "black" ? (Se(),
|
|
15046
|
+
n.color === "black" ? (Se(), Le("svg", vd, e[1] || (e[1] = [
|
|
15035
15047
|
Bi('<g fill="none" fill-rule="evenodd"><path d="M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z" fill="#FFF"></path><path d="M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944" fill="#4285F4"></path><path d="M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703" fill="#34A853"></path><path d="M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z" fill="#FABB05"></path><path d="M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774" fill="#E94235"></path></g>', 1)
|
|
15036
15048
|
]))) : Ms("", !0)
|
|
15037
15049
|
], 64));
|
|
15038
15050
|
}
|
|
15039
|
-
}),
|
|
15051
|
+
}), Fd = /* @__PURE__ */ Re({
|
|
15040
15052
|
__name: "CoinflowGooglePayButton",
|
|
15041
15053
|
props: {
|
|
15042
15054
|
args: {
|
|
@@ -15052,7 +15064,7 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
15052
15064
|
alignItems: "center"
|
|
15053
15065
|
}, {
|
|
15054
15066
|
default: To(() => [
|
|
15055
|
-
Wi(
|
|
15067
|
+
Wi(Sd, {
|
|
15056
15068
|
color: n.args.color
|
|
15057
15069
|
}, null, 8, ["color"])
|
|
15058
15070
|
]),
|
|
@@ -15061,19 +15073,19 @@ const Pd = /* @__PURE__ */ bs(cd, [["render", ud]]), vs = (n) => {
|
|
|
15061
15073
|
}
|
|
15062
15074
|
});
|
|
15063
15075
|
export {
|
|
15064
|
-
|
|
15076
|
+
Zf as CARD_TYPE_MAPPING,
|
|
15065
15077
|
qr as CardType,
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15078
|
+
Nd as CoinflowApplePayButton,
|
|
15079
|
+
Pd as CoinflowCardNumberInput,
|
|
15080
|
+
Ud as CoinflowCardNumberOnlyInput,
|
|
15069
15081
|
Ld as CoinflowCvvInput,
|
|
15070
|
-
|
|
15071
|
-
|
|
15082
|
+
Cd as CoinflowCvvOnlyInput,
|
|
15083
|
+
Fd as CoinflowGooglePayButton,
|
|
15072
15084
|
ks as CoinflowIframe,
|
|
15073
|
-
|
|
15074
|
-
|
|
15085
|
+
Td as CoinflowPurchase,
|
|
15086
|
+
Od as CoinflowPurchaseProtection,
|
|
15075
15087
|
Ye as CoinflowUtils,
|
|
15076
|
-
|
|
15088
|
+
Md as CoinflowWithdraw,
|
|
15077
15089
|
Ua as Currency,
|
|
15078
15090
|
Ha as MerchantStyle,
|
|
15079
15091
|
ja as PaymentMethods,
|
|
@@ -15081,13 +15093,13 @@ export {
|
|
|
15081
15093
|
Va as ThreeDsChallengePreference,
|
|
15082
15094
|
zn as TokenExCardNumberIframeId,
|
|
15083
15095
|
Gr as TokenExCvvContainerID,
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
-
|
|
15096
|
+
Xf as doInitializeCvvOnlyTokenExIframe,
|
|
15097
|
+
td as doInitializeTokenExCardOnlyIframe,
|
|
15098
|
+
Qf as doInitializeTokenExIframe,
|
|
15099
|
+
Rd as getCustomerName,
|
|
15088
15100
|
ms as getHandlers,
|
|
15089
|
-
|
|
15101
|
+
Yf as getIframeConfig,
|
|
15090
15102
|
ys as getWalletPubkey,
|
|
15091
|
-
|
|
15103
|
+
Hf as handleIFrameMessage,
|
|
15092
15104
|
Bo as setTokenExScriptTag
|
|
15093
15105
|
};
|