@coinflowlabs/vue 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/coinflow-vue.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { defineComponent as kt, createElementBlock as Bt, openBlock as Rt, resolveComponent as No, createBlock as In, ref as cr, onMounted as xo, watchEffect as Xr, unref as Lr, createElementVNode as Hr, normalizeStyle as ja, renderSlot as Za, createVNode as Hi, createStaticVNode as Ni, withCtx as Bo, Fragment as Xa, createCommentVNode as xs } from "vue";
|
|
2
|
-
var Ja = /* @__PURE__ */ ((r) => (r.USER = "user", r.BUSINESS = "business", r))(Ja || {}), Qa = /* @__PURE__ */ ((r) => (r.ASAP = "asap", r.SAME_DAY = "same_day", r.STANDARD = "standard", r.CARD = "card", r.IBAN = "iban", r.PIX = "pix", r.EFT = "eft", r.VENMO = "venmo", r))(Qa || {}), ec = /* @__PURE__ */ ((r) => (r.Credits = "Credits", r.USDC = "USDC", r.Bank = "Bank", r))(ec || {}), tc = /* @__PURE__ */ ((r) => (r.Rounded = "rounded", r.Sharp = "sharp", r.Pill = "pill", r))(tc || {}), rc = /* @__PURE__ */ ((r) => (r.NoPreference = "NoPreference", r.Frictionless = "Frictionless", r.Challenge = "Challenge", r))(rc || {}), nc = /* @__PURE__ */ ((r) => (r.card = "card", r.ach = "ach", r.fasterPayments = "fasterPayments", r.sepa = "sepa", r.pix = "pix", r.usdc = "usdc", r.googlePay = "googlePay", r.applePay = "applePay", r.credits = "credits", r.crypto = "crypto", r.instantBankTransfer = "instantBankTransfer", r))(nc || {})
|
|
2
|
+
var Ja = /* @__PURE__ */ ((r) => (r.USER = "user", r.BUSINESS = "business", r))(Ja || {}), Qa = /* @__PURE__ */ ((r) => (r.ASAP = "asap", r.SAME_DAY = "same_day", r.STANDARD = "standard", r.CARD = "card", r.IBAN = "iban", r.PIX = "pix", r.EFT = "eft", r.VENMO = "venmo", r))(Qa || {}), ec = /* @__PURE__ */ ((r) => (r.Credits = "Credits", r.USDC = "USDC", r.Bank = "Bank", r))(ec || {}), tc = /* @__PURE__ */ ((r) => (r.Rounded = "rounded", r.Sharp = "sharp", r.Pill = "pill", r))(tc || {}), rc = /* @__PURE__ */ ((r) => (r.NoPreference = "NoPreference", r.Frictionless = "Frictionless", r.Challenge = "Challenge", r))(rc || {}), nc = /* @__PURE__ */ ((r) => (r.card = "card", r.ach = "ach", r.fasterPayments = "fasterPayments", r.sepa = "sepa", r.pix = "pix", r.usdc = "usdc", r.googlePay = "googlePay", r.applePay = "applePay", r.credits = "credits", r.crypto = "crypto", r.instantBankTransfer = "instantBankTransfer", r))(nc || {});
|
|
3
|
+
const em = {
|
|
4
|
+
card: "Card",
|
|
5
|
+
ach: "ACH",
|
|
6
|
+
fasterPayments: "Faster Payments",
|
|
7
|
+
sepa: "SEPA",
|
|
8
|
+
pix: "PIX",
|
|
9
|
+
usdc: "USDC",
|
|
10
|
+
googlePay: "Google Pay",
|
|
11
|
+
applePay: "Apple Pay",
|
|
12
|
+
credits: "Credits",
|
|
13
|
+
crypto: "Crypto",
|
|
14
|
+
instantBankTransfer: "Instant Bank Transfer"
|
|
15
|
+
};
|
|
16
|
+
var $r = /* @__PURE__ */ ((r) => (r.VISA = "VISA", r.MASTERCARD = "MSTR", r.AMEX = "AMEX", r.DISCOVER = "DISC", r))($r || {});
|
|
3
17
|
function Jr(r) {
|
|
4
18
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
5
19
|
}
|
|
@@ -51,27 +65,27 @@ function ic() {
|
|
|
51
65
|
return (L + O) * 3 / 4 - O;
|
|
52
66
|
}
|
|
53
67
|
function g(T) {
|
|
54
|
-
var L, O = o(T), N = O[0],
|
|
68
|
+
var L, O = o(T), N = O[0], P = O[1], H = new t(f(T, N, P)), K = 0, Q = P > 0 ? N - 4 : N, W;
|
|
55
69
|
for (W = 0; W < Q; W += 4)
|
|
56
70
|
L = e[T.charCodeAt(W)] << 18 | e[T.charCodeAt(W + 1)] << 12 | e[T.charCodeAt(W + 2)] << 6 | e[T.charCodeAt(W + 3)], H[K++] = L >> 16 & 255, H[K++] = L >> 8 & 255, H[K++] = L & 255;
|
|
57
|
-
return
|
|
71
|
+
return P === 2 && (L = e[T.charCodeAt(W)] << 2 | e[T.charCodeAt(W + 1)] >> 4, H[K++] = L & 255), P === 1 && (L = e[T.charCodeAt(W)] << 10 | e[T.charCodeAt(W + 1)] << 4 | e[T.charCodeAt(W + 2)] >> 2, H[K++] = L >> 8 & 255, H[K++] = L & 255), H;
|
|
58
72
|
}
|
|
59
73
|
function w(T) {
|
|
60
74
|
return r[T >> 18 & 63] + r[T >> 12 & 63] + r[T >> 6 & 63] + r[T & 63];
|
|
61
75
|
}
|
|
62
76
|
function b(T, L, O) {
|
|
63
|
-
for (var N,
|
|
64
|
-
N = (T[H] << 16 & 16711680) + (T[H + 1] << 8 & 65280) + (T[H + 2] & 255),
|
|
65
|
-
return
|
|
77
|
+
for (var N, P = [], H = L; H < O; H += 3)
|
|
78
|
+
N = (T[H] << 16 & 16711680) + (T[H + 1] << 8 & 65280) + (T[H + 2] & 255), P.push(w(N));
|
|
79
|
+
return P.join("");
|
|
66
80
|
}
|
|
67
81
|
function x(T) {
|
|
68
|
-
for (var L, O = T.length, N = O % 3,
|
|
69
|
-
|
|
70
|
-
return N === 1 ? (L = T[O - 1],
|
|
82
|
+
for (var L, O = T.length, N = O % 3, P = [], H = 16383, K = 0, Q = O - N; K < Q; K += H)
|
|
83
|
+
P.push(b(T, K, K + H > Q ? Q : K + H));
|
|
84
|
+
return N === 1 ? (L = T[O - 1], P.push(
|
|
71
85
|
r[L >> 2] + r[L << 4 & 63] + "=="
|
|
72
|
-
)) : N === 2 && (L = (T[O - 2] << 8) + T[O - 1],
|
|
86
|
+
)) : N === 2 && (L = (T[O - 2] << 8) + T[O - 1], P.push(
|
|
73
87
|
r[L >> 10] + r[L >> 4 & 63] + r[L << 2 & 63] + "="
|
|
74
|
-
)),
|
|
88
|
+
)), P.join("");
|
|
75
89
|
}
|
|
76
90
|
return Fr;
|
|
77
91
|
}
|
|
@@ -199,7 +213,7 @@ function qi() {
|
|
|
199
213
|
return w(_, h, d);
|
|
200
214
|
};
|
|
201
215
|
function b(_) {
|
|
202
|
-
return g(_), o(_ < 0 ? 0 :
|
|
216
|
+
return g(_), o(_ < 0 ? 0 : P(_) | 0);
|
|
203
217
|
}
|
|
204
218
|
a.allocUnsafe = function(_) {
|
|
205
219
|
return b(_);
|
|
@@ -215,7 +229,7 @@ function qi() {
|
|
|
215
229
|
return U !== d && (v = v.slice(0, U)), v;
|
|
216
230
|
}
|
|
217
231
|
function T(_) {
|
|
218
|
-
const h = _.length < 0 ? 0 :
|
|
232
|
+
const h = _.length < 0 ? 0 : P(_.length) | 0, d = o(h);
|
|
219
233
|
for (let v = 0; v < h; v += 1)
|
|
220
234
|
d[v] = _[v] & 255;
|
|
221
235
|
return d;
|
|
@@ -237,7 +251,7 @@ function qi() {
|
|
|
237
251
|
}
|
|
238
252
|
function N(_) {
|
|
239
253
|
if (a.isBuffer(_)) {
|
|
240
|
-
const h =
|
|
254
|
+
const h = P(_.length) | 0, d = o(h);
|
|
241
255
|
return d.length === 0 || _.copy(d, 0, 0, h), d;
|
|
242
256
|
}
|
|
243
257
|
if (_.length !== void 0)
|
|
@@ -245,7 +259,7 @@ function qi() {
|
|
|
245
259
|
if (_.type === "Buffer" && Array.isArray(_.data))
|
|
246
260
|
return T(_.data);
|
|
247
261
|
}
|
|
248
|
-
function
|
|
262
|
+
function P(_) {
|
|
249
263
|
if (_ >= s)
|
|
250
264
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s.toString(16) + " bytes");
|
|
251
265
|
return _ | 0;
|
|
@@ -810,13 +824,13 @@ function qi() {
|
|
|
810
824
|
if (d + v > _.length) throw new RangeError("Index out of range");
|
|
811
825
|
if (d < 0) throw new RangeError("Index out of range");
|
|
812
826
|
}
|
|
813
|
-
function
|
|
827
|
+
function M(_, h, d, v, U) {
|
|
814
828
|
return h = +h, d = d >>> 0, U || k(_, h, d, 4), t.write(_, h, d, v, 23, 4), d + 4;
|
|
815
829
|
}
|
|
816
830
|
a.prototype.writeFloatLE = function(h, d, v) {
|
|
817
|
-
return
|
|
831
|
+
return M(this, h, d, !0, v);
|
|
818
832
|
}, a.prototype.writeFloatBE = function(h, d, v) {
|
|
819
|
-
return
|
|
833
|
+
return M(this, h, d, !1, v);
|
|
820
834
|
};
|
|
821
835
|
function V(_, h, d, v, U) {
|
|
822
836
|
return h = +h, d = d >>> 0, U || k(_, h, d, 8), t.write(_, h, d, v, 52, 8), d + 8;
|
|
@@ -944,7 +958,7 @@ function qi() {
|
|
|
944
958
|
);
|
|
945
959
|
}
|
|
946
960
|
const ve = /[^+/0-9A-Za-z-_]/g;
|
|
947
|
-
function
|
|
961
|
+
function Pt(_) {
|
|
948
962
|
if (_ = _.split("=")[0], _ = _.trim().replace(ve, ""), _.length < 2) return "";
|
|
949
963
|
for (; _.length % 4 !== 0; )
|
|
950
964
|
_ = _ + "=";
|
|
@@ -1018,7 +1032,7 @@ function qi() {
|
|
|
1018
1032
|
return F;
|
|
1019
1033
|
}
|
|
1020
1034
|
function Ue(_) {
|
|
1021
|
-
return e.toByteArray(
|
|
1035
|
+
return e.toByteArray(Pt(_));
|
|
1022
1036
|
}
|
|
1023
1037
|
function Ne(_, h, d, v) {
|
|
1024
1038
|
let U;
|
|
@@ -1082,8 +1096,8 @@ function Lo(r, e) {
|
|
|
1082
1096
|
}
|
|
1083
1097
|
const ai = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
1084
1098
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1085
|
-
const cc = (r) => new Uint32Array(r.buffer, r.byteOffset, Math.floor(r.byteLength / 4)), ci = (r) => new DataView(r.buffer, r.byteOffset, r.byteLength),
|
|
1086
|
-
function
|
|
1099
|
+
const cc = (r) => new Uint32Array(r.buffer, r.byteOffset, Math.floor(r.byteLength / 4)), ci = (r) => new DataView(r.buffer, r.byteOffset, r.byteLength), Mt = (r, e) => r << 32 - e | r >>> e, Ps = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, uc = (r) => r << 24 & 4278190080 | r << 8 & 16711680 | r >>> 8 & 65280 | r >>> 24 & 255;
|
|
1100
|
+
function Ms(r) {
|
|
1087
1101
|
for (let e = 0; e < r.length; e++)
|
|
1088
1102
|
r[e] = uc(r[e]);
|
|
1089
1103
|
}
|
|
@@ -1130,7 +1144,7 @@ function fc(r, e, t, n) {
|
|
|
1130
1144
|
r.setUint32(e + f, o, n), r.setUint32(e + g, a, n);
|
|
1131
1145
|
}
|
|
1132
1146
|
const dc = (r, e, t) => r & e ^ ~r & t, pc = (r, e, t) => r & e ^ r & t ^ e & t;
|
|
1133
|
-
class
|
|
1147
|
+
class Po extends Gi {
|
|
1134
1148
|
constructor(e, t, n, s) {
|
|
1135
1149
|
super(), this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = s, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = ci(this.buffer);
|
|
1136
1150
|
}
|
|
@@ -1181,13 +1195,13 @@ class Mo extends Gi {
|
|
|
1181
1195
|
}
|
|
1182
1196
|
}
|
|
1183
1197
|
const an = /* @__PURE__ */ BigInt(2 ** 32 - 1), xi = /* @__PURE__ */ BigInt(32);
|
|
1184
|
-
function
|
|
1198
|
+
function Mo(r, e = !1) {
|
|
1185
1199
|
return e ? { h: Number(r & an), l: Number(r >> xi & an) } : { h: Number(r >> xi & an) | 0, l: Number(r & an) | 0 };
|
|
1186
1200
|
}
|
|
1187
1201
|
function Uo(r, e = !1) {
|
|
1188
1202
|
let t = new Uint32Array(r.length), n = new Uint32Array(r.length);
|
|
1189
1203
|
for (let s = 0; s < r.length; s++) {
|
|
1190
|
-
const { h: i, l: o } =
|
|
1204
|
+
const { h: i, l: o } = Mo(r[s], e);
|
|
1191
1205
|
[t[s], n[s]] = [i, o];
|
|
1192
1206
|
}
|
|
1193
1207
|
return [t, n];
|
|
@@ -1198,7 +1212,7 @@ function Ac(r, e, t, n) {
|
|
|
1198
1212
|
return { h: r + t + (s / 2 ** 32 | 0) | 0, l: s | 0 };
|
|
1199
1213
|
}
|
|
1200
1214
|
const Ic = (r, e, t) => (r >>> 0) + (e >>> 0) + (t >>> 0), vc = (r, e, t, n) => e + t + n + (r / 2 ** 32 | 0) | 0, Oc = (r, e, t, n) => (r >>> 0) + (e >>> 0) + (t >>> 0) + (n >>> 0), kc = (r, e, t, n, s) => e + t + n + s + (r / 2 ** 32 | 0) | 0, Tc = (r, e, t, n, s) => (r >>> 0) + (e >>> 0) + (t >>> 0) + (n >>> 0) + (s >>> 0), Nc = (r, e, t, n, s, i) => e + t + n + s + i + (r / 2 ** 32 | 0) | 0, _e = {
|
|
1201
|
-
fromBig:
|
|
1215
|
+
fromBig: Mo,
|
|
1202
1216
|
split: Uo,
|
|
1203
1217
|
toBig: gc,
|
|
1204
1218
|
shrSH: mc,
|
|
@@ -1302,7 +1316,7 @@ const Ic = (r, e, t) => (r >>> 0) + (e >>> 0) + (t >>> 0), vc = (r, e, t, n) =>
|
|
|
1302
1316
|
"0x5fcb6fab3ad6faec",
|
|
1303
1317
|
"0x6c44198c4a475817"
|
|
1304
1318
|
].map((r) => BigInt(r))), Jt = /* @__PURE__ */ new Uint32Array(80), Qt = /* @__PURE__ */ new Uint32Array(80);
|
|
1305
|
-
class Lc extends
|
|
1319
|
+
class Lc extends Po {
|
|
1306
1320
|
constructor() {
|
|
1307
1321
|
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;
|
|
1308
1322
|
}
|
|
@@ -1322,14 +1336,14 @@ class Lc extends Mo {
|
|
|
1322
1336
|
const Q = Jt[K - 15] | 0, W = Qt[K - 15] | 0, D = _e.rotrSH(Q, W, 1) ^ _e.rotrSH(Q, W, 8) ^ _e.shrSH(Q, W, 7), Z = _e.rotrSL(Q, W, 1) ^ _e.rotrSL(Q, W, 8) ^ _e.shrSL(Q, W, 7), j = Jt[K - 2] | 0, X = Qt[K - 2] | 0, z = _e.rotrSH(j, X, 19) ^ _e.rotrBH(j, X, 61) ^ _e.shrSH(j, X, 6), G = _e.rotrSL(j, X, 19) ^ _e.rotrBL(j, X, 61) ^ _e.shrSL(j, X, 6), ee = _e.add4L(Z, G, Qt[K - 7], Qt[K - 16]), S = _e.add4H(ee, D, z, Jt[K - 7], Jt[K - 16]);
|
|
1323
1337
|
Jt[K] = S | 0, Qt[K] = ee | 0;
|
|
1324
1338
|
}
|
|
1325
|
-
let { Ah: n, Al: s, Bh: i, Bl: o, Ch: a, Cl: f, Dh: g, Dl: w, Eh: b, El: x, Fh: T, Fl: L, Gh: O, Gl: N, Hh:
|
|
1339
|
+
let { Ah: n, Al: s, Bh: i, Bl: o, Ch: a, Cl: f, Dh: g, Dl: w, Eh: b, El: x, Fh: T, Fl: L, Gh: O, Gl: N, Hh: P, Hl: H } = this;
|
|
1326
1340
|
for (let K = 0; K < 80; K++) {
|
|
1327
|
-
const Q = _e.rotrSH(b, x, 14) ^ _e.rotrSH(b, x, 18) ^ _e.rotrBH(b, x, 41), W = _e.rotrSL(b, x, 14) ^ _e.rotrSL(b, x, 18) ^ _e.rotrBL(b, x, 41), D = b & T ^ ~b & O, Z = x & L ^ ~x & N, j = _e.add5L(H, W, Z, Bc[K], Qt[K]), X = _e.add5H(j,
|
|
1328
|
-
|
|
1341
|
+
const Q = _e.rotrSH(b, x, 14) ^ _e.rotrSH(b, x, 18) ^ _e.rotrBH(b, x, 41), W = _e.rotrSL(b, x, 14) ^ _e.rotrSL(b, x, 18) ^ _e.rotrBL(b, x, 41), D = b & T ^ ~b & O, Z = x & L ^ ~x & N, j = _e.add5L(H, W, Z, Bc[K], Qt[K]), X = _e.add5H(j, P, Q, D, xc[K], Jt[K]), z = j | 0, G = _e.rotrSH(n, s, 28) ^ _e.rotrBH(n, s, 34) ^ _e.rotrBH(n, s, 39), ee = _e.rotrSL(n, s, 28) ^ _e.rotrBL(n, s, 34) ^ _e.rotrBL(n, s, 39), S = n & i ^ n & a ^ i & a, c = s & o ^ s & f ^ o & f;
|
|
1342
|
+
P = O | 0, H = N | 0, O = T | 0, N = L | 0, T = b | 0, L = x | 0, { h: b, l: x } = _e.add(g | 0, w | 0, X | 0, z | 0), g = a | 0, w = f | 0, a = i | 0, f = o | 0, i = n | 0, o = s | 0;
|
|
1329
1343
|
const p = _e.add3L(z, ee, c);
|
|
1330
1344
|
n = _e.add3H(p, X, G, S), s = p | 0;
|
|
1331
1345
|
}
|
|
1332
|
-
({ h: n, l: s } = _e.add(this.Ah | 0, this.Al | 0, n | 0, s | 0)), { h: i, l: o } = _e.add(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: a, l: f } = _e.add(this.Ch | 0, this.Cl | 0, a | 0, f | 0), { h: g, l: w } = _e.add(this.Dh | 0, this.Dl | 0, g | 0, w | 0), { h: b, l: x } = _e.add(this.Eh | 0, this.El | 0, b | 0, x | 0), { h: T, l: L } = _e.add(this.Fh | 0, this.Fl | 0, T | 0, L | 0), { h: O, l: N } = _e.add(this.Gh | 0, this.Gl | 0, O | 0, N | 0), { h:
|
|
1346
|
+
({ h: n, l: s } = _e.add(this.Ah | 0, this.Al | 0, n | 0, s | 0)), { h: i, l: o } = _e.add(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: a, l: f } = _e.add(this.Ch | 0, this.Cl | 0, a | 0, f | 0), { h: g, l: w } = _e.add(this.Dh | 0, this.Dl | 0, g | 0, w | 0), { h: b, l: x } = _e.add(this.Eh | 0, this.El | 0, b | 0, x | 0), { h: T, l: L } = _e.add(this.Fh | 0, this.Fl | 0, T | 0, L | 0), { h: O, l: N } = _e.add(this.Gh | 0, this.Gl | 0, O | 0, N | 0), { h: P, l: H } = _e.add(this.Hh | 0, this.Hl | 0, P | 0, H | 0), this.set(n, s, i, o, a, f, g, w, b, x, T, L, O, N, P, H);
|
|
1333
1347
|
}
|
|
1334
1348
|
roundClean() {
|
|
1335
1349
|
Jt.fill(0), Qt.fill(0);
|
|
@@ -1340,7 +1354,7 @@ class Lc extends Mo {
|
|
|
1340
1354
|
}
|
|
1341
1355
|
const Cc = /* @__PURE__ */ Vi(() => new Lc());
|
|
1342
1356
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1343
|
-
const $o = /* @__PURE__ */ BigInt(0), On = /* @__PURE__ */ BigInt(1),
|
|
1357
|
+
const $o = /* @__PURE__ */ BigInt(0), On = /* @__PURE__ */ BigInt(1), Pc = /* @__PURE__ */ BigInt(2);
|
|
1344
1358
|
function fr(r) {
|
|
1345
1359
|
return r instanceof Uint8Array || r != null && typeof r == "object" && r.constructor.name === "Uint8Array";
|
|
1346
1360
|
}
|
|
@@ -1348,12 +1362,12 @@ function en(r) {
|
|
|
1348
1362
|
if (!fr(r))
|
|
1349
1363
|
throw new Error("Uint8Array expected");
|
|
1350
1364
|
}
|
|
1351
|
-
const
|
|
1365
|
+
const Mc = /* @__PURE__ */ Array.from({ length: 256 }, (r, e) => e.toString(16).padStart(2, "0"));
|
|
1352
1366
|
function dr(r) {
|
|
1353
1367
|
en(r);
|
|
1354
1368
|
let e = "";
|
|
1355
1369
|
for (let t = 0; t < r.length; t++)
|
|
1356
|
-
e +=
|
|
1370
|
+
e += Mc[r[t]];
|
|
1357
1371
|
return e;
|
|
1358
1372
|
}
|
|
1359
1373
|
function Ho(r) {
|
|
@@ -1461,7 +1475,7 @@ function Kc(r, e) {
|
|
|
1461
1475
|
function $c(r, e, t) {
|
|
1462
1476
|
return r | (t ? On : $o) << BigInt(e);
|
|
1463
1477
|
}
|
|
1464
|
-
const ji = (r) => (
|
|
1478
|
+
const ji = (r) => (Pc << BigInt(r - 1)) - On, ui = (r) => new Uint8Array(r), Ds = (r) => Uint8Array.from(r);
|
|
1465
1479
|
function Wo(r, e, t) {
|
|
1466
1480
|
if (typeof r != "number" || r < 2)
|
|
1467
1481
|
throw new Error("hashLen must be a number");
|
|
@@ -1803,8 +1817,8 @@ function jo(r, e) {
|
|
|
1803
1817
|
const O = L * f;
|
|
1804
1818
|
let N = Number(o & b);
|
|
1805
1819
|
o >>= T, N > f && (N -= x, o += li);
|
|
1806
|
-
const
|
|
1807
|
-
N === 0 ? w = w.add(t(K, i[
|
|
1820
|
+
const P = O, H = O + Math.abs(N) - 1, K = L % 2 !== 0, Q = N < 0;
|
|
1821
|
+
N === 0 ? w = w.add(t(K, i[P])) : g = g.add(t(Q, i[H]));
|
|
1808
1822
|
}
|
|
1809
1823
|
return { p: g, f: w };
|
|
1810
1824
|
},
|
|
@@ -1858,13 +1872,13 @@ function su(r) {
|
|
|
1858
1872
|
throw new Error("Contexts/pre-hash are not supported");
|
|
1859
1873
|
return E;
|
|
1860
1874
|
}), L = (E) => typeof E == "bigint" && Nt < E, O = (E, A) => L(E) && L(A) && E < A, N = (E) => E === Nt || O(E, g);
|
|
1861
|
-
function
|
|
1875
|
+
function P(E, A) {
|
|
1862
1876
|
if (O(E, A))
|
|
1863
1877
|
return E;
|
|
1864
1878
|
throw new Error(`Expected valid scalar < ${A}, got ${typeof E} ${E}`);
|
|
1865
1879
|
}
|
|
1866
1880
|
function H(E) {
|
|
1867
|
-
return E === Nt ? E :
|
|
1881
|
+
return E === Nt ? E : P(E, n);
|
|
1868
1882
|
}
|
|
1869
1883
|
const K = /* @__PURE__ */ new Map();
|
|
1870
1884
|
function Q(E) {
|
|
@@ -1910,7 +1924,7 @@ function su(r) {
|
|
|
1910
1924
|
const { a: A, d: C } = e;
|
|
1911
1925
|
if (this.is0())
|
|
1912
1926
|
throw new Error("bad point: ZERO");
|
|
1913
|
-
const { ex: R, ey: u, ez: l, et: y } = this, k = w(R * R),
|
|
1927
|
+
const { ex: R, ey: u, ez: l, et: y } = this, k = w(R * R), M = w(u * u), V = w(l * l), re = w(V * V), J = w(k * A), Ee = w(V * w(J + M)), de = w(re + w(C * w(k * M)));
|
|
1914
1928
|
if (Ee !== de)
|
|
1915
1929
|
throw new Error("bad point: equation left != right (1)");
|
|
1916
1930
|
const pe = w(R * u), Le = w(l * y);
|
|
@@ -1920,8 +1934,8 @@ function su(r) {
|
|
|
1920
1934
|
// Compare one point to another.
|
|
1921
1935
|
equals(A) {
|
|
1922
1936
|
Q(A);
|
|
1923
|
-
const { ex: C, ey: R, ez: u } = this, { ex: l, ey: y, ez: k } = A,
|
|
1924
|
-
return
|
|
1937
|
+
const { ex: C, ey: R, ez: u } = this, { ex: l, ey: y, ez: k } = A, M = w(C * k), V = w(l * u), re = w(R * k), J = w(y * u);
|
|
1938
|
+
return M === V && re === J;
|
|
1925
1939
|
}
|
|
1926
1940
|
is0() {
|
|
1927
1941
|
return this.equals(W.ZERO);
|
|
@@ -1933,7 +1947,7 @@ function su(r) {
|
|
|
1933
1947
|
// https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
|
|
1934
1948
|
// Cost: 4M + 4S + 1*a + 6add + 1*2.
|
|
1935
1949
|
double() {
|
|
1936
|
-
const { a: A } = e, { ex: C, ey: R, ez: u } = this, l = w(C * C), y = w(R * R), k = w(cn * w(u * u)),
|
|
1950
|
+
const { a: A } = e, { ex: C, ey: R, ez: u } = this, l = w(C * C), y = w(R * R), k = w(cn * w(u * u)), M = w(A * l), V = C + R, re = w(w(V * V) - l - y), J = M + y, Ee = J - k, de = M - y, pe = w(re * Ee), Le = w(J * de), Re = w(re * de), ve = w(Ee * J);
|
|
1937
1951
|
return new W(pe, Le, ve, Re);
|
|
1938
1952
|
}
|
|
1939
1953
|
// Fast algo for adding 2 Extended Points.
|
|
@@ -1941,15 +1955,15 @@ function su(r) {
|
|
|
1941
1955
|
// Cost: 9M + 1*a + 1*d + 7add.
|
|
1942
1956
|
add(A) {
|
|
1943
1957
|
Q(A);
|
|
1944
|
-
const { a: C, d: R } = e, { ex: u, ey: l, ez: y, et: k } = this, { ex:
|
|
1958
|
+
const { a: C, d: R } = e, { ex: u, ey: l, ez: y, et: k } = this, { ex: M, ey: V, ez: re, et: J } = A;
|
|
1945
1959
|
if (C === BigInt(-1)) {
|
|
1946
|
-
const mt = w((l - u) * (V +
|
|
1960
|
+
const mt = w((l - u) * (V + M)), xe = w((l + u) * (V - M)), Ce = w(xe - mt);
|
|
1947
1961
|
if (Ce === Nt)
|
|
1948
1962
|
return this.double();
|
|
1949
1963
|
const St = w(y * cn * J), De = w(k * cn * re), _ = De + St, h = xe + mt, d = De - St, v = w(_ * Ce), U = w(h * d), F = w(_ * d), Y = w(Ce * h);
|
|
1950
1964
|
return new W(v, U, Y, F);
|
|
1951
1965
|
}
|
|
1952
|
-
const Ee = w(u *
|
|
1966
|
+
const Ee = w(u * M), de = w(l * V), pe = w(k * R * J), Le = w(y * re), Re = w((u + l) * (M + V) - Ee - de), ve = Le - pe, Pt = Le + pe, Te = w(de - C * Ee), ze = w(Re * ve), br = w(Pt * Te), Ue = w(Re * Te), Ne = w(ve * Pt);
|
|
1953
1967
|
return new W(ze, br, Ne, Ue);
|
|
1954
1968
|
}
|
|
1955
1969
|
subtract(A) {
|
|
@@ -1960,7 +1974,7 @@ function su(r) {
|
|
|
1960
1974
|
}
|
|
1961
1975
|
// Constant-time multiplication.
|
|
1962
1976
|
multiply(A) {
|
|
1963
|
-
const { p: C, f: R } = this.wNAF(
|
|
1977
|
+
const { p: C, f: R } = this.wNAF(P(A, n));
|
|
1964
1978
|
return W.normalizeZ([C, R])[0];
|
|
1965
1979
|
}
|
|
1966
1980
|
// Non-constant-time multiplication. Uses double-and-add algorithm.
|
|
@@ -1988,10 +2002,10 @@ function su(r) {
|
|
|
1988
2002
|
toAffine(A) {
|
|
1989
2003
|
const { ex: C, ey: R, ez: u } = this, l = this.is0();
|
|
1990
2004
|
A == null && (A = l ? ru : t.inv(u));
|
|
1991
|
-
const y = w(C * A), k = w(R * A),
|
|
2005
|
+
const y = w(C * A), k = w(R * A), M = w(u * A);
|
|
1992
2006
|
if (l)
|
|
1993
2007
|
return { x: Nt, y: vt };
|
|
1994
|
-
if (
|
|
2008
|
+
if (M !== vt)
|
|
1995
2009
|
throw new Error("invZ was invalid");
|
|
1996
2010
|
return { x: y, y: k };
|
|
1997
2011
|
}
|
|
@@ -2006,16 +2020,16 @@ function su(r) {
|
|
|
2006
2020
|
A = lt("pointHex", A, l);
|
|
2007
2021
|
const y = A.slice(), k = A[l - 1];
|
|
2008
2022
|
y[l - 1] = k & -129;
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2011
|
-
const V = w(
|
|
2023
|
+
const M = Sr(y);
|
|
2024
|
+
M === Nt || (C ? P(M, g) : P(M, t.ORDER));
|
|
2025
|
+
const V = w(M * M), re = w(V - vt), J = w(R * V - u);
|
|
2012
2026
|
let { isValid: Ee, value: de } = b(re, J);
|
|
2013
2027
|
if (!Ee)
|
|
2014
2028
|
throw new Error("Point.fromHex: invalid y coordinate");
|
|
2015
2029
|
const pe = (de & vt) === vt, Le = (k & 128) !== 0;
|
|
2016
2030
|
if (!C && de === Nt && Le)
|
|
2017
2031
|
throw new Error("Point.fromHex: x=0 and x_0=1");
|
|
2018
|
-
return Le !== pe && (de = w(-de)), W.fromAffine({ x: de, y:
|
|
2032
|
+
return Le !== pe && (de = w(-de)), W.fromAffine({ x: de, y: M });
|
|
2019
2033
|
}
|
|
2020
2034
|
static fromPrivateKey(A) {
|
|
2021
2035
|
return G(A).point;
|
|
@@ -2051,7 +2065,7 @@ function su(r) {
|
|
|
2051
2065
|
}
|
|
2052
2066
|
function c(E, A, C = {}) {
|
|
2053
2067
|
E = lt("message", E), s && (E = s(E));
|
|
2054
|
-
const { prefix: R, scalar: u, pointBytes: l } = G(A), y = S(C.context, R, E), k = D.multiply(y).toRawBytes(),
|
|
2068
|
+
const { prefix: R, scalar: u, pointBytes: l } = G(A), y = S(C.context, R, E), k = D.multiply(y).toRawBytes(), M = S(C.context, k, l, E), V = X(y + M * u);
|
|
2055
2069
|
H(V);
|
|
2056
2070
|
const re = pr(k, qr(V, t.BYTES));
|
|
2057
2071
|
return lt("result", re, a * 2);
|
|
@@ -2061,16 +2075,16 @@ function su(r) {
|
|
|
2061
2075
|
const { context: u, zip215: l } = R, y = t.BYTES;
|
|
2062
2076
|
E = lt("signature", E, 2 * y), A = lt("message", A), s && (A = s(A));
|
|
2063
2077
|
const k = Sr(E.slice(y, 2 * y));
|
|
2064
|
-
let
|
|
2078
|
+
let M, V, re;
|
|
2065
2079
|
try {
|
|
2066
|
-
|
|
2080
|
+
M = W.fromHex(C, l), V = W.fromHex(E.slice(0, y), l), re = D.multiplyUnsafe(k);
|
|
2067
2081
|
} catch {
|
|
2068
2082
|
return !1;
|
|
2069
2083
|
}
|
|
2070
|
-
if (!l &&
|
|
2084
|
+
if (!l && M.isSmallOrder())
|
|
2071
2085
|
return !1;
|
|
2072
|
-
const J = S(u, V.toRawBytes(),
|
|
2073
|
-
return V.add(
|
|
2086
|
+
const J = S(u, V.toRawBytes(), M.toRawBytes(), A);
|
|
2087
|
+
return V.add(M.multiplyUnsafe(J)).subtract(re).clearCofactor().equals(W.ZERO);
|
|
2074
2088
|
}
|
|
2075
2089
|
return D._setWindowSize(8), {
|
|
2076
2090
|
CURVE: e,
|
|
@@ -2137,7 +2151,7 @@ const fu = Go(Xi, void 0, !0), du = {
|
|
|
2137
2151
|
// Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.
|
|
2138
2152
|
// Constant-time, u/√v
|
|
2139
2153
|
uvRatio: hu
|
|
2140
|
-
},
|
|
2154
|
+
}, Pr = su(du);
|
|
2141
2155
|
var dn = { exports: {} };
|
|
2142
2156
|
const pu = {}, gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2143
2157
|
__proto__: null,
|
|
@@ -2590,42 +2604,42 @@ function Zo() {
|
|
|
2590
2604
|
}, i.prototype.sub = function(c) {
|
|
2591
2605
|
return this.clone().isub(c);
|
|
2592
2606
|
};
|
|
2593
|
-
function
|
|
2607
|
+
function P(S, c, p) {
|
|
2594
2608
|
p.negative = c.negative ^ S.negative;
|
|
2595
2609
|
var m = S.length + c.length | 0;
|
|
2596
2610
|
p.length = m, m = m - 1 | 0;
|
|
2597
2611
|
var I = S.words[0] | 0, E = c.words[0] | 0, A = I * E, C = A & 67108863, R = A / 67108864 | 0;
|
|
2598
2612
|
p.words[0] = C;
|
|
2599
2613
|
for (var u = 1; u < m; u++) {
|
|
2600
|
-
for (var l = R >>> 26, y = R & 67108863, k = Math.min(u, c.length - 1),
|
|
2601
|
-
var V = u -
|
|
2602
|
-
I = S.words[V] | 0, E = c.words[
|
|
2614
|
+
for (var l = R >>> 26, y = R & 67108863, k = Math.min(u, c.length - 1), M = Math.max(0, u - S.length + 1); M <= k; M++) {
|
|
2615
|
+
var V = u - M | 0;
|
|
2616
|
+
I = S.words[V] | 0, E = c.words[M] | 0, A = I * E + y, l += A / 67108864 | 0, y = A & 67108863;
|
|
2603
2617
|
}
|
|
2604
2618
|
p.words[u] = y | 0, R = l | 0;
|
|
2605
2619
|
}
|
|
2606
2620
|
return R !== 0 ? p.words[u] = R | 0 : p.length--, p._strip();
|
|
2607
2621
|
}
|
|
2608
2622
|
var H = function(c, p, m) {
|
|
2609
|
-
var I = c.words, E = p.words, A = m.words, C = 0, R, u, l, y = I[0] | 0, k = y & 8191,
|
|
2610
|
-
m.negative = c.negative ^ p.negative, m.length = 19, R = Math.imul(k, ge), u = Math.imul(k, fe), u = u + Math.imul(
|
|
2623
|
+
var I = c.words, E = p.words, A = m.words, C = 0, R, u, l, y = I[0] | 0, k = y & 8191, M = y >>> 13, V = I[1] | 0, re = V & 8191, J = V >>> 13, Ee = I[2] | 0, de = Ee & 8191, pe = Ee >>> 13, Le = I[3] | 0, Re = Le & 8191, ve = Le >>> 13, Pt = I[4] | 0, Te = Pt & 8191, ze = Pt >>> 13, br = I[5] | 0, Ue = br & 8191, Ne = br >>> 13, mt = I[6] | 0, xe = mt & 8191, Ce = mt >>> 13, St = I[7] | 0, De = St & 8191, _ = St >>> 13, h = I[8] | 0, d = h & 8191, v = h >>> 13, U = I[9] | 0, F = U & 8191, Y = U >>> 13, me = E[0] | 0, ge = me & 8191, fe = me >>> 13, Fe = E[1] | 0, he = Fe & 8191, Ve = Fe >>> 13, Ss = E[2] | 0, Ye = Ss & 8191, je = Ss >>> 13, As = E[3] | 0, Ze = As & 8191, Xe = As >>> 13, Is = E[4] | 0, Je = Is & 8191, Qe = Is >>> 13, vs = E[5] | 0, et = vs & 8191, tt = vs >>> 13, Os = E[6] | 0, rt = Os & 8191, nt = Os >>> 13, ks = E[7] | 0, it = ks & 8191, st = ks >>> 13, Ts = E[8] | 0, ot = Ts & 8191, at = Ts >>> 13, Ns = E[9] | 0, ct = Ns & 8191, ut = Ns >>> 13;
|
|
2624
|
+
m.negative = c.negative ^ p.negative, m.length = 19, R = Math.imul(k, ge), u = Math.imul(k, fe), u = u + Math.imul(M, ge) | 0, l = Math.imul(M, fe);
|
|
2611
2625
|
var Kn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2612
|
-
C = (l + (u >>> 13) | 0) + (Kn >>> 26) | 0, Kn &= 67108863, R = Math.imul(re, ge), u = Math.imul(re, fe), u = u + Math.imul(J, ge) | 0, l = Math.imul(J, fe), R = R + Math.imul(k, he) | 0, u = u + Math.imul(k, Ve) | 0, u = u + Math.imul(
|
|
2626
|
+
C = (l + (u >>> 13) | 0) + (Kn >>> 26) | 0, Kn &= 67108863, R = Math.imul(re, ge), u = Math.imul(re, fe), u = u + Math.imul(J, ge) | 0, l = Math.imul(J, fe), R = R + Math.imul(k, he) | 0, u = u + Math.imul(k, Ve) | 0, u = u + Math.imul(M, he) | 0, l = l + Math.imul(M, Ve) | 0;
|
|
2613
2627
|
var $n = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2614
|
-
C = (l + (u >>> 13) | 0) + ($n >>> 26) | 0, $n &= 67108863, R = Math.imul(de, ge), u = Math.imul(de, fe), u = u + Math.imul(pe, ge) | 0, l = Math.imul(pe, fe), R = R + Math.imul(re, he) | 0, u = u + Math.imul(re, Ve) | 0, u = u + Math.imul(J, he) | 0, l = l + Math.imul(J, Ve) | 0, R = R + Math.imul(k, Ye) | 0, u = u + Math.imul(k, je) | 0, u = u + Math.imul(
|
|
2628
|
+
C = (l + (u >>> 13) | 0) + ($n >>> 26) | 0, $n &= 67108863, R = Math.imul(de, ge), u = Math.imul(de, fe), u = u + Math.imul(pe, ge) | 0, l = Math.imul(pe, fe), R = R + Math.imul(re, he) | 0, u = u + Math.imul(re, Ve) | 0, u = u + Math.imul(J, he) | 0, l = l + Math.imul(J, Ve) | 0, R = R + Math.imul(k, Ye) | 0, u = u + Math.imul(k, je) | 0, u = u + Math.imul(M, Ye) | 0, l = l + Math.imul(M, je) | 0;
|
|
2615
2629
|
var Hn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2616
|
-
C = (l + (u >>> 13) | 0) + (Hn >>> 26) | 0, Hn &= 67108863, R = Math.imul(Re, ge), u = Math.imul(Re, fe), u = u + Math.imul(ve, ge) | 0, l = Math.imul(ve, fe), R = R + Math.imul(de, he) | 0, u = u + Math.imul(de, Ve) | 0, u = u + Math.imul(pe, he) | 0, l = l + Math.imul(pe, Ve) | 0, R = R + Math.imul(re, Ye) | 0, u = u + Math.imul(re, je) | 0, u = u + Math.imul(J, Ye) | 0, l = l + Math.imul(J, je) | 0, R = R + Math.imul(k, Ze) | 0, u = u + Math.imul(k, Xe) | 0, u = u + Math.imul(
|
|
2630
|
+
C = (l + (u >>> 13) | 0) + (Hn >>> 26) | 0, Hn &= 67108863, R = Math.imul(Re, ge), u = Math.imul(Re, fe), u = u + Math.imul(ve, ge) | 0, l = Math.imul(ve, fe), R = R + Math.imul(de, he) | 0, u = u + Math.imul(de, Ve) | 0, u = u + Math.imul(pe, he) | 0, l = l + Math.imul(pe, Ve) | 0, R = R + Math.imul(re, Ye) | 0, u = u + Math.imul(re, je) | 0, u = u + Math.imul(J, Ye) | 0, l = l + Math.imul(J, je) | 0, R = R + Math.imul(k, Ze) | 0, u = u + Math.imul(k, Xe) | 0, u = u + Math.imul(M, Ze) | 0, l = l + Math.imul(M, Xe) | 0;
|
|
2617
2631
|
var Wn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2618
|
-
C = (l + (u >>> 13) | 0) + (Wn >>> 26) | 0, Wn &= 67108863, R = Math.imul(Te, ge), u = Math.imul(Te, fe), u = u + Math.imul(ze, ge) | 0, l = Math.imul(ze, fe), R = R + Math.imul(Re, he) | 0, u = u + Math.imul(Re, Ve) | 0, u = u + Math.imul(ve, he) | 0, l = l + Math.imul(ve, Ve) | 0, R = R + Math.imul(de, Ye) | 0, u = u + Math.imul(de, je) | 0, u = u + Math.imul(pe, Ye) | 0, l = l + Math.imul(pe, je) | 0, R = R + Math.imul(re, Ze) | 0, u = u + Math.imul(re, Xe) | 0, u = u + Math.imul(J, Ze) | 0, l = l + Math.imul(J, Xe) | 0, R = R + Math.imul(k, Je) | 0, u = u + Math.imul(k, Qe) | 0, u = u + Math.imul(
|
|
2632
|
+
C = (l + (u >>> 13) | 0) + (Wn >>> 26) | 0, Wn &= 67108863, R = Math.imul(Te, ge), u = Math.imul(Te, fe), u = u + Math.imul(ze, ge) | 0, l = Math.imul(ze, fe), R = R + Math.imul(Re, he) | 0, u = u + Math.imul(Re, Ve) | 0, u = u + Math.imul(ve, he) | 0, l = l + Math.imul(ve, Ve) | 0, R = R + Math.imul(de, Ye) | 0, u = u + Math.imul(de, je) | 0, u = u + Math.imul(pe, Ye) | 0, l = l + Math.imul(pe, je) | 0, R = R + Math.imul(re, Ze) | 0, u = u + Math.imul(re, Xe) | 0, u = u + Math.imul(J, Ze) | 0, l = l + Math.imul(J, Xe) | 0, R = R + Math.imul(k, Je) | 0, u = u + Math.imul(k, Qe) | 0, u = u + Math.imul(M, Je) | 0, l = l + Math.imul(M, Qe) | 0;
|
|
2619
2633
|
var qn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2620
|
-
C = (l + (u >>> 13) | 0) + (qn >>> 26) | 0, qn &= 67108863, R = Math.imul(Ue, ge), u = Math.imul(Ue, fe), u = u + Math.imul(Ne, ge) | 0, l = Math.imul(Ne, fe), R = R + Math.imul(Te, he) | 0, u = u + Math.imul(Te, Ve) | 0, u = u + Math.imul(ze, he) | 0, l = l + Math.imul(ze, Ve) | 0, R = R + Math.imul(Re, Ye) | 0, u = u + Math.imul(Re, je) | 0, u = u + Math.imul(ve, Ye) | 0, l = l + Math.imul(ve, je) | 0, R = R + Math.imul(de, Ze) | 0, u = u + Math.imul(de, Xe) | 0, u = u + Math.imul(pe, Ze) | 0, l = l + Math.imul(pe, Xe) | 0, R = R + Math.imul(re, Je) | 0, u = u + Math.imul(re, Qe) | 0, u = u + Math.imul(J, Je) | 0, l = l + Math.imul(J, Qe) | 0, R = R + Math.imul(k, et) | 0, u = u + Math.imul(k, tt) | 0, u = u + Math.imul(
|
|
2634
|
+
C = (l + (u >>> 13) | 0) + (qn >>> 26) | 0, qn &= 67108863, R = Math.imul(Ue, ge), u = Math.imul(Ue, fe), u = u + Math.imul(Ne, ge) | 0, l = Math.imul(Ne, fe), R = R + Math.imul(Te, he) | 0, u = u + Math.imul(Te, Ve) | 0, u = u + Math.imul(ze, he) | 0, l = l + Math.imul(ze, Ve) | 0, R = R + Math.imul(Re, Ye) | 0, u = u + Math.imul(Re, je) | 0, u = u + Math.imul(ve, Ye) | 0, l = l + Math.imul(ve, je) | 0, R = R + Math.imul(de, Ze) | 0, u = u + Math.imul(de, Xe) | 0, u = u + Math.imul(pe, Ze) | 0, l = l + Math.imul(pe, Xe) | 0, R = R + Math.imul(re, Je) | 0, u = u + Math.imul(re, Qe) | 0, u = u + Math.imul(J, Je) | 0, l = l + Math.imul(J, Qe) | 0, R = R + Math.imul(k, et) | 0, u = u + Math.imul(k, tt) | 0, u = u + Math.imul(M, et) | 0, l = l + Math.imul(M, tt) | 0;
|
|
2621
2635
|
var Gn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2622
|
-
C = (l + (u >>> 13) | 0) + (Gn >>> 26) | 0, Gn &= 67108863, R = Math.imul(xe, ge), u = Math.imul(xe, fe), u = u + Math.imul(Ce, ge) | 0, l = Math.imul(Ce, fe), R = R + Math.imul(Ue, he) | 0, u = u + Math.imul(Ue, Ve) | 0, u = u + Math.imul(Ne, he) | 0, l = l + Math.imul(Ne, Ve) | 0, R = R + Math.imul(Te, Ye) | 0, u = u + Math.imul(Te, je) | 0, u = u + Math.imul(ze, Ye) | 0, l = l + Math.imul(ze, je) | 0, R = R + Math.imul(Re, Ze) | 0, u = u + Math.imul(Re, Xe) | 0, u = u + Math.imul(ve, Ze) | 0, l = l + Math.imul(ve, Xe) | 0, R = R + Math.imul(de, Je) | 0, u = u + Math.imul(de, Qe) | 0, u = u + Math.imul(pe, Je) | 0, l = l + Math.imul(pe, Qe) | 0, R = R + Math.imul(re, et) | 0, u = u + Math.imul(re, tt) | 0, u = u + Math.imul(J, et) | 0, l = l + Math.imul(J, tt) | 0, R = R + Math.imul(k, rt) | 0, u = u + Math.imul(k, nt) | 0, u = u + Math.imul(
|
|
2636
|
+
C = (l + (u >>> 13) | 0) + (Gn >>> 26) | 0, Gn &= 67108863, R = Math.imul(xe, ge), u = Math.imul(xe, fe), u = u + Math.imul(Ce, ge) | 0, l = Math.imul(Ce, fe), R = R + Math.imul(Ue, he) | 0, u = u + Math.imul(Ue, Ve) | 0, u = u + Math.imul(Ne, he) | 0, l = l + Math.imul(Ne, Ve) | 0, R = R + Math.imul(Te, Ye) | 0, u = u + Math.imul(Te, je) | 0, u = u + Math.imul(ze, Ye) | 0, l = l + Math.imul(ze, je) | 0, R = R + Math.imul(Re, Ze) | 0, u = u + Math.imul(Re, Xe) | 0, u = u + Math.imul(ve, Ze) | 0, l = l + Math.imul(ve, Xe) | 0, R = R + Math.imul(de, Je) | 0, u = u + Math.imul(de, Qe) | 0, u = u + Math.imul(pe, Je) | 0, l = l + Math.imul(pe, Qe) | 0, R = R + Math.imul(re, et) | 0, u = u + Math.imul(re, tt) | 0, u = u + Math.imul(J, et) | 0, l = l + Math.imul(J, tt) | 0, R = R + Math.imul(k, rt) | 0, u = u + Math.imul(k, nt) | 0, u = u + Math.imul(M, rt) | 0, l = l + Math.imul(M, nt) | 0;
|
|
2623
2637
|
var Vn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2624
|
-
C = (l + (u >>> 13) | 0) + (Vn >>> 26) | 0, Vn &= 67108863, R = Math.imul(De, ge), u = Math.imul(De, fe), u = u + Math.imul(_, ge) | 0, l = Math.imul(_, fe), R = R + Math.imul(xe, he) | 0, u = u + Math.imul(xe, Ve) | 0, u = u + Math.imul(Ce, he) | 0, l = l + Math.imul(Ce, Ve) | 0, R = R + Math.imul(Ue, Ye) | 0, u = u + Math.imul(Ue, je) | 0, u = u + Math.imul(Ne, Ye) | 0, l = l + Math.imul(Ne, je) | 0, R = R + Math.imul(Te, Ze) | 0, u = u + Math.imul(Te, Xe) | 0, u = u + Math.imul(ze, Ze) | 0, l = l + Math.imul(ze, Xe) | 0, R = R + Math.imul(Re, Je) | 0, u = u + Math.imul(Re, Qe) | 0, u = u + Math.imul(ve, Je) | 0, l = l + Math.imul(ve, Qe) | 0, R = R + Math.imul(de, et) | 0, u = u + Math.imul(de, tt) | 0, u = u + Math.imul(pe, et) | 0, l = l + Math.imul(pe, tt) | 0, R = R + Math.imul(re, rt) | 0, u = u + Math.imul(re, nt) | 0, u = u + Math.imul(J, rt) | 0, l = l + Math.imul(J, nt) | 0, R = R + Math.imul(k, it) | 0, u = u + Math.imul(k, st) | 0, u = u + Math.imul(
|
|
2638
|
+
C = (l + (u >>> 13) | 0) + (Vn >>> 26) | 0, Vn &= 67108863, R = Math.imul(De, ge), u = Math.imul(De, fe), u = u + Math.imul(_, ge) | 0, l = Math.imul(_, fe), R = R + Math.imul(xe, he) | 0, u = u + Math.imul(xe, Ve) | 0, u = u + Math.imul(Ce, he) | 0, l = l + Math.imul(Ce, Ve) | 0, R = R + Math.imul(Ue, Ye) | 0, u = u + Math.imul(Ue, je) | 0, u = u + Math.imul(Ne, Ye) | 0, l = l + Math.imul(Ne, je) | 0, R = R + Math.imul(Te, Ze) | 0, u = u + Math.imul(Te, Xe) | 0, u = u + Math.imul(ze, Ze) | 0, l = l + Math.imul(ze, Xe) | 0, R = R + Math.imul(Re, Je) | 0, u = u + Math.imul(Re, Qe) | 0, u = u + Math.imul(ve, Je) | 0, l = l + Math.imul(ve, Qe) | 0, R = R + Math.imul(de, et) | 0, u = u + Math.imul(de, tt) | 0, u = u + Math.imul(pe, et) | 0, l = l + Math.imul(pe, tt) | 0, R = R + Math.imul(re, rt) | 0, u = u + Math.imul(re, nt) | 0, u = u + Math.imul(J, rt) | 0, l = l + Math.imul(J, nt) | 0, R = R + Math.imul(k, it) | 0, u = u + Math.imul(k, st) | 0, u = u + Math.imul(M, it) | 0, l = l + Math.imul(M, st) | 0;
|
|
2625
2639
|
var Yn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2626
|
-
C = (l + (u >>> 13) | 0) + (Yn >>> 26) | 0, Yn &= 67108863, R = Math.imul(d, ge), u = Math.imul(d, fe), u = u + Math.imul(v, ge) | 0, l = Math.imul(v, fe), R = R + Math.imul(De, he) | 0, u = u + Math.imul(De, Ve) | 0, u = u + Math.imul(_, he) | 0, l = l + Math.imul(_, Ve) | 0, R = R + Math.imul(xe, Ye) | 0, u = u + Math.imul(xe, je) | 0, u = u + Math.imul(Ce, Ye) | 0, l = l + Math.imul(Ce, je) | 0, R = R + Math.imul(Ue, Ze) | 0, u = u + Math.imul(Ue, Xe) | 0, u = u + Math.imul(Ne, Ze) | 0, l = l + Math.imul(Ne, Xe) | 0, R = R + Math.imul(Te, Je) | 0, u = u + Math.imul(Te, Qe) | 0, u = u + Math.imul(ze, Je) | 0, l = l + Math.imul(ze, Qe) | 0, R = R + Math.imul(Re, et) | 0, u = u + Math.imul(Re, tt) | 0, u = u + Math.imul(ve, et) | 0, l = l + Math.imul(ve, tt) | 0, R = R + Math.imul(de, rt) | 0, u = u + Math.imul(de, nt) | 0, u = u + Math.imul(pe, rt) | 0, l = l + Math.imul(pe, nt) | 0, R = R + Math.imul(re, it) | 0, u = u + Math.imul(re, st) | 0, u = u + Math.imul(J, it) | 0, l = l + Math.imul(J, st) | 0, R = R + Math.imul(k, ot) | 0, u = u + Math.imul(k, at) | 0, u = u + Math.imul(
|
|
2640
|
+
C = (l + (u >>> 13) | 0) + (Yn >>> 26) | 0, Yn &= 67108863, R = Math.imul(d, ge), u = Math.imul(d, fe), u = u + Math.imul(v, ge) | 0, l = Math.imul(v, fe), R = R + Math.imul(De, he) | 0, u = u + Math.imul(De, Ve) | 0, u = u + Math.imul(_, he) | 0, l = l + Math.imul(_, Ve) | 0, R = R + Math.imul(xe, Ye) | 0, u = u + Math.imul(xe, je) | 0, u = u + Math.imul(Ce, Ye) | 0, l = l + Math.imul(Ce, je) | 0, R = R + Math.imul(Ue, Ze) | 0, u = u + Math.imul(Ue, Xe) | 0, u = u + Math.imul(Ne, Ze) | 0, l = l + Math.imul(Ne, Xe) | 0, R = R + Math.imul(Te, Je) | 0, u = u + Math.imul(Te, Qe) | 0, u = u + Math.imul(ze, Je) | 0, l = l + Math.imul(ze, Qe) | 0, R = R + Math.imul(Re, et) | 0, u = u + Math.imul(Re, tt) | 0, u = u + Math.imul(ve, et) | 0, l = l + Math.imul(ve, tt) | 0, R = R + Math.imul(de, rt) | 0, u = u + Math.imul(de, nt) | 0, u = u + Math.imul(pe, rt) | 0, l = l + Math.imul(pe, nt) | 0, R = R + Math.imul(re, it) | 0, u = u + Math.imul(re, st) | 0, u = u + Math.imul(J, it) | 0, l = l + Math.imul(J, st) | 0, R = R + Math.imul(k, ot) | 0, u = u + Math.imul(k, at) | 0, u = u + Math.imul(M, ot) | 0, l = l + Math.imul(M, at) | 0;
|
|
2627
2641
|
var jn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2628
|
-
C = (l + (u >>> 13) | 0) + (jn >>> 26) | 0, jn &= 67108863, R = Math.imul(F, ge), u = Math.imul(F, fe), u = u + Math.imul(Y, ge) | 0, l = Math.imul(Y, fe), R = R + Math.imul(d, he) | 0, u = u + Math.imul(d, Ve) | 0, u = u + Math.imul(v, he) | 0, l = l + Math.imul(v, Ve) | 0, R = R + Math.imul(De, Ye) | 0, u = u + Math.imul(De, je) | 0, u = u + Math.imul(_, Ye) | 0, l = l + Math.imul(_, je) | 0, R = R + Math.imul(xe, Ze) | 0, u = u + Math.imul(xe, Xe) | 0, u = u + Math.imul(Ce, Ze) | 0, l = l + Math.imul(Ce, Xe) | 0, R = R + Math.imul(Ue, Je) | 0, u = u + Math.imul(Ue, Qe) | 0, u = u + Math.imul(Ne, Je) | 0, l = l + Math.imul(Ne, Qe) | 0, R = R + Math.imul(Te, et) | 0, u = u + Math.imul(Te, tt) | 0, u = u + Math.imul(ze, et) | 0, l = l + Math.imul(ze, tt) | 0, R = R + Math.imul(Re, rt) | 0, u = u + Math.imul(Re, nt) | 0, u = u + Math.imul(ve, rt) | 0, l = l + Math.imul(ve, nt) | 0, R = R + Math.imul(de, it) | 0, u = u + Math.imul(de, st) | 0, u = u + Math.imul(pe, it) | 0, l = l + Math.imul(pe, st) | 0, R = R + Math.imul(re, ot) | 0, u = u + Math.imul(re, at) | 0, u = u + Math.imul(J, ot) | 0, l = l + Math.imul(J, at) | 0, R = R + Math.imul(k, ct) | 0, u = u + Math.imul(k, ut) | 0, u = u + Math.imul(
|
|
2642
|
+
C = (l + (u >>> 13) | 0) + (jn >>> 26) | 0, jn &= 67108863, R = Math.imul(F, ge), u = Math.imul(F, fe), u = u + Math.imul(Y, ge) | 0, l = Math.imul(Y, fe), R = R + Math.imul(d, he) | 0, u = u + Math.imul(d, Ve) | 0, u = u + Math.imul(v, he) | 0, l = l + Math.imul(v, Ve) | 0, R = R + Math.imul(De, Ye) | 0, u = u + Math.imul(De, je) | 0, u = u + Math.imul(_, Ye) | 0, l = l + Math.imul(_, je) | 0, R = R + Math.imul(xe, Ze) | 0, u = u + Math.imul(xe, Xe) | 0, u = u + Math.imul(Ce, Ze) | 0, l = l + Math.imul(Ce, Xe) | 0, R = R + Math.imul(Ue, Je) | 0, u = u + Math.imul(Ue, Qe) | 0, u = u + Math.imul(Ne, Je) | 0, l = l + Math.imul(Ne, Qe) | 0, R = R + Math.imul(Te, et) | 0, u = u + Math.imul(Te, tt) | 0, u = u + Math.imul(ze, et) | 0, l = l + Math.imul(ze, tt) | 0, R = R + Math.imul(Re, rt) | 0, u = u + Math.imul(Re, nt) | 0, u = u + Math.imul(ve, rt) | 0, l = l + Math.imul(ve, nt) | 0, R = R + Math.imul(de, it) | 0, u = u + Math.imul(de, st) | 0, u = u + Math.imul(pe, it) | 0, l = l + Math.imul(pe, st) | 0, R = R + Math.imul(re, ot) | 0, u = u + Math.imul(re, at) | 0, u = u + Math.imul(J, ot) | 0, l = l + Math.imul(J, at) | 0, R = R + Math.imul(k, ct) | 0, u = u + Math.imul(k, ut) | 0, u = u + Math.imul(M, ct) | 0, l = l + Math.imul(M, ut) | 0;
|
|
2629
2643
|
var Zn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2630
2644
|
C = (l + (u >>> 13) | 0) + (Zn >>> 26) | 0, Zn &= 67108863, R = Math.imul(F, he), u = Math.imul(F, Ve), u = u + Math.imul(Y, he) | 0, l = Math.imul(Y, Ve), R = R + Math.imul(d, Ye) | 0, u = u + Math.imul(d, je) | 0, u = u + Math.imul(v, Ye) | 0, l = l + Math.imul(v, je) | 0, R = R + Math.imul(De, Ze) | 0, u = u + Math.imul(De, Xe) | 0, u = u + Math.imul(_, Ze) | 0, l = l + Math.imul(_, Xe) | 0, R = R + Math.imul(xe, Je) | 0, u = u + Math.imul(xe, Qe) | 0, u = u + Math.imul(Ce, Je) | 0, l = l + Math.imul(Ce, Qe) | 0, R = R + Math.imul(Ue, et) | 0, u = u + Math.imul(Ue, tt) | 0, u = u + Math.imul(Ne, et) | 0, l = l + Math.imul(Ne, tt) | 0, R = R + Math.imul(Te, rt) | 0, u = u + Math.imul(Te, nt) | 0, u = u + Math.imul(ze, rt) | 0, l = l + Math.imul(ze, nt) | 0, R = R + Math.imul(Re, it) | 0, u = u + Math.imul(Re, st) | 0, u = u + Math.imul(ve, it) | 0, l = l + Math.imul(ve, st) | 0, R = R + Math.imul(de, ot) | 0, u = u + Math.imul(de, at) | 0, u = u + Math.imul(pe, ot) | 0, l = l + Math.imul(pe, at) | 0, R = R + Math.imul(re, ct) | 0, u = u + Math.imul(re, ut) | 0, u = u + Math.imul(J, ct) | 0, l = l + Math.imul(J, ut) | 0;
|
|
2631
2645
|
var Xn = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
@@ -2647,15 +2661,15 @@ function Zo() {
|
|
|
2647
2661
|
var si = (C + R | 0) + ((u & 8191) << 13) | 0;
|
|
2648
2662
|
return C = (l + (u >>> 13) | 0) + (si >>> 26) | 0, si &= 67108863, A[0] = Kn, A[1] = $n, A[2] = Hn, A[3] = Wn, A[4] = qn, A[5] = Gn, A[6] = Vn, A[7] = Yn, A[8] = jn, A[9] = Zn, A[10] = Xn, A[11] = Jn, A[12] = Qn, A[13] = ei, A[14] = ti, A[15] = ri, A[16] = ni, A[17] = ii, A[18] = si, C !== 0 && (A[19] = C, m.length++), m;
|
|
2649
2663
|
};
|
|
2650
|
-
Math.imul || (H =
|
|
2664
|
+
Math.imul || (H = P);
|
|
2651
2665
|
function K(S, c, p) {
|
|
2652
2666
|
p.negative = c.negative ^ S.negative, p.length = S.length + c.length;
|
|
2653
2667
|
for (var m = 0, I = 0, E = 0; E < p.length - 1; E++) {
|
|
2654
2668
|
var A = I;
|
|
2655
2669
|
I = 0;
|
|
2656
2670
|
for (var C = m & 67108863, R = Math.min(E, c.length - 1), u = Math.max(0, E - S.length + 1); u <= R; u++) {
|
|
2657
|
-
var l = E - u, y = S.words[l] | 0, k = c.words[u] | 0,
|
|
2658
|
-
A = A + (
|
|
2671
|
+
var l = E - u, y = S.words[l] | 0, k = c.words[u] | 0, M = y * k, V = M & 67108863;
|
|
2672
|
+
A = A + (M / 67108864 | 0) | 0, V = V + C | 0, C = V & 67108863, A = A + (V >>> 26) | 0, I += A >>> 26, A &= 67108863;
|
|
2659
2673
|
}
|
|
2660
2674
|
p.words[E] = C, m = A, A = I;
|
|
2661
2675
|
}
|
|
@@ -2666,7 +2680,7 @@ function Zo() {
|
|
|
2666
2680
|
}
|
|
2667
2681
|
i.prototype.mulTo = function(c, p) {
|
|
2668
2682
|
var m, I = this.length + c.length;
|
|
2669
|
-
return this.length === 10 && c.length === 10 ? m = H(this, c, p) : I < 63 ? m =
|
|
2683
|
+
return this.length === 10 && c.length === 10 ? m = H(this, c, p) : I < 63 ? m = P(this, c, p) : I < 1024 ? m = K(this, c, p) : m = Q(this, c, p), m;
|
|
2670
2684
|
}, i.prototype.mul = function(c) {
|
|
2671
2685
|
var p = new i(null);
|
|
2672
2686
|
return p.words = new Array(this.length + c.length), this.mulTo(c, p);
|
|
@@ -2820,10 +2834,10 @@ function Zo() {
|
|
|
2820
2834
|
var y = I.clone()._ishlnsubmul(E, 1, R);
|
|
2821
2835
|
y.negative === 0 && (I = y, u && (u.words[R] = 1));
|
|
2822
2836
|
for (var k = R - 1; k >= 0; k--) {
|
|
2823
|
-
var
|
|
2824
|
-
for (
|
|
2825
|
-
|
|
2826
|
-
u && (u.words[k] =
|
|
2837
|
+
var M = (I.words[E.length + k] | 0) * 67108864 + (I.words[E.length + k - 1] | 0);
|
|
2838
|
+
for (M = Math.min(M / A | 0, 67108863), I._ishlnsubmul(E, M, k); I.negative !== 0; )
|
|
2839
|
+
M--, I.negative = 0, I._ishlnsubmul(E, 1, k), I.isZero() || (I.negative ^= 1);
|
|
2840
|
+
u && (u.words[k] = M);
|
|
2827
2841
|
}
|
|
2828
2842
|
return u && u._strip(), I._strip(), p !== "div" && m !== 0 && I.iushrn(m), {
|
|
2829
2843
|
div: u || null,
|
|
@@ -2898,9 +2912,9 @@ function Zo() {
|
|
|
2898
2912
|
if (y > 0)
|
|
2899
2913
|
for (p.iushrn(y); y-- > 0; )
|
|
2900
2914
|
(I.isOdd() || E.isOdd()) && (I.iadd(u), E.isub(l)), I.iushrn(1), E.iushrn(1);
|
|
2901
|
-
for (var
|
|
2902
|
-
if (
|
|
2903
|
-
for (m.iushrn(
|
|
2915
|
+
for (var M = 0, V = 1; (m.words[0] & V) === 0 && M < 26; ++M, V <<= 1) ;
|
|
2916
|
+
if (M > 0)
|
|
2917
|
+
for (m.iushrn(M); M-- > 0; )
|
|
2904
2918
|
(A.isOdd() || C.isOdd()) && (A.iadd(u), C.isub(l)), A.iushrn(1), C.iushrn(1);
|
|
2905
2919
|
p.cmp(m) >= 0 ? (p.isub(m), I.isub(A), E.isub(C)) : (m.isub(p), A.isub(I), C.isub(E));
|
|
2906
2920
|
}
|
|
@@ -3207,12 +3221,12 @@ function Zo() {
|
|
|
3207
3221
|
var A = new i(1).toRed(this), C = A.redNeg(), R = this.m.subn(1).iushrn(1), u = this.m.bitLength();
|
|
3208
3222
|
for (u = new i(2 * u * u).toRed(this); this.pow(u, R).cmp(C) !== 0; )
|
|
3209
3223
|
u.redIAdd(C);
|
|
3210
|
-
for (var l = this.pow(u, I), y = this.pow(c, I.addn(1).iushrn(1)), k = this.pow(c, I),
|
|
3224
|
+
for (var l = this.pow(u, I), y = this.pow(c, I.addn(1).iushrn(1)), k = this.pow(c, I), M = E; k.cmp(A) !== 0; ) {
|
|
3211
3225
|
for (var V = k, re = 0; V.cmp(A) !== 0; re++)
|
|
3212
3226
|
V = V.redSqr();
|
|
3213
|
-
n(re <
|
|
3214
|
-
var J = this.pow(l, new i(1).iushln(
|
|
3215
|
-
y = y.redMul(J), l = J.redSqr(), k = k.redMul(l),
|
|
3227
|
+
n(re < M);
|
|
3228
|
+
var J = this.pow(l, new i(1).iushln(M - re - 1));
|
|
3229
|
+
y = y.redMul(J), l = J.redSqr(), k = k.redMul(l), M = re;
|
|
3216
3230
|
}
|
|
3217
3231
|
return y;
|
|
3218
3232
|
}, G.prototype.invm = function(c) {
|
|
@@ -3329,16 +3343,16 @@ function bu() {
|
|
|
3329
3343
|
throw new TypeError("Expected Buffer");
|
|
3330
3344
|
if (O.length === 0)
|
|
3331
3345
|
return "";
|
|
3332
|
-
for (var N = 0,
|
|
3346
|
+
for (var N = 0, P = 0, H = 0, K = O.length; H !== K && O[H] === 0; )
|
|
3333
3347
|
H++, N++;
|
|
3334
3348
|
for (var Q = (K - H) * b + 1 >>> 0, W = new Uint8Array(Q); H !== K; ) {
|
|
3335
|
-
for (var D = O[H], Z = 0, j = Q - 1; (D !== 0 || Z <
|
|
3349
|
+
for (var D = O[H], Z = 0, j = Q - 1; (D !== 0 || Z < P) && j !== -1; j--, Z++)
|
|
3336
3350
|
D += 256 * W[j] >>> 0, W[j] = D % f >>> 0, D = D / f >>> 0;
|
|
3337
3351
|
if (D !== 0)
|
|
3338
3352
|
throw new Error("Non-zero carry");
|
|
3339
|
-
|
|
3353
|
+
P = Z, H++;
|
|
3340
3354
|
}
|
|
3341
|
-
for (var X = Q -
|
|
3355
|
+
for (var X = Q - P; X !== Q && W[X] === 0; )
|
|
3342
3356
|
X++;
|
|
3343
3357
|
for (var z = g.repeat(N); X < Q; ++X)
|
|
3344
3358
|
z += t.charAt(W[X]);
|
|
@@ -3349,8 +3363,8 @@ function bu() {
|
|
|
3349
3363
|
throw new TypeError("Expected String");
|
|
3350
3364
|
if (O.length === 0)
|
|
3351
3365
|
return r.alloc(0);
|
|
3352
|
-
for (var N = 0,
|
|
3353
|
-
|
|
3366
|
+
for (var N = 0, P = 0, H = 0; O[N] === g; )
|
|
3367
|
+
P++, N++;
|
|
3354
3368
|
for (var K = (O.length - N) * w + 1 >>> 0, Q = new Uint8Array(K); N < O.length; ) {
|
|
3355
3369
|
var W = O.charCodeAt(N);
|
|
3356
3370
|
if (W > 255)
|
|
@@ -3366,9 +3380,9 @@ function bu() {
|
|
|
3366
3380
|
}
|
|
3367
3381
|
for (var X = K - H; X !== K && Q[X] === 0; )
|
|
3368
3382
|
X++;
|
|
3369
|
-
var z = r.allocUnsafe(
|
|
3370
|
-
z.fill(0, 0,
|
|
3371
|
-
for (var G =
|
|
3383
|
+
var z = r.allocUnsafe(P + (K - X));
|
|
3384
|
+
z.fill(0, 0, P);
|
|
3385
|
+
for (var G = P; X !== K; )
|
|
3372
3386
|
z[G++] = Q[X++];
|
|
3373
3387
|
return z;
|
|
3374
3388
|
}
|
|
@@ -3469,7 +3483,7 @@ const ft = /* @__PURE__ */ Jr(Ru), Eu = /* @__PURE__ */ new Uint32Array([
|
|
|
3469
3483
|
528734635,
|
|
3470
3484
|
1541459225
|
|
3471
3485
|
]), tr = /* @__PURE__ */ new Uint32Array(64);
|
|
3472
|
-
class Su extends
|
|
3486
|
+
class Su extends Po {
|
|
3473
3487
|
constructor() {
|
|
3474
3488
|
super(64, 32, 8, !1), this.A = er[0] | 0, this.B = er[1] | 0, this.C = er[2] | 0, this.D = er[3] | 0, this.E = er[4] | 0, this.F = er[5] | 0, this.G = er[6] | 0, this.H = er[7] | 0;
|
|
3475
3489
|
}
|
|
@@ -3485,12 +3499,12 @@ class Su extends Mo {
|
|
|
3485
3499
|
for (let b = 0; b < 16; b++, t += 4)
|
|
3486
3500
|
tr[b] = e.getUint32(t, !1);
|
|
3487
3501
|
for (let b = 16; b < 64; b++) {
|
|
3488
|
-
const x = tr[b - 15], T = tr[b - 2], L =
|
|
3502
|
+
const x = tr[b - 15], T = tr[b - 2], L = Mt(x, 7) ^ Mt(x, 18) ^ x >>> 3, O = Mt(T, 17) ^ Mt(T, 19) ^ T >>> 10;
|
|
3489
3503
|
tr[b] = O + tr[b - 7] + L + tr[b - 16] | 0;
|
|
3490
3504
|
}
|
|
3491
3505
|
let { A: n, B: s, C: i, D: o, E: a, F: f, G: g, H: w } = this;
|
|
3492
3506
|
for (let b = 0; b < 64; b++) {
|
|
3493
|
-
const x =
|
|
3507
|
+
const x = Mt(a, 6) ^ Mt(a, 11) ^ Mt(a, 25), T = w + x + dc(a, f, g) + Eu[b] + tr[b] | 0, O = (Mt(n, 2) ^ Mt(n, 13) ^ Mt(n, 22)) + pc(n, s, i) | 0;
|
|
3494
3508
|
w = g, g = f, f = a, a = o + T | 0, o = i, i = s, s = n, n = T + O | 0;
|
|
3495
3509
|
}
|
|
3496
3510
|
n = n + this.A | 0, s = s + this.B | 0, i = i + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, f = f + this.F | 0, g = g + this.G | 0, w = w + this.H | 0, this.set(n, s, i, o, a, f, g, w);
|
|
@@ -3922,13 +3936,13 @@ function Nu() {
|
|
|
3922
3936
|
], N.prototype, "readFixedArray", null), t([
|
|
3923
3937
|
O
|
|
3924
3938
|
], N.prototype, "readArray", null), ke.BinaryReader = N;
|
|
3925
|
-
function
|
|
3939
|
+
function P(X) {
|
|
3926
3940
|
return X.charAt(0).toUpperCase() + X.slice(1);
|
|
3927
3941
|
}
|
|
3928
3942
|
function H(X, z, G, ee, S) {
|
|
3929
3943
|
try {
|
|
3930
3944
|
if (typeof ee == "string")
|
|
3931
|
-
S[`write${
|
|
3945
|
+
S[`write${P(ee)}`](G);
|
|
3932
3946
|
else if (ee instanceof Array)
|
|
3933
3947
|
if (typeof ee[0] == "number") {
|
|
3934
3948
|
if (G.length !== ee[0])
|
|
@@ -3996,7 +4010,7 @@ function Nu() {
|
|
|
3996
4010
|
function W(X, z, G, ee) {
|
|
3997
4011
|
try {
|
|
3998
4012
|
if (typeof G == "string")
|
|
3999
|
-
return ee[`read${
|
|
4013
|
+
return ee[`read${P(G)}`]();
|
|
4000
4014
|
if (G instanceof Array) {
|
|
4001
4015
|
if (typeof G[0] == "number")
|
|
4002
4016
|
return ee.readFixedArray(G[0]);
|
|
@@ -4322,45 +4336,45 @@ function xu() {
|
|
|
4322
4336
|
}
|
|
4323
4337
|
/** @override */
|
|
4324
4338
|
decode(l, y = 0) {
|
|
4325
|
-
const k = t(l),
|
|
4326
|
-
return O(V,
|
|
4339
|
+
const k = t(l), M = k.readUInt32LE(y), V = k.readUInt32LE(y + 4);
|
|
4340
|
+
return O(V, M);
|
|
4327
4341
|
}
|
|
4328
4342
|
/** @override */
|
|
4329
4343
|
encode(l, y, k = 0) {
|
|
4330
|
-
const
|
|
4331
|
-
return V.writeUInt32LE(
|
|
4344
|
+
const M = L(l), V = t(y);
|
|
4345
|
+
return V.writeUInt32LE(M.lo32, k), V.writeUInt32LE(M.hi32, k + 4), 8;
|
|
4332
4346
|
}
|
|
4333
4347
|
}
|
|
4334
4348
|
q.NearUInt64 = N;
|
|
4335
|
-
class
|
|
4349
|
+
class P extends n {
|
|
4336
4350
|
constructor(l) {
|
|
4337
4351
|
super(8, l);
|
|
4338
4352
|
}
|
|
4339
4353
|
/** @override */
|
|
4340
4354
|
decode(l, y = 0) {
|
|
4341
|
-
const k = t(l),
|
|
4342
|
-
return O(
|
|
4355
|
+
const k = t(l), M = k.readUInt32BE(y), V = k.readUInt32BE(y + 4);
|
|
4356
|
+
return O(M, V);
|
|
4343
4357
|
}
|
|
4344
4358
|
/** @override */
|
|
4345
4359
|
encode(l, y, k = 0) {
|
|
4346
|
-
const
|
|
4347
|
-
return V.writeUInt32BE(
|
|
4360
|
+
const M = L(l), V = t(y);
|
|
4361
|
+
return V.writeUInt32BE(M.hi32, k), V.writeUInt32BE(M.lo32, k + 4), 8;
|
|
4348
4362
|
}
|
|
4349
4363
|
}
|
|
4350
|
-
q.NearUInt64BE =
|
|
4364
|
+
q.NearUInt64BE = P;
|
|
4351
4365
|
class H extends n {
|
|
4352
4366
|
constructor(l) {
|
|
4353
4367
|
super(8, l);
|
|
4354
4368
|
}
|
|
4355
4369
|
/** @override */
|
|
4356
4370
|
decode(l, y = 0) {
|
|
4357
|
-
const k = t(l),
|
|
4358
|
-
return O(V,
|
|
4371
|
+
const k = t(l), M = k.readUInt32LE(y), V = k.readInt32LE(y + 4);
|
|
4372
|
+
return O(V, M);
|
|
4359
4373
|
}
|
|
4360
4374
|
/** @override */
|
|
4361
4375
|
encode(l, y, k = 0) {
|
|
4362
|
-
const
|
|
4363
|
-
return V.writeUInt32LE(
|
|
4376
|
+
const M = L(l), V = t(y);
|
|
4377
|
+
return V.writeUInt32LE(M.lo32, k), V.writeInt32LE(M.hi32, k + 4), 8;
|
|
4364
4378
|
}
|
|
4365
4379
|
}
|
|
4366
4380
|
q.NearInt64 = H;
|
|
@@ -4370,13 +4384,13 @@ function xu() {
|
|
|
4370
4384
|
}
|
|
4371
4385
|
/** @override */
|
|
4372
4386
|
decode(l, y = 0) {
|
|
4373
|
-
const k = t(l),
|
|
4374
|
-
return O(
|
|
4387
|
+
const k = t(l), M = k.readInt32BE(y), V = k.readUInt32BE(y + 4);
|
|
4388
|
+
return O(M, V);
|
|
4375
4389
|
}
|
|
4376
4390
|
/** @override */
|
|
4377
4391
|
encode(l, y, k = 0) {
|
|
4378
|
-
const
|
|
4379
|
-
return V.writeInt32BE(
|
|
4392
|
+
const M = L(l), V = t(y);
|
|
4393
|
+
return V.writeInt32BE(M.hi32, k), V.writeUInt32BE(M.lo32, k + 4), 8;
|
|
4380
4394
|
}
|
|
4381
4395
|
}
|
|
4382
4396
|
q.NearInt64BE = K;
|
|
@@ -4442,19 +4456,19 @@ function xu() {
|
|
|
4442
4456
|
throw new TypeError("elementLayout must be a Layout");
|
|
4443
4457
|
if (!(y instanceof o && y.isCount() || Number.isInteger(y) && 0 <= y))
|
|
4444
4458
|
throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");
|
|
4445
|
-
let
|
|
4446
|
-
!(y instanceof o) && 0 < l.span && (
|
|
4459
|
+
let M = -1;
|
|
4460
|
+
!(y instanceof o) && 0 < l.span && (M = y * l.span), super(M, k), this.elementLayout = l, this.count = y;
|
|
4447
4461
|
}
|
|
4448
4462
|
/** @override */
|
|
4449
4463
|
getSpan(l, y = 0) {
|
|
4450
4464
|
if (0 <= this.span)
|
|
4451
4465
|
return this.span;
|
|
4452
|
-
let k = 0,
|
|
4453
|
-
if (
|
|
4454
|
-
k =
|
|
4466
|
+
let k = 0, M = this.count;
|
|
4467
|
+
if (M instanceof o && (M = M.decode(l, y)), 0 < this.elementLayout.span)
|
|
4468
|
+
k = M * this.elementLayout.span;
|
|
4455
4469
|
else {
|
|
4456
4470
|
let V = 0;
|
|
4457
|
-
for (; V <
|
|
4471
|
+
for (; V < M; )
|
|
4458
4472
|
k += this.elementLayout.getSpan(l, y + k), ++V;
|
|
4459
4473
|
}
|
|
4460
4474
|
return k;
|
|
@@ -4462,9 +4476,9 @@ function xu() {
|
|
|
4462
4476
|
/** @override */
|
|
4463
4477
|
decode(l, y = 0) {
|
|
4464
4478
|
const k = [];
|
|
4465
|
-
let
|
|
4466
|
-
for (V instanceof o && (V = V.decode(l, y));
|
|
4467
|
-
k.push(this.elementLayout.decode(l, y)), y += this.elementLayout.getSpan(l, y),
|
|
4479
|
+
let M = 0, V = this.count;
|
|
4480
|
+
for (V instanceof o && (V = V.decode(l, y)); M < V; )
|
|
4481
|
+
k.push(this.elementLayout.decode(l, y)), y += this.elementLayout.getSpan(l, y), M += 1;
|
|
4468
4482
|
return k;
|
|
4469
4483
|
}
|
|
4470
4484
|
/** Implement {@link Layout#encode|encode} for {@link Sequence}.
|
|
@@ -4478,7 +4492,7 @@ function xu() {
|
|
|
4478
4492
|
* ExternalLayout} then the length of `src` will be encoded as the
|
|
4479
4493
|
* count after `src` is encoded. */
|
|
4480
4494
|
encode(l, y, k = 0) {
|
|
4481
|
-
const
|
|
4495
|
+
const M = this.elementLayout, V = l.reduce((re, J) => re + M.encode(J, y, k + re), 0);
|
|
4482
4496
|
return this.count instanceof o && this.count.encode(l.length, y, k), V;
|
|
4483
4497
|
}
|
|
4484
4498
|
}
|
|
@@ -4491,12 +4505,12 @@ function xu() {
|
|
|
4491
4505
|
for (const V of l)
|
|
4492
4506
|
if (0 > V.span && V.property === void 0)
|
|
4493
4507
|
throw new Error("fields cannot contain unnamed variable-length layout");
|
|
4494
|
-
let
|
|
4508
|
+
let M = -1;
|
|
4495
4509
|
try {
|
|
4496
|
-
|
|
4510
|
+
M = l.reduce((V, re) => V + re.getSpan(), 0);
|
|
4497
4511
|
} catch {
|
|
4498
4512
|
}
|
|
4499
|
-
super(
|
|
4513
|
+
super(M, y), this.fields = l, this.decodePrefixes = !!k;
|
|
4500
4514
|
}
|
|
4501
4515
|
/** @override */
|
|
4502
4516
|
getSpan(l, y = 0) {
|
|
@@ -4504,9 +4518,9 @@ function xu() {
|
|
|
4504
4518
|
return this.span;
|
|
4505
4519
|
let k = 0;
|
|
4506
4520
|
try {
|
|
4507
|
-
k = this.fields.reduce((
|
|
4521
|
+
k = this.fields.reduce((M, V) => {
|
|
4508
4522
|
const re = V.getSpan(l, y);
|
|
4509
|
-
return y += re,
|
|
4523
|
+
return y += re, M + re;
|
|
4510
4524
|
}, 0);
|
|
4511
4525
|
} catch {
|
|
4512
4526
|
throw new RangeError("indeterminate span");
|
|
@@ -4517,8 +4531,8 @@ function xu() {
|
|
|
4517
4531
|
decode(l, y = 0) {
|
|
4518
4532
|
e(l);
|
|
4519
4533
|
const k = this.makeDestinationObject();
|
|
4520
|
-
for (const
|
|
4521
|
-
if (
|
|
4534
|
+
for (const M of this.fields)
|
|
4535
|
+
if (M.property !== void 0 && (k[M.property] = M.decode(l, y)), y += M.getSpan(l, y), this.decodePrefixes && l.length === y)
|
|
4522
4536
|
break;
|
|
4523
4537
|
return k;
|
|
4524
4538
|
}
|
|
@@ -4528,7 +4542,7 @@ function xu() {
|
|
|
4528
4542
|
* Layout#property|property} the corresponding region of the buffer is
|
|
4529
4543
|
* left unmodified. */
|
|
4530
4544
|
encode(l, y, k = 0) {
|
|
4531
|
-
const
|
|
4545
|
+
const M = k;
|
|
4532
4546
|
let V = 0, re = 0;
|
|
4533
4547
|
for (const J of this.fields) {
|
|
4534
4548
|
let Ee = J.span;
|
|
@@ -4538,7 +4552,7 @@ function xu() {
|
|
|
4538
4552
|
}
|
|
4539
4553
|
V = k, k += Ee;
|
|
4540
4554
|
}
|
|
4541
|
-
return V + re -
|
|
4555
|
+
return V + re - M;
|
|
4542
4556
|
}
|
|
4543
4557
|
/** @override */
|
|
4544
4558
|
fromArray(l) {
|
|
@@ -4623,13 +4637,13 @@ function xu() {
|
|
|
4623
4637
|
q.UnionLayoutDiscriminator = G;
|
|
4624
4638
|
class ee extends n {
|
|
4625
4639
|
constructor(l, y, k) {
|
|
4626
|
-
let
|
|
4640
|
+
let M;
|
|
4627
4641
|
if (l instanceof g || l instanceof w)
|
|
4628
|
-
|
|
4642
|
+
M = new G(new f(l));
|
|
4629
4643
|
else if (l instanceof o && l.isCount())
|
|
4630
|
-
|
|
4644
|
+
M = new G(l);
|
|
4631
4645
|
else if (l instanceof z)
|
|
4632
|
-
|
|
4646
|
+
M = l;
|
|
4633
4647
|
else
|
|
4634
4648
|
throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");
|
|
4635
4649
|
if (y === void 0 && (y = null), !(y === null || y instanceof n))
|
|
@@ -4640,7 +4654,7 @@ function xu() {
|
|
|
4640
4654
|
y.property === void 0 && (y = y.replicate("content"));
|
|
4641
4655
|
}
|
|
4642
4656
|
let V = -1;
|
|
4643
|
-
y && (V = y.span, 0 <= V && (l instanceof g || l instanceof w) && (V +=
|
|
4657
|
+
y && (V = y.span, 0 <= V && (l instanceof g || l instanceof w) && (V += M.layout.span)), super(V, k), this.discriminator = M, this.usesPrefixDiscriminator = l instanceof g || l instanceof w, this.defaultLayout = y, this.registry = {};
|
|
4644
4658
|
let re = this.defaultGetSourceVariant.bind(this);
|
|
4645
4659
|
this.getSourceVariant = function(J) {
|
|
4646
4660
|
return re(J);
|
|
@@ -4709,11 +4723,11 @@ function xu() {
|
|
|
4709
4723
|
* layout} is used to decode the content. */
|
|
4710
4724
|
decode(l, y = 0) {
|
|
4711
4725
|
let k;
|
|
4712
|
-
const
|
|
4726
|
+
const M = this.discriminator, V = M.decode(l, y), re = this.registry[V];
|
|
4713
4727
|
if (re === void 0) {
|
|
4714
4728
|
const J = this.defaultLayout;
|
|
4715
4729
|
let Ee = 0;
|
|
4716
|
-
this.usesPrefixDiscriminator && (Ee =
|
|
4730
|
+
this.usesPrefixDiscriminator && (Ee = M.layout.span), k = this.makeDestinationObject(), k[M.property] = V, k[J.property] = J.decode(l, y + Ee);
|
|
4717
4731
|
} else
|
|
4718
4732
|
k = re.decode(l, y);
|
|
4719
4733
|
return k;
|
|
@@ -4725,13 +4739,13 @@ function xu() {
|
|
|
4725
4739
|
* use the appropriate variant-specific {@link VariantLayout#encode}
|
|
4726
4740
|
* method. */
|
|
4727
4741
|
encode(l, y, k = 0) {
|
|
4728
|
-
const
|
|
4729
|
-
if (
|
|
4742
|
+
const M = this.getSourceVariant(l);
|
|
4743
|
+
if (M === void 0) {
|
|
4730
4744
|
const V = this.discriminator, re = this.defaultLayout;
|
|
4731
4745
|
let J = 0;
|
|
4732
4746
|
return this.usesPrefixDiscriminator && (J = V.layout.span), V.encode(l[V.property], y, k), J + re.encode(l[re.property], y, k + J);
|
|
4733
4747
|
}
|
|
4734
|
-
return
|
|
4748
|
+
return M.encode(l, y, k);
|
|
4735
4749
|
}
|
|
4736
4750
|
/** Register a new variant structure within a union. The newly
|
|
4737
4751
|
* created variant is returned.
|
|
@@ -4747,8 +4761,8 @@ function xu() {
|
|
|
4747
4761
|
*
|
|
4748
4762
|
* @return {VariantLayout} */
|
|
4749
4763
|
addVariant(l, y, k) {
|
|
4750
|
-
const
|
|
4751
|
-
return this.registry[l] =
|
|
4764
|
+
const M = new S(this, l, y, k);
|
|
4765
|
+
return this.registry[l] = M, M;
|
|
4752
4766
|
}
|
|
4753
4767
|
/**
|
|
4754
4768
|
* Get the layout associated with a registered variant.
|
|
@@ -4771,21 +4785,21 @@ function xu() {
|
|
|
4771
4785
|
}
|
|
4772
4786
|
q.Union = ee;
|
|
4773
4787
|
class S extends n {
|
|
4774
|
-
constructor(l, y, k,
|
|
4788
|
+
constructor(l, y, k, M) {
|
|
4775
4789
|
if (!(l instanceof ee))
|
|
4776
4790
|
throw new TypeError("union must be a Union");
|
|
4777
4791
|
if (!Number.isInteger(y) || 0 > y)
|
|
4778
4792
|
throw new TypeError("variant must be a (non-negative) integer");
|
|
4779
|
-
if (typeof k == "string" &&
|
|
4793
|
+
if (typeof k == "string" && M === void 0 && (M = k, k = null), k) {
|
|
4780
4794
|
if (!(k instanceof n))
|
|
4781
4795
|
throw new TypeError("layout must be a Layout");
|
|
4782
4796
|
if (l.defaultLayout !== null && 0 <= k.span && k.span > l.defaultLayout.span)
|
|
4783
4797
|
throw new Error("variant span exceeds span of containing union");
|
|
4784
|
-
if (typeof
|
|
4798
|
+
if (typeof M != "string")
|
|
4785
4799
|
throw new TypeError("variant must have a String property");
|
|
4786
4800
|
}
|
|
4787
4801
|
let V = l.span;
|
|
4788
|
-
0 > l.span && (V = k ? k.span : 0, 0 <= V && l.usesPrefixDiscriminator && (V += l.discriminator.layout.span)), super(V,
|
|
4802
|
+
0 > l.span && (V = k ? k.span : 0, 0 <= V && l.usesPrefixDiscriminator && (V += l.discriminator.layout.span)), super(V, M), this.union = l, this.variant = y, this.layout = k || null;
|
|
4789
4803
|
}
|
|
4790
4804
|
/** @override */
|
|
4791
4805
|
getSpan(l, y = 0) {
|
|
@@ -4793,25 +4807,25 @@ function xu() {
|
|
|
4793
4807
|
return this.span;
|
|
4794
4808
|
let k = 0;
|
|
4795
4809
|
this.union.usesPrefixDiscriminator && (k = this.union.discriminator.layout.span);
|
|
4796
|
-
let
|
|
4797
|
-
return this.layout && (
|
|
4810
|
+
let M = 0;
|
|
4811
|
+
return this.layout && (M = this.layout.getSpan(l, y + k)), k + M;
|
|
4798
4812
|
}
|
|
4799
4813
|
/** @override */
|
|
4800
4814
|
decode(l, y = 0) {
|
|
4801
4815
|
const k = this.makeDestinationObject();
|
|
4802
4816
|
if (this !== this.union.getVariant(l, y))
|
|
4803
4817
|
throw new Error("variant mismatch");
|
|
4804
|
-
let
|
|
4805
|
-
return this.union.usesPrefixDiscriminator && (
|
|
4818
|
+
let M = 0;
|
|
4819
|
+
return this.union.usesPrefixDiscriminator && (M = this.union.discriminator.layout.span), this.layout ? k[this.property] = this.layout.decode(l, y + M) : this.property ? k[this.property] = !0 : this.union.usesPrefixDiscriminator && (k[this.union.discriminator.property] = this.variant), k;
|
|
4806
4820
|
}
|
|
4807
4821
|
/** @override */
|
|
4808
4822
|
encode(l, y, k = 0) {
|
|
4809
|
-
let
|
|
4810
|
-
if (this.union.usesPrefixDiscriminator && (
|
|
4823
|
+
let M = 0;
|
|
4824
|
+
if (this.union.usesPrefixDiscriminator && (M = this.union.discriminator.layout.span), this.layout && !Object.prototype.hasOwnProperty.call(l, this.property))
|
|
4811
4825
|
throw new TypeError("variant lacks property " + this.property);
|
|
4812
4826
|
this.union.discriminator.encode(this.variant, y, k);
|
|
4813
|
-
let V =
|
|
4814
|
-
if (this.layout && (this.layout.encode(l[this.property], y, k +
|
|
4827
|
+
let V = M;
|
|
4828
|
+
if (this.layout && (this.layout.encode(l[this.property], y, k + M), V += this.layout.getSpan(y, k + M), 0 <= this.union.span && V > this.union.span))
|
|
4815
4829
|
throw new Error("encoded variant overruns containing union");
|
|
4816
4830
|
return V;
|
|
4817
4831
|
}
|
|
@@ -4833,17 +4847,17 @@ function xu() {
|
|
|
4833
4847
|
if (typeof y == "string" && k === void 0 && (k = y, y = !1), 4 < l.span)
|
|
4834
4848
|
throw new RangeError("word cannot exceed 32 bits");
|
|
4835
4849
|
super(l.span, k), this.word = l, this.msb = !!y, this.fields = [];
|
|
4836
|
-
let
|
|
4850
|
+
let M = 0;
|
|
4837
4851
|
this._packedSetValue = function(V) {
|
|
4838
|
-
return
|
|
4852
|
+
return M = c(V), this;
|
|
4839
4853
|
}, this._packedGetValue = function() {
|
|
4840
|
-
return
|
|
4854
|
+
return M;
|
|
4841
4855
|
};
|
|
4842
4856
|
}
|
|
4843
4857
|
/** @override */
|
|
4844
4858
|
decode(l, y = 0) {
|
|
4845
|
-
const k = this.makeDestinationObject(),
|
|
4846
|
-
this._packedSetValue(
|
|
4859
|
+
const k = this.makeDestinationObject(), M = this.word.decode(l, y);
|
|
4860
|
+
this._packedSetValue(M);
|
|
4847
4861
|
for (const V of this.fields)
|
|
4848
4862
|
V.property !== void 0 && (k[V.property] = V.decode(l));
|
|
4849
4863
|
return k;
|
|
@@ -4854,8 +4868,8 @@ function xu() {
|
|
|
4854
4868
|
* Layout#property|property} the corresponding region of the packed
|
|
4855
4869
|
* value is left unmodified. Unused bits are also left unmodified. */
|
|
4856
4870
|
encode(l, y, k = 0) {
|
|
4857
|
-
const
|
|
4858
|
-
this._packedSetValue(
|
|
4871
|
+
const M = this.word.decode(y, k);
|
|
4872
|
+
this._packedSetValue(M);
|
|
4859
4873
|
for (const V of this.fields)
|
|
4860
4874
|
if (V.property !== void 0) {
|
|
4861
4875
|
const re = l[V.property];
|
|
@@ -4912,10 +4926,10 @@ function xu() {
|
|
|
4912
4926
|
throw new TypeError("container must be a BitStructure");
|
|
4913
4927
|
if (!Number.isInteger(y) || 0 >= y)
|
|
4914
4928
|
throw new TypeError("bits must be positive integer");
|
|
4915
|
-
const
|
|
4916
|
-
if (y + V >
|
|
4917
|
-
throw new Error("bits too long for span remainder (" + (
|
|
4918
|
-
this.container = l, this.bits = y, this.valueMask = (1 << y) - 1, y === 32 && (this.valueMask = 4294967295), this.start = V, this.container.msb && (this.start =
|
|
4929
|
+
const M = 8 * l.span, V = l.fields.reduce((re, J) => re + J.bits, 0);
|
|
4930
|
+
if (y + V > M)
|
|
4931
|
+
throw new Error("bits too long for span remainder (" + (M - V) + " of " + M + " remain)");
|
|
4932
|
+
this.container = l, this.bits = y, this.valueMask = (1 << y) - 1, y === 32 && (this.valueMask = 4294967295), this.start = V, this.container.msb && (this.start = M - V - y), this.wordMask = c(this.valueMask << this.start), this.property = k;
|
|
4919
4933
|
}
|
|
4920
4934
|
/** Store a value into the corresponding subsequence of the containing
|
|
4921
4935
|
* bit field. */
|
|
@@ -4975,13 +4989,13 @@ function xu() {
|
|
|
4975
4989
|
* ExternalLayout} then the length of `src` will be encoded as the
|
|
4976
4990
|
* count after `src` is encoded. */
|
|
4977
4991
|
encode(l, y, k) {
|
|
4978
|
-
let
|
|
4979
|
-
if (this.length instanceof o && (
|
|
4980
|
-
throw new TypeError(s("Blob.encode", this) + " requires (length " +
|
|
4981
|
-
if (k +
|
|
4992
|
+
let M = this.length;
|
|
4993
|
+
if (this.length instanceof o && (M = l.length), !(l instanceof Uint8Array && M === l.length))
|
|
4994
|
+
throw new TypeError(s("Blob.encode", this) + " requires (length " + M + ") Uint8Array as src");
|
|
4995
|
+
if (k + M > y.length)
|
|
4982
4996
|
throw new RangeError("encoding overruns Uint8Array");
|
|
4983
4997
|
const V = t(l);
|
|
4984
|
-
return t(y).write(V.toString("hex"), k,
|
|
4998
|
+
return t(y).write(V.toString("hex"), k, M, "hex"), this.length instanceof o && this.length.encode(M, y, k), M;
|
|
4985
4999
|
}
|
|
4986
5000
|
}
|
|
4987
5001
|
q.Blob = E;
|
|
@@ -5005,11 +5019,11 @@ function xu() {
|
|
|
5005
5019
|
/** @override */
|
|
5006
5020
|
encode(l, y, k = 0) {
|
|
5007
5021
|
typeof l != "string" && (l = String(l));
|
|
5008
|
-
const
|
|
5022
|
+
const M = r.Buffer.from(l, "utf8"), V = M.length;
|
|
5009
5023
|
if (k + V > y.length)
|
|
5010
5024
|
throw new RangeError("encoding overruns Buffer");
|
|
5011
5025
|
const re = t(y);
|
|
5012
|
-
return
|
|
5026
|
+
return M.copy(re, k), re[k + V] = 0, V + 1;
|
|
5013
5027
|
}
|
|
5014
5028
|
}
|
|
5015
5029
|
q.CString = A;
|
|
@@ -5035,12 +5049,12 @@ function xu() {
|
|
|
5035
5049
|
/** @override */
|
|
5036
5050
|
encode(l, y, k = 0) {
|
|
5037
5051
|
typeof l != "string" && (l = String(l));
|
|
5038
|
-
const
|
|
5052
|
+
const M = r.Buffer.from(l, "utf8"), V = M.length;
|
|
5039
5053
|
if (0 <= this.maxSpan && this.maxSpan < V)
|
|
5040
5054
|
throw new RangeError("text length exceeds maxSpan");
|
|
5041
5055
|
if (k + V > y.length)
|
|
5042
5056
|
throw new RangeError("encoding overruns Buffer");
|
|
5043
|
-
return
|
|
5057
|
+
return M.copy(t(y), k), V;
|
|
5044
5058
|
}
|
|
5045
5059
|
}
|
|
5046
5060
|
q.UTF8 = C;
|
|
@@ -5057,9 +5071,9 @@ function xu() {
|
|
|
5057
5071
|
return 0;
|
|
5058
5072
|
}
|
|
5059
5073
|
}
|
|
5060
|
-
return q.Constant = R, q.greedy = (u, l) => new a(u, l), q.offset = (u, l, y) => new f(u, l, y), q.u8 = (u) => new g(1, u), q.u16 = (u) => new g(2, u), q.u24 = (u) => new g(3, u), q.u32 = (u) => new g(4, u), q.u40 = (u) => new g(5, u), q.u48 = (u) => new g(6, u), q.nu64 = (u) => new N(u), q.u16be = (u) => new w(2, u), q.u24be = (u) => new w(3, u), q.u32be = (u) => new w(4, u), q.u40be = (u) => new w(5, u), q.u48be = (u) => new w(6, u), q.nu64be = (u) => new
|
|
5074
|
+
return q.Constant = R, q.greedy = (u, l) => new a(u, l), q.offset = (u, l, y) => new f(u, l, y), q.u8 = (u) => new g(1, u), q.u16 = (u) => new g(2, u), q.u24 = (u) => new g(3, u), q.u32 = (u) => new g(4, u), q.u40 = (u) => new g(5, u), q.u48 = (u) => new g(6, u), q.nu64 = (u) => new N(u), q.u16be = (u) => new w(2, u), q.u24be = (u) => new w(3, u), q.u32be = (u) => new w(4, u), q.u40be = (u) => new w(5, u), q.u48be = (u) => new w(6, u), q.nu64be = (u) => new P(u), q.s8 = (u) => new b(1, u), q.s16 = (u) => new b(2, u), q.s24 = (u) => new b(3, u), q.s32 = (u) => new b(4, u), q.s40 = (u) => new b(5, u), q.s48 = (u) => new b(6, u), q.ns64 = (u) => new H(u), q.s16be = (u) => new x(2, u), q.s24be = (u) => new x(3, u), q.s32be = (u) => new x(4, u), q.s40be = (u) => new x(5, u), q.s48be = (u) => new x(6, u), q.ns64be = (u) => new K(u), q.f32 = (u) => new Q(u), q.f32be = (u) => new W(u), q.f64 = (u) => new D(u), q.f64be = (u) => new Z(u), q.struct = (u, l, y) => new X(u, l, y), q.bits = (u, l, y) => new p(u, l, y), q.seq = (u, l, y) => new j(u, l, y), q.union = (u, l, y) => new ee(u, l, y), q.unionLayoutDiscriminator = (u, l) => new G(u, l), q.blob = (u, l) => new E(u, l), q.cstr = (u) => new A(u), q.utf8 = (u, l) => new C(u, l), q.constant = (u, l) => new R(u, l), q;
|
|
5061
5075
|
}
|
|
5062
|
-
var B = xu(), Bu = 1, Lu = 2, Cu = 3,
|
|
5076
|
+
var B = xu(), Bu = 1, Lu = 2, Cu = 3, Pu = 4, Mu = 5, Uu = 6, Du = 7, Fu = 8, zu = 9, Ku = 10, $u = -32700, Hu = -32603, Wu = -32602, qu = -32601, Gu = -32600, Vu = -32016, Yu = -32015, ju = -32014, Zu = -32013, Xu = -32012, Ju = -32011, Qu = -32010, el = -32009, tl = -32008, rl = -32007, nl = -32006, il = -32005, sl = -32004, ol = -32003, al = -32002, cl = -32001, ul = 28e5, ll = 2800001, hl = 2800002, fl = 2800003, dl = 2800004, pl = 2800005, gl = 2800006, ml = 2800007, _l = 2800008, yl = 2800009, wl = 2800010, bl = 323e4, Rl = 32300001, El = 3230002, Sl = 3230003, Al = 3230004, Il = 361e4, vl = 3610001, Ol = 3610002, kl = 3610003, Tl = 3610004, Nl = 3610005, xl = 3610006, Bl = 3610007, Ll = 3611e3, Cl = 3704e3, Pl = 3704001, Ml = 3704002, Ul = 3704003, Dl = 3704004, Fl = 4128e3, zl = 4128001, Kl = 4128002, $l = 4615e3, Hl = 4615001, Wl = 4615002, ql = 4615003, Gl = 4615004, Vl = 4615005, Yl = 4615006, jl = 4615007, Zl = 4615008, Xl = 4615009, Jl = 4615010, Ql = 4615011, eh = 4615012, th = 4615013, rh = 4615014, nh = 4615015, ih = 4615016, sh = 4615017, oh = 4615018, ah = 4615019, ch = 4615020, uh = 4615021, lh = 4615022, hh = 4615023, fh = 4615024, dh = 4615025, ph = 4615026, gh = 4615027, mh = 4615028, _h = 4615029, yh = 4615030, wh = 4615031, bh = 4615032, Rh = 4615033, Eh = 4615034, Sh = 4615035, Ah = 4615036, Ih = 4615037, vh = 4615038, Oh = 4615039, kh = 4615040, Th = 4615041, Nh = 4615042, xh = 4615043, Bh = 4615044, Lh = 4615045, Ch = 4615046, Ph = 4615047, Mh = 4615048, Uh = 4615049, Dh = 4615050, Fh = 4615051, zh = 4615052, Kh = 4615053, $h = 4615054, Hh = 5508e3, Wh = 5508001, qh = 5508002, Gh = 5508003, Vh = 5508004, Yh = 5508005, jh = 5508006, Zh = 5508007, Xh = 5508008, Jh = 5508009, Qh = 5508010, ef = 5508011, tf = 5663e3, rf = 5663001, nf = 5663002, sf = 5663003, of = 5663004, af = 5663005, cf = 5663006, uf = 5663007, lf = 5663008, hf = 5663009, ff = 5663010, df = 5663011, pf = 5663012, gf = 5663013, mf = 5663014, _f = 5663015, yf = 5663016, wf = 5663017, bf = 5663018, Rf = 5663019, Ef = 705e4, Sf = 7050001, Af = 7050002, If = 7050003, vf = 7050004, Of = 7050005, kf = 7050006, Tf = 7050007, Nf = 7050008, xf = 7050009, Bf = 7050010, Lf = 7050011, Cf = 7050012, Pf = 7050013, Mf = 7050014, Uf = 7050015, Df = 7050016, Ff = 7050017, zf = 7050018, Kf = 7050019, $f = 7050020, Hf = 7050021, Wf = 7050022, qf = 7050023, Gf = 7050024, Vf = 7050025, Yf = 7050026, jf = 7050027, Zf = 7050028, Xf = 7050029, Jf = 7050030, Qf = 7050031, ed = 7050032, td = 7050033, rd = 7050034, nd = 7050035, id = 7050036, Jo = 8078e3, Qo = 8078001, sd = 8078002, od = 8078003, ea = 8078004, ta = 8078005, ra = 8078006, ad = 8078007, cd = 8078008, ud = 8078009, ld = 8078010, na = 8078011, hd = 8078012, fd = 8078013, dd = 8078014, pd = 8078015, gd = 8078016, md = 8078017, _d = 8078018, yd = 8078019, wd = 8078020, bd = 8078021, Rd = 8078022, Ed = 81e5, Sd = 8100001, Ad = 8100002, Id = 8100003, vd = 819e4, Od = 8190001, kd = 8190002, Td = 8190003, Nd = 8190004, xd = 99e5, Bd = 9900001, Ld = 9900002, Cd = 9900003, Pd = 9900004;
|
|
5063
5077
|
function ia(r) {
|
|
5064
5078
|
return Array.isArray(r) ? "%5B" + r.map(ia).join(
|
|
5065
5079
|
"%2C%20"
|
|
@@ -5075,11 +5089,11 @@ function ia(r) {
|
|
|
5075
5089
|
)
|
|
5076
5090
|
);
|
|
5077
5091
|
}
|
|
5078
|
-
function
|
|
5092
|
+
function Md([r, e]) {
|
|
5079
5093
|
return `${r}=${ia(e)}`;
|
|
5080
5094
|
}
|
|
5081
5095
|
function Ud(r) {
|
|
5082
|
-
const e = Object.entries(r).map(
|
|
5096
|
+
const e = Object.entries(r).map(Md).join("&");
|
|
5083
5097
|
return btoa(e);
|
|
5084
5098
|
}
|
|
5085
5099
|
var Dd = {
|
|
@@ -5099,7 +5113,7 @@ var Dd = {
|
|
|
5099
5113
|
[pl]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
|
|
5100
5114
|
[wl]: "Program address cannot end with PDA marker.",
|
|
5101
5115
|
[ll]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
5102
|
-
[
|
|
5116
|
+
[Pu]: "Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
5103
5117
|
[Bu]: "The network has progressed past the last block for which this transaction could have been committed.",
|
|
5104
5118
|
[Jo]: "Codec [$codecDescription] cannot decode empty byte arrays.",
|
|
5105
5119
|
[Rd]: "Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",
|
|
@@ -5132,7 +5146,7 @@ var Dd = {
|
|
|
5132
5146
|
[Vl]: "account data too small for instruction",
|
|
5133
5147
|
[lh]: "instruction expected an executable account",
|
|
5134
5148
|
[Ch]: "An account does not have enough lamports to be rent-exempt",
|
|
5135
|
-
[
|
|
5149
|
+
[Mh]: "Program arithmetic overflowed",
|
|
5136
5150
|
[Lh]: "Failed to serialize or deserialize account data: $encodedData",
|
|
5137
5151
|
[$h]: "Builtin programs must consume compute units",
|
|
5138
5152
|
[bh]: "Cross-program invocation call depth too deep",
|
|
@@ -5153,7 +5167,7 @@ var Dd = {
|
|
|
5153
5167
|
[jl]: "incorrect program id for instruction",
|
|
5154
5168
|
[Yl]: "insufficient funds for instruction",
|
|
5155
5169
|
[Gl]: "invalid account data for instruction",
|
|
5156
|
-
[
|
|
5170
|
+
[Ph]: "Invalid account owner",
|
|
5157
5171
|
[Wl]: "invalid program argument",
|
|
5158
5172
|
[gh]: "program returned invalid error code",
|
|
5159
5173
|
[ql]: "invalid instruction data",
|
|
@@ -5183,10 +5197,10 @@ var Dd = {
|
|
|
5183
5197
|
[Fl]: "The instruction does not have any accounts.",
|
|
5184
5198
|
[zl]: "The instruction does not have any data.",
|
|
5185
5199
|
[Kl]: "Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",
|
|
5186
|
-
[
|
|
5200
|
+
[Mu]: "Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",
|
|
5187
5201
|
[Lu]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
|
|
5188
5202
|
[Ld]: "Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
5189
|
-
[
|
|
5203
|
+
[Pd]: "Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",
|
|
5190
5204
|
[Bd]: "Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
5191
5205
|
[xd]: "Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
5192
5206
|
[Cd]: "Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
@@ -5212,8 +5226,8 @@ var Dd = {
|
|
|
5212
5226
|
[ol]: "Transaction signature verification failure",
|
|
5213
5227
|
[Yu]: "$__serverMessage",
|
|
5214
5228
|
[Cl]: "Key pair bytes must be of length 64, got $byteLength.",
|
|
5215
|
-
[
|
|
5216
|
-
[
|
|
5229
|
+
[Pl]: "Expected private key bytes with length 32. Actual length: $actualLength.",
|
|
5230
|
+
[Ml]: "Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",
|
|
5217
5231
|
[Dl]: "The provided private key does not match the provided public key.",
|
|
5218
5232
|
[Ul]: "Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",
|
|
5219
5233
|
[Uu]: "Lamports value must be in the range [0, 2e64-1]",
|
|
@@ -5273,7 +5287,7 @@ For a list of runtimes that currently support Ed25519 operations, visit https://
|
|
|
5273
5287
|
[Yf]: "Transaction address table lookup uses an invalid index",
|
|
5274
5288
|
[Gf]: "Transaction loads an address table account with an invalid owner",
|
|
5275
5289
|
[td]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
|
|
5276
|
-
[
|
|
5290
|
+
[Pf]: "This program may not be used for executing instructions",
|
|
5277
5291
|
[jf]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
|
|
5278
5292
|
[Kf]: "Transaction loads a writable account that cannot be written",
|
|
5279
5293
|
[ed]: "Transaction exceeded max loaded accounts data size cap",
|
|
@@ -5281,7 +5295,7 @@ For a list of runtimes that currently support Ed25519 operations, visit https://
|
|
|
5281
5295
|
[vf]: "Attempt to load a program that does not exist",
|
|
5282
5296
|
[nd]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
|
|
5283
5297
|
[rd]: "ResanitizationNeeded",
|
|
5284
|
-
[
|
|
5298
|
+
[Mf]: "Transaction failed to sanitize accounts offsets correctly",
|
|
5285
5299
|
[Cf]: "Transaction did not pass signature verification",
|
|
5286
5300
|
[Wf]: "Transaction locked too many accounts",
|
|
5287
5301
|
[id]: "Sum of account balances before and after transaction do not match",
|
|
@@ -5815,7 +5829,7 @@ function Et(r) {
|
|
|
5815
5829
|
}
|
|
5816
5830
|
});
|
|
5817
5831
|
}
|
|
5818
|
-
function
|
|
5832
|
+
function Mr() {
|
|
5819
5833
|
return _r("unknown", () => !0);
|
|
5820
5834
|
}
|
|
5821
5835
|
function nn(r, e, t) {
|
|
@@ -5999,11 +6013,11 @@ function b0(r) {
|
|
|
5999
6013
|
x[T] = a[b][T];
|
|
6000
6014
|
for (var L = 16; L < 80; ++L)
|
|
6001
6015
|
x[L] = wi(x[L - 3] ^ x[L - 8] ^ x[L - 14] ^ x[L - 16], 1);
|
|
6002
|
-
for (var O = t[0], N = t[1],
|
|
6003
|
-
var W = Math.floor(Q / 20), D = wi(O, 5) + w0(W, N,
|
|
6004
|
-
K = H, H =
|
|
6016
|
+
for (var O = t[0], N = t[1], P = t[2], H = t[3], K = t[4], Q = 0; Q < 80; ++Q) {
|
|
6017
|
+
var W = Math.floor(Q / 20), D = wi(O, 5) + w0(W, N, P, H) + K + e[W] + x[Q] >>> 0;
|
|
6018
|
+
K = H, H = P, P = wi(N, 30) >>> 0, N = O, O = D;
|
|
6005
6019
|
}
|
|
6006
|
-
t[0] = t[0] + O >>> 0, t[1] = t[1] + N >>> 0, t[2] = t[2] +
|
|
6020
|
+
t[0] = t[0] + O >>> 0, t[1] = t[1] + N >>> 0, t[2] = t[2] + P >>> 0, t[3] = t[3] + H >>> 0, t[4] = t[4] + K >>> 0;
|
|
6007
6021
|
}
|
|
6008
6022
|
return [t[0] >> 24 & 255, t[0] >> 16 & 255, t[0] >> 8 & 255, t[0] & 255, t[1] >> 24 & 255, t[1] >> 16 & 255, t[1] >> 8 & 255, t[1] & 255, t[2] >> 24 & 255, t[2] >> 16 & 255, t[2] >> 8 & 255, t[2] & 255, t[3] >> 24 & 255, t[3] >> 16 & 255, t[3] >> 8 & 255, t[3] & 255, t[4] >> 24 & 255, t[4] >> 16 & 255, t[4] >> 8 & 255, t[4] & 255];
|
|
6009
6023
|
}
|
|
@@ -6175,9 +6189,9 @@ function T0() {
|
|
|
6175
6189
|
}, a.prototype.emit = function(g, w, b, x, T, L) {
|
|
6176
6190
|
var O = t ? t + g : g;
|
|
6177
6191
|
if (!this._events[O]) return !1;
|
|
6178
|
-
var N = this._events[O],
|
|
6192
|
+
var N = this._events[O], P = arguments.length, H, K;
|
|
6179
6193
|
if (N.fn) {
|
|
6180
|
-
switch (N.once && this.removeListener(g, N.fn, void 0, !0),
|
|
6194
|
+
switch (N.once && this.removeListener(g, N.fn, void 0, !0), P) {
|
|
6181
6195
|
case 1:
|
|
6182
6196
|
return N.fn.call(N.context), !0;
|
|
6183
6197
|
case 2:
|
|
@@ -6191,13 +6205,13 @@ function T0() {
|
|
|
6191
6205
|
case 6:
|
|
6192
6206
|
return N.fn.call(N.context, w, b, x, T, L), !0;
|
|
6193
6207
|
}
|
|
6194
|
-
for (K = 1, H = new Array(
|
|
6208
|
+
for (K = 1, H = new Array(P - 1); K < P; K++)
|
|
6195
6209
|
H[K - 1] = arguments[K];
|
|
6196
6210
|
N.fn.apply(N.context, H);
|
|
6197
6211
|
} else {
|
|
6198
6212
|
var Q = N.length, W;
|
|
6199
6213
|
for (K = 0; K < Q; K++)
|
|
6200
|
-
switch (N[K].once && this.removeListener(g, N[K].fn, void 0, !0),
|
|
6214
|
+
switch (N[K].once && this.removeListener(g, N[K].fn, void 0, !0), P) {
|
|
6201
6215
|
case 1:
|
|
6202
6216
|
N[K].fn.call(N[K].context);
|
|
6203
6217
|
break;
|
|
@@ -6211,7 +6225,7 @@ function T0() {
|
|
|
6211
6225
|
N[K].fn.call(N[K].context, w, b, x);
|
|
6212
6226
|
break;
|
|
6213
6227
|
default:
|
|
6214
|
-
if (!H) for (W = 1, H = new Array(
|
|
6228
|
+
if (!H) for (W = 1, H = new Array(P - 1); W < P; W++)
|
|
6215
6229
|
H[W - 1] = arguments[W];
|
|
6216
6230
|
N[K].fn.apply(N[K].context, H);
|
|
6217
6231
|
}
|
|
@@ -6230,7 +6244,7 @@ function T0() {
|
|
|
6230
6244
|
if (L.fn)
|
|
6231
6245
|
L.fn === w && (!x || L.once) && (!b || L.context === b) && o(this, T);
|
|
6232
6246
|
else {
|
|
6233
|
-
for (var O = 0, N = [],
|
|
6247
|
+
for (var O = 0, N = [], P = L.length; O < P; O++)
|
|
6234
6248
|
(L[O].fn !== w || x && !L[O].once || b && L[O].context !== b) && N.push(L[O]);
|
|
6235
6249
|
N.length ? this._events[T] = N.length === 1 ? N[0] : N : o(this, T);
|
|
6236
6250
|
}
|
|
@@ -6534,12 +6548,12 @@ var L0 = class {
|
|
|
6534
6548
|
});
|
|
6535
6549
|
}
|
|
6536
6550
|
};
|
|
6537
|
-
const ma = [], _a = [], ya = [],
|
|
6551
|
+
const ma = [], _a = [], ya = [], P0 = /* @__PURE__ */ BigInt(0), zr = /* @__PURE__ */ BigInt(1), M0 = /* @__PURE__ */ BigInt(2), U0 = /* @__PURE__ */ BigInt(7), D0 = /* @__PURE__ */ BigInt(256), F0 = /* @__PURE__ */ BigInt(113);
|
|
6538
6552
|
for (let r = 0, e = zr, t = 1, n = 0; r < 24; r++) {
|
|
6539
6553
|
[t, n] = [n, (2 * t + 3 * n) % 5], ma.push(2 * (5 * n + t)), _a.push((r + 1) * (r + 2) / 2 % 64);
|
|
6540
|
-
let s =
|
|
6554
|
+
let s = P0;
|
|
6541
6555
|
for (let i = 0; i < 7; i++)
|
|
6542
|
-
e = (e << zr ^ (e >> U0) * F0) % D0, e &
|
|
6556
|
+
e = (e << zr ^ (e >> U0) * F0) % D0, e & M0 && (s ^= zr << (zr << /* @__PURE__ */ BigInt(i)) - zr);
|
|
6543
6557
|
ya.push(s);
|
|
6544
6558
|
}
|
|
6545
6559
|
const [z0, K0] = /* @__PURE__ */ Uo(ya, !0), to = (r, e, t) => t > 32 ? zo(r, e, t) : Do(r, e, t), ro = (r, e, t) => t > 32 ? Ko(r, e, t) : Fo(r, e, t);
|
|
@@ -6576,7 +6590,7 @@ class rs extends Gi {
|
|
|
6576
6590
|
this.state = new Uint8Array(200), this.state32 = cc(this.state);
|
|
6577
6591
|
}
|
|
6578
6592
|
keccak() {
|
|
6579
|
-
|
|
6593
|
+
Ps || Ms(this.state32), $0(this.state32, this.rounds), Ps || Ms(this.state32), this.posOut = 0, this.pos = 0;
|
|
6580
6594
|
}
|
|
6581
6595
|
update(e) {
|
|
6582
6596
|
Or(this);
|
|
@@ -6740,14 +6754,14 @@ const io = BigInt(3);
|
|
|
6740
6754
|
BigInt(4);
|
|
6741
6755
|
function V0(r) {
|
|
6742
6756
|
const e = W0(r), { Fp: t } = e, n = e.toBytes || ((L, O, N) => {
|
|
6743
|
-
const
|
|
6744
|
-
return pr(Uint8Array.from([4]), t.toBytes(
|
|
6757
|
+
const P = O.toAffine();
|
|
6758
|
+
return pr(Uint8Array.from([4]), t.toBytes(P.x), t.toBytes(P.y));
|
|
6745
6759
|
}), s = e.fromBytes || ((L) => {
|
|
6746
|
-
const O = L.subarray(1), N = t.fromBytes(O.subarray(0, t.BYTES)),
|
|
6747
|
-
return { x: N, y:
|
|
6760
|
+
const O = L.subarray(1), N = t.fromBytes(O.subarray(0, t.BYTES)), P = t.fromBytes(O.subarray(t.BYTES, 2 * t.BYTES));
|
|
6761
|
+
return { x: N, y: P };
|
|
6748
6762
|
});
|
|
6749
6763
|
function i(L) {
|
|
6750
|
-
const { a: O, b: N } = e,
|
|
6764
|
+
const { a: O, b: N } = e, P = t.sqr(L), H = t.mul(P, L);
|
|
6751
6765
|
return t.add(t.add(H, t.mul(L, O)), N);
|
|
6752
6766
|
}
|
|
6753
6767
|
if (!t.eql(t.sqr(e.Gy), i(e.Gx)))
|
|
@@ -6760,7 +6774,7 @@ function V0(r) {
|
|
|
6760
6774
|
throw new Error("Expected valid bigint: 0 < bigint < curve.n");
|
|
6761
6775
|
}
|
|
6762
6776
|
function f(L) {
|
|
6763
|
-
const { allowedPrivateKeyLengths: O, nByteLength: N, wrapPrivateKey:
|
|
6777
|
+
const { allowedPrivateKeyLengths: O, nByteLength: N, wrapPrivateKey: P, n: H } = e;
|
|
6764
6778
|
if (O && typeof L != "bigint") {
|
|
6765
6779
|
if (fr(L) && (L = dr(L)), typeof L != "string" || !O.includes(L.length))
|
|
6766
6780
|
throw new Error("Invalid key");
|
|
@@ -6772,7 +6786,7 @@ function V0(r) {
|
|
|
6772
6786
|
} catch {
|
|
6773
6787
|
throw new Error(`private key must be ${N} bytes, hex or bigint, not ${typeof L}`);
|
|
6774
6788
|
}
|
|
6775
|
-
return
|
|
6789
|
+
return P && (K = Ke(K, H)), a(K), K;
|
|
6776
6790
|
}
|
|
6777
6791
|
const g = /* @__PURE__ */ new Map();
|
|
6778
6792
|
function w(L) {
|
|
@@ -6780,24 +6794,24 @@ function V0(r) {
|
|
|
6780
6794
|
throw new Error("ProjectivePoint expected");
|
|
6781
6795
|
}
|
|
6782
6796
|
class b {
|
|
6783
|
-
constructor(O, N,
|
|
6784
|
-
if (this.px = O, this.py = N, this.pz =
|
|
6797
|
+
constructor(O, N, P) {
|
|
6798
|
+
if (this.px = O, this.py = N, this.pz = P, O == null || !t.isValid(O))
|
|
6785
6799
|
throw new Error("x required");
|
|
6786
6800
|
if (N == null || !t.isValid(N))
|
|
6787
6801
|
throw new Error("y required");
|
|
6788
|
-
if (
|
|
6802
|
+
if (P == null || !t.isValid(P))
|
|
6789
6803
|
throw new Error("z required");
|
|
6790
6804
|
}
|
|
6791
6805
|
// Does not validate if the point is on-curve.
|
|
6792
6806
|
// Use fromHex instead, or call assertValidity() later.
|
|
6793
6807
|
static fromAffine(O) {
|
|
6794
|
-
const { x: N, y:
|
|
6795
|
-
if (!O || !t.isValid(N) || !t.isValid(
|
|
6808
|
+
const { x: N, y: P } = O || {};
|
|
6809
|
+
if (!O || !t.isValid(N) || !t.isValid(P))
|
|
6796
6810
|
throw new Error("invalid affine point");
|
|
6797
6811
|
if (O instanceof b)
|
|
6798
6812
|
throw new Error("projective point not allowed");
|
|
6799
6813
|
const H = (K) => t.eql(K, t.ZERO);
|
|
6800
|
-
return H(N) && H(
|
|
6814
|
+
return H(N) && H(P) ? b.ZERO : new b(N, P, t.ONE);
|
|
6801
6815
|
}
|
|
6802
6816
|
get x() {
|
|
6803
6817
|
return this.toAffine().x;
|
|
@@ -6812,8 +6826,8 @@ function V0(r) {
|
|
|
6812
6826
|
* Optimization: converts a list of projective points to a list of identical points with Z=1.
|
|
6813
6827
|
*/
|
|
6814
6828
|
static normalizeZ(O) {
|
|
6815
|
-
const N = t.invertBatch(O.map((
|
|
6816
|
-
return O.map((
|
|
6829
|
+
const N = t.invertBatch(O.map((P) => P.pz));
|
|
6830
|
+
return O.map((P, H) => P.toAffine(N[H])).map(b.fromAffine);
|
|
6817
6831
|
}
|
|
6818
6832
|
/**
|
|
6819
6833
|
* Converts hash string or Uint8Array to Point.
|
|
@@ -6841,8 +6855,8 @@ function V0(r) {
|
|
|
6841
6855
|
const { x: O, y: N } = this.toAffine();
|
|
6842
6856
|
if (!t.isValid(O) || !t.isValid(N))
|
|
6843
6857
|
throw new Error("bad point: x or y not FE");
|
|
6844
|
-
const
|
|
6845
|
-
if (!t.eql(
|
|
6858
|
+
const P = t.sqr(N), H = i(O);
|
|
6859
|
+
if (!t.eql(P, H))
|
|
6846
6860
|
throw new Error("bad point: equation left != right");
|
|
6847
6861
|
if (!this.isTorsionFree())
|
|
6848
6862
|
throw new Error("bad point: not in prime-order subgroup");
|
|
@@ -6858,7 +6872,7 @@ function V0(r) {
|
|
|
6858
6872
|
*/
|
|
6859
6873
|
equals(O) {
|
|
6860
6874
|
w(O);
|
|
6861
|
-
const { px: N, py:
|
|
6875
|
+
const { px: N, py: P, pz: H } = this, { px: K, py: Q, pz: W } = O, D = t.eql(t.mul(N, W), t.mul(K, H)), Z = t.eql(t.mul(P, W), t.mul(Q, H));
|
|
6862
6876
|
return D && Z;
|
|
6863
6877
|
}
|
|
6864
6878
|
/**
|
|
@@ -6872,9 +6886,9 @@ function V0(r) {
|
|
|
6872
6886
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
6873
6887
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
6874
6888
|
double() {
|
|
6875
|
-
const { a: O, b: N } = e,
|
|
6889
|
+
const { a: O, b: N } = e, P = t.mul(N, io), { px: H, py: K, pz: Q } = this;
|
|
6876
6890
|
let W = t.ZERO, D = t.ZERO, Z = t.ZERO, j = t.mul(H, H), X = t.mul(K, K), z = t.mul(Q, Q), G = t.mul(H, K);
|
|
6877
|
-
return G = t.add(G, G), Z = t.mul(H, Q), Z = t.add(Z, Z), W = t.mul(O, Z), D = t.mul(
|
|
6891
|
+
return G = t.add(G, G), Z = t.mul(H, Q), Z = t.add(Z, Z), W = t.mul(O, Z), D = t.mul(P, z), D = t.add(W, D), W = t.sub(X, D), D = t.add(X, D), D = t.mul(W, D), W = t.mul(G, W), Z = t.mul(P, Z), z = t.mul(O, z), G = t.sub(j, z), G = t.mul(O, G), G = t.add(G, Z), Z = t.add(j, j), j = t.add(Z, j), j = t.add(j, z), j = t.mul(j, G), D = t.add(D, j), z = t.mul(K, Q), z = t.add(z, z), j = t.mul(z, G), W = t.sub(W, j), Z = t.mul(z, X), Z = t.add(Z, Z), Z = t.add(Z, Z), new b(W, D, Z);
|
|
6878
6892
|
}
|
|
6879
6893
|
// Renes-Costello-Batina exception-free addition formula.
|
|
6880
6894
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -6882,13 +6896,13 @@ function V0(r) {
|
|
|
6882
6896
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
6883
6897
|
add(O) {
|
|
6884
6898
|
w(O);
|
|
6885
|
-
const { px: N, py:
|
|
6899
|
+
const { px: N, py: P, pz: H } = this, { px: K, py: Q, pz: W } = O;
|
|
6886
6900
|
let D = t.ZERO, Z = t.ZERO, j = t.ZERO;
|
|
6887
6901
|
const X = e.a, z = t.mul(e.b, io);
|
|
6888
|
-
let G = t.mul(N, K), ee = t.mul(
|
|
6902
|
+
let G = t.mul(N, K), ee = t.mul(P, Q), S = t.mul(H, W), c = t.add(N, P), p = t.add(K, Q);
|
|
6889
6903
|
c = t.mul(c, p), p = t.add(G, ee), c = t.sub(c, p), p = t.add(N, H);
|
|
6890
6904
|
let m = t.add(K, W);
|
|
6891
|
-
return p = t.mul(p, m), m = t.add(G, S), p = t.sub(p, m), m = t.add(
|
|
6905
|
+
return p = t.mul(p, m), m = t.add(G, S), p = t.sub(p, m), m = t.add(P, H), D = t.add(Q, W), m = t.mul(m, D), D = t.add(ee, S), m = t.sub(m, D), j = t.mul(X, p), D = t.mul(z, S), j = t.add(D, j), D = t.sub(ee, j), j = t.add(ee, j), Z = t.mul(D, j), ee = t.add(G, G), ee = t.add(ee, G), S = t.mul(X, S), p = t.mul(z, p), ee = t.add(ee, S), S = t.sub(G, S), S = t.mul(X, S), p = t.add(p, S), G = t.mul(ee, p), Z = t.add(Z, G), G = t.mul(m, p), D = t.mul(c, D), D = t.sub(D, G), G = t.mul(c, ee), j = t.mul(m, j), j = t.add(j, G), new b(D, Z, j);
|
|
6892
6906
|
}
|
|
6893
6907
|
subtract(O) {
|
|
6894
6908
|
return this.add(O.negate());
|
|
@@ -6898,8 +6912,8 @@ function V0(r) {
|
|
|
6898
6912
|
}
|
|
6899
6913
|
wNAF(O) {
|
|
6900
6914
|
return T.wNAFCached(this, g, O, (N) => {
|
|
6901
|
-
const
|
|
6902
|
-
return N.map((H, K) => H.toAffine(
|
|
6915
|
+
const P = t.invertBatch(N.map((H) => H.pz));
|
|
6916
|
+
return N.map((H, K) => H.toAffine(P[K])).map(b.fromAffine);
|
|
6903
6917
|
});
|
|
6904
6918
|
}
|
|
6905
6919
|
/**
|
|
@@ -6913,13 +6927,13 @@ function V0(r) {
|
|
|
6913
6927
|
return N;
|
|
6914
6928
|
if (a(O), O === Tt)
|
|
6915
6929
|
return this;
|
|
6916
|
-
const { endo:
|
|
6917
|
-
if (!
|
|
6930
|
+
const { endo: P } = e;
|
|
6931
|
+
if (!P)
|
|
6918
6932
|
return T.unsafeLadder(this, O);
|
|
6919
|
-
let { k1neg: H, k1: K, k2neg: Q, k2: W } =
|
|
6933
|
+
let { k1neg: H, k1: K, k2neg: Q, k2: W } = P.splitScalar(O), D = N, Z = N, j = this;
|
|
6920
6934
|
for (; K > jt || W > jt; )
|
|
6921
6935
|
K & Tt && (D = D.add(j)), W & Tt && (Z = Z.add(j)), j = j.double(), K >>= Tt, W >>= Tt;
|
|
6922
|
-
return H && (D = D.negate()), Q && (Z = Z.negate()), Z = new b(t.mul(Z.px,
|
|
6936
|
+
return H && (D = D.negate()), Q && (Z = Z.negate()), Z = new b(t.mul(Z.px, P.beta), Z.py, Z.pz), D.add(Z);
|
|
6923
6937
|
}
|
|
6924
6938
|
/**
|
|
6925
6939
|
* Constant time multiplication.
|
|
@@ -6932,17 +6946,17 @@ function V0(r) {
|
|
|
6932
6946
|
*/
|
|
6933
6947
|
multiply(O) {
|
|
6934
6948
|
a(O);
|
|
6935
|
-
let N = O,
|
|
6949
|
+
let N = O, P, H;
|
|
6936
6950
|
const { endo: K } = e;
|
|
6937
6951
|
if (K) {
|
|
6938
6952
|
const { k1neg: Q, k1: W, k2neg: D, k2: Z } = K.splitScalar(N);
|
|
6939
6953
|
let { p: j, f: X } = this.wNAF(W), { p: z, f: G } = this.wNAF(Z);
|
|
6940
|
-
j = T.constTimeNegate(Q, j), z = T.constTimeNegate(D, z), z = new b(t.mul(z.px, K.beta), z.py, z.pz),
|
|
6954
|
+
j = T.constTimeNegate(Q, j), z = T.constTimeNegate(D, z), z = new b(t.mul(z.px, K.beta), z.py, z.pz), P = j.add(z), H = X.add(G);
|
|
6941
6955
|
} else {
|
|
6942
6956
|
const { p: Q, f: W } = this.wNAF(N);
|
|
6943
|
-
|
|
6957
|
+
P = Q, H = W;
|
|
6944
6958
|
}
|
|
6945
|
-
return b.normalizeZ([
|
|
6959
|
+
return b.normalizeZ([P, H])[0];
|
|
6946
6960
|
}
|
|
6947
6961
|
/**
|
|
6948
6962
|
* Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.
|
|
@@ -6950,17 +6964,17 @@ function V0(r) {
|
|
|
6950
6964
|
* The trick could be useful if both P and Q are not G (not in our case).
|
|
6951
6965
|
* @returns non-zero affine point
|
|
6952
6966
|
*/
|
|
6953
|
-
multiplyAndAddUnsafe(O, N,
|
|
6954
|
-
const H = b.BASE, K = (W, D) => D === jt || D === Tt || !W.equals(H) ? W.multiplyUnsafe(D) : W.multiply(D), Q = K(this, N).add(K(O,
|
|
6967
|
+
multiplyAndAddUnsafe(O, N, P) {
|
|
6968
|
+
const H = b.BASE, K = (W, D) => D === jt || D === Tt || !W.equals(H) ? W.multiplyUnsafe(D) : W.multiply(D), Q = K(this, N).add(K(O, P));
|
|
6955
6969
|
return Q.is0() ? void 0 : Q;
|
|
6956
6970
|
}
|
|
6957
6971
|
// Converts Projective point to affine (x, y) coordinates.
|
|
6958
6972
|
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
|
6959
6973
|
// (x, y, z) ∋ (x=x/z, y=y/z)
|
|
6960
6974
|
toAffine(O) {
|
|
6961
|
-
const { px: N, py:
|
|
6975
|
+
const { px: N, py: P, pz: H } = this, K = this.is0();
|
|
6962
6976
|
O == null && (O = K ? t.ONE : t.inv(H));
|
|
6963
|
-
const Q = t.mul(N, O), W = t.mul(
|
|
6977
|
+
const Q = t.mul(N, O), W = t.mul(P, O), D = t.mul(H, O);
|
|
6964
6978
|
if (K)
|
|
6965
6979
|
return { x: t.ZERO, y: t.ZERO };
|
|
6966
6980
|
if (!t.eql(D, t.ONE))
|
|
@@ -7056,20 +7070,20 @@ function j0(r) {
|
|
|
7056
7070
|
return L(p) ? a(-p) : p;
|
|
7057
7071
|
}
|
|
7058
7072
|
const N = (p, m, I) => hr(p.slice(m, I));
|
|
7059
|
-
class
|
|
7073
|
+
class P {
|
|
7060
7074
|
constructor(m, I, E) {
|
|
7061
7075
|
this.r = m, this.s = I, this.recovery = E, this.assertValidity();
|
|
7062
7076
|
}
|
|
7063
7077
|
// pair (bytes of r, bytes of s)
|
|
7064
7078
|
static fromCompact(m) {
|
|
7065
7079
|
const I = e.nByteLength;
|
|
7066
|
-
return m = lt("compactSignature", m, I * 2), new
|
|
7080
|
+
return m = lt("compactSignature", m, I * 2), new P(N(m, 0, I), N(m, I, 2 * I));
|
|
7067
7081
|
}
|
|
7068
7082
|
// DER encoded ECDSA signature
|
|
7069
7083
|
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
|
7070
7084
|
static fromDER(m) {
|
|
7071
7085
|
const { r: I, s: E } = ur.toSig(lt("DER", m));
|
|
7072
|
-
return new
|
|
7086
|
+
return new P(I, E);
|
|
7073
7087
|
}
|
|
7074
7088
|
assertValidity() {
|
|
7075
7089
|
if (!x(this.r))
|
|
@@ -7078,7 +7092,7 @@ function j0(r) {
|
|
|
7078
7092
|
throw new Error("s must be 0 < s < CURVE.n");
|
|
7079
7093
|
}
|
|
7080
7094
|
addRecoveryBit(m) {
|
|
7081
|
-
return new
|
|
7095
|
+
return new P(this.r, this.s, m);
|
|
7082
7096
|
}
|
|
7083
7097
|
recoverPublicKey(m) {
|
|
7084
7098
|
const { r: I, s: E, recovery: A } = this, C = Z(lt("msgHash", m));
|
|
@@ -7087,7 +7101,7 @@ function j0(r) {
|
|
|
7087
7101
|
const R = A === 2 || A === 3 ? I + e.n : I;
|
|
7088
7102
|
if (R >= t.ORDER)
|
|
7089
7103
|
throw new Error("recovery id 2 or 3 invalid");
|
|
7090
|
-
const u = (A & 1) === 0 ? "02" : "03", l = g.fromHex(u + T(R)), y = f(R), k = a(-C * y),
|
|
7104
|
+
const u = (A & 1) === 0 ? "02" : "03", l = g.fromHex(u + T(R)), y = f(R), k = a(-C * y), M = a(E * y), V = g.BASE.multiplyAndAddUnsafe(l, k, M);
|
|
7091
7105
|
if (!V)
|
|
7092
7106
|
throw new Error("point at infinify");
|
|
7093
7107
|
return V.assertValidity(), V;
|
|
@@ -7097,7 +7111,7 @@ function j0(r) {
|
|
|
7097
7111
|
return L(this.s);
|
|
7098
7112
|
}
|
|
7099
7113
|
normalizeS() {
|
|
7100
|
-
return this.hasHighS() ? new
|
|
7114
|
+
return this.hasHighS() ? new P(this.r, a(-this.s), this.recovery) : this;
|
|
7101
7115
|
}
|
|
7102
7116
|
// DER-encoded
|
|
7103
7117
|
toDERRawBytes() {
|
|
@@ -7181,7 +7195,7 @@ function j0(r) {
|
|
|
7181
7195
|
const J = u === !0 ? A(t.BYTES) : u;
|
|
7182
7196
|
k.push(lt("extraEntropy", J));
|
|
7183
7197
|
}
|
|
7184
|
-
const
|
|
7198
|
+
const M = pr(...k), V = l;
|
|
7185
7199
|
function re(J) {
|
|
7186
7200
|
const Ee = D(J);
|
|
7187
7201
|
if (!x(Ee))
|
|
@@ -7192,10 +7206,10 @@ function j0(r) {
|
|
|
7192
7206
|
const Re = a(de * a(V + Le * y));
|
|
7193
7207
|
if (Re === jt)
|
|
7194
7208
|
return;
|
|
7195
|
-
let ve = (pe.x === Le ? 0 : 2) | Number(pe.y & Tt),
|
|
7196
|
-
return C && L(Re) && (
|
|
7209
|
+
let ve = (pe.x === Le ? 0 : 2) | Number(pe.y & Tt), Pt = Re;
|
|
7210
|
+
return C && L(Re) && (Pt = O(Re), ve ^= 1), new P(Le, Pt, ve);
|
|
7197
7211
|
}
|
|
7198
|
-
return { seed:
|
|
7212
|
+
return { seed: M, k2sig: re };
|
|
7199
7213
|
}
|
|
7200
7214
|
const G = { lowS: e.lowS, prehash: !1 }, ee = { lowS: e.lowS, prehash: !1 };
|
|
7201
7215
|
function S(p, m, I = G) {
|
|
@@ -7212,15 +7226,15 @@ function j0(r) {
|
|
|
7212
7226
|
try {
|
|
7213
7227
|
if (typeof A == "string" || fr(A))
|
|
7214
7228
|
try {
|
|
7215
|
-
u =
|
|
7229
|
+
u = P.fromDER(A);
|
|
7216
7230
|
} catch (pe) {
|
|
7217
7231
|
if (!(pe instanceof ur.Err))
|
|
7218
7232
|
throw pe;
|
|
7219
|
-
u =
|
|
7233
|
+
u = P.fromCompact(A);
|
|
7220
7234
|
}
|
|
7221
7235
|
else if (typeof A == "object" && typeof A.r == "bigint" && typeof A.s == "bigint") {
|
|
7222
7236
|
const { r: pe, s: Le } = A;
|
|
7223
|
-
u = new
|
|
7237
|
+
u = new P(pe, Le);
|
|
7224
7238
|
} else
|
|
7225
7239
|
throw new Error("PARSE");
|
|
7226
7240
|
l = g.fromHex(I);
|
|
@@ -7232,7 +7246,7 @@ function j0(r) {
|
|
|
7232
7246
|
if (C && u.hasHighS())
|
|
7233
7247
|
return !1;
|
|
7234
7248
|
R && (m = e.hash(m));
|
|
7235
|
-
const { r: y, s: k } = u,
|
|
7249
|
+
const { r: y, s: k } = u, M = Z(m), V = f(k), re = a(M * V), J = a(y * V), Ee = g.BASE.multiplyAndAddUnsafe(l, re, J)?.toAffine();
|
|
7236
7250
|
return Ee ? a(Ee.x) === y : !1;
|
|
7237
7251
|
}
|
|
7238
7252
|
return {
|
|
@@ -7242,7 +7256,7 @@ function j0(r) {
|
|
|
7242
7256
|
sign: S,
|
|
7243
7257
|
verify: c,
|
|
7244
7258
|
ProjectivePoint: g,
|
|
7245
|
-
Signature:
|
|
7259
|
+
Signature: P,
|
|
7246
7260
|
utils: H
|
|
7247
7261
|
};
|
|
7248
7262
|
}
|
|
@@ -7259,19 +7273,19 @@ function X0(r, e) {
|
|
|
7259
7273
|
return Object.freeze({ ...t(e), create: t });
|
|
7260
7274
|
}
|
|
7261
7275
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
7262
|
-
const Ra = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), so = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), J0 = BigInt(1),
|
|
7276
|
+
const Ra = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), so = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), J0 = BigInt(1), Pi = BigInt(2), oo = (r, e) => (r + e / Pi) / e;
|
|
7263
7277
|
function Q0(r) {
|
|
7264
|
-
const e = Ra, t = BigInt(3), n = BigInt(6), s = BigInt(11), i = BigInt(22), o = BigInt(23), a = BigInt(44), f = BigInt(88), g = r * r * r % e, w = g * g * r % e, b = qe(w, t, e) * w % e, x = qe(b, t, e) * w % e, T = qe(x,
|
|
7265
|
-
if (!
|
|
7278
|
+
const e = Ra, t = BigInt(3), n = BigInt(6), s = BigInt(11), i = BigInt(22), o = BigInt(23), a = BigInt(44), f = BigInt(88), g = r * r * r % e, w = g * g * r % e, b = qe(w, t, e) * w % e, x = qe(b, t, e) * w % e, T = qe(x, Pi, e) * g % e, L = qe(T, s, e) * T % e, O = qe(L, i, e) * L % e, N = qe(O, a, e) * O % e, P = qe(N, f, e) * N % e, H = qe(P, a, e) * O % e, K = qe(H, t, e) * w % e, Q = qe(K, o, e) * L % e, W = qe(Q, n, e) * g % e, D = qe(W, Pi, e);
|
|
7279
|
+
if (!Mi.eql(Mi.sqr(D), r))
|
|
7266
7280
|
throw new Error("Cannot find square root");
|
|
7267
7281
|
return D;
|
|
7268
7282
|
}
|
|
7269
|
-
const
|
|
7283
|
+
const Mi = Go(Ra, void 0, void 0, { sqrt: Q0 }), Bn = X0({
|
|
7270
7284
|
a: BigInt(0),
|
|
7271
7285
|
// equation params: a, b
|
|
7272
7286
|
b: BigInt(7),
|
|
7273
7287
|
// Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975
|
|
7274
|
-
Fp:
|
|
7288
|
+
Fp: Mi,
|
|
7275
7289
|
// Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n
|
|
7276
7290
|
n: so,
|
|
7277
7291
|
// Curve order, total count of valid points in the field
|
|
@@ -7302,21 +7316,21 @@ const Pi = Go(Ra, void 0, void 0, { sqrt: Q0 }), Bn = X0({
|
|
|
7302
7316
|
}, Ci);
|
|
7303
7317
|
BigInt(0);
|
|
7304
7318
|
Bn.ProjectivePoint;
|
|
7305
|
-
const ep =
|
|
7306
|
-
const r =
|
|
7319
|
+
const ep = Pr.utils.randomPrivateKey, ao = () => {
|
|
7320
|
+
const r = Pr.utils.randomPrivateKey(), e = Sn(r), t = new Uint8Array(64);
|
|
7307
7321
|
return t.set(r), t.set(e, 32), {
|
|
7308
7322
|
publicKey: e,
|
|
7309
7323
|
secretKey: t
|
|
7310
7324
|
};
|
|
7311
|
-
}, Sn =
|
|
7325
|
+
}, Sn = Pr.getPublicKey;
|
|
7312
7326
|
function co(r) {
|
|
7313
7327
|
try {
|
|
7314
|
-
return
|
|
7328
|
+
return Pr.ExtendedPoint.fromHex(r), !0;
|
|
7315
7329
|
} catch {
|
|
7316
7330
|
return !1;
|
|
7317
7331
|
}
|
|
7318
7332
|
}
|
|
7319
|
-
const ns = (r, e) =>
|
|
7333
|
+
const ns = (r, e) => Pr.sign(r, e.slice(0, 32)), tp = Pr.verify, we = (r) => le.Buffer.isBuffer(r) ? r : r instanceof Uint8Array ? le.Buffer.from(r.buffer, r.byteOffset, r.byteLength) : le.Buffer.from(r);
|
|
7320
7334
|
class is {
|
|
7321
7335
|
constructor(e) {
|
|
7322
7336
|
Object.assign(this, e);
|
|
@@ -7841,7 +7855,7 @@ class Ct {
|
|
|
7841
7855
|
const f = It(t, 0, $t), g = At(t);
|
|
7842
7856
|
let w = [];
|
|
7843
7857
|
for (let x = 0; x < g; x++) {
|
|
7844
|
-
const T = Ft(t), L = At(t), O = It(t, 0, L), N = At(t),
|
|
7858
|
+
const T = Ft(t), L = At(t), O = It(t, 0, L), N = At(t), P = It(t, 0, N), H = ft.encode(le.Buffer.from(P));
|
|
7845
7859
|
w.push({
|
|
7846
7860
|
programIdIndex: T,
|
|
7847
7861
|
accounts: O,
|
|
@@ -8021,19 +8035,19 @@ class gr {
|
|
|
8021
8035
|
a.push(new ie(It(t, 0, $t)));
|
|
8022
8036
|
const g = ft.encode(It(t, 0, $t)), w = At(t), b = [];
|
|
8023
8037
|
for (let L = 0; L < w; L++) {
|
|
8024
|
-
const O = Ft(t), N = At(t),
|
|
8038
|
+
const O = Ft(t), N = At(t), P = It(t, 0, N), H = At(t), K = new Uint8Array(It(t, 0, H));
|
|
8025
8039
|
b.push({
|
|
8026
8040
|
programIdIndex: O,
|
|
8027
|
-
accountKeyIndexes:
|
|
8041
|
+
accountKeyIndexes: P,
|
|
8028
8042
|
data: K
|
|
8029
8043
|
});
|
|
8030
8044
|
}
|
|
8031
8045
|
const x = At(t), T = [];
|
|
8032
8046
|
for (let L = 0; L < x; L++) {
|
|
8033
|
-
const O = new ie(It(t, 0, $t)), N = At(t),
|
|
8047
|
+
const O = new ie(It(t, 0, $t)), N = At(t), P = It(t, 0, N), H = At(t), K = It(t, 0, H);
|
|
8034
8048
|
T.push({
|
|
8035
8049
|
accountKey: O,
|
|
8036
|
-
writableIndexes:
|
|
8050
|
+
writableIndexes: P,
|
|
8037
8051
|
readonlyIndexes: K
|
|
8038
8052
|
});
|
|
8039
8053
|
}
|
|
@@ -8181,9 +8195,9 @@ class Ie {
|
|
|
8181
8195
|
throw new Error(`Transaction instruction index ${O} has undefined program id`);
|
|
8182
8196
|
const s = [], i = [];
|
|
8183
8197
|
t.forEach((O) => {
|
|
8184
|
-
O.keys.forEach((
|
|
8198
|
+
O.keys.forEach((P) => {
|
|
8185
8199
|
i.push({
|
|
8186
|
-
...
|
|
8200
|
+
...P
|
|
8187
8201
|
});
|
|
8188
8202
|
});
|
|
8189
8203
|
const N = O.programId.toString();
|
|
@@ -8197,14 +8211,14 @@ class Ie {
|
|
|
8197
8211
|
});
|
|
8198
8212
|
const o = [];
|
|
8199
8213
|
i.forEach((O) => {
|
|
8200
|
-
const N = O.pubkey.toString(),
|
|
8201
|
-
|
|
8214
|
+
const N = O.pubkey.toString(), P = o.findIndex((H) => H.pubkey.toString() === N);
|
|
8215
|
+
P > -1 ? (o[P].isWritable = o[P].isWritable || O.isWritable, o[P].isSigner = o[P].isSigner || O.isSigner) : o.push(O);
|
|
8202
8216
|
}), o.sort(function(O, N) {
|
|
8203
8217
|
if (O.isSigner !== N.isSigner)
|
|
8204
8218
|
return O.isSigner ? -1 : 1;
|
|
8205
8219
|
if (O.isWritable !== N.isWritable)
|
|
8206
8220
|
return O.isWritable ? -1 : 1;
|
|
8207
|
-
const
|
|
8221
|
+
const P = {
|
|
8208
8222
|
localeMatcher: "best fit",
|
|
8209
8223
|
usage: "sort",
|
|
8210
8224
|
sensitivity: "variant",
|
|
@@ -8212,7 +8226,7 @@ class Ie {
|
|
|
8212
8226
|
numeric: !1,
|
|
8213
8227
|
caseFirst: "lower"
|
|
8214
8228
|
};
|
|
8215
|
-
return O.pubkey.toBase58().localeCompare(N.pubkey.toBase58(), "en",
|
|
8229
|
+
return O.pubkey.toBase58().localeCompare(N.pubkey.toBase58(), "en", P);
|
|
8216
8230
|
});
|
|
8217
8231
|
const a = o.findIndex((O) => O.pubkey.equals(n));
|
|
8218
8232
|
if (a > -1) {
|
|
@@ -8225,7 +8239,7 @@ class Ie {
|
|
|
8225
8239
|
isWritable: !0
|
|
8226
8240
|
});
|
|
8227
8241
|
for (const O of this.signatures) {
|
|
8228
|
-
const N = o.findIndex((
|
|
8242
|
+
const N = o.findIndex((P) => P.pubkey.equals(O.publicKey));
|
|
8229
8243
|
if (N > -1)
|
|
8230
8244
|
o[N].isSigner || (o[N].isSigner = !0, console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));
|
|
8231
8245
|
else
|
|
@@ -8236,17 +8250,17 @@ class Ie {
|
|
|
8236
8250
|
o.forEach(({
|
|
8237
8251
|
pubkey: O,
|
|
8238
8252
|
isSigner: N,
|
|
8239
|
-
isWritable:
|
|
8253
|
+
isWritable: P
|
|
8240
8254
|
}) => {
|
|
8241
|
-
N ? (b.push(O.toString()), f += 1,
|
|
8255
|
+
N ? (b.push(O.toString()), f += 1, P || (g += 1)) : (x.push(O.toString()), P || (w += 1));
|
|
8242
8256
|
});
|
|
8243
8257
|
const T = b.concat(x), L = t.map((O) => {
|
|
8244
8258
|
const {
|
|
8245
8259
|
data: N,
|
|
8246
|
-
programId:
|
|
8260
|
+
programId: P
|
|
8247
8261
|
} = O;
|
|
8248
8262
|
return {
|
|
8249
|
-
programIdIndex: T.indexOf(
|
|
8263
|
+
programIdIndex: T.indexOf(P.toString()),
|
|
8250
8264
|
accounts: O.keys.map((H) => T.indexOf(H.pubkey.toString())),
|
|
8251
8265
|
data: ft.encode(N)
|
|
8252
8266
|
};
|
|
@@ -8551,16 +8565,16 @@ class cs {
|
|
|
8551
8565
|
const T = [];
|
|
8552
8566
|
for (const L of s) {
|
|
8553
8567
|
const O = [];
|
|
8554
|
-
for (const
|
|
8555
|
-
const H = b.get(
|
|
8568
|
+
for (const P of L.accountKeyIndexes) {
|
|
8569
|
+
const H = b.get(P);
|
|
8556
8570
|
if (H === void 0)
|
|
8557
|
-
throw new Error(`Failed to find key for account key index ${
|
|
8558
|
-
const K =
|
|
8571
|
+
throw new Error(`Failed to find key for account key index ${P}`);
|
|
8572
|
+
const K = P < o;
|
|
8559
8573
|
let Q;
|
|
8560
|
-
K ? Q =
|
|
8574
|
+
K ? Q = P < g : P < b.staticAccountKeys.length ? Q = P - o < w : Q = P - b.staticAccountKeys.length < // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above
|
|
8561
8575
|
b.accountKeysFromLookups.writable.length, O.push({
|
|
8562
8576
|
pubkey: H,
|
|
8563
|
-
isSigner:
|
|
8577
|
+
isSigner: P < n.numRequiredSignatures,
|
|
8564
8578
|
isWritable: Q
|
|
8565
8579
|
});
|
|
8566
8580
|
}
|
|
@@ -8775,7 +8789,7 @@ function Oe(r, e) {
|
|
|
8775
8789
|
return t;
|
|
8776
8790
|
}
|
|
8777
8791
|
const Oa = B.nu64("lamportsPerSignature"), ka = B.struct([B.u32("version"), B.u32("state"), be("authorizedPubkey"), be("nonce"), B.struct([Oa], "feeCalculator")]), Di = ka.span;
|
|
8778
|
-
class
|
|
8792
|
+
class Pn {
|
|
8779
8793
|
/**
|
|
8780
8794
|
* @internal
|
|
8781
8795
|
*/
|
|
@@ -8790,7 +8804,7 @@ class Mn {
|
|
|
8790
8804
|
*/
|
|
8791
8805
|
static fromAccountData(e) {
|
|
8792
8806
|
const t = ka.decode(we(e), 0);
|
|
8793
|
-
return new
|
|
8807
|
+
return new Pn({
|
|
8794
8808
|
authorizedPubkey: new ie(t.authorizedPubkey),
|
|
8795
8809
|
nonce: new ie(t.nonce).toString(),
|
|
8796
8810
|
feeCalculator: t.feeCalculator
|
|
@@ -8820,7 +8834,7 @@ class Rp {
|
|
|
8820
8834
|
this.checkProgramId(e.programId);
|
|
8821
8835
|
const n = B.u32("instruction").decode(e.data);
|
|
8822
8836
|
let s;
|
|
8823
|
-
for (const [i, o] of Object.entries(
|
|
8837
|
+
for (const [i, o] of Object.entries(Me))
|
|
8824
8838
|
if (o.index == n) {
|
|
8825
8839
|
s = i;
|
|
8826
8840
|
break;
|
|
@@ -8838,7 +8852,7 @@ class Rp {
|
|
|
8838
8852
|
lamports: t,
|
|
8839
8853
|
space: n,
|
|
8840
8854
|
programId: s
|
|
8841
|
-
} = Oe(
|
|
8855
|
+
} = Oe(Me.Create, e.data);
|
|
8842
8856
|
return {
|
|
8843
8857
|
fromPubkey: e.keys[0].pubkey,
|
|
8844
8858
|
newAccountPubkey: e.keys[1].pubkey,
|
|
@@ -8854,7 +8868,7 @@ class Rp {
|
|
|
8854
8868
|
this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 2);
|
|
8855
8869
|
const {
|
|
8856
8870
|
lamports: t
|
|
8857
|
-
} = Oe(
|
|
8871
|
+
} = Oe(Me.Transfer, e.data);
|
|
8858
8872
|
return {
|
|
8859
8873
|
fromPubkey: e.keys[0].pubkey,
|
|
8860
8874
|
toPubkey: e.keys[1].pubkey,
|
|
@@ -8870,7 +8884,7 @@ class Rp {
|
|
|
8870
8884
|
lamports: t,
|
|
8871
8885
|
seed: n,
|
|
8872
8886
|
programId: s
|
|
8873
|
-
} = Oe(
|
|
8887
|
+
} = Oe(Me.TransferWithSeed, e.data);
|
|
8874
8888
|
return {
|
|
8875
8889
|
fromPubkey: e.keys[0].pubkey,
|
|
8876
8890
|
basePubkey: e.keys[1].pubkey,
|
|
@@ -8887,7 +8901,7 @@ class Rp {
|
|
|
8887
8901
|
this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 1);
|
|
8888
8902
|
const {
|
|
8889
8903
|
space: t
|
|
8890
|
-
} = Oe(
|
|
8904
|
+
} = Oe(Me.Allocate, e.data);
|
|
8891
8905
|
return {
|
|
8892
8906
|
accountPubkey: e.keys[0].pubkey,
|
|
8893
8907
|
space: t
|
|
@@ -8903,7 +8917,7 @@ class Rp {
|
|
|
8903
8917
|
seed: n,
|
|
8904
8918
|
space: s,
|
|
8905
8919
|
programId: i
|
|
8906
|
-
} = Oe(
|
|
8920
|
+
} = Oe(Me.AllocateWithSeed, e.data);
|
|
8907
8921
|
return {
|
|
8908
8922
|
accountPubkey: e.keys[0].pubkey,
|
|
8909
8923
|
basePubkey: new ie(t),
|
|
@@ -8919,7 +8933,7 @@ class Rp {
|
|
|
8919
8933
|
this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 1);
|
|
8920
8934
|
const {
|
|
8921
8935
|
programId: t
|
|
8922
|
-
} = Oe(
|
|
8936
|
+
} = Oe(Me.Assign, e.data);
|
|
8923
8937
|
return {
|
|
8924
8938
|
accountPubkey: e.keys[0].pubkey,
|
|
8925
8939
|
programId: new ie(t)
|
|
@@ -8934,7 +8948,7 @@ class Rp {
|
|
|
8934
8948
|
base: t,
|
|
8935
8949
|
seed: n,
|
|
8936
8950
|
programId: s
|
|
8937
|
-
} = Oe(
|
|
8951
|
+
} = Oe(Me.AssignWithSeed, e.data);
|
|
8938
8952
|
return {
|
|
8939
8953
|
accountPubkey: e.keys[0].pubkey,
|
|
8940
8954
|
basePubkey: new ie(t),
|
|
@@ -8953,7 +8967,7 @@ class Rp {
|
|
|
8953
8967
|
lamports: s,
|
|
8954
8968
|
space: i,
|
|
8955
8969
|
programId: o
|
|
8956
|
-
} = Oe(
|
|
8970
|
+
} = Oe(Me.CreateWithSeed, e.data);
|
|
8957
8971
|
return {
|
|
8958
8972
|
fromPubkey: e.keys[0].pubkey,
|
|
8959
8973
|
newAccountPubkey: e.keys[1].pubkey,
|
|
@@ -8971,7 +8985,7 @@ class Rp {
|
|
|
8971
8985
|
this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 3);
|
|
8972
8986
|
const {
|
|
8973
8987
|
authorized: t
|
|
8974
|
-
} = Oe(
|
|
8988
|
+
} = Oe(Me.InitializeNonceAccount, e.data);
|
|
8975
8989
|
return {
|
|
8976
8990
|
noncePubkey: e.keys[0].pubkey,
|
|
8977
8991
|
authorizedPubkey: new ie(t)
|
|
@@ -8981,7 +8995,7 @@ class Rp {
|
|
|
8981
8995
|
* Decode a nonce advance system instruction and retrieve the instruction params.
|
|
8982
8996
|
*/
|
|
8983
8997
|
static decodeNonceAdvance(e) {
|
|
8984
|
-
return this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 3), Oe(
|
|
8998
|
+
return this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 3), Oe(Me.AdvanceNonceAccount, e.data), {
|
|
8985
8999
|
noncePubkey: e.keys[0].pubkey,
|
|
8986
9000
|
authorizedPubkey: e.keys[2].pubkey
|
|
8987
9001
|
};
|
|
@@ -8993,7 +9007,7 @@ class Rp {
|
|
|
8993
9007
|
this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 5);
|
|
8994
9008
|
const {
|
|
8995
9009
|
lamports: t
|
|
8996
|
-
} = Oe(
|
|
9010
|
+
} = Oe(Me.WithdrawNonceAccount, e.data);
|
|
8997
9011
|
return {
|
|
8998
9012
|
noncePubkey: e.keys[0].pubkey,
|
|
8999
9013
|
toPubkey: e.keys[1].pubkey,
|
|
@@ -9008,7 +9022,7 @@ class Rp {
|
|
|
9008
9022
|
this.checkProgramId(e.programId), this.checkKeyLength(e.keys, 2);
|
|
9009
9023
|
const {
|
|
9010
9024
|
authorized: t
|
|
9011
|
-
} = Oe(
|
|
9025
|
+
} = Oe(Me.AuthorizeNonceAccount, e.data);
|
|
9012
9026
|
return {
|
|
9013
9027
|
noncePubkey: e.keys[0].pubkey,
|
|
9014
9028
|
authorizedPubkey: e.keys[1].pubkey,
|
|
@@ -9030,7 +9044,7 @@ class Rp {
|
|
|
9030
9044
|
throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`);
|
|
9031
9045
|
}
|
|
9032
9046
|
}
|
|
9033
|
-
const
|
|
9047
|
+
const Me = Object.freeze({
|
|
9034
9048
|
Create: {
|
|
9035
9049
|
index: 0,
|
|
9036
9050
|
layout: B.struct([B.u32("instruction"), B.ns64("lamports"), B.ns64("space"), be("programId")])
|
|
@@ -9097,7 +9111,7 @@ class dt {
|
|
|
9097
9111
|
* Generate a transaction instruction that creates a new account
|
|
9098
9112
|
*/
|
|
9099
9113
|
static createAccount(e) {
|
|
9100
|
-
const t =
|
|
9114
|
+
const t = Me.Create, n = Se(t, {
|
|
9101
9115
|
lamports: e.lamports,
|
|
9102
9116
|
space: e.space,
|
|
9103
9117
|
programId: we(e.programId.toBuffer())
|
|
@@ -9122,7 +9136,7 @@ class dt {
|
|
|
9122
9136
|
static transfer(e) {
|
|
9123
9137
|
let t, n;
|
|
9124
9138
|
if ("basePubkey" in e) {
|
|
9125
|
-
const s =
|
|
9139
|
+
const s = Me.TransferWithSeed;
|
|
9126
9140
|
t = Se(s, {
|
|
9127
9141
|
lamports: BigInt(e.lamports),
|
|
9128
9142
|
seed: e.seed,
|
|
@@ -9141,7 +9155,7 @@ class dt {
|
|
|
9141
9155
|
isWritable: !0
|
|
9142
9156
|
}];
|
|
9143
9157
|
} else {
|
|
9144
|
-
const s =
|
|
9158
|
+
const s = Me.Transfer;
|
|
9145
9159
|
t = Se(s, {
|
|
9146
9160
|
lamports: BigInt(e.lamports)
|
|
9147
9161
|
}), n = [{
|
|
@@ -9166,7 +9180,7 @@ class dt {
|
|
|
9166
9180
|
static assign(e) {
|
|
9167
9181
|
let t, n;
|
|
9168
9182
|
if ("basePubkey" in e) {
|
|
9169
|
-
const s =
|
|
9183
|
+
const s = Me.AssignWithSeed;
|
|
9170
9184
|
t = Se(s, {
|
|
9171
9185
|
base: we(e.basePubkey.toBuffer()),
|
|
9172
9186
|
seed: e.seed,
|
|
@@ -9181,7 +9195,7 @@ class dt {
|
|
|
9181
9195
|
isWritable: !1
|
|
9182
9196
|
}];
|
|
9183
9197
|
} else {
|
|
9184
|
-
const s =
|
|
9198
|
+
const s = Me.Assign;
|
|
9185
9199
|
t = Se(s, {
|
|
9186
9200
|
programId: we(e.programId.toBuffer())
|
|
9187
9201
|
}), n = [{
|
|
@@ -9201,7 +9215,7 @@ class dt {
|
|
|
9201
9215
|
* an address generated with `from`, a seed, and programId
|
|
9202
9216
|
*/
|
|
9203
9217
|
static createAccountWithSeed(e) {
|
|
9204
|
-
const t =
|
|
9218
|
+
const t = Me.CreateWithSeed, n = Se(t, {
|
|
9205
9219
|
base: we(e.basePubkey.toBuffer()),
|
|
9206
9220
|
seed: e.seed,
|
|
9207
9221
|
lamports: e.lamports,
|
|
@@ -9257,7 +9271,7 @@ class dt {
|
|
|
9257
9271
|
* Generate an instruction to initialize a Nonce account
|
|
9258
9272
|
*/
|
|
9259
9273
|
static nonceInitialize(e) {
|
|
9260
|
-
const t =
|
|
9274
|
+
const t = Me.InitializeNonceAccount, n = Se(t, {
|
|
9261
9275
|
authorized: we(e.authorizedPubkey.toBuffer())
|
|
9262
9276
|
}), s = {
|
|
9263
9277
|
keys: [{
|
|
@@ -9282,7 +9296,7 @@ class dt {
|
|
|
9282
9296
|
* Generate an instruction to advance the nonce in a Nonce account
|
|
9283
9297
|
*/
|
|
9284
9298
|
static nonceAdvance(e) {
|
|
9285
|
-
const t =
|
|
9299
|
+
const t = Me.AdvanceNonceAccount, n = Se(t), s = {
|
|
9286
9300
|
keys: [{
|
|
9287
9301
|
pubkey: e.noncePubkey,
|
|
9288
9302
|
isSigner: !1,
|
|
@@ -9305,7 +9319,7 @@ class dt {
|
|
|
9305
9319
|
* Generate a transaction instruction that withdraws lamports from a Nonce account
|
|
9306
9320
|
*/
|
|
9307
9321
|
static nonceWithdraw(e) {
|
|
9308
|
-
const t =
|
|
9322
|
+
const t = Me.WithdrawNonceAccount, n = Se(t, {
|
|
9309
9323
|
lamports: e.lamports
|
|
9310
9324
|
});
|
|
9311
9325
|
return new Be({
|
|
@@ -9339,7 +9353,7 @@ class dt {
|
|
|
9339
9353
|
* on a Nonce account.
|
|
9340
9354
|
*/
|
|
9341
9355
|
static nonceAuthorize(e) {
|
|
9342
|
-
const t =
|
|
9356
|
+
const t = Me.AuthorizeNonceAccount, n = Se(t, {
|
|
9343
9357
|
authorized: we(e.newAuthorizedPubkey.toBuffer())
|
|
9344
9358
|
});
|
|
9345
9359
|
return new Be({
|
|
@@ -9362,7 +9376,7 @@ class dt {
|
|
|
9362
9376
|
static allocate(e) {
|
|
9363
9377
|
let t, n;
|
|
9364
9378
|
if ("basePubkey" in e) {
|
|
9365
|
-
const s =
|
|
9379
|
+
const s = Me.AllocateWithSeed;
|
|
9366
9380
|
t = Se(s, {
|
|
9367
9381
|
base: we(e.basePubkey.toBuffer()),
|
|
9368
9382
|
seed: e.seed,
|
|
@@ -9378,7 +9392,7 @@ class dt {
|
|
|
9378
9392
|
isWritable: !1
|
|
9379
9393
|
}];
|
|
9380
9394
|
} else {
|
|
9381
|
-
const s =
|
|
9395
|
+
const s = Me.Allocate;
|
|
9382
9396
|
t = Se(s, {
|
|
9383
9397
|
space: e.space
|
|
9384
9398
|
}), n = [{
|
|
@@ -9504,14 +9518,14 @@ class mr {
|
|
|
9504
9518
|
preflightCommitment: L
|
|
9505
9519
|
}), {
|
|
9506
9520
|
context: N,
|
|
9507
|
-
value:
|
|
9521
|
+
value: P
|
|
9508
9522
|
} = await e.confirmTransaction({
|
|
9509
9523
|
signature: O,
|
|
9510
9524
|
lastValidBlockHeight: T.lastValidBlockHeight,
|
|
9511
9525
|
blockhash: T.recentBlockhash
|
|
9512
9526
|
}, L);
|
|
9513
|
-
if (
|
|
9514
|
-
throw new Error(`Transaction ${O} failed (${JSON.stringify(
|
|
9527
|
+
if (P.err)
|
|
9528
|
+
throw new Error(`Transaction ${O} failed (${JSON.stringify(P)})`);
|
|
9515
9529
|
for (; ; ) {
|
|
9516
9530
|
try {
|
|
9517
9531
|
if (await e.getSlot({
|
|
@@ -9732,12 +9746,12 @@ function Cp(r) {
|
|
|
9732
9746
|
return `${o}//${n}${f}${i}`;
|
|
9733
9747
|
}
|
|
9734
9748
|
const We = nn(es(ie), ne(), (r) => new ie(r)), Na = ts([ne(), $e("base64")]), ls = nn(es(le.Buffer), Na, (r) => le.Buffer.from(r[0], "base64")), xa = 30 * 1e3;
|
|
9735
|
-
function
|
|
9749
|
+
function Pp(r) {
|
|
9736
9750
|
if (/^https?:/.test(r) === !1)
|
|
9737
9751
|
throw new TypeError("Endpoint URL must start with `http:` or `https:`.");
|
|
9738
9752
|
return r;
|
|
9739
9753
|
}
|
|
9740
|
-
function
|
|
9754
|
+
function Pe(r) {
|
|
9741
9755
|
let e, t;
|
|
9742
9756
|
if (typeof r == "string")
|
|
9743
9757
|
e = r;
|
|
@@ -9771,15 +9785,15 @@ function Ba(r) {
|
|
|
9771
9785
|
jsonrpc: $e("2.0"),
|
|
9772
9786
|
id: ne(),
|
|
9773
9787
|
error: te({
|
|
9774
|
-
code:
|
|
9788
|
+
code: Mr(),
|
|
9775
9789
|
message: ne(),
|
|
9776
9790
|
data: ue(i0())
|
|
9777
9791
|
})
|
|
9778
9792
|
})]);
|
|
9779
9793
|
}
|
|
9780
|
-
const
|
|
9794
|
+
const Mp = Ba(Mr());
|
|
9781
9795
|
function ye(r) {
|
|
9782
|
-
return nn(Ba(r),
|
|
9796
|
+
return nn(Ba(r), Mp, (e) => "error" in e ? e : {
|
|
9783
9797
|
...e,
|
|
9784
9798
|
result: se(e.result, r)
|
|
9785
9799
|
});
|
|
@@ -9792,7 +9806,7 @@ function Ge(r) {
|
|
|
9792
9806
|
value: r
|
|
9793
9807
|
}));
|
|
9794
9808
|
}
|
|
9795
|
-
function
|
|
9809
|
+
function Mn(r) {
|
|
9796
9810
|
return te({
|
|
9797
9811
|
context: te({
|
|
9798
9812
|
slot: $()
|
|
@@ -9854,7 +9868,7 @@ const Up = te({
|
|
|
9854
9868
|
}), Vp = te({
|
|
9855
9869
|
program: ne(),
|
|
9856
9870
|
programId: We,
|
|
9857
|
-
parsed:
|
|
9871
|
+
parsed: Mr()
|
|
9858
9872
|
}), Yp = te({
|
|
9859
9873
|
programId: We,
|
|
9860
9874
|
accounts: oe(We),
|
|
@@ -9970,7 +9984,7 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
9970
9984
|
})
|
|
9971
9985
|
}))), Ki = te({
|
|
9972
9986
|
program: ne(),
|
|
9973
|
-
parsed:
|
|
9987
|
+
parsed: Mr(),
|
|
9974
9988
|
space: $()
|
|
9975
9989
|
}), ug = Ge(oe(te({
|
|
9976
9990
|
pubkey: We,
|
|
@@ -10020,13 +10034,13 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
10020
10034
|
blockTime: ue(ae($()))
|
|
10021
10035
|
}))), _g = te({
|
|
10022
10036
|
subscription: $(),
|
|
10023
|
-
result:
|
|
10037
|
+
result: Mn(jr)
|
|
10024
10038
|
}), yg = te({
|
|
10025
10039
|
pubkey: We,
|
|
10026
10040
|
account: jr
|
|
10027
10041
|
}), wg = te({
|
|
10028
10042
|
subscription: $(),
|
|
10029
|
-
result:
|
|
10043
|
+
result: Mn(yg)
|
|
10030
10044
|
}), bg = te({
|
|
10031
10045
|
parent: $(),
|
|
10032
10046
|
slot: $(),
|
|
@@ -10063,7 +10077,7 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
10063
10077
|
result: Eg
|
|
10064
10078
|
}), Ag = te({
|
|
10065
10079
|
subscription: $(),
|
|
10066
|
-
result:
|
|
10080
|
+
result: Mn(Et([Wp, qp]))
|
|
10067
10081
|
}), Ig = te({
|
|
10068
10082
|
subscription: $(),
|
|
10069
10083
|
result: $()
|
|
@@ -10116,26 +10130,26 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
10116
10130
|
signer: Ht(),
|
|
10117
10131
|
writable: Ht(),
|
|
10118
10132
|
source: ue(Et([$e("transaction"), $e("lookupTable")]))
|
|
10119
|
-
}),
|
|
10133
|
+
}), Pa = te({
|
|
10120
10134
|
accountKeys: oe(Ca),
|
|
10121
10135
|
signatures: oe(ne())
|
|
10122
|
-
}),
|
|
10123
|
-
parsed:
|
|
10136
|
+
}), Ma = te({
|
|
10137
|
+
parsed: Mr(),
|
|
10124
10138
|
program: ne(),
|
|
10125
10139
|
programId: We
|
|
10126
10140
|
}), Ua = te({
|
|
10127
10141
|
accounts: oe(We),
|
|
10128
10142
|
data: ne(),
|
|
10129
10143
|
programId: We
|
|
10130
|
-
}), Bg = Et([Ua,
|
|
10131
|
-
parsed:
|
|
10144
|
+
}), Bg = Et([Ua, Ma]), Lg = Et([te({
|
|
10145
|
+
parsed: Mr(),
|
|
10132
10146
|
program: ne(),
|
|
10133
10147
|
programId: ne()
|
|
10134
10148
|
}), te({
|
|
10135
10149
|
accounts: oe(ne()),
|
|
10136
10150
|
data: ne(),
|
|
10137
10151
|
programId: ne()
|
|
10138
|
-
})]), Da = nn(Bg, Lg, (r) => "accounts" in r ? se(r, Ua) : se(r,
|
|
10152
|
+
})]), Da = nn(Bg, Lg, (r) => "accounts" in r ? se(r, Ua) : se(r, Ma)), Fa = te({
|
|
10139
10153
|
signatures: oe(ne()),
|
|
10140
10154
|
message: te({
|
|
10141
10155
|
accountKeys: oe(Ca),
|
|
@@ -10202,19 +10216,19 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
10202
10216
|
rewards: ue(oe(wr)),
|
|
10203
10217
|
blockTime: ae($()),
|
|
10204
10218
|
blockHeight: ae($())
|
|
10205
|
-
}))),
|
|
10219
|
+
}))), Pg = ye(ae(te({
|
|
10206
10220
|
blockhash: ne(),
|
|
10207
10221
|
previousBlockhash: ne(),
|
|
10208
10222
|
parentSlot: $(),
|
|
10209
10223
|
rewards: ue(oe(wr)),
|
|
10210
10224
|
blockTime: ae($()),
|
|
10211
10225
|
blockHeight: ae($())
|
|
10212
|
-
}))),
|
|
10226
|
+
}))), Mg = ye(ae(te({
|
|
10213
10227
|
blockhash: ne(),
|
|
10214
10228
|
previousBlockhash: ne(),
|
|
10215
10229
|
parentSlot: $(),
|
|
10216
10230
|
transactions: oe(te({
|
|
10217
|
-
transaction:
|
|
10231
|
+
transaction: Pa,
|
|
10218
10232
|
meta: ae(Un),
|
|
10219
10233
|
version: ue(Ur)
|
|
10220
10234
|
})),
|
|
@@ -10238,7 +10252,7 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
10238
10252
|
previousBlockhash: ne(),
|
|
10239
10253
|
parentSlot: $(),
|
|
10240
10254
|
transactions: oe(te({
|
|
10241
|
-
transaction:
|
|
10255
|
+
transaction: Pa,
|
|
10242
10256
|
meta: ae(fs),
|
|
10243
10257
|
version: ue(Ur)
|
|
10244
10258
|
})),
|
|
@@ -10297,7 +10311,7 @@ const Qp = ye(Up), eg = ye(zp), tg = ye(Fp), rg = ye(Kp), ng = ye($p), ig = ye(H
|
|
|
10297
10311
|
logs: oe(ne()),
|
|
10298
10312
|
signature: ne()
|
|
10299
10313
|
}), jg = te({
|
|
10300
|
-
result:
|
|
10314
|
+
result: Mn(Yg),
|
|
10301
10315
|
subscription: $()
|
|
10302
10316
|
}), Zg = {
|
|
10303
10317
|
"solana-client": "js/1.0.0-maintenance"
|
|
@@ -10321,7 +10335,7 @@ class Xg {
|
|
|
10321
10335
|
const {
|
|
10322
10336
|
commitment: b,
|
|
10323
10337
|
config: x
|
|
10324
|
-
} =
|
|
10338
|
+
} = Pe(w), T = this._buildArgs([], b, void 0, x), L = ho(T);
|
|
10325
10339
|
return g[L] = g[L] ?? (async () => {
|
|
10326
10340
|
try {
|
|
10327
10341
|
const O = await this._rpcRequest("getBlockHeight", T), N = se(O, ye($()));
|
|
@@ -10335,7 +10349,7 @@ class Xg {
|
|
|
10335
10349
|
};
|
|
10336
10350
|
})();
|
|
10337
10351
|
let n, s, i, o, a, f;
|
|
10338
|
-
t && typeof t == "string" ? this._commitment = t : t && (this._commitment = t.commitment, this._confirmTransactionInitialTimeout = t.confirmTransactionInitialTimeout, n = t.wsEndpoint, s = t.httpHeaders, i = t.fetch, o = t.fetchMiddleware, a = t.disableRetryOnRateLimit, f = t.httpAgent), this._rpcEndpoint =
|
|
10352
|
+
t && typeof t == "string" ? this._commitment = t : t && (this._commitment = t.commitment, this._confirmTransactionInitialTimeout = t.confirmTransactionInitialTimeout, n = t.wsEndpoint, s = t.httpHeaders, i = t.fetch, o = t.fetchMiddleware, a = t.disableRetryOnRateLimit, f = t.httpAgent), this._rpcEndpoint = Pp(e), this._rpcWsEndpoint = n || Cp(e), this._rpcClient = Zp(e, s, i, o, a, f), this._rpcRequest = Xp(this._rpcClient), this._rpcBatchRequest = Jp(this._rpcClient), this._rpcWebSocket = new Np(this._rpcWsEndpoint, {
|
|
10339
10353
|
autoconnect: !1,
|
|
10340
10354
|
max_reconnects: 1 / 0
|
|
10341
10355
|
}), this._rpcWebSocket.on("open", this._wsOnOpen.bind(this)), this._rpcWebSocket.on("error", this._wsOnError.bind(this)), this._rpcWebSocket.on("close", this._wsOnClose.bind(this)), this._rpcWebSocket.on("accountNotification", this._wsOnAccountNotification.bind(this)), this._rpcWebSocket.on("programNotification", this._wsOnProgramAccountNotification.bind(this)), this._rpcWebSocket.on("slotNotification", this._wsOnSlotNotification.bind(this)), this._rpcWebSocket.on("slotsUpdatesNotification", this._wsOnSlotUpdatesNotification.bind(this)), this._rpcWebSocket.on("signatureNotification", this._wsOnSignatureNotification.bind(this)), this._rpcWebSocket.on("rootNotification", this._wsOnRootNotification.bind(this)), this._rpcWebSocket.on("logsNotification", this._wsOnLogsNotification.bind(this));
|
|
@@ -10359,7 +10373,7 @@ class Xg {
|
|
|
10359
10373
|
const {
|
|
10360
10374
|
commitment: n,
|
|
10361
10375
|
config: s
|
|
10362
|
-
} =
|
|
10376
|
+
} = Pe(t), i = this._buildArgs([e.toBase58()], n, void 0, s), o = await this._rpcRequest("getBalance", i), a = se(o, Ge($()));
|
|
10363
10377
|
if ("error" in a)
|
|
10364
10378
|
throw new ce(a.error, `failed to get balance for ${e.toBase58()}`);
|
|
10365
10379
|
return a.result;
|
|
@@ -10445,7 +10459,7 @@ class Xg {
|
|
|
10445
10459
|
const {
|
|
10446
10460
|
commitment: s,
|
|
10447
10461
|
config: i
|
|
10448
|
-
} =
|
|
10462
|
+
} = Pe(n);
|
|
10449
10463
|
let o = [e.toBase58()];
|
|
10450
10464
|
"mint" in t ? o.push({
|
|
10451
10465
|
mint: t.mint.toBase58()
|
|
@@ -10503,7 +10517,7 @@ class Xg {
|
|
|
10503
10517
|
const {
|
|
10504
10518
|
commitment: n,
|
|
10505
10519
|
config: s
|
|
10506
|
-
} =
|
|
10520
|
+
} = Pe(t), i = this._buildArgs([e.toBase58()], n, "base64", s), o = await this._rpcRequest("getAccountInfo", i), a = se(o, Ge(ae(jr)));
|
|
10507
10521
|
if ("error" in a)
|
|
10508
10522
|
throw new ce(a.error, `failed to get info about account ${e.toBase58()}`);
|
|
10509
10523
|
return a.result;
|
|
@@ -10515,7 +10529,7 @@ class Xg {
|
|
|
10515
10529
|
const {
|
|
10516
10530
|
commitment: n,
|
|
10517
10531
|
config: s
|
|
10518
|
-
} =
|
|
10532
|
+
} = Pe(t), i = this._buildArgs([e.toBase58()], n, "jsonParsed", s), o = await this._rpcRequest("getAccountInfo", i), a = se(o, Ge(ae($i)));
|
|
10519
10533
|
if ("error" in a)
|
|
10520
10534
|
throw new ce(a.error, `failed to get info about account ${e.toBase58()}`);
|
|
10521
10535
|
return a.result;
|
|
@@ -10537,7 +10551,7 @@ class Xg {
|
|
|
10537
10551
|
const {
|
|
10538
10552
|
commitment: n,
|
|
10539
10553
|
config: s
|
|
10540
|
-
} =
|
|
10554
|
+
} = Pe(t), i = e.map((g) => g.toBase58()), o = this._buildArgs([i], n, "jsonParsed", s), a = await this._rpcRequest("getMultipleAccounts", o), f = se(a, Ge(oe(ae($i))));
|
|
10541
10555
|
if ("error" in f)
|
|
10542
10556
|
throw new ce(f.error, `failed to get info for accounts ${i}`);
|
|
10543
10557
|
return f.result;
|
|
@@ -10549,7 +10563,7 @@ class Xg {
|
|
|
10549
10563
|
const {
|
|
10550
10564
|
commitment: n,
|
|
10551
10565
|
config: s
|
|
10552
|
-
} =
|
|
10566
|
+
} = Pe(t), i = e.map((g) => g.toBase58()), o = this._buildArgs([i], n, "base64", s), a = await this._rpcRequest("getMultipleAccounts", o), f = se(a, Ge(oe(ae(jr))));
|
|
10553
10567
|
if ("error" in f)
|
|
10554
10568
|
throw new ce(f.error, `failed to get info for accounts ${i}`);
|
|
10555
10569
|
return f.result;
|
|
@@ -10569,7 +10583,7 @@ class Xg {
|
|
|
10569
10583
|
const {
|
|
10570
10584
|
commitment: s,
|
|
10571
10585
|
config: i
|
|
10572
|
-
} =
|
|
10586
|
+
} = Pe(t), o = this._buildArgs([e.toBase58()], s, void 0, {
|
|
10573
10587
|
...i,
|
|
10574
10588
|
epoch: n ?? i?.epoch
|
|
10575
10589
|
}), a = await this._rpcRequest("getStakeActivation", o), f = se(a, ye(pg));
|
|
@@ -10588,7 +10602,7 @@ class Xg {
|
|
|
10588
10602
|
const {
|
|
10589
10603
|
commitment: n,
|
|
10590
10604
|
config: s
|
|
10591
|
-
} =
|
|
10605
|
+
} = Pe(t), {
|
|
10592
10606
|
encoding: i,
|
|
10593
10607
|
...o
|
|
10594
10608
|
} = s || {}, a = this._buildArgs([e.toBase58()], n, i || "base64", {
|
|
@@ -10610,7 +10624,7 @@ class Xg {
|
|
|
10610
10624
|
const {
|
|
10611
10625
|
commitment: n,
|
|
10612
10626
|
config: s
|
|
10613
|
-
} =
|
|
10627
|
+
} = Pe(t), i = this._buildArgs([e.toBase58()], n, "jsonParsed", s), o = await this._rpcRequest("getProgramAccounts", i), a = se(o, ye(oe(dg)));
|
|
10614
10628
|
if ("error" in a)
|
|
10615
10629
|
throw new ce(a.error, `failed to get accounts owned by program ${e.toBase58()}`);
|
|
10616
10630
|
return a.result;
|
|
@@ -10789,13 +10803,13 @@ class Xg {
|
|
|
10789
10803
|
const N = async () => {
|
|
10790
10804
|
try {
|
|
10791
10805
|
const {
|
|
10792
|
-
context:
|
|
10806
|
+
context: P,
|
|
10793
10807
|
value: H
|
|
10794
10808
|
} = await this.getNonceAndContext(s, {
|
|
10795
10809
|
commitment: e,
|
|
10796
10810
|
minContextSlot: n
|
|
10797
10811
|
});
|
|
10798
|
-
return O =
|
|
10812
|
+
return O = P.slot, H?.nonce;
|
|
10799
10813
|
} catch {
|
|
10800
10814
|
return L;
|
|
10801
10815
|
}
|
|
@@ -10941,7 +10955,7 @@ class Xg {
|
|
|
10941
10955
|
const {
|
|
10942
10956
|
commitment: t,
|
|
10943
10957
|
config: n
|
|
10944
|
-
} =
|
|
10958
|
+
} = Pe(e), s = this._buildArgs([], t, void 0, n), i = await this._rpcRequest("getSlot", s), o = se(i, ye($()));
|
|
10945
10959
|
if ("error" in o)
|
|
10946
10960
|
throw new ce(o.error, "failed to get slot");
|
|
10947
10961
|
return o.result;
|
|
@@ -10953,7 +10967,7 @@ class Xg {
|
|
|
10953
10967
|
const {
|
|
10954
10968
|
commitment: t,
|
|
10955
10969
|
config: n
|
|
10956
|
-
} =
|
|
10970
|
+
} = Pe(e), s = this._buildArgs([], t, void 0, n), i = await this._rpcRequest("getSlotLeader", s), o = se(i, ye(ne()));
|
|
10957
10971
|
if ("error" in o)
|
|
10958
10972
|
throw new ce(o.error, "failed to get slot leader");
|
|
10959
10973
|
return o.result;
|
|
@@ -11003,7 +11017,7 @@ class Xg {
|
|
|
11003
11017
|
const {
|
|
11004
11018
|
commitment: t,
|
|
11005
11019
|
config: n
|
|
11006
|
-
} =
|
|
11020
|
+
} = Pe(e), s = this._buildArgs([], t, void 0, n), i = await this._rpcRequest("getTransactionCount", s), o = se(i, ye($()));
|
|
11007
11021
|
if ("error" in o)
|
|
11008
11022
|
throw new ce(o.error, "failed to get transaction count");
|
|
11009
11023
|
return o.result;
|
|
@@ -11035,7 +11049,7 @@ class Xg {
|
|
|
11035
11049
|
const {
|
|
11036
11050
|
commitment: s,
|
|
11037
11051
|
config: i
|
|
11038
|
-
} =
|
|
11052
|
+
} = Pe(n), o = this._buildArgs([e.map((g) => g.toBase58())], s, void 0, {
|
|
11039
11053
|
...i,
|
|
11040
11054
|
epoch: t ?? i?.epoch
|
|
11041
11055
|
}), a = await this._rpcRequest("getInflationReward", o), f = se(a, Dp);
|
|
@@ -11059,7 +11073,7 @@ class Xg {
|
|
|
11059
11073
|
const {
|
|
11060
11074
|
commitment: t,
|
|
11061
11075
|
config: n
|
|
11062
|
-
} =
|
|
11076
|
+
} = Pe(e), s = this._buildArgs([], t, void 0, n), i = await this._rpcRequest("getEpochInfo", s), o = se(i, rg);
|
|
11063
11077
|
if ("error" in o)
|
|
11064
11078
|
throw new ce(o.error, "failed to get epoch info");
|
|
11065
11079
|
return o.result;
|
|
@@ -11200,7 +11214,7 @@ class Xg {
|
|
|
11200
11214
|
const {
|
|
11201
11215
|
commitment: t,
|
|
11202
11216
|
config: n
|
|
11203
|
-
} =
|
|
11217
|
+
} = Pe(e), s = this._buildArgs([], t, void 0, n), i = await this._rpcRequest("getLatestBlockhash", s), o = se(i, Kg);
|
|
11204
11218
|
if ("error" in o)
|
|
11205
11219
|
throw new ce(o.error, "failed to get latest blockhash");
|
|
11206
11220
|
return o.result;
|
|
@@ -11212,7 +11226,7 @@ class Xg {
|
|
|
11212
11226
|
const {
|
|
11213
11227
|
commitment: n,
|
|
11214
11228
|
config: s
|
|
11215
|
-
} =
|
|
11229
|
+
} = Pe(t), i = this._buildArgs([e], n, void 0, s), o = await this._rpcRequest("isBlockhashValid", i), a = se(o, $g);
|
|
11216
11230
|
if ("error" in a)
|
|
11217
11231
|
throw new ce(a.error, "failed to determine if the blockhash `" + e + "`is valid");
|
|
11218
11232
|
return a.result;
|
|
@@ -11265,17 +11279,17 @@ class Xg {
|
|
|
11265
11279
|
const {
|
|
11266
11280
|
commitment: n,
|
|
11267
11281
|
config: s
|
|
11268
|
-
} =
|
|
11282
|
+
} = Pe(t), i = this._buildArgsAtLeastConfirmed([e], n, void 0, s), o = await this._rpcRequest("getBlock", i);
|
|
11269
11283
|
try {
|
|
11270
11284
|
switch (s?.transactionDetails) {
|
|
11271
11285
|
case "accounts": {
|
|
11272
|
-
const a = se(o,
|
|
11286
|
+
const a = se(o, Mg);
|
|
11273
11287
|
if ("error" in a)
|
|
11274
11288
|
throw a.error;
|
|
11275
11289
|
return a.result;
|
|
11276
11290
|
}
|
|
11277
11291
|
case "none": {
|
|
11278
|
-
const a = se(o,
|
|
11292
|
+
const a = se(o, Pg);
|
|
11279
11293
|
if ("error" in a)
|
|
11280
11294
|
throw a.error;
|
|
11281
11295
|
return a.result;
|
|
@@ -11318,7 +11332,7 @@ class Xg {
|
|
|
11318
11332
|
const {
|
|
11319
11333
|
commitment: n,
|
|
11320
11334
|
config: s
|
|
11321
|
-
} =
|
|
11335
|
+
} = Pe(t), i = this._buildArgsAtLeastConfirmed([e], n, "jsonParsed", s), o = await this._rpcRequest("getBlock", i);
|
|
11322
11336
|
try {
|
|
11323
11337
|
switch (s?.transactionDetails) {
|
|
11324
11338
|
case "accounts": {
|
|
@@ -11382,7 +11396,7 @@ class Xg {
|
|
|
11382
11396
|
const {
|
|
11383
11397
|
commitment: n,
|
|
11384
11398
|
config: s
|
|
11385
|
-
} =
|
|
11399
|
+
} = Pe(t), i = this._buildArgsAtLeastConfirmed([e], n, void 0, s), o = await this._rpcRequest("getTransaction", i), a = se(o, vi);
|
|
11386
11400
|
if ("error" in a)
|
|
11387
11401
|
throw new ce(a.error, "failed to get transaction");
|
|
11388
11402
|
const f = a.result;
|
|
@@ -11401,7 +11415,7 @@ class Xg {
|
|
|
11401
11415
|
const {
|
|
11402
11416
|
commitment: n,
|
|
11403
11417
|
config: s
|
|
11404
|
-
} =
|
|
11418
|
+
} = Pe(t), i = this._buildArgsAtLeastConfirmed([e], n, "jsonParsed", s), o = await this._rpcRequest("getTransaction", i), a = se(o, hn);
|
|
11405
11419
|
if ("error" in a)
|
|
11406
11420
|
throw new ce(a.error, "failed to get transaction");
|
|
11407
11421
|
return a.result;
|
|
@@ -11413,7 +11427,7 @@ class Xg {
|
|
|
11413
11427
|
const {
|
|
11414
11428
|
commitment: n,
|
|
11415
11429
|
config: s
|
|
11416
|
-
} =
|
|
11430
|
+
} = Pe(t), i = e.map((f) => ({
|
|
11417
11431
|
methodName: "getTransaction",
|
|
11418
11432
|
args: this._buildArgsAtLeastConfirmed([f], n, "jsonParsed", s)
|
|
11419
11433
|
}));
|
|
@@ -11448,7 +11462,7 @@ class Xg {
|
|
|
11448
11462
|
const {
|
|
11449
11463
|
commitment: n,
|
|
11450
11464
|
config: s
|
|
11451
|
-
} =
|
|
11465
|
+
} = Pe(t), i = e.map((f) => ({
|
|
11452
11466
|
methodName: "getTransaction",
|
|
11453
11467
|
args: this._buildArgsAtLeastConfirmed([f], n, void 0, s)
|
|
11454
11468
|
}));
|
|
@@ -11674,7 +11688,7 @@ class Xg {
|
|
|
11674
11688
|
value: s
|
|
11675
11689
|
} = await this.getAccountInfoAndContext(e, t);
|
|
11676
11690
|
let i = null;
|
|
11677
|
-
return s !== null && (i =
|
|
11691
|
+
return s !== null && (i = Pn.fromAccountData(s.data)), {
|
|
11678
11692
|
context: n,
|
|
11679
11693
|
value: i
|
|
11680
11694
|
};
|
|
@@ -11750,7 +11764,7 @@ class Xg {
|
|
|
11750
11764
|
const {
|
|
11751
11765
|
commitment: t,
|
|
11752
11766
|
config: n
|
|
11753
|
-
} =
|
|
11767
|
+
} = Pe(e), s = this._buildArgs([], t, "base64", n), i = await this._rpcRequest("getStakeMinimumDelegation", s), o = se(i, Ge($()));
|
|
11754
11768
|
if ("error" in o)
|
|
11755
11769
|
throw new ce(o.error, "failed to get stake minimum delegation");
|
|
11756
11770
|
return o.result;
|
|
@@ -11774,9 +11788,9 @@ class Xg {
|
|
|
11774
11788
|
const O = e.serialize(), N = le.Buffer.from(O).toString("base64");
|
|
11775
11789
|
if (Array.isArray(t) || n !== void 0)
|
|
11776
11790
|
throw new Error("Invalid arguments");
|
|
11777
|
-
const
|
|
11778
|
-
|
|
11779
|
-
const H = [N,
|
|
11791
|
+
const P = t || {};
|
|
11792
|
+
P.encoding = "base64", "commitment" in P || (P.commitment = this.commitment), t && typeof t == "object" && "innerInstructions" in t && (P.innerInstructions = t.innerInstructions);
|
|
11793
|
+
const H = [N, P], K = await this._rpcRequest("simulateTransaction", H), Q = se(K, go);
|
|
11780
11794
|
if ("error" in Q)
|
|
11781
11795
|
throw new Error("failed to simulate transaction: " + Q.error.message);
|
|
11782
11796
|
return Q.result;
|
|
@@ -12129,7 +12143,7 @@ class Xg {
|
|
|
12129
12143
|
const {
|
|
12130
12144
|
commitment: s,
|
|
12131
12145
|
config: i
|
|
12132
|
-
} =
|
|
12146
|
+
} = Pe(n), o = this._buildArgs(
|
|
12133
12147
|
[e.toBase58()],
|
|
12134
12148
|
s || this._commitment || "finalized",
|
|
12135
12149
|
// Apply connection/server default.
|
|
@@ -12179,7 +12193,7 @@ class Xg {
|
|
|
12179
12193
|
const {
|
|
12180
12194
|
commitment: i,
|
|
12181
12195
|
config: o
|
|
12182
|
-
} =
|
|
12196
|
+
} = Pe(n), a = this._buildArgs(
|
|
12183
12197
|
[e.toBase58()],
|
|
12184
12198
|
i || this._commitment || "finalized",
|
|
12185
12199
|
// Apply connection/server default.
|
|
@@ -14199,7 +14213,7 @@ const p1 = 1e9, g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
14199
14213
|
MessageAccountKeys: Vr,
|
|
14200
14214
|
MessageV0: gr,
|
|
14201
14215
|
NONCE_ACCOUNT_LENGTH: Di,
|
|
14202
|
-
NonceAccount:
|
|
14216
|
+
NonceAccount: Pn,
|
|
14203
14217
|
PACKET_DATA_SIZE: sr,
|
|
14204
14218
|
PUBLIC_KEY_LENGTH: $t,
|
|
14205
14219
|
PublicKey: ie,
|
|
@@ -14207,7 +14221,7 @@ const p1 = 1e9, g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
14207
14221
|
SOLANA_SCHEMA: Wr,
|
|
14208
14222
|
STAKE_CONFIG_ID: $a,
|
|
14209
14223
|
STAKE_INSTRUCTION_LAYOUTS: ht,
|
|
14210
|
-
SYSTEM_INSTRUCTION_LAYOUTS:
|
|
14224
|
+
SYSTEM_INSTRUCTION_LAYOUTS: Me,
|
|
14211
14225
|
SYSVAR_CLOCK_PUBKEY: Dt,
|
|
14212
14226
|
SYSVAR_EPOCH_SCHEDULE_PUBKEY: gp,
|
|
14213
14227
|
SYSVAR_INSTRUCTIONS_PUBKEY: mp,
|
|
@@ -14335,45 +14349,45 @@ function m1() {
|
|
|
14335
14349
|
},
|
|
14336
14350
|
_compress: function(f, g, w) {
|
|
14337
14351
|
if (f == null) return "";
|
|
14338
|
-
var b, x, T = {}, L = {}, O = "", N = "",
|
|
14352
|
+
var b, x, T = {}, L = {}, O = "", N = "", P = "", H = 2, K = 3, Q = 2, W = [], D = 0, Z = 0, j;
|
|
14339
14353
|
for (j = 0; j < f.length; j += 1)
|
|
14340
|
-
if (O = f.charAt(j), Object.prototype.hasOwnProperty.call(T, O) || (T[O] = K++, L[O] = !0), N =
|
|
14341
|
-
|
|
14354
|
+
if (O = f.charAt(j), Object.prototype.hasOwnProperty.call(T, O) || (T[O] = K++, L[O] = !0), N = P + O, Object.prototype.hasOwnProperty.call(T, N))
|
|
14355
|
+
P = N;
|
|
14342
14356
|
else {
|
|
14343
|
-
if (Object.prototype.hasOwnProperty.call(L,
|
|
14344
|
-
if (
|
|
14357
|
+
if (Object.prototype.hasOwnProperty.call(L, P)) {
|
|
14358
|
+
if (P.charCodeAt(0) < 256) {
|
|
14345
14359
|
for (b = 0; b < Q; b++)
|
|
14346
14360
|
D = D << 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++;
|
|
14347
|
-
for (x =
|
|
14361
|
+
for (x = P.charCodeAt(0), b = 0; b < 8; b++)
|
|
14348
14362
|
D = D << 1 | x & 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = x >> 1;
|
|
14349
14363
|
} else {
|
|
14350
14364
|
for (x = 1, b = 0; b < Q; b++)
|
|
14351
14365
|
D = D << 1 | x, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = 0;
|
|
14352
|
-
for (x =
|
|
14366
|
+
for (x = P.charCodeAt(0), b = 0; b < 16; b++)
|
|
14353
14367
|
D = D << 1 | x & 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = x >> 1;
|
|
14354
14368
|
}
|
|
14355
|
-
H--, H == 0 && (H = Math.pow(2, Q), Q++), delete L[
|
|
14369
|
+
H--, H == 0 && (H = Math.pow(2, Q), Q++), delete L[P];
|
|
14356
14370
|
} else
|
|
14357
|
-
for (x = T[
|
|
14371
|
+
for (x = T[P], b = 0; b < Q; b++)
|
|
14358
14372
|
D = D << 1 | x & 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = x >> 1;
|
|
14359
|
-
H--, H == 0 && (H = Math.pow(2, Q), Q++), T[N] = K++,
|
|
14373
|
+
H--, H == 0 && (H = Math.pow(2, Q), Q++), T[N] = K++, P = String(O);
|
|
14360
14374
|
}
|
|
14361
|
-
if (
|
|
14362
|
-
if (Object.prototype.hasOwnProperty.call(L,
|
|
14363
|
-
if (
|
|
14375
|
+
if (P !== "") {
|
|
14376
|
+
if (Object.prototype.hasOwnProperty.call(L, P)) {
|
|
14377
|
+
if (P.charCodeAt(0) < 256) {
|
|
14364
14378
|
for (b = 0; b < Q; b++)
|
|
14365
14379
|
D = D << 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++;
|
|
14366
|
-
for (x =
|
|
14380
|
+
for (x = P.charCodeAt(0), b = 0; b < 8; b++)
|
|
14367
14381
|
D = D << 1 | x & 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = x >> 1;
|
|
14368
14382
|
} else {
|
|
14369
14383
|
for (x = 1, b = 0; b < Q; b++)
|
|
14370
14384
|
D = D << 1 | x, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = 0;
|
|
14371
|
-
for (x =
|
|
14385
|
+
for (x = P.charCodeAt(0), b = 0; b < 16; b++)
|
|
14372
14386
|
D = D << 1 | x & 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = x >> 1;
|
|
14373
14387
|
}
|
|
14374
|
-
H--, H == 0 && (H = Math.pow(2, Q), Q++), delete L[
|
|
14388
|
+
H--, H == 0 && (H = Math.pow(2, Q), Q++), delete L[P];
|
|
14375
14389
|
} else
|
|
14376
|
-
for (x = T[
|
|
14390
|
+
for (x = T[P], b = 0; b < Q; b++)
|
|
14377
14391
|
D = D << 1 | x & 1, Z == g - 1 ? (Z = 0, W.push(w(D)), D = 0) : Z++, x = x >> 1;
|
|
14378
14392
|
H--, H == 0 && (H = Math.pow(2, Q), Q++);
|
|
14379
14393
|
}
|
|
@@ -14392,9 +14406,9 @@ function m1() {
|
|
|
14392
14406
|
});
|
|
14393
14407
|
},
|
|
14394
14408
|
_decompress: function(f, g, w) {
|
|
14395
|
-
var b = [], x = 4, T = 4, L = 3, O = "", N = [],
|
|
14396
|
-
for (
|
|
14397
|
-
b[
|
|
14409
|
+
var b = [], x = 4, T = 4, L = 3, O = "", N = [], P, H, K, Q, W, D, Z, j = { val: w(0), position: g, index: 1 };
|
|
14410
|
+
for (P = 0; P < 3; P += 1)
|
|
14411
|
+
b[P] = P;
|
|
14398
14412
|
for (K = 0, W = Math.pow(2, 2), D = 1; D != W; )
|
|
14399
14413
|
Q = j.val & j.position, j.position >>= 1, j.position == 0 && (j.position = g, j.val = w(j.index++)), K |= (Q > 0 ? 1 : 0) * D, D <<= 1;
|
|
14400
14414
|
switch (K) {
|
|
@@ -14450,7 +14464,7 @@ function m1() {
|
|
|
14450
14464
|
var _1 = m1();
|
|
14451
14465
|
const xt = /* @__PURE__ */ Jr(_1);
|
|
14452
14466
|
var Ga = /* @__PURE__ */ ((r) => (r.USD = "USD", r.AED = "AED", r.AFN = "AFN", r.ALL = "ALL", r.ANG = "ANG", r.AOA = "AOA", r.ARS = "ARS", r.AUD = "AUD", r.AWG = "AWG", r.AZN = "AZN", r.BAM = "BAM", r.BBD = "BBD", r.BDT = "BDT", r.BGN = "BGN", r.BHD = "BHD", r.BIF = "BIF", r.BMD = "BMD", r.BND = "BND", r.BOB = "BOB", r.BRL = "BRL", r.BSD = "BSD", r.BTN = "BTN", r.BWP = "BWP", r.BYN = "BYN", r.BZD = "BZD", r.CAD = "CAD", r.CHF = "CHF", r.CLF = "CLF", r.CLP = "CLP", r.CNY = "CNY", r.COP = "COP", r.CRC = "CRC", r.CUP = "CUP", r.CVE = "CVE", r.CZK = "CZK", r.DJF = "DJF", r.DKK = "DKK", r.DOP = "DOP", r.DZD = "DZD", r.EGP = "EGP", r.ETB = "ETB", r.EUR = "EUR", r.FJD = "FJD", r.GBP = "GBP", r.GEL = "GEL", r.GHS = "GHS", r.GMD = "GMD", r.GNF = "GNF", r.GTQ = "GTQ", r.GYD = "GYD", r.HKD = "HKD", r.HNL = "HNL", r.HTG = "HTG", r.HUF = "HUF", r.IDR = "IDR", r.ILS = "ILS", r.INR = "INR", r.IQD = "IQD", r.IRR = "IRR", r.ISK = "ISK", r.JMD = "JMD", r.JOD = "JOD", r.JPY = "JPY", r.KES = "KES", r.KGS = "KGS", r.KHR = "KHR", r.KMF = "KMF", r.KRW = "KRW", r.KWD = "KWD", r.KYD = "KYD", r.KZT = "KZT", r.LAK = "LAK", r.LBP = "LBP", r.LKR = "LKR", r.LRD = "LRD", r.LSL = "LSL", r.LYD = "LYD", r.MAD = "MAD", r.MDL = "MDL", r.MGA = "MGA", r.MKD = "MKD", r.MMK = "MMK", r.MNT = "MNT", r.MOP = "MOP", r.MRU = "MRU", r.MUR = "MUR", r.MWK = "MWK", r.MVR = "MVR", r.MXN = "MXN", r.MYR = "MYR", r.MZN = "MZN", r.NAD = "NAD", r.NGN = "NGN", r.NIO = "NIO", r.NOK = "NOK", r.NPR = "NPR", r.NZD = "NZD", r.OMR = "OMR", r.PAB = "PAB", r.PEN = "PEN", r.PGK = "PGK", r.PHP = "PHP", r.PKR = "PKR", r.PLN = "PLN", r.PYG = "PYG", r.QAR = "QAR", r.RON = "RON", r.RSD = "RSD", r.RWF = "RWF", r.SAR = "SAR", r.SCR = "SCR", r.SDG = "SDG", r.SEK = "SEK", r.SGD = "SGD", r.SLE = "SLE", r.SLL = "SLL", r.SOS = "SOS", r.SRD = "SRD", r.STN = "STN", r.SVC = "SVC", r.SYP = "SYP", r.SZL = "SZL", r.THB = "THB", r.TJS = "TJS", r.TMT = "TMT", r.TND = "TND", r.TOP = "TOP", r.TRY = "TRY", r.TTD = "TTD", r.TWD = "TWD", r.TZS = "TZS", r.UAH = "UAH", r.UGX = "UGX", r.UYU = "UYU", r.UZS = "UZS", r.VND = "VND", r.VUV = "VUV", r.XAF = "XAF", r.XCD = "XCD", r.XOF = "XOF", r.XPF = "XPF", r.YER = "YER", r.ZAR = "ZAR", r.ZMW = "ZMW", r.ZWL = "ZWL", r))(Ga || {});
|
|
14453
|
-
const
|
|
14467
|
+
const sm = {
|
|
14454
14468
|
AED: "784",
|
|
14455
14469
|
AFN: "971",
|
|
14456
14470
|
ALL: "008",
|
|
@@ -14603,11 +14617,43 @@ const tm = {
|
|
|
14603
14617
|
BRL: "BRL",
|
|
14604
14618
|
CAD: "CAD"
|
|
14605
14619
|
/* CAD */
|
|
14606
|
-
}
|
|
14607
|
-
|
|
14620
|
+
}, w1 = /* @__PURE__ */ new Set([
|
|
14621
|
+
"CLF"
|
|
14622
|
+
/* CLF */
|
|
14623
|
+
]), b1 = /* @__PURE__ */ new Set([
|
|
14624
|
+
"BHD",
|
|
14625
|
+
"IQD",
|
|
14626
|
+
"JOD",
|
|
14627
|
+
"KWD",
|
|
14628
|
+
"LYD",
|
|
14629
|
+
"OMR",
|
|
14630
|
+
"TND"
|
|
14631
|
+
/* TND */
|
|
14632
|
+
]), R1 = /* @__PURE__ */ new Set([
|
|
14633
|
+
"BIF",
|
|
14634
|
+
"CLP",
|
|
14635
|
+
"DJF",
|
|
14636
|
+
"GNF",
|
|
14637
|
+
"ISK",
|
|
14638
|
+
"JPY",
|
|
14639
|
+
"KMF",
|
|
14640
|
+
"PYG",
|
|
14641
|
+
"RWF",
|
|
14642
|
+
"UGX",
|
|
14643
|
+
"VND",
|
|
14644
|
+
"VUV",
|
|
14645
|
+
"XAF",
|
|
14646
|
+
"XOF",
|
|
14647
|
+
"XPF"
|
|
14648
|
+
/* XPF */
|
|
14649
|
+
]);
|
|
14650
|
+
function om(r) {
|
|
14651
|
+
return w1.has(r) ? 4 : b1.has(r) ? 3 : R1.has(r) ? 0 : 2;
|
|
14652
|
+
}
|
|
14653
|
+
function am(r) {
|
|
14608
14654
|
return r in y1;
|
|
14609
14655
|
}
|
|
14610
|
-
function
|
|
14656
|
+
function cm(r, e) {
|
|
14611
14657
|
return r.currency === e;
|
|
14612
14658
|
}
|
|
14613
14659
|
class Xt {
|
|
@@ -14646,7 +14692,7 @@ class Xt {
|
|
|
14646
14692
|
bankAccountLinkRedirect: L,
|
|
14647
14693
|
additionalWallets: O,
|
|
14648
14694
|
chargebackProtectionData: N,
|
|
14649
|
-
merchantCss:
|
|
14695
|
+
merchantCss: P,
|
|
14650
14696
|
color: H,
|
|
14651
14697
|
rent: K,
|
|
14652
14698
|
lockDefaultToken: Q,
|
|
@@ -14671,7 +14717,7 @@ class Xt {
|
|
|
14671
14717
|
allowedPaymentMethods: l,
|
|
14672
14718
|
accountFundingTransaction: y,
|
|
14673
14719
|
partialUsdcChecked: k,
|
|
14674
|
-
redemptionCheck:
|
|
14720
|
+
redemptionCheck: M,
|
|
14675
14721
|
allowedWithdrawSpeeds: V
|
|
14676
14722
|
}) {
|
|
14677
14723
|
const re = s ? `/${s}/${g}` : `/${g}`, J = new URL(re + n, Xt.getCoinflowBaseUrl(i));
|
|
@@ -14706,7 +14752,7 @@ class Xt {
|
|
|
14706
14752
|
const Ee = window?.nSureSDK?.getDeviceId();
|
|
14707
14753
|
Ee && J.searchParams.append("deviceId", Ee);
|
|
14708
14754
|
}
|
|
14709
|
-
return
|
|
14755
|
+
return P && J.searchParams.append("merchantCss", P), H && J.searchParams.append("color", H), K && J.searchParams.append("rent", K.lamports.toString()), M && J.searchParams.append("redemptionCheck", "true"), ee && J.searchParams.append(
|
|
14710
14756
|
"nativeSolToConvert",
|
|
14711
14757
|
ee.lamports.toString()
|
|
14712
14758
|
), Q && J.searchParams.append("lockDefaultToken", "true"), D && J.searchParams.append("planCode", D), Z && J.searchParams.append("disableApplePay", "true"), j && J.searchParams.append("disableGooglePay", "true"), z && J.searchParams.append("settlementType", z), G && J.searchParams.append("lockAmount", "true"), c === !1 && J.searchParams.append("usePermit", "false"), p && J.searchParams.append("transactionSigner", p), m === !0 && J.searchParams.append("authOnly", "true"), k === !0 && J.searchParams.append("partialUsdcChecked", "true"), E && J.searchParams.append("jwtToken", E), A && J.searchParams.append(
|
|
@@ -14796,7 +14842,7 @@ class Xt {
|
|
|
14796
14842
|
}
|
|
14797
14843
|
}
|
|
14798
14844
|
}
|
|
14799
|
-
function
|
|
14845
|
+
function um(r) {
|
|
14800
14846
|
if (!r) return;
|
|
14801
14847
|
let e, t;
|
|
14802
14848
|
if ("name" in r && r.name && (e = r.name.split(" ")[0], t = r.name.split(" ").slice(1).join(" ")), "firstName" in r && r.firstName && (e = r.firstName), "lastName" in r && r.lastName && (t = r.lastName), e && t)
|
|
@@ -14819,7 +14865,7 @@ function _s(r) {
|
|
|
14819
14865
|
return null;
|
|
14820
14866
|
}
|
|
14821
14867
|
}
|
|
14822
|
-
function
|
|
14868
|
+
function E1(r, e, t) {
|
|
14823
14869
|
let n;
|
|
14824
14870
|
try {
|
|
14825
14871
|
if (n = JSON.parse(r), !("method" in n) || !("data" in n)) return;
|
|
@@ -14857,7 +14903,7 @@ function w1(r, e, t) {
|
|
|
14857
14903
|
function ys(r) {
|
|
14858
14904
|
let e, t;
|
|
14859
14905
|
return "signer" in r && typeof r.signer == "object" && r.signer && "blockchain" in r.signer && "wallet" in r.signer ? (e = r.signer.blockchain, t = r.signer.wallet) : "blockchain" in r && r.blockchain && (e = r.blockchain, t = r.wallet), e ? Xt.byBlockchain(e, {
|
|
14860
|
-
solana: () =>
|
|
14906
|
+
solana: () => S1({
|
|
14861
14907
|
wallet: t,
|
|
14862
14908
|
onSuccess: r.onSuccess,
|
|
14863
14909
|
onAuthDeclined: r.onAuthDeclined
|
|
@@ -14882,7 +14928,7 @@ function ys(r) {
|
|
|
14882
14928
|
onSuccess: r.onSuccess,
|
|
14883
14929
|
onAuthDeclined: r.onAuthDeclined
|
|
14884
14930
|
}),
|
|
14885
|
-
user: () =>
|
|
14931
|
+
user: () => A1(r)
|
|
14886
14932
|
})() : {
|
|
14887
14933
|
handleSendTransaction: () => {
|
|
14888
14934
|
throw new Error("handleSendTransaction Not Implemented");
|
|
@@ -14897,7 +14943,7 @@ function ys(r) {
|
|
|
14897
14943
|
onAuthDeclined: r.onAuthDeclined
|
|
14898
14944
|
};
|
|
14899
14945
|
}
|
|
14900
|
-
function
|
|
14946
|
+
function S1({
|
|
14901
14947
|
wallet: r,
|
|
14902
14948
|
onSuccess: e,
|
|
14903
14949
|
onAuthDeclined: t
|
|
@@ -14961,7 +15007,7 @@ function fn({
|
|
|
14961
15007
|
onAuthDeclined: t
|
|
14962
15008
|
};
|
|
14963
15009
|
}
|
|
14964
|
-
function
|
|
15010
|
+
function A1({
|
|
14965
15011
|
onSuccess: r,
|
|
14966
15012
|
onAuthDeclined: e
|
|
14967
15013
|
}) {
|
|
@@ -14971,7 +15017,7 @@ function R1({
|
|
|
14971
15017
|
onAuthDeclined: e
|
|
14972
15018
|
};
|
|
14973
15019
|
}
|
|
14974
|
-
class
|
|
15020
|
+
class lm {
|
|
14975
15021
|
static on(e, t) {
|
|
14976
15022
|
document.addEventListener(e, t);
|
|
14977
15023
|
}
|
|
@@ -14982,13 +15028,13 @@ class sm {
|
|
|
14982
15028
|
document.removeEventListener(e, t);
|
|
14983
15029
|
}
|
|
14984
15030
|
}
|
|
14985
|
-
const zn = "tokenExCardNumber", Zr = "tokenExCardCvv",
|
|
15031
|
+
const zn = "tokenExCardNumber", Zr = "tokenExCardCvv", I1 = {
|
|
14986
15032
|
[$r.VISA]: "visa",
|
|
14987
15033
|
[$r.MASTERCARD]: "masterCard",
|
|
14988
15034
|
[$r.AMEX]: "americanExpress",
|
|
14989
15035
|
[$r.DISCOVER]: "discover"
|
|
14990
15036
|
};
|
|
14991
|
-
async function
|
|
15037
|
+
async function v1(r) {
|
|
14992
15038
|
const { token: e, origins: t, env: n } = r;
|
|
14993
15039
|
return new Promise((s, i) => {
|
|
14994
15040
|
fetch(new Xt(n).url + "/api/tokenize/iframe/config", {
|
|
@@ -15018,7 +15064,7 @@ function ko({
|
|
|
15018
15064
|
console.log("Setting tokenExScriptLoaded to true!"), e(!0);
|
|
15019
15065
|
});
|
|
15020
15066
|
}
|
|
15021
|
-
function
|
|
15067
|
+
function O1({
|
|
15022
15068
|
iframe: r,
|
|
15023
15069
|
setCachedToken: e,
|
|
15024
15070
|
setLoaded: t
|
|
@@ -15042,7 +15088,7 @@ function A1({
|
|
|
15042
15088
|
r.cvvFocus();
|
|
15043
15089
|
}), t(!1), r.load(), { ...r, tokenize: n };
|
|
15044
15090
|
}
|
|
15045
|
-
async function
|
|
15091
|
+
async function k1(r) {
|
|
15046
15092
|
const { token: e, cardType: t } = r;
|
|
15047
15093
|
return await ws(Zr, r, {
|
|
15048
15094
|
cvvOnly: !0,
|
|
@@ -15050,17 +15096,17 @@ async function I1(r) {
|
|
|
15050
15096
|
cvvContainerID: Zr,
|
|
15051
15097
|
placeholder: "CVV",
|
|
15052
15098
|
token: e,
|
|
15053
|
-
cardType:
|
|
15099
|
+
cardType: I1[t]
|
|
15054
15100
|
});
|
|
15055
15101
|
}
|
|
15056
|
-
async function
|
|
15102
|
+
async function T1(r) {
|
|
15057
15103
|
return await ws(zn, r, {
|
|
15058
15104
|
cvv: !0,
|
|
15059
15105
|
cvvContainerID: Zr,
|
|
15060
15106
|
cvvPlaceholder: "CVV"
|
|
15061
15107
|
});
|
|
15062
15108
|
}
|
|
15063
|
-
async function
|
|
15109
|
+
async function N1(r) {
|
|
15064
15110
|
return await ws(zn, r, { cvv: !1 });
|
|
15065
15111
|
}
|
|
15066
15112
|
async function ws(r, e, t) {
|
|
@@ -15071,10 +15117,10 @@ async function ws(r, e, t) {
|
|
|
15071
15117
|
);
|
|
15072
15118
|
return;
|
|
15073
15119
|
}
|
|
15074
|
-
const g = await
|
|
15120
|
+
const g = await v1({
|
|
15075
15121
|
...e,
|
|
15076
15122
|
token: t.token
|
|
15077
|
-
}), { styles: w } =
|
|
15123
|
+
}), { styles: w } = x1(s), b = {
|
|
15078
15124
|
...g,
|
|
15079
15125
|
placeholder: "0000 0000 0000 0000",
|
|
15080
15126
|
enablePrettyFormat: !0,
|
|
@@ -15083,9 +15129,9 @@ async function ws(r, e, t) {
|
|
|
15083
15129
|
debug: i ?? !1,
|
|
15084
15130
|
...t
|
|
15085
15131
|
}, x = TokenEx.Iframe(r, b);
|
|
15086
|
-
return
|
|
15132
|
+
return O1({ iframe: x, setCachedToken: a, setLoaded: f });
|
|
15087
15133
|
}
|
|
15088
|
-
function
|
|
15134
|
+
function x1(r) {
|
|
15089
15135
|
const e = JSON.parse(r);
|
|
15090
15136
|
return { styles: {
|
|
15091
15137
|
base: rr(e.base),
|
|
@@ -15120,7 +15166,7 @@ var To;
|
|
|
15120
15166
|
e.IN_GAME_PRODUCT = "inGameProduct", e.GAME_OF_SKILL = "gameOfSkill", e.DATA_STORAGE = "dataStorage", e.COMPUTING_RESOURCES = "computingResources", e.SPORTS_TICKET = "sportsTicket", e.E_SPORTS_TICKET = "eSportsTicket", e.MUSIC_TICKET = "musicTicket", e.CONFERENCE_TICKET = "conferenceTicket", e.VIRTUAL_SPORTS_TICKET = "virtualSportsTicket", e.VIRTUAL_ESPORTS_TICKET = "virtualESportsTicket", e.VIRTUAL_MUSIC_TICKET = "virtualMusicTicket", e.VIRTUAL_CONFERENCE_TICKET = "virtualConferenceTicket", e.ALCOHOL = "alcohol", e.DLC = "DLC", e.SUBSCRIPTION = "subscription", e.FUND_ACAUSE = "fundACause", e.REAL_ESTATE = "realEstate", e.COMPUTING_CONTRACT = "computingContract", e.DIGITAL_ART = "digitalArt", e.TOP_UP = "topUp", e.OWNERSHIP_CONTRACT = "ownershipContract", e.IN_GAME_CURRENCY = "inGameCurrency", e.MONEY_TOP_UP_CART_ITEM = "moneyTopUpCartItem";
|
|
15121
15167
|
})(r.productType || (r.productType = {}));
|
|
15122
15168
|
})(To || (To = {}));
|
|
15123
|
-
const
|
|
15169
|
+
const B1 = kt({
|
|
15124
15170
|
name: "CoinflowIFrame",
|
|
15125
15171
|
props: {
|
|
15126
15172
|
args: {
|
|
@@ -15148,7 +15194,7 @@ const T1 = kt({
|
|
|
15148
15194
|
if (!e.includes(Xt.getCoinflowBaseUrl(this.args.env)))
|
|
15149
15195
|
return;
|
|
15150
15196
|
this.$emit("onMessage", { data: r, origin: e });
|
|
15151
|
-
const t =
|
|
15197
|
+
const t = E1(
|
|
15152
15198
|
r,
|
|
15153
15199
|
this.args,
|
|
15154
15200
|
this.args.handleHeightChangeId
|
|
@@ -15189,8 +15235,8 @@ const T1 = kt({
|
|
|
15189
15235
|
for (const [n, s] of e)
|
|
15190
15236
|
t[n] = s;
|
|
15191
15237
|
return t;
|
|
15192
|
-
},
|
|
15193
|
-
function
|
|
15238
|
+
}, L1 = ["src", "scrolling"];
|
|
15239
|
+
function C1(r, e, t, n, s, i) {
|
|
15194
15240
|
return Rt(), Bt("iframe", {
|
|
15195
15241
|
credentialless: "",
|
|
15196
15242
|
style: { height: "100%", width: "100%" },
|
|
@@ -15204,9 +15250,9 @@ function x1(r, e, t, n, s, i) {
|
|
|
15204
15250
|
const o = r.$refs.iframeRef;
|
|
15205
15251
|
o && (o.style.opacity = "1");
|
|
15206
15252
|
})
|
|
15207
|
-
}, null, 40,
|
|
15253
|
+
}, null, 40, L1);
|
|
15208
15254
|
}
|
|
15209
|
-
const Rs = /* @__PURE__ */ bs(
|
|
15255
|
+
const Rs = /* @__PURE__ */ bs(B1, [["render", C1]]), P1 = kt({
|
|
15210
15256
|
name: "CoinflowWithdraw",
|
|
15211
15257
|
components: { CoinflowIFrame: Rs },
|
|
15212
15258
|
props: {
|
|
@@ -15236,13 +15282,13 @@ const Rs = /* @__PURE__ */ bs(T1, [["render", x1]]), B1 = kt({
|
|
|
15236
15282
|
}
|
|
15237
15283
|
}
|
|
15238
15284
|
});
|
|
15239
|
-
function
|
|
15285
|
+
function M1(r, e, t, n, s, i) {
|
|
15240
15286
|
const o = No("coinflow-i-frame");
|
|
15241
15287
|
return Rt(), In(o, {
|
|
15242
15288
|
args: { ...r.iframeProps, ...r.messageHandlers, handleHeightChangeId: r.handleHeightChangeId }
|
|
15243
15289
|
}, null, 8, ["args"]);
|
|
15244
15290
|
}
|
|
15245
|
-
const
|
|
15291
|
+
const hm = /* @__PURE__ */ bs(P1, [["render", M1]]), U1 = kt({
|
|
15246
15292
|
name: "CoinflowPurchase",
|
|
15247
15293
|
components: { CoinflowIFrame: Rs },
|
|
15248
15294
|
props: {
|
|
@@ -15272,13 +15318,13 @@ const om = /* @__PURE__ */ bs(B1, [["render", L1]]), C1 = kt({
|
|
|
15272
15318
|
}
|
|
15273
15319
|
}
|
|
15274
15320
|
});
|
|
15275
|
-
function
|
|
15321
|
+
function D1(r, e, t, n, s, i) {
|
|
15276
15322
|
const o = No("coinflow-i-frame");
|
|
15277
15323
|
return Rt(), In(o, {
|
|
15278
15324
|
args: { ...r.iframeProps, ...r.messageHandlers, handleHeightChangeId: r.handleHeightChangeId }
|
|
15279
15325
|
}, null, 8, ["args"]);
|
|
15280
15326
|
}
|
|
15281
|
-
const
|
|
15327
|
+
const fm = /* @__PURE__ */ bs(U1, [["render", D1]]), Es = (r) => {
|
|
15282
15328
|
const e = cr(!1), t = cr(!1), n = cr(void 0), s = cr(void 0);
|
|
15283
15329
|
xo(() => {
|
|
15284
15330
|
ko({
|
|
@@ -15289,7 +15335,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15289
15335
|
});
|
|
15290
15336
|
});
|
|
15291
15337
|
const i = (b) => s.value = b, o = () => e.value = !0, a = (b) => n.value = b, f = async (b) => {
|
|
15292
|
-
const x = await
|
|
15338
|
+
const x = await k1({
|
|
15293
15339
|
...r,
|
|
15294
15340
|
...b,
|
|
15295
15341
|
tokenExScriptLoaded: t.value,
|
|
@@ -15298,7 +15344,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15298
15344
|
});
|
|
15299
15345
|
return a(x), x;
|
|
15300
15346
|
}, g = async (b) => {
|
|
15301
|
-
const x = await
|
|
15347
|
+
const x = await T1({
|
|
15302
15348
|
...r,
|
|
15303
15349
|
...b,
|
|
15304
15350
|
tokenExScriptLoaded: t.value,
|
|
@@ -15307,7 +15353,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15307
15353
|
});
|
|
15308
15354
|
return a(x), x;
|
|
15309
15355
|
}, w = async (b) => {
|
|
15310
|
-
const x = await
|
|
15356
|
+
const x = await N1({
|
|
15311
15357
|
...r,
|
|
15312
15358
|
...b,
|
|
15313
15359
|
tokenExScriptLoaded: t.value,
|
|
@@ -15328,7 +15374,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15328
15374
|
setTokenExScriptTag: ko,
|
|
15329
15375
|
tokenExScriptLoaded: t
|
|
15330
15376
|
};
|
|
15331
|
-
},
|
|
15377
|
+
}, F1 = ["id"], dm = /* @__PURE__ */ kt({
|
|
15332
15378
|
__name: "CoinflowCardNumberInput",
|
|
15333
15379
|
props: {
|
|
15334
15380
|
args: {
|
|
@@ -15355,14 +15401,14 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15355
15401
|
origins: r.args.origins,
|
|
15356
15402
|
font: r.args.font
|
|
15357
15403
|
});
|
|
15358
|
-
}, {}), (o, a) => (Rt(), Bt("div", { id: Lr(zn) }, null, 8,
|
|
15404
|
+
}, {}), (o, a) => (Rt(), Bt("div", { id: Lr(zn) }, null, 8, F1));
|
|
15359
15405
|
}
|
|
15360
|
-
}),
|
|
15406
|
+
}), z1 = ["id"], pm = /* @__PURE__ */ kt({
|
|
15361
15407
|
__name: "CoinflowCvvInput",
|
|
15362
15408
|
setup(r) {
|
|
15363
|
-
return (e, t) => (Rt(), Bt("div", { id: Lr(Zr) }, null, 8,
|
|
15409
|
+
return (e, t) => (Rt(), Bt("div", { id: Lr(Zr) }, null, 8, z1));
|
|
15364
15410
|
}
|
|
15365
|
-
}),
|
|
15411
|
+
}), K1 = ["id"], gm = /* @__PURE__ */ kt({
|
|
15366
15412
|
__name: "CoinflowCvvOnlyInput",
|
|
15367
15413
|
props: {
|
|
15368
15414
|
args: {
|
|
@@ -15389,9 +15435,9 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15389
15435
|
css: i(),
|
|
15390
15436
|
font: r.args.font
|
|
15391
15437
|
});
|
|
15392
|
-
}, {}), (o, a) => (Rt(), Bt("div", { id: Lr(Zr) }, null, 8,
|
|
15438
|
+
}, {}), (o, a) => (Rt(), Bt("div", { id: Lr(Zr) }, null, 8, K1));
|
|
15393
15439
|
}
|
|
15394
|
-
}),
|
|
15440
|
+
}), mm = /* @__PURE__ */ kt({
|
|
15395
15441
|
__name: "CoinflowPurchaseProtection",
|
|
15396
15442
|
props: {
|
|
15397
15443
|
args: {
|
|
@@ -15423,7 +15469,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15423
15469
|
});
|
|
15424
15470
|
}), (s, i) => null;
|
|
15425
15471
|
}
|
|
15426
|
-
}),
|
|
15472
|
+
}), $1 = ["id"], _m = /* @__PURE__ */ kt({
|
|
15427
15473
|
__name: "CoinflowCardNumberOnlyInput",
|
|
15428
15474
|
props: {
|
|
15429
15475
|
args: {
|
|
@@ -15450,12 +15496,12 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15450
15496
|
origins: r.args.origins,
|
|
15451
15497
|
font: r.args.font
|
|
15452
15498
|
});
|
|
15453
|
-
}, {}), (o, a) => (Rt(), Bt("div", { id: Lr(zn) }, null, 8,
|
|
15499
|
+
}, {}), (o, a) => (Rt(), Bt("div", { id: Lr(zn) }, null, 8, $1));
|
|
15454
15500
|
}
|
|
15455
|
-
}),
|
|
15501
|
+
}), H1 = { style: {
|
|
15456
15502
|
position: "relative",
|
|
15457
15503
|
height: "100%"
|
|
15458
|
-
} },
|
|
15504
|
+
} }, W1 = { style: {
|
|
15459
15505
|
position: "relative",
|
|
15460
15506
|
zIndex: 10,
|
|
15461
15507
|
height: "100%"
|
|
@@ -15501,9 +15547,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15501
15547
|
function a({ data: f }) {
|
|
15502
15548
|
try {
|
|
15503
15549
|
const g = JSON.parse(f);
|
|
15504
|
-
if ("method" in g && g.method === "loaded" && (s.value = 1,
|
|
15505
|
-
i.value = "none";
|
|
15506
|
-
}, 2e3)), "method" in g && g.data.startsWith("ERROR"))
|
|
15550
|
+
if ("method" in g && g.method === "loaded" && (s.value = 1, i.value = "none"), "method" in g && g.data.startsWith("ERROR"))
|
|
15507
15551
|
return r.args?.onError?.(g.info), !1;
|
|
15508
15552
|
if (!("method" in g) || g.method !== "getToken")
|
|
15509
15553
|
return;
|
|
@@ -15512,7 +15556,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15512
15556
|
}
|
|
15513
15557
|
e?.(f);
|
|
15514
15558
|
}
|
|
15515
|
-
return (f, g) => (Rt(), Bt("div",
|
|
15559
|
+
return (f, g) => (Rt(), Bt("div", H1, [
|
|
15516
15560
|
Hr("div", {
|
|
15517
15561
|
style: ja({
|
|
15518
15562
|
backgroundColor: r.args.color,
|
|
@@ -15532,7 +15576,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15532
15576
|
}, [
|
|
15533
15577
|
Za(f.$slots, "default")
|
|
15534
15578
|
], 4),
|
|
15535
|
-
Hr("div",
|
|
15579
|
+
Hr("div", W1, [
|
|
15536
15580
|
Hi(Rs, {
|
|
15537
15581
|
onOnMessage: a,
|
|
15538
15582
|
args: { ...t(), ...n(), handleHeightChangeId: Lr(o) }
|
|
@@ -15540,10 +15584,10 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15540
15584
|
])
|
|
15541
15585
|
]));
|
|
15542
15586
|
}
|
|
15543
|
-
}),
|
|
15587
|
+
}), q1 = {
|
|
15544
15588
|
id: "svg-logo",
|
|
15545
15589
|
viewBox: "0 0 35 15"
|
|
15546
|
-
},
|
|
15590
|
+
}, G1 = {
|
|
15547
15591
|
id: "svg-logo",
|
|
15548
15592
|
x: "0",
|
|
15549
15593
|
y: "3.85",
|
|
@@ -15554,12 +15598,12 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15554
15598
|
version: "1.1",
|
|
15555
15599
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15556
15600
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
15557
|
-
},
|
|
15601
|
+
}, V1 = {
|
|
15558
15602
|
stroke: "none",
|
|
15559
15603
|
"stroke-width": "1",
|
|
15560
15604
|
fill: "none",
|
|
15561
15605
|
"fill-rule": "evenodd"
|
|
15562
|
-
},
|
|
15606
|
+
}, Y1 = ["fill"], j1 = /* @__PURE__ */ kt({
|
|
15563
15607
|
__name: "ApplePayOverlay",
|
|
15564
15608
|
props: {
|
|
15565
15609
|
color: {
|
|
@@ -15569,18 +15613,18 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15569
15613
|
},
|
|
15570
15614
|
setup(r) {
|
|
15571
15615
|
const e = r.color === "white" ? "#000" : "#FFF";
|
|
15572
|
-
return (t, n) => (Rt(), Bt("svg",
|
|
15573
|
-
(Rt(), Bt("svg",
|
|
15616
|
+
return (t, n) => (Rt(), Bt("svg", q1, [
|
|
15617
|
+
(Rt(), Bt("svg", G1, [
|
|
15574
15618
|
n[1] || (n[1] = Hr("title", null, "Apple Logo", -1)),
|
|
15575
|
-
Hr("g",
|
|
15619
|
+
Hr("g", V1, [
|
|
15576
15620
|
Hr("g", { fill: Lr(e) }, [...n[0] || (n[0] = [
|
|
15577
15621
|
Ni('<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)
|
|
15578
|
-
])], 8,
|
|
15622
|
+
])], 8, Y1)
|
|
15579
15623
|
])
|
|
15580
15624
|
]))
|
|
15581
15625
|
]));
|
|
15582
15626
|
}
|
|
15583
|
-
}),
|
|
15627
|
+
}), ym = /* @__PURE__ */ kt({
|
|
15584
15628
|
__name: "CoinflowApplePayButton",
|
|
15585
15629
|
props: {
|
|
15586
15630
|
args: {
|
|
@@ -15594,24 +15638,24 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15594
15638
|
args: r.args
|
|
15595
15639
|
}, {
|
|
15596
15640
|
default: Bo(() => [
|
|
15597
|
-
Hi(
|
|
15641
|
+
Hi(j1, {
|
|
15598
15642
|
color: r.args.color
|
|
15599
15643
|
}, null, 8, ["color"])
|
|
15600
15644
|
]),
|
|
15601
15645
|
_: 1
|
|
15602
15646
|
}, 8, ["args"]));
|
|
15603
15647
|
}
|
|
15604
|
-
}),
|
|
15648
|
+
}), Z1 = {
|
|
15605
15649
|
key: 0,
|
|
15606
15650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15607
15651
|
width: "41",
|
|
15608
15652
|
height: "17"
|
|
15609
|
-
},
|
|
15653
|
+
}, X1 = {
|
|
15610
15654
|
key: 1,
|
|
15611
15655
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15612
15656
|
width: "41",
|
|
15613
15657
|
height: "17"
|
|
15614
|
-
},
|
|
15658
|
+
}, J1 = /* @__PURE__ */ kt({
|
|
15615
15659
|
__name: "GooglePayOverlay",
|
|
15616
15660
|
props: {
|
|
15617
15661
|
color: {
|
|
@@ -15621,15 +15665,15 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15621
15665
|
},
|
|
15622
15666
|
setup(r) {
|
|
15623
15667
|
return (e, t) => (Rt(), Bt(Xa, null, [
|
|
15624
|
-
r.color === "white" ? (Rt(), Bt("svg",
|
|
15668
|
+
r.color === "white" ? (Rt(), Bt("svg", Z1, [...t[0] || (t[0] = [
|
|
15625
15669
|
Ni('<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)
|
|
15626
15670
|
])])) : xs("", !0),
|
|
15627
|
-
r.color === "black" ? (Rt(), Bt("svg",
|
|
15671
|
+
r.color === "black" ? (Rt(), Bt("svg", X1, [...t[1] || (t[1] = [
|
|
15628
15672
|
Ni('<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)
|
|
15629
15673
|
])])) : xs("", !0)
|
|
15630
15674
|
], 64));
|
|
15631
15675
|
}
|
|
15632
|
-
}),
|
|
15676
|
+
}), wm = /* @__PURE__ */ kt({
|
|
15633
15677
|
__name: "CoinflowGooglePayButton",
|
|
15634
15678
|
props: {
|
|
15635
15679
|
args: {
|
|
@@ -15645,7 +15689,7 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15645
15689
|
alignItems: "center"
|
|
15646
15690
|
}, {
|
|
15647
15691
|
default: Bo(() => [
|
|
15648
|
-
Hi(
|
|
15692
|
+
Hi(J1, {
|
|
15649
15693
|
color: r.args.color
|
|
15650
15694
|
}, null, 8, ["color"])
|
|
15651
15695
|
]),
|
|
@@ -15654,22 +15698,22 @@ const am = /* @__PURE__ */ bs(C1, [["render", M1]]), Es = (r) => {
|
|
|
15654
15698
|
}
|
|
15655
15699
|
});
|
|
15656
15700
|
export {
|
|
15657
|
-
|
|
15701
|
+
I1 as CARD_TYPE_MAPPING,
|
|
15658
15702
|
$r as CardType,
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15703
|
+
ym as CoinflowApplePayButton,
|
|
15704
|
+
dm as CoinflowCardNumberInput,
|
|
15705
|
+
_m as CoinflowCardNumberOnlyInput,
|
|
15706
|
+
pm as CoinflowCvvInput,
|
|
15707
|
+
gm as CoinflowCvvOnlyInput,
|
|
15708
|
+
wm as CoinflowGooglePayButton,
|
|
15665
15709
|
Rs as CoinflowIframe,
|
|
15666
|
-
|
|
15667
|
-
|
|
15710
|
+
fm as CoinflowPurchase,
|
|
15711
|
+
mm as CoinflowPurchaseProtection,
|
|
15668
15712
|
Xt as CoinflowUtils,
|
|
15669
|
-
|
|
15713
|
+
hm as CoinflowWithdraw,
|
|
15670
15714
|
Ga as Currency,
|
|
15671
|
-
|
|
15672
|
-
|
|
15715
|
+
sm as CurrencyToISO4217,
|
|
15716
|
+
lm as EventBus,
|
|
15673
15717
|
Va as IFrameMessageMethods,
|
|
15674
15718
|
tc as MerchantStyle,
|
|
15675
15719
|
nc as PaymentMethods,
|
|
@@ -15680,16 +15724,18 @@ export {
|
|
|
15680
15724
|
Ja as WithdrawCategory,
|
|
15681
15725
|
y1 as WithdrawCurrencies,
|
|
15682
15726
|
Qa as WithdrawSpeed,
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15727
|
+
k1 as doInitializeCvvOnlyTokenExIframe,
|
|
15728
|
+
N1 as doInitializeTokenExCardOnlyIframe,
|
|
15729
|
+
T1 as doInitializeTokenExIframe,
|
|
15730
|
+
om as getCurrencyDecimals,
|
|
15731
|
+
um as getCustomerName,
|
|
15687
15732
|
ys as getHandlers,
|
|
15688
|
-
|
|
15733
|
+
v1 as getIframeConfig,
|
|
15689
15734
|
_s as getWalletPubkey,
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15735
|
+
E1 as handleIFrameMessage,
|
|
15736
|
+
cm as isTypedCurrencyCents,
|
|
15737
|
+
am as isWithdrawCurrency,
|
|
15693
15738
|
To as nftCartItem,
|
|
15739
|
+
em as paymentMethodLabels,
|
|
15694
15740
|
ko as setTokenExScriptTag
|
|
15695
15741
|
};
|