@wishknish/knishio-client-js 0.9.0 → 0.9.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/client.cjs.js +29 -29
- package/dist/client.cjs.js.map +1 -1
- package/dist/client.es.mjs +810 -818
- package/dist/client.es.mjs.map +1 -1
- package/dist/client.iife.js +29 -29
- package/dist/client.iife.js.map +1 -1
- package/package.json +9 -13
- package/src/Wallet.js +12 -0
package/dist/client.es.mjs
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import { gql as E, cacheExchange as sn, fetchExchange as rn, subscriptionExchange as on, createClient as an } from "@urql/core";
|
|
6
|
-
import { createClient as ln } from "graphql-ws";
|
|
7
|
-
import { pipe as cn, map as un, subscribe as hn } from "wonka";
|
|
1
|
+
import F from "jssha";
|
|
2
|
+
import { gql as E, cacheExchange as en, fetchExchange as tn, subscriptionExchange as nn, createClient as sn } from "@urql/core";
|
|
3
|
+
import { createClient as rn } from "graphql-ws";
|
|
4
|
+
import { pipe as on, map as an, subscribe as ln } from "wonka";
|
|
8
5
|
typeof self > "u" && (global.self = global);
|
|
9
|
-
class
|
|
6
|
+
class qt {
|
|
10
7
|
/**
|
|
11
8
|
* Converts the given buffer to a string containing its hexadecimal representation.
|
|
12
9
|
*
|
|
@@ -75,17 +72,17 @@ String.prototype.toCamelCase || (String.prototype.toCamelCase = function() {
|
|
|
75
72
|
String.prototype.toSnakeCase || (String.prototype.toSnakeCase = function() {
|
|
76
73
|
return this.replace(/[A-Z]/g, (o) => `_${o.toLowerCase()}`);
|
|
77
74
|
});
|
|
78
|
-
function
|
|
75
|
+
function Ue(o, e) {
|
|
79
76
|
const t = Math.ceil(o.length / e), n = [];
|
|
80
77
|
for (let s = 0, r = 0; s < t; ++s, r += e)
|
|
81
78
|
n[s] = o.substr(r, e);
|
|
82
79
|
return n;
|
|
83
80
|
}
|
|
84
|
-
function
|
|
81
|
+
function nt(o = 256, e = "abcdef0123456789") {
|
|
85
82
|
let t = new Uint8Array(o);
|
|
86
83
|
return t = crypto.getRandomValues(t), t = t.map((n) => e.charCodeAt(n % e.length)), String.fromCharCode.apply(null, t);
|
|
87
84
|
}
|
|
88
|
-
function
|
|
85
|
+
function cn(o, e, t, n, s) {
|
|
89
86
|
if (n = n || "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?¿¡", s = s || n, e > n.length || t > s.length)
|
|
90
87
|
return console.warn("Strings::charsetBaseConvert() - Can't convert", o, "to base", t, "greater than symbol table length. src-table:", n.length, "dest-table:", s.length), !1;
|
|
91
88
|
let i = BigInt(0);
|
|
@@ -98,27 +95,27 @@ function dn(o, e, t, n, s) {
|
|
|
98
95
|
}
|
|
99
96
|
return a || "0";
|
|
100
97
|
}
|
|
101
|
-
function
|
|
102
|
-
return
|
|
98
|
+
function un(o) {
|
|
99
|
+
return qt.toHex(o, {});
|
|
103
100
|
}
|
|
104
|
-
function
|
|
105
|
-
return
|
|
101
|
+
function hn(o) {
|
|
102
|
+
return qt.toUint8Array(o);
|
|
106
103
|
}
|
|
107
|
-
function
|
|
108
|
-
const e =
|
|
104
|
+
function dn(o) {
|
|
105
|
+
const e = hn(o);
|
|
109
106
|
return btoa(String.fromCharCode.apply(null, e));
|
|
110
107
|
}
|
|
111
|
-
function
|
|
108
|
+
function pn(o) {
|
|
112
109
|
const e = new Uint8Array(atob(o).split("").map((t) => t.charCodeAt(0)));
|
|
113
|
-
return
|
|
110
|
+
return un(e);
|
|
114
111
|
}
|
|
115
|
-
function
|
|
112
|
+
function De(o) {
|
|
116
113
|
return /^[A-F0-9]+$/i.test(o);
|
|
117
114
|
}
|
|
118
|
-
function
|
|
115
|
+
function fn(o) {
|
|
119
116
|
return (typeof o == "number" || typeof o == "string" && o.trim() !== "") && !isNaN(o);
|
|
120
117
|
}
|
|
121
|
-
let
|
|
118
|
+
let he = class {
|
|
122
119
|
/**
|
|
123
120
|
* Normalizes the meta array into the standard {key: ..., value: ...} format
|
|
124
121
|
*
|
|
@@ -155,10 +152,10 @@ let de = class {
|
|
|
155
152
|
return t;
|
|
156
153
|
}
|
|
157
154
|
};
|
|
158
|
-
function
|
|
159
|
-
return o.length ? [o.slice(0, e)].concat(
|
|
155
|
+
function mn(o, e) {
|
|
156
|
+
return o.length ? [o.slice(0, e)].concat(mn(o.slice(e), e)) : [];
|
|
160
157
|
}
|
|
161
|
-
function
|
|
158
|
+
function yn(o, e) {
|
|
162
159
|
let t, n, s;
|
|
163
160
|
const r = [Array, Date, Number, String, Boolean], i = Object.prototype.toString;
|
|
164
161
|
for (e = e || [], t = 0; t < e.length; t += 2)
|
|
@@ -168,11 +165,11 @@ function wn(o, e) {
|
|
|
168
165
|
i.call(o) === i.call(s = new r[t](o)) && (n = t ? s : []);
|
|
169
166
|
e.push(o, n);
|
|
170
167
|
for (t in o)
|
|
171
|
-
e.hasOwnProperty.call(o, t) && (n[t] =
|
|
168
|
+
e.hasOwnProperty.call(o, t) && (n[t] = yn(o[t], e));
|
|
172
169
|
}
|
|
173
170
|
return n || o;
|
|
174
171
|
}
|
|
175
|
-
function
|
|
172
|
+
function gn(...o) {
|
|
176
173
|
return [].concat(...o.map((e, t) => {
|
|
177
174
|
const n = o.slice(0);
|
|
178
175
|
n.splice(t, 1);
|
|
@@ -180,17 +177,17 @@ function kn(...o) {
|
|
|
180
177
|
return e.filter((r) => !s.includes(r));
|
|
181
178
|
}));
|
|
182
179
|
}
|
|
183
|
-
function
|
|
180
|
+
function fe(...o) {
|
|
184
181
|
return o.reduce((e, t) => e.filter((n) => t.includes(n)));
|
|
185
182
|
}
|
|
186
|
-
class
|
|
183
|
+
class st {
|
|
187
184
|
/**
|
|
188
185
|
*
|
|
189
186
|
* @param policy
|
|
190
187
|
* @param metaKeys
|
|
191
188
|
*/
|
|
192
189
|
constructor(e = {}, t = {}) {
|
|
193
|
-
this.policy =
|
|
190
|
+
this.policy = st.normalizePolicy(e), this.fillDefault(t);
|
|
194
191
|
}
|
|
195
192
|
/**
|
|
196
193
|
*
|
|
@@ -218,7 +215,7 @@ class rt {
|
|
|
218
215
|
})) {
|
|
219
216
|
const i = r.map((a) => a.key);
|
|
220
217
|
this.policy[s] || (this.policy[s] = {});
|
|
221
|
-
for (const a of
|
|
218
|
+
for (const a of gn(e, i))
|
|
222
219
|
this.policy[s][a] || (this.policy[s][a] = s === "write" && !["characters", "pubkey"].includes(a) ? ["self"] : ["all"]);
|
|
223
220
|
}
|
|
224
221
|
}
|
|
@@ -243,7 +240,7 @@ class P {
|
|
|
243
240
|
* @param {object|array} meta
|
|
244
241
|
*/
|
|
245
242
|
constructor(e = []) {
|
|
246
|
-
this.meta =
|
|
243
|
+
this.meta = he.normalizeMeta(e);
|
|
247
244
|
}
|
|
248
245
|
/**
|
|
249
246
|
*
|
|
@@ -251,7 +248,7 @@ class P {
|
|
|
251
248
|
* @returns {AtomMeta}
|
|
252
249
|
*/
|
|
253
250
|
merge(e) {
|
|
254
|
-
return this.meta = Array.from(/* @__PURE__ */ new Set([...this.meta, ...
|
|
251
|
+
return this.meta = Array.from(/* @__PURE__ */ new Set([...this.meta, ...he.normalizeMeta(e)])), this;
|
|
255
252
|
}
|
|
256
253
|
/**
|
|
257
254
|
*
|
|
@@ -320,7 +317,7 @@ class P {
|
|
|
320
317
|
* @returns {AtomMeta}
|
|
321
318
|
*/
|
|
322
319
|
addPolicy(e) {
|
|
323
|
-
const t = new
|
|
320
|
+
const t = new st(e, Object.keys(this.meta));
|
|
324
321
|
return this.merge({
|
|
325
322
|
policy: t.toJson()
|
|
326
323
|
}), this;
|
|
@@ -353,7 +350,7 @@ Stack:
|
|
|
353
350
|
${this.stack}`;
|
|
354
351
|
}
|
|
355
352
|
}
|
|
356
|
-
class
|
|
353
|
+
class oe extends x {
|
|
357
354
|
/**
|
|
358
355
|
* Class constructor
|
|
359
356
|
*
|
|
@@ -365,7 +362,7 @@ class ae extends x {
|
|
|
365
362
|
super(e, t, n), this.name = "AtomsMissingException";
|
|
366
363
|
}
|
|
367
364
|
}
|
|
368
|
-
class
|
|
365
|
+
class ie {
|
|
369
366
|
/**
|
|
370
367
|
*
|
|
371
368
|
* @param {Atom} atom
|
|
@@ -386,7 +383,7 @@ class oe {
|
|
|
386
383
|
case "[object Array]": {
|
|
387
384
|
const t = [];
|
|
388
385
|
for (const n in e)
|
|
389
|
-
t.push(
|
|
386
|
+
t.push(ie.isStructure(e[n]) ? ie.structure(e[n]) : e[n]);
|
|
390
387
|
return t;
|
|
391
388
|
}
|
|
392
389
|
case "[object Object]": {
|
|
@@ -394,7 +391,7 @@ class oe {
|
|
|
394
391
|
for (const s of n)
|
|
395
392
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
396
393
|
const r = {};
|
|
397
|
-
r[s] =
|
|
394
|
+
r[s] = ie.isStructure(e[s]) ? ie.structure(e[s]) : e[s], t.push(r);
|
|
398
395
|
}
|
|
399
396
|
if (t.length > 0)
|
|
400
397
|
return t;
|
|
@@ -416,10 +413,10 @@ class oe {
|
|
|
416
413
|
* @returns {Object[]}
|
|
417
414
|
*/
|
|
418
415
|
view() {
|
|
419
|
-
return
|
|
416
|
+
return ie.structure(this);
|
|
420
417
|
}
|
|
421
418
|
}
|
|
422
|
-
class
|
|
419
|
+
class bn extends ie {
|
|
423
420
|
constructor({
|
|
424
421
|
position: e = null,
|
|
425
422
|
walletAddress: t = null,
|
|
@@ -437,8 +434,8 @@ class _n extends oe {
|
|
|
437
434
|
super(), this.position = e, this.walletAddress = t, this.isotope = n, this.token = s, this.value = r, this.batchId = i, this.metaType = a, this.metaId = c, this.meta = u, this.index = l, this.createdAt = h, this.version = p;
|
|
438
435
|
}
|
|
439
436
|
}
|
|
440
|
-
const
|
|
441
|
-
4:
|
|
437
|
+
const Re = {
|
|
438
|
+
4: bn
|
|
442
439
|
};
|
|
443
440
|
class g {
|
|
444
441
|
/**
|
|
@@ -471,7 +468,7 @@ class g {
|
|
|
471
468
|
index: h = null,
|
|
472
469
|
version: p = null
|
|
473
470
|
}) {
|
|
474
|
-
this.position = e, this.walletAddress = t, this.isotope = n, this.token = s, this.value = r !== null ? String(r) : null, this.batchId = i, this.metaType = a, this.metaId = c, this.meta = u ?
|
|
471
|
+
this.position = e, this.walletAddress = t, this.isotope = n, this.token = s, this.value = r !== null ? String(r) : null, this.batchId = i, this.metaType = a, this.metaId = c, this.meta = u ? he.normalizeMeta(u) : [], this.index = h, this.otsFragment = l, this.createdAt = String(+/* @__PURE__ */ new Date()), p !== null && Object.prototype.hasOwnProperty.call(Re, p) && (this.version = String(p));
|
|
475
472
|
}
|
|
476
473
|
/**
|
|
477
474
|
*
|
|
@@ -643,15 +640,15 @@ class g {
|
|
|
643
640
|
atoms: e,
|
|
644
641
|
output: t = "base17"
|
|
645
642
|
}) {
|
|
646
|
-
const n = new
|
|
643
|
+
const n = new F("SHAKE256", "TEXT"), s = g.sortAtoms(e);
|
|
647
644
|
if (s.length === 0)
|
|
648
|
-
throw new
|
|
645
|
+
throw new oe();
|
|
649
646
|
if (s.map((r) => {
|
|
650
647
|
if (!(r instanceof g))
|
|
651
|
-
throw new
|
|
648
|
+
throw new oe();
|
|
652
649
|
return r;
|
|
653
|
-
}), s.every((r) => r.version && Object.prototype.hasOwnProperty.call(
|
|
654
|
-
n.update(JSON.stringify(s.map((r) =>
|
|
650
|
+
}), s.every((r) => r.version && Object.prototype.hasOwnProperty.call(Re, r.version)))
|
|
651
|
+
n.update(JSON.stringify(s.map((r) => Re[r.version].create(r).view())));
|
|
655
652
|
else {
|
|
656
653
|
const r = String(e.length);
|
|
657
654
|
let i = [];
|
|
@@ -666,7 +663,7 @@ class g {
|
|
|
666
663
|
case "array":
|
|
667
664
|
return n.getHash("ARRAYBUFFER", { outputLen: 256 });
|
|
668
665
|
default:
|
|
669
|
-
return
|
|
666
|
+
return cn(n.getHash("HEX", { outputLen: 256 }), 16, 17, "0123456789abcdef", "0123456789abcdefg").padStart(64, "0");
|
|
670
667
|
}
|
|
671
668
|
}
|
|
672
669
|
static jsonSerialization(e, t) {
|
|
@@ -687,7 +684,7 @@ class g {
|
|
|
687
684
|
* Get aggregated meta from stored normalized ones
|
|
688
685
|
*/
|
|
689
686
|
aggregatedMeta() {
|
|
690
|
-
return
|
|
687
|
+
return he.aggregateMeta(this.meta);
|
|
691
688
|
}
|
|
692
689
|
/**
|
|
693
690
|
*
|
|
@@ -707,28 +704,28 @@ class g {
|
|
|
707
704
|
return e;
|
|
708
705
|
}
|
|
709
706
|
}
|
|
710
|
-
function
|
|
707
|
+
function tt(o = null, e = 2048) {
|
|
711
708
|
if (o) {
|
|
712
|
-
const t = new
|
|
709
|
+
const t = new F("SHAKE256", "TEXT");
|
|
713
710
|
return t.update(o), t.getHash("HEX", { outputLen: e * 4 });
|
|
714
711
|
} else
|
|
715
|
-
return
|
|
712
|
+
return nt(e);
|
|
716
713
|
}
|
|
717
|
-
function
|
|
718
|
-
const t = new
|
|
714
|
+
function de(o, e = null) {
|
|
715
|
+
const t = new F("SHAKE256", "TEXT");
|
|
719
716
|
return t.update(o), t.getHash("HEX", { outputLen: 256 });
|
|
720
717
|
}
|
|
721
|
-
function
|
|
722
|
-
const t = new
|
|
718
|
+
function Ve(o, e) {
|
|
719
|
+
const t = new F("SHAKE256", "TEXT");
|
|
723
720
|
return t.update(o), t.getHash("HEX", { outputLen: e });
|
|
724
721
|
}
|
|
725
|
-
function
|
|
722
|
+
function Be({
|
|
726
723
|
molecularHash: o = null,
|
|
727
724
|
index: e = null
|
|
728
725
|
}) {
|
|
729
|
-
return o !== null && e !== null ?
|
|
726
|
+
return o !== null && e !== null ? de(String(o) + String(e), "generateBatchId") : nt(64);
|
|
730
727
|
}
|
|
731
|
-
class
|
|
728
|
+
class pe {
|
|
732
729
|
/**
|
|
733
730
|
*
|
|
734
731
|
* @param id
|
|
@@ -745,7 +742,7 @@ class fe {
|
|
|
745
742
|
*/
|
|
746
743
|
static createFromGraphQL(e) {
|
|
747
744
|
let t = e.metas || {};
|
|
748
|
-
return t.length && (t = JSON.parse(t), t || (t = {})), new
|
|
745
|
+
return t.length && (t = JSON.parse(t), t || (t = {})), new pe(
|
|
749
746
|
e.id,
|
|
750
747
|
e.name,
|
|
751
748
|
t
|
|
@@ -757,7 +754,7 @@ class fe {
|
|
|
757
754
|
* @returns {TokenUnit}
|
|
758
755
|
*/
|
|
759
756
|
static createFromDB(e) {
|
|
760
|
-
return new
|
|
757
|
+
return new pe(
|
|
761
758
|
e[0],
|
|
762
759
|
e[1],
|
|
763
760
|
e.length > 2 ? e[2] : {}
|
|
@@ -795,7 +792,7 @@ class fe {
|
|
|
795
792
|
};
|
|
796
793
|
}
|
|
797
794
|
}
|
|
798
|
-
class
|
|
795
|
+
class ze extends x {
|
|
799
796
|
/**
|
|
800
797
|
* Class constructor
|
|
801
798
|
*
|
|
@@ -807,101 +804,100 @@ class Je extends x {
|
|
|
807
804
|
super(e, t, n), this.name = "WalletCredentialException";
|
|
808
805
|
}
|
|
809
806
|
}
|
|
810
|
-
const
|
|
811
|
-
function
|
|
812
|
-
return e ? { h: Number(o &
|
|
807
|
+
const Te = /* @__PURE__ */ BigInt(2 ** 32 - 1), at = /* @__PURE__ */ BigInt(32);
|
|
808
|
+
function wn(o, e = !1) {
|
|
809
|
+
return e ? { h: Number(o & Te), l: Number(o >> at & Te) } : { h: Number(o >> at & Te) | 0, l: Number(o & Te) | 0 };
|
|
813
810
|
}
|
|
814
|
-
function
|
|
811
|
+
function kn(o, e = !1) {
|
|
815
812
|
const t = o.length;
|
|
816
813
|
let n = new Uint32Array(t), s = new Uint32Array(t);
|
|
817
814
|
for (let r = 0; r < t; r++) {
|
|
818
|
-
const { h: i, l: a } =
|
|
815
|
+
const { h: i, l: a } = wn(o[r], e);
|
|
819
816
|
[n[r], s[r]] = [i, a];
|
|
820
817
|
}
|
|
821
818
|
return [n, s];
|
|
822
819
|
}
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
function Mn(o) {
|
|
820
|
+
const _n = (o, e, t) => o << t | e >>> 32 - t, Sn = (o, e, t) => e << t | o >>> 32 - t, $n = (o, e, t) => e << t - 32 | o >>> 64 - t, An = (o, e, t) => o << t - 32 | e >>> 64 - t;
|
|
821
|
+
function vn(o) {
|
|
826
822
|
return o instanceof Uint8Array || ArrayBuffer.isView(o) && o.constructor.name === "Uint8Array";
|
|
827
823
|
}
|
|
828
|
-
function
|
|
824
|
+
function lt(o, e = "") {
|
|
829
825
|
if (!Number.isSafeInteger(o) || o < 0) {
|
|
830
826
|
const t = e && `"${e}" `;
|
|
831
827
|
throw new Error(`${t}expected integer >= 0, got ${o}`);
|
|
832
828
|
}
|
|
833
829
|
}
|
|
834
|
-
function
|
|
835
|
-
const n =
|
|
830
|
+
function j(o, e, t = "") {
|
|
831
|
+
const n = vn(o), s = o?.length, r = e !== void 0;
|
|
836
832
|
if (!n || r && s !== e) {
|
|
837
833
|
const i = t && `"${t}" `, a = r ? ` of length ${e}` : "", c = n ? `length=${s}` : `type=${typeof o}`;
|
|
838
834
|
throw new Error(i + "expected Uint8Array" + a + ", got " + c);
|
|
839
835
|
}
|
|
840
836
|
return o;
|
|
841
837
|
}
|
|
842
|
-
function
|
|
838
|
+
function ct(o, e = !0) {
|
|
843
839
|
if (o.destroyed)
|
|
844
840
|
throw new Error("Hash instance has been destroyed");
|
|
845
841
|
if (e && o.finished)
|
|
846
842
|
throw new Error("Hash#digest() has already been called");
|
|
847
843
|
}
|
|
848
|
-
function
|
|
849
|
-
|
|
844
|
+
function xn(o, e) {
|
|
845
|
+
j(o, void 0, "digestInto() output");
|
|
850
846
|
const t = e.outputLen;
|
|
851
847
|
if (o.length < t)
|
|
852
848
|
throw new Error('"digestInto() output" expected to be of length >=' + t);
|
|
853
849
|
}
|
|
854
|
-
function
|
|
850
|
+
function Wt(o) {
|
|
855
851
|
return new Uint32Array(o.buffer, o.byteOffset, Math.floor(o.byteLength / 4));
|
|
856
852
|
}
|
|
857
|
-
function
|
|
853
|
+
function Ut(...o) {
|
|
858
854
|
for (let e = 0; e < o.length; e++)
|
|
859
855
|
o[e].fill(0);
|
|
860
856
|
}
|
|
861
|
-
const
|
|
862
|
-
function
|
|
857
|
+
const In = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
858
|
+
function Mn(o) {
|
|
863
859
|
return o << 24 & 4278190080 | o << 8 & 16711680 | o >>> 8 & 65280 | o >>> 24 & 255;
|
|
864
860
|
}
|
|
865
|
-
function
|
|
861
|
+
function Tn(o) {
|
|
866
862
|
for (let e = 0; e < o.length; e++)
|
|
867
|
-
o[e] =
|
|
863
|
+
o[e] = Mn(o[e]);
|
|
868
864
|
return o;
|
|
869
865
|
}
|
|
870
|
-
const
|
|
871
|
-
function
|
|
866
|
+
const ut = In ? (o) => o : Tn;
|
|
867
|
+
function Bt(o, e = {}) {
|
|
872
868
|
const t = (s, r) => o(r).update(s).digest(), n = o(void 0);
|
|
873
869
|
return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = (s) => o(s), Object.assign(t, e), Object.freeze(t);
|
|
874
870
|
}
|
|
875
|
-
function
|
|
871
|
+
function Cn(o = 32) {
|
|
876
872
|
const e = typeof globalThis == "object" ? globalThis.crypto : null;
|
|
877
|
-
if (typeof
|
|
873
|
+
if (typeof e?.getRandomValues != "function")
|
|
878
874
|
throw new Error("crypto.getRandomValues must be defined");
|
|
879
875
|
return e.getRandomValues(new Uint8Array(o));
|
|
880
876
|
}
|
|
881
|
-
const
|
|
877
|
+
const Ke = (o) => ({
|
|
882
878
|
oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, o])
|
|
883
|
-
}),
|
|
884
|
-
for (let o = 0, e =
|
|
885
|
-
[t, n] = [n, (2 * t + 3 * n) % 5],
|
|
886
|
-
let s =
|
|
879
|
+
}), En = BigInt(0), me = BigInt(1), On = BigInt(2), Rn = BigInt(7), qn = BigInt(256), Wn = BigInt(113), Ht = [], Pt = [], Kt = [];
|
|
880
|
+
for (let o = 0, e = me, t = 1, n = 0; o < 24; o++) {
|
|
881
|
+
[t, n] = [n, (2 * t + 3 * n) % 5], Ht.push(2 * (5 * n + t)), Pt.push((o + 1) * (o + 2) / 2 % 64);
|
|
882
|
+
let s = En;
|
|
887
883
|
for (let r = 0; r < 7; r++)
|
|
888
|
-
e = (e <<
|
|
889
|
-
|
|
884
|
+
e = (e << me ^ (e >> Rn) * Wn) % qn, e & On && (s ^= me << (me << BigInt(r)) - me);
|
|
885
|
+
Kt.push(s);
|
|
890
886
|
}
|
|
891
|
-
const
|
|
892
|
-
function
|
|
887
|
+
const Nt = kn(Kt, !0), Un = Nt[0], Bn = Nt[1], ht = (o, e, t) => t > 32 ? $n(o, e, t) : _n(o, e, t), dt = (o, e, t) => t > 32 ? An(o, e, t) : Sn(o, e, t);
|
|
888
|
+
function Hn(o, e = 24) {
|
|
893
889
|
const t = new Uint32Array(10);
|
|
894
890
|
for (let n = 24 - e; n < 24; n++) {
|
|
895
891
|
for (let i = 0; i < 10; i++)
|
|
896
892
|
t[i] = o[i] ^ o[i + 10] ^ o[i + 20] ^ o[i + 30] ^ o[i + 40];
|
|
897
893
|
for (let i = 0; i < 10; i += 2) {
|
|
898
|
-
const a = (i + 8) % 10, c = (i + 2) % 10, u = t[c], l = t[c + 1], h =
|
|
894
|
+
const a = (i + 8) % 10, c = (i + 2) % 10, u = t[c], l = t[c + 1], h = ht(u, l, 1) ^ t[a], p = dt(u, l, 1) ^ t[a + 1];
|
|
899
895
|
for (let d = 0; d < 50; d += 10)
|
|
900
896
|
o[i + d] ^= h, o[i + d + 1] ^= p;
|
|
901
897
|
}
|
|
902
898
|
let s = o[2], r = o[3];
|
|
903
899
|
for (let i = 0; i < 24; i++) {
|
|
904
|
-
const a =
|
|
900
|
+
const a = Pt[i], c = ht(s, r, a), u = dt(s, r, a), l = Ht[i];
|
|
905
901
|
s = o[l], r = o[l + 1], o[l] = c, o[l + 1] = u;
|
|
906
902
|
}
|
|
907
903
|
for (let i = 0; i < 50; i += 10) {
|
|
@@ -910,36 +906,36 @@ function Nn(o, e = 24) {
|
|
|
910
906
|
for (let a = 0; a < 10; a++)
|
|
911
907
|
o[i + a] ^= ~t[(a + 2) % 10] & t[(a + 4) % 10];
|
|
912
908
|
}
|
|
913
|
-
o[0] ^=
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
class
|
|
909
|
+
o[0] ^= Un[n], o[1] ^= Bn[n];
|
|
910
|
+
}
|
|
911
|
+
Ut(t);
|
|
912
|
+
}
|
|
913
|
+
class Ne {
|
|
914
|
+
state;
|
|
915
|
+
pos = 0;
|
|
916
|
+
posOut = 0;
|
|
917
|
+
finished = !1;
|
|
918
|
+
state32;
|
|
919
|
+
destroyed = !1;
|
|
920
|
+
blockLen;
|
|
921
|
+
suffix;
|
|
922
|
+
outputLen;
|
|
923
|
+
enableXOF = !1;
|
|
924
|
+
rounds;
|
|
918
925
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
919
926
|
constructor(e, t, n, s = !1, r = 24) {
|
|
920
|
-
|
|
921
|
-
Q(this, "pos", 0);
|
|
922
|
-
Q(this, "posOut", 0);
|
|
923
|
-
Q(this, "finished", !1);
|
|
924
|
-
Q(this, "state32");
|
|
925
|
-
Q(this, "destroyed", !1);
|
|
926
|
-
Q(this, "blockLen");
|
|
927
|
-
Q(this, "suffix");
|
|
928
|
-
Q(this, "outputLen");
|
|
929
|
-
Q(this, "enableXOF", !1);
|
|
930
|
-
Q(this, "rounds");
|
|
931
|
-
if (this.blockLen = e, this.suffix = t, this.outputLen = n, this.enableXOF = s, this.rounds = r, ct(n, "outputLen"), !(0 < e && e < 200))
|
|
927
|
+
if (this.blockLen = e, this.suffix = t, this.outputLen = n, this.enableXOF = s, this.rounds = r, lt(n, "outputLen"), !(0 < e && e < 200))
|
|
932
928
|
throw new Error("only keccak-f1600 function is supported");
|
|
933
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
929
|
+
this.state = new Uint8Array(200), this.state32 = Wt(this.state);
|
|
934
930
|
}
|
|
935
931
|
clone() {
|
|
936
932
|
return this._cloneInto();
|
|
937
933
|
}
|
|
938
934
|
keccak() {
|
|
939
|
-
|
|
935
|
+
ut(this.state32), Hn(this.state32, this.rounds), ut(this.state32), this.posOut = 0, this.pos = 0;
|
|
940
936
|
}
|
|
941
937
|
update(e) {
|
|
942
|
-
|
|
938
|
+
ct(this), j(e);
|
|
943
939
|
const { blockLen: t, state: n } = this, s = e.length;
|
|
944
940
|
for (let r = 0; r < s; ) {
|
|
945
941
|
const i = Math.min(t - this.pos, s - r);
|
|
@@ -957,7 +953,7 @@ class Fe {
|
|
|
957
953
|
e[n] ^= t, (t & 128) !== 0 && n === s - 1 && this.keccak(), e[s - 1] ^= 128, this.keccak();
|
|
958
954
|
}
|
|
959
955
|
writeInto(e) {
|
|
960
|
-
|
|
956
|
+
ct(this, !1), j(e), this.finish();
|
|
961
957
|
const t = this.state, { blockLen: n } = this;
|
|
962
958
|
for (let s = 0, r = e.length; s < r; ) {
|
|
963
959
|
this.posOut >= n && this.keccak();
|
|
@@ -972,10 +968,10 @@ class Fe {
|
|
|
972
968
|
return this.writeInto(e);
|
|
973
969
|
}
|
|
974
970
|
xof(e) {
|
|
975
|
-
return
|
|
971
|
+
return lt(e), this.xofInto(new Uint8Array(e));
|
|
976
972
|
}
|
|
977
973
|
digestInto(e) {
|
|
978
|
-
if (
|
|
974
|
+
if (xn(e, this), this.finished)
|
|
979
975
|
throw new Error("digest() was already called");
|
|
980
976
|
return this.writeInto(e), this.destroy(), e;
|
|
981
977
|
}
|
|
@@ -983,49 +979,49 @@ class Fe {
|
|
|
983
979
|
return this.digestInto(new Uint8Array(this.outputLen));
|
|
984
980
|
}
|
|
985
981
|
destroy() {
|
|
986
|
-
this.destroyed = !0,
|
|
982
|
+
this.destroyed = !0, Ut(this.state);
|
|
987
983
|
}
|
|
988
984
|
_cloneInto(e) {
|
|
989
985
|
const { blockLen: t, suffix: n, outputLen: s, rounds: r, enableXOF: i } = this;
|
|
990
|
-
return e
|
|
986
|
+
return e ||= new Ne(t, n, s, i, r), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = r, e.suffix = n, e.outputLen = s, e.enableXOF = i, e.destroyed = this.destroyed, e;
|
|
991
987
|
}
|
|
992
988
|
}
|
|
993
|
-
const Lt = (o, e, t, n = {}) =>
|
|
989
|
+
const Lt = (o, e, t, n = {}) => Bt(() => new Ne(e, o, t), n), Pn = /* @__PURE__ */ Lt(
|
|
994
990
|
6,
|
|
995
991
|
136,
|
|
996
992
|
32,
|
|
997
|
-
/* @__PURE__ */
|
|
998
|
-
),
|
|
993
|
+
/* @__PURE__ */ Ke(8)
|
|
994
|
+
), Kn = /* @__PURE__ */ Lt(
|
|
999
995
|
6,
|
|
1000
996
|
72,
|
|
1001
997
|
64,
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
),
|
|
1004
|
-
function
|
|
998
|
+
/* @__PURE__ */ Ke(10)
|
|
999
|
+
), Ft = (o, e, t, n = {}) => Bt((s = {}) => new Ne(e, o, s.dkLen === void 0 ? t : s.dkLen, !0), n), Nn = /* @__PURE__ */ Ft(31, 168, 16, /* @__PURE__ */ Ke(11)), Qt = /* @__PURE__ */ Ft(31, 136, 32, /* @__PURE__ */ Ke(12));
|
|
1000
|
+
function rt(o) {
|
|
1005
1001
|
if (!Number.isSafeInteger(o) || o < 0 || o > 4294967295)
|
|
1006
1002
|
throw new Error("wrong u32 integer:" + o);
|
|
1007
1003
|
return o;
|
|
1008
1004
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return
|
|
1005
|
+
function jt(o) {
|
|
1006
|
+
return rt(o), (o & o - 1) === 0 && o !== 0;
|
|
1011
1007
|
}
|
|
1012
|
-
function
|
|
1013
|
-
|
|
1008
|
+
function Dt(o, e) {
|
|
1009
|
+
rt(o);
|
|
1014
1010
|
let t = 0;
|
|
1015
1011
|
for (let n = 0; n < e; n++, o >>>= 1)
|
|
1016
1012
|
t = t << 1 | o & 1;
|
|
1017
1013
|
return t;
|
|
1018
1014
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
1015
|
+
function Vt(o) {
|
|
1016
|
+
return rt(o), 31 - Math.clz32(o);
|
|
1021
1017
|
}
|
|
1022
|
-
function
|
|
1018
|
+
function pt(o) {
|
|
1023
1019
|
const e = o.length;
|
|
1024
|
-
if (e < 2 || !
|
|
1020
|
+
if (e < 2 || !jt(e))
|
|
1025
1021
|
throw new Error("n must be a power of 2 and greater than 1. Got " + e);
|
|
1026
|
-
const t =
|
|
1022
|
+
const t = Vt(e);
|
|
1027
1023
|
for (let n = 0; n < e; n++) {
|
|
1028
|
-
const s =
|
|
1024
|
+
const s = Dt(n, t);
|
|
1029
1025
|
if (n < s) {
|
|
1030
1026
|
const r = o[n];
|
|
1031
1027
|
o[n] = o[s], o[s] = r;
|
|
@@ -1033,15 +1029,15 @@ function ft(o) {
|
|
|
1033
1029
|
}
|
|
1034
1030
|
return o;
|
|
1035
1031
|
}
|
|
1036
|
-
const
|
|
1037
|
-
const { N: t, roots: n, dit: s, invertButterflies: r = !1, skipStages: i = 0, brp: a = !0 } = e, c =
|
|
1038
|
-
if (!
|
|
1032
|
+
const ft = (o, e) => {
|
|
1033
|
+
const { N: t, roots: n, dit: s, invertButterflies: r = !1, skipStages: i = 0, brp: a = !0 } = e, c = Vt(t);
|
|
1034
|
+
if (!jt(t))
|
|
1039
1035
|
throw new Error("FFT: Polynomial size should be power of two");
|
|
1040
1036
|
const u = s !== r;
|
|
1041
1037
|
return (l) => {
|
|
1042
1038
|
if (l.length !== t)
|
|
1043
1039
|
throw new Error("FFT: wrong Polynomial length");
|
|
1044
|
-
s && a &&
|
|
1040
|
+
s && a && pt(l);
|
|
1045
1041
|
for (let h = 0, p = 1; h < c - i; h++) {
|
|
1046
1042
|
const d = s ? h + 1 + i : c - h, b = 1 << d, A = b >> 1, O = t >> d;
|
|
1047
1043
|
for (let f = 0; f < t; f += b)
|
|
@@ -1053,12 +1049,11 @@ const mt = (o, e) => {
|
|
|
1053
1049
|
} else r ? (l[k] = o.add(I, _), l[$] = o.mul(o.sub(I, _), v)) : (l[k] = o.add(_, I), l[$] = o.mul(o.sub(_, I), v));
|
|
1054
1050
|
}
|
|
1055
1051
|
}
|
|
1056
|
-
return !s && a &&
|
|
1052
|
+
return !s && a && pt(l), l;
|
|
1057
1053
|
};
|
|
1058
1054
|
};
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
function Ge(o, e) {
|
|
1055
|
+
const mt = Cn;
|
|
1056
|
+
function Je(o, e) {
|
|
1062
1057
|
if (o.length !== e.length)
|
|
1063
1058
|
return !1;
|
|
1064
1059
|
let t = 0;
|
|
@@ -1066,10 +1061,10 @@ function Ge(o, e) {
|
|
|
1066
1061
|
t |= o[n] ^ e[n];
|
|
1067
1062
|
return t === 0;
|
|
1068
1063
|
}
|
|
1069
|
-
function
|
|
1064
|
+
function Ln(o) {
|
|
1070
1065
|
return Uint8Array.from(o);
|
|
1071
1066
|
}
|
|
1072
|
-
function
|
|
1067
|
+
function qe(o, ...e) {
|
|
1073
1068
|
const t = (s) => typeof s == "number" ? s : s.bytesLen, n = e.reduce((s, r) => s + t(r), 0);
|
|
1074
1069
|
return {
|
|
1075
1070
|
bytesLen: n,
|
|
@@ -1077,12 +1072,12 @@ function We(o, ...e) {
|
|
|
1077
1072
|
const r = new Uint8Array(n);
|
|
1078
1073
|
for (let i = 0, a = 0; i < e.length; i++) {
|
|
1079
1074
|
const c = e[i], u = t(c), l = typeof c == "number" ? s[i] : c.encode(s[i]);
|
|
1080
|
-
|
|
1075
|
+
j(l, u, o), r.set(l, a), typeof c != "number" && l.fill(0), a += u;
|
|
1081
1076
|
}
|
|
1082
1077
|
return r;
|
|
1083
1078
|
},
|
|
1084
1079
|
decode: (s) => {
|
|
1085
|
-
|
|
1080
|
+
j(s, n, o);
|
|
1086
1081
|
const r = [];
|
|
1087
1082
|
for (const i of e) {
|
|
1088
1083
|
const a = t(i), c = s.subarray(0, a);
|
|
@@ -1092,7 +1087,7 @@ function We(o, ...e) {
|
|
|
1092
1087
|
}
|
|
1093
1088
|
};
|
|
1094
1089
|
}
|
|
1095
|
-
function
|
|
1090
|
+
function Ge(o, e) {
|
|
1096
1091
|
const t = e * o.bytesLen;
|
|
1097
1092
|
return {
|
|
1098
1093
|
bytesLen: t,
|
|
@@ -1107,7 +1102,7 @@ function Xe(o, e) {
|
|
|
1107
1102
|
return s;
|
|
1108
1103
|
},
|
|
1109
1104
|
decode: (n) => {
|
|
1110
|
-
|
|
1105
|
+
j(n, t);
|
|
1111
1106
|
const s = [];
|
|
1112
1107
|
for (let r = 0; r < n.length; r += o.bytesLen)
|
|
1113
1108
|
s.push(o.decode(n.subarray(r, r + o.bytesLen)));
|
|
@@ -1115,7 +1110,7 @@ function Xe(o, e) {
|
|
|
1115
1110
|
}
|
|
1116
1111
|
};
|
|
1117
1112
|
}
|
|
1118
|
-
function
|
|
1113
|
+
function G(...o) {
|
|
1119
1114
|
for (const e of o)
|
|
1120
1115
|
if (Array.isArray(e))
|
|
1121
1116
|
for (const t of e)
|
|
@@ -1123,11 +1118,10 @@ function X(...o) {
|
|
|
1123
1118
|
else
|
|
1124
1119
|
e.fill(0);
|
|
1125
1120
|
}
|
|
1126
|
-
function
|
|
1121
|
+
function yt(o) {
|
|
1127
1122
|
return (1 << o) - 1;
|
|
1128
1123
|
}
|
|
1129
|
-
|
|
1130
|
-
const Dn = (o) => {
|
|
1124
|
+
const Fn = (o) => {
|
|
1131
1125
|
const { newPoly: e, N: t, Q: n, F: s, ROOT_OF_UNITY: r, brvBits: i } = o, a = (f, m = n) => {
|
|
1132
1126
|
const w = f % m | 0;
|
|
1133
1127
|
return (w >= 0 ? w | 0 : m + w | 0) | 0;
|
|
@@ -1138,7 +1132,7 @@ const Dn = (o) => {
|
|
|
1138
1132
|
function u() {
|
|
1139
1133
|
const f = e(t);
|
|
1140
1134
|
for (let m = 0; m < t; m++) {
|
|
1141
|
-
const w =
|
|
1135
|
+
const w = Dt(m, i), T = BigInt(r) ** BigInt(w) % BigInt(n);
|
|
1142
1136
|
f[m] = Number(T) | 0;
|
|
1143
1137
|
}
|
|
1144
1138
|
return f;
|
|
@@ -1156,7 +1150,7 @@ const Dn = (o) => {
|
|
|
1156
1150
|
invertButterflies: !0,
|
|
1157
1151
|
skipStages: 1,
|
|
1158
1152
|
brp: !1
|
|
1159
|
-
}, d =
|
|
1153
|
+
}, d = ft(h, { dit: !1, ...p }), b = ft(h, { dit: !0, ...p });
|
|
1160
1154
|
return { mod: a, smod: c, nttZetas: l, NTT: {
|
|
1161
1155
|
encode: (f) => d(f),
|
|
1162
1156
|
decode: (f) => {
|
|
@@ -1166,14 +1160,14 @@ const Dn = (o) => {
|
|
|
1166
1160
|
return f;
|
|
1167
1161
|
}
|
|
1168
1162
|
}, bitsCoder: (f, m) => {
|
|
1169
|
-
const w =
|
|
1163
|
+
const w = yt(f), T = f * (t / 8);
|
|
1170
1164
|
return {
|
|
1171
1165
|
bytesLen: T,
|
|
1172
1166
|
encode: (k) => {
|
|
1173
1167
|
const $ = new Uint8Array(T);
|
|
1174
1168
|
for (let v = 0, I = 0, _ = 0, U = 0; v < k.length; v++)
|
|
1175
1169
|
for (I |= (m.encode(k[v]) & w) << _, _ += f; _ >= 8; _ -= 8, I >>= 8)
|
|
1176
|
-
$[U++] = I &
|
|
1170
|
+
$[U++] = I & yt(_);
|
|
1177
1171
|
return $;
|
|
1178
1172
|
},
|
|
1179
1173
|
decode: (k) => {
|
|
@@ -1185,7 +1179,7 @@ const Dn = (o) => {
|
|
|
1185
1179
|
}
|
|
1186
1180
|
};
|
|
1187
1181
|
} };
|
|
1188
|
-
},
|
|
1182
|
+
}, Qn = (o) => (e, t) => {
|
|
1189
1183
|
t || (t = o.blockLen);
|
|
1190
1184
|
const n = new Uint8Array(e.length + 2);
|
|
1191
1185
|
n.set(e);
|
|
@@ -1195,79 +1189,78 @@ const Dn = (o) => {
|
|
|
1195
1189
|
stats: () => ({ calls: a, xofs: c }),
|
|
1196
1190
|
get: (u, l) => (n[s + 0] = u, n[s + 1] = l, i.destroy(), i = o.create({}).update(n), a++, () => (c++, i.xofInto(r))),
|
|
1197
1191
|
clean: () => {
|
|
1198
|
-
i.destroy(),
|
|
1192
|
+
i.destroy(), G(r, n);
|
|
1199
1193
|
}
|
|
1200
1194
|
};
|
|
1201
|
-
},
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
ROOT_OF_UNITY: Gn,
|
|
1195
|
+
}, jn = /* @__PURE__ */ Qn(Nn);
|
|
1196
|
+
const L = 256, ae = 3329, Dn = 3303, Vn = 17, { mod: Se, nttZetas: zn, NTT: te, bitsCoder: Jn } = Fn({
|
|
1197
|
+
N: L,
|
|
1198
|
+
Q: ae,
|
|
1199
|
+
F: Dn,
|
|
1200
|
+
ROOT_OF_UNITY: Vn,
|
|
1208
1201
|
newPoly: (o) => new Uint16Array(o),
|
|
1209
1202
|
brvBits: 7
|
|
1210
|
-
}),
|
|
1211
|
-
768: { N:
|
|
1212
|
-
},
|
|
1203
|
+
}), Gn = {
|
|
1204
|
+
768: { N: L, Q: ae, K: 3, ETA1: 2, ETA2: 2, du: 10, dv: 4, RBGstrength: 192 }
|
|
1205
|
+
}, Xn = (o) => {
|
|
1213
1206
|
if (o >= 12)
|
|
1214
1207
|
return { encode: (t) => t, decode: (t) => t };
|
|
1215
1208
|
const e = 2 ** (o - 1);
|
|
1216
1209
|
return {
|
|
1217
1210
|
// const compress = (i: number) => round((2 ** d / Q) * i) % 2 ** d;
|
|
1218
|
-
encode: (t) => ((t << o) +
|
|
1211
|
+
encode: (t) => ((t << o) + ae / 2) / ae,
|
|
1219
1212
|
// const decompress = (i: number) => round((Q / 2 ** d) * i);
|
|
1220
|
-
decode: (t) => t *
|
|
1213
|
+
decode: (t) => t * ae + e >>> o
|
|
1221
1214
|
};
|
|
1222
|
-
},
|
|
1223
|
-
function
|
|
1224
|
-
for (let t = 0; t <
|
|
1225
|
-
o[t] =
|
|
1215
|
+
}, ye = (o) => Jn(o, Xn(o));
|
|
1216
|
+
function ne(o, e) {
|
|
1217
|
+
for (let t = 0; t < L; t++)
|
|
1218
|
+
o[t] = Se(o[t] + e[t]);
|
|
1226
1219
|
}
|
|
1227
|
-
function
|
|
1228
|
-
for (let t = 0; t <
|
|
1229
|
-
o[t] =
|
|
1220
|
+
function Zn(o, e) {
|
|
1221
|
+
for (let t = 0; t < L; t++)
|
|
1222
|
+
o[t] = Se(o[t] - e[t]);
|
|
1230
1223
|
}
|
|
1231
|
-
function
|
|
1232
|
-
const r =
|
|
1224
|
+
function Yn(o, e, t, n, s) {
|
|
1225
|
+
const r = Se(e * n * s + o * t), i = Se(o * n + e * t);
|
|
1233
1226
|
return { c0: r, c1: i };
|
|
1234
1227
|
}
|
|
1235
|
-
function
|
|
1236
|
-
for (let t = 0; t <
|
|
1237
|
-
let n =
|
|
1228
|
+
function Ce(o, e) {
|
|
1229
|
+
for (let t = 0; t < L / 2; t++) {
|
|
1230
|
+
let n = zn[64 + (t >> 1)];
|
|
1238
1231
|
t & 1 && (n = -n);
|
|
1239
|
-
const { c0: s, c1: r } =
|
|
1232
|
+
const { c0: s, c1: r } = Yn(o[2 * t + 0], o[2 * t + 1], e[2 * t + 0], e[2 * t + 1], n);
|
|
1240
1233
|
o[2 * t + 0] = s, o[2 * t + 1] = r;
|
|
1241
1234
|
}
|
|
1242
1235
|
return o;
|
|
1243
1236
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const e = new Uint16Array(
|
|
1246
|
-
for (let t = 0; t <
|
|
1237
|
+
function gt(o) {
|
|
1238
|
+
const e = new Uint16Array(L);
|
|
1239
|
+
for (let t = 0; t < L; ) {
|
|
1247
1240
|
const n = o();
|
|
1248
1241
|
if (n.length % 3)
|
|
1249
1242
|
throw new Error("SampleNTT: unaligned block");
|
|
1250
|
-
for (let s = 0; t <
|
|
1243
|
+
for (let s = 0; t < L && s + 3 <= n.length; s += 3) {
|
|
1251
1244
|
const r = (n[s + 0] >> 0 | n[s + 1] << 8) & 4095, i = (n[s + 1] >> 4 | n[s + 2] << 4) & 4095;
|
|
1252
|
-
r <
|
|
1245
|
+
r < ae && (e[t++] = r), t < L && i < ae && (e[t++] = i);
|
|
1253
1246
|
}
|
|
1254
1247
|
}
|
|
1255
1248
|
return e;
|
|
1256
1249
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const s = o(n *
|
|
1250
|
+
function ge(o, e, t, n) {
|
|
1251
|
+
const s = o(n * L / 4, e, t), r = new Uint16Array(L), i = Wt(s);
|
|
1259
1252
|
let a = 0;
|
|
1260
1253
|
for (let c = 0, u = 0, l = 0, h = 0; c < i.length; c++) {
|
|
1261
1254
|
let p = i[c];
|
|
1262
1255
|
for (let d = 0; d < 32; d++)
|
|
1263
|
-
l += p & 1, p >>= 1, a += 1, a === n ? (h = l, l = 0) : a === 2 * n && (r[u++] =
|
|
1256
|
+
l += p & 1, p >>= 1, a += 1, a === n ? (h = l, l = 0) : a === 2 * n && (r[u++] = Se(h - l), l = 0, a = 0);
|
|
1264
1257
|
}
|
|
1265
1258
|
if (a)
|
|
1266
1259
|
throw new Error(`sampleCBD: leftover bits: ${a}`);
|
|
1267
1260
|
return r;
|
|
1268
1261
|
}
|
|
1269
|
-
const
|
|
1270
|
-
const { K: e, PRF: t, XOF: n, HASH512: s, ETA1: r, ETA2: i, du: a, dv: c } = o, u =
|
|
1262
|
+
const es = (o) => {
|
|
1263
|
+
const { K: e, PRF: t, XOF: n, HASH512: s, ETA1: r, ETA2: i, du: a, dv: c } = o, u = ye(1), l = ye(c), h = ye(a), p = qe("publicKey", Ge(ye(12), e), 32), d = Ge(ye(12), e), b = qe("ciphertext", Ge(h, e), l), A = qe("seed", 32, 32);
|
|
1271
1264
|
return {
|
|
1272
1265
|
secretCoder: d,
|
|
1273
1266
|
lengths: {
|
|
@@ -1276,18 +1269,18 @@ const ss = (o) => {
|
|
|
1276
1269
|
cipherText: b.bytesLen
|
|
1277
1270
|
},
|
|
1278
1271
|
keygen: (O) => {
|
|
1279
|
-
|
|
1272
|
+
j(O, 32, "seed");
|
|
1280
1273
|
const f = new Uint8Array(33);
|
|
1281
1274
|
f.set(O), f[32] = e;
|
|
1282
1275
|
const m = s(f), [w, T] = A.decode(m), k = [], $ = [];
|
|
1283
1276
|
for (let _ = 0; _ < e; _++)
|
|
1284
|
-
k.push(
|
|
1277
|
+
k.push(te.encode(ge(t, T, _, r)));
|
|
1285
1278
|
const v = n(w);
|
|
1286
1279
|
for (let _ = 0; _ < e; _++) {
|
|
1287
|
-
const U =
|
|
1280
|
+
const U = te.encode(ge(t, T, e + _, r));
|
|
1288
1281
|
for (let R = 0; R < e; R++) {
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1282
|
+
const ce = gt(v.get(R, _));
|
|
1283
|
+
ne(U, Ce(ce, k[R]));
|
|
1291
1284
|
}
|
|
1292
1285
|
$.push(U);
|
|
1293
1286
|
}
|
|
@@ -1296,37 +1289,37 @@ const ss = (o) => {
|
|
|
1296
1289
|
publicKey: p.encode([$, w]),
|
|
1297
1290
|
secretKey: d.encode(k)
|
|
1298
1291
|
};
|
|
1299
|
-
return
|
|
1292
|
+
return G(w, T, k, $, f, m), I;
|
|
1300
1293
|
},
|
|
1301
1294
|
encrypt: (O, f, m) => {
|
|
1302
1295
|
const [w, T] = p.decode(O), k = [];
|
|
1303
1296
|
for (let R = 0; R < e; R++)
|
|
1304
|
-
k.push(
|
|
1305
|
-
const $ = n(T), v = new Uint16Array(
|
|
1297
|
+
k.push(te.encode(ge(t, m, R, r)));
|
|
1298
|
+
const $ = n(T), v = new Uint16Array(L), I = [];
|
|
1306
1299
|
for (let R = 0; R < e; R++) {
|
|
1307
|
-
const
|
|
1308
|
-
for (let
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1300
|
+
const ce = ge(t, m, e + R, i), je = new Uint16Array(L);
|
|
1301
|
+
for (let Me = 0; Me < e; Me++) {
|
|
1302
|
+
const Yt = gt($.get(R, Me));
|
|
1303
|
+
ne(je, Ce(Yt, k[Me]));
|
|
1311
1304
|
}
|
|
1312
|
-
|
|
1305
|
+
ne(ce, te.decode(je)), I.push(ce), ne(v, Ce(w[R], k[R])), G(je);
|
|
1313
1306
|
}
|
|
1314
1307
|
$.clean();
|
|
1315
|
-
const _ =
|
|
1316
|
-
|
|
1308
|
+
const _ = ge(t, m, 2 * e, i);
|
|
1309
|
+
ne(_, te.decode(v));
|
|
1317
1310
|
const U = u.decode(f);
|
|
1318
|
-
return
|
|
1311
|
+
return ne(U, _), G(w, k, v, _), b.encode([I, U]);
|
|
1319
1312
|
},
|
|
1320
1313
|
decrypt: (O, f) => {
|
|
1321
|
-
const [m, w] = b.decode(O), T = d.decode(f), k = new Uint16Array(
|
|
1314
|
+
const [m, w] = b.decode(O), T = d.decode(f), k = new Uint16Array(L);
|
|
1322
1315
|
for (let $ = 0; $ < e; $++)
|
|
1323
|
-
|
|
1324
|
-
return
|
|
1316
|
+
ne(k, Ce(T[$], te.encode(m[$])));
|
|
1317
|
+
return Zn(w, te.decode(k)), G(k, T, m), u.encode(w);
|
|
1325
1318
|
}
|
|
1326
1319
|
};
|
|
1327
1320
|
};
|
|
1328
|
-
function
|
|
1329
|
-
const e =
|
|
1321
|
+
function ts(o) {
|
|
1322
|
+
const e = es(o), { HASH256: t, HASH512: n, KDF: s } = o, { secretCoder: r, lengths: i } = e, a = qe("secretKey", i.secretKey, i.publicKey, 32, 32), c = 32, u = 64;
|
|
1330
1323
|
return {
|
|
1331
1324
|
info: { type: "ml-kem" },
|
|
1332
1325
|
lengths: {
|
|
@@ -1336,46 +1329,46 @@ function rs(o) {
|
|
|
1336
1329
|
msgRand: c,
|
|
1337
1330
|
secretKey: a.bytesLen
|
|
1338
1331
|
},
|
|
1339
|
-
keygen: (l =
|
|
1340
|
-
|
|
1332
|
+
keygen: (l = mt(u)) => {
|
|
1333
|
+
j(l, u, "seed");
|
|
1341
1334
|
const { publicKey: h, secretKey: p } = e.keygen(l.subarray(0, 32)), d = t(h), b = a.encode([p, h, d, l.subarray(32)]);
|
|
1342
|
-
return
|
|
1335
|
+
return G(p, d), { publicKey: h, secretKey: b };
|
|
1343
1336
|
},
|
|
1344
1337
|
getPublicKey: (l) => {
|
|
1345
1338
|
const [h, p] = a.decode(l);
|
|
1346
1339
|
return Uint8Array.from(p);
|
|
1347
1340
|
},
|
|
1348
|
-
encapsulate: (l, h =
|
|
1349
|
-
|
|
1350
|
-
const p = l.subarray(0, 384 * o.K), d = r.encode(r.decode(
|
|
1351
|
-
if (!
|
|
1352
|
-
throw
|
|
1353
|
-
|
|
1341
|
+
encapsulate: (l, h = mt(c)) => {
|
|
1342
|
+
j(l, i.publicKey, "publicKey"), j(h, c, "message");
|
|
1343
|
+
const p = l.subarray(0, 384 * o.K), d = r.encode(r.decode(Ln(p)));
|
|
1344
|
+
if (!Je(d, p))
|
|
1345
|
+
throw G(d), new Error("ML-KEM.encapsulate: wrong publicKey modulus");
|
|
1346
|
+
G(d);
|
|
1354
1347
|
const b = n.create().update(h).update(t(l)).digest(), A = e.encrypt(l, h, b.subarray(32, 64));
|
|
1355
|
-
return
|
|
1348
|
+
return G(b.subarray(32)), { cipherText: A, sharedSecret: b.subarray(0, 32) };
|
|
1356
1349
|
},
|
|
1357
1350
|
decapsulate: (l, h) => {
|
|
1358
|
-
|
|
1351
|
+
j(h, a.bytesLen, "secretKey"), j(l, i.cipherText, "cipherText");
|
|
1359
1352
|
const p = a.bytesLen - 96, d = p + 32, b = t(h.subarray(p / 2, d));
|
|
1360
|
-
if (!
|
|
1353
|
+
if (!Je(b, h.subarray(d, d + 32)))
|
|
1361
1354
|
throw new Error("invalid secretKey: hash check failed");
|
|
1362
|
-
const [A, O, f, m] = a.decode(h), w = e.decrypt(l, A), T = n.create().update(w).update(f).digest(), k = T.subarray(0, 32), $ = e.encrypt(O, w, T.subarray(32, 64)), v =
|
|
1363
|
-
return
|
|
1355
|
+
const [A, O, f, m] = a.decode(h), w = e.decrypt(l, A), T = n.create().update(w).update(f).digest(), k = T.subarray(0, 32), $ = e.encrypt(O, w, T.subarray(32, 64)), v = Je(l, $), I = s.create({ dkLen: 32 }).update(m).update(l).digest();
|
|
1356
|
+
return G(w, $, v ? I : k), v ? k : I;
|
|
1364
1357
|
}
|
|
1365
1358
|
};
|
|
1366
1359
|
}
|
|
1367
|
-
function
|
|
1368
|
-
return
|
|
1369
|
-
}
|
|
1370
|
-
const
|
|
1371
|
-
HASH256:
|
|
1372
|
-
HASH512:
|
|
1373
|
-
KDF:
|
|
1374
|
-
XOF:
|
|
1375
|
-
PRF:
|
|
1376
|
-
},
|
|
1377
|
-
...
|
|
1378
|
-
...
|
|
1360
|
+
function ns(o, e, t) {
|
|
1361
|
+
return Qt.create({ dkLen: o }).update(e).update(new Uint8Array([t])).digest();
|
|
1362
|
+
}
|
|
1363
|
+
const ss = {
|
|
1364
|
+
HASH256: Pn,
|
|
1365
|
+
HASH512: Kn,
|
|
1366
|
+
KDF: Qt,
|
|
1367
|
+
XOF: jn,
|
|
1368
|
+
PRF: ns
|
|
1369
|
+
}, Xe = /* @__PURE__ */ ts({
|
|
1370
|
+
...ss,
|
|
1371
|
+
...Gn[768]
|
|
1379
1372
|
});
|
|
1380
1373
|
class S {
|
|
1381
1374
|
/**
|
|
@@ -1398,7 +1391,7 @@ class S {
|
|
|
1398
1391
|
batchId: i = null,
|
|
1399
1392
|
characters: a = null
|
|
1400
1393
|
}) {
|
|
1401
|
-
this.token = n, this.balance = "0", this.molecules = {}, this.key = null, this.privkey = null, this.pubkey = null, this.tokenUnits = [], this.tradeRates = {}, this.address = s, this.position = r, this.bundle = t, this.batchId = i, this.characters = a, e && (this.bundle = this.bundle ||
|
|
1394
|
+
this.token = n, this.balance = "0", this.molecules = {}, this.key = null, this.privkey = null, this.pubkey = null, this.tokenUnits = [], this.tradeRates = {}, this.address = s, this.position = r, this.bundle = t, this.batchId = i, this.characters = a, e && (this.bundle = this.bundle || de(e, "Wallet::constructor"), this.position = this.position || S.generatePosition(), this.key = S.generateKey({
|
|
1402
1395
|
secret: e,
|
|
1403
1396
|
token: this.token,
|
|
1404
1397
|
position: this.position
|
|
@@ -1423,8 +1416,8 @@ class S {
|
|
|
1423
1416
|
}) {
|
|
1424
1417
|
let i = null;
|
|
1425
1418
|
if (!e && !t)
|
|
1426
|
-
throw new
|
|
1427
|
-
return e && !t && (i = S.generatePosition(), t =
|
|
1419
|
+
throw new ze();
|
|
1420
|
+
return e && !t && (i = S.generatePosition(), t = de(e, "Wallet::create")), new S({
|
|
1428
1421
|
secret: e,
|
|
1429
1422
|
bundle: t,
|
|
1430
1423
|
token: n,
|
|
@@ -1440,7 +1433,7 @@ class S {
|
|
|
1440
1433
|
* @return {boolean}
|
|
1441
1434
|
*/
|
|
1442
1435
|
static isBundleHash(e) {
|
|
1443
|
-
return typeof e != "string" ? !1 : e.length === 64 &&
|
|
1436
|
+
return typeof e != "string" ? !1 : e.length === 64 && De(e);
|
|
1444
1437
|
}
|
|
1445
1438
|
/**
|
|
1446
1439
|
* Get formatted token units from the raw data
|
|
@@ -1451,7 +1444,7 @@ class S {
|
|
|
1451
1444
|
static getTokenUnits(e) {
|
|
1452
1445
|
const t = [];
|
|
1453
1446
|
return e.forEach((n) => {
|
|
1454
|
-
t.push(
|
|
1447
|
+
t.push(pe.createFromDB(n));
|
|
1455
1448
|
}), t;
|
|
1456
1449
|
}
|
|
1457
1450
|
/**
|
|
@@ -1468,12 +1461,12 @@ class S {
|
|
|
1468
1461
|
position: n
|
|
1469
1462
|
}) {
|
|
1470
1463
|
if (!e)
|
|
1471
|
-
throw new
|
|
1464
|
+
throw new ze("Wallet::generateKey() - Secret is required!");
|
|
1472
1465
|
if (!n)
|
|
1473
|
-
throw new
|
|
1474
|
-
const s =
|
|
1466
|
+
throw new ze("Wallet::generateKey() - Position is required!");
|
|
1467
|
+
const s = De(e) ? e : Ve(e, 1024), r = De(n) ? n : Ve(n, 256), a = BigInt(`0x${s}`) + BigInt(`0x${r}`), c = new F("SHAKE256", "TEXT");
|
|
1475
1468
|
c.update(a.toString(16)), t && c.update(t);
|
|
1476
|
-
const u = new
|
|
1469
|
+
const u = new F("SHAKE256", "TEXT");
|
|
1477
1470
|
return u.update(c.getHash("HEX", { outputLen: 8192 })), u.getHash("HEX", { outputLen: 8192 });
|
|
1478
1471
|
}
|
|
1479
1472
|
/**
|
|
@@ -1483,16 +1476,16 @@ class S {
|
|
|
1483
1476
|
* @return {string}
|
|
1484
1477
|
*/
|
|
1485
1478
|
static generateAddress(e) {
|
|
1486
|
-
const t =
|
|
1479
|
+
const t = Ue(e, 128), n = new F("SHAKE256", "TEXT");
|
|
1487
1480
|
for (const r in t) {
|
|
1488
1481
|
let i = t[r];
|
|
1489
1482
|
for (let a = 1; a <= 16; a++) {
|
|
1490
|
-
const c = new
|
|
1483
|
+
const c = new F("SHAKE256", "TEXT");
|
|
1491
1484
|
c.update(i), i = c.getHash("HEX", { outputLen: 512 });
|
|
1492
1485
|
}
|
|
1493
1486
|
n.update(i);
|
|
1494
1487
|
}
|
|
1495
|
-
const s = new
|
|
1488
|
+
const s = new F("SHAKE256", "TEXT");
|
|
1496
1489
|
return s.update(n.getHash("HEX", { outputLen: 8192 })), s.getHash("HEX", { outputLen: 256 });
|
|
1497
1490
|
}
|
|
1498
1491
|
/**
|
|
@@ -1501,16 +1494,16 @@ class S {
|
|
|
1501
1494
|
* @returns {string}
|
|
1502
1495
|
*/
|
|
1503
1496
|
static generatePosition(e = 64) {
|
|
1504
|
-
return
|
|
1497
|
+
return nt(e, "abcdef0123456789");
|
|
1505
1498
|
}
|
|
1506
1499
|
/**
|
|
1507
1500
|
* Initializes the ML-KEM key pair
|
|
1508
1501
|
*/
|
|
1509
1502
|
initializeMLKEM() {
|
|
1510
|
-
const e =
|
|
1503
|
+
const e = tt(this.key, 128), t = new Uint8Array(64);
|
|
1511
1504
|
for (let r = 0; r < 64; r++)
|
|
1512
1505
|
t[r] = parseInt(e.substr(r * 2, 2), 16);
|
|
1513
|
-
const { publicKey: n, secretKey: s } =
|
|
1506
|
+
const { publicKey: n, secretKey: s } = Xe.keygen(t);
|
|
1514
1507
|
this.pubkey = this.serializeKey(n), this.privkey = s;
|
|
1515
1508
|
}
|
|
1516
1509
|
serializeKey(e) {
|
|
@@ -1633,13 +1626,18 @@ class S {
|
|
|
1633
1626
|
sourceWallet: e,
|
|
1634
1627
|
isRemainder: t = !1
|
|
1635
1628
|
}) {
|
|
1636
|
-
e.batchId && (this.batchId = t ? e.batchId :
|
|
1629
|
+
e.batchId && (this.batchId = t ? e.batchId : Be({}));
|
|
1637
1630
|
}
|
|
1638
1631
|
async encryptMessage(e, t) {
|
|
1639
|
-
const n = JSON.stringify(e), s = new TextEncoder().encode(n), r = this.deserializeKey(t),
|
|
1632
|
+
const n = JSON.stringify(e), s = new TextEncoder().encode(n), r = this.deserializeKey(t), i = 1184;
|
|
1633
|
+
if (r.length !== i)
|
|
1634
|
+
throw new Error(
|
|
1635
|
+
`KnishIO: cannot ML-KEM-encrypt — recipient public key is ${r.length} bytes, expected ${i} (ML-KEM-768). The node likely did not advertise an ML-KEM public key (upgrade the validator to a PQ-transport build), or authenticate with { encrypt: false }.`
|
|
1636
|
+
);
|
|
1637
|
+
const { cipherText: a, sharedSecret: c } = Xe.encapsulate(r), u = await this.encryptWithSharedSecret(s, c);
|
|
1640
1638
|
return {
|
|
1641
|
-
cipherText: this.serializeKey(
|
|
1642
|
-
encryptedMessage: this.serializeKey(
|
|
1639
|
+
cipherText: this.serializeKey(a),
|
|
1640
|
+
encryptedMessage: this.serializeKey(u)
|
|
1643
1641
|
};
|
|
1644
1642
|
}
|
|
1645
1643
|
async decryptMessage(e) {
|
|
@@ -1656,7 +1654,7 @@ class S {
|
|
|
1656
1654
|
const { cipherText: t, encryptedMessage: n } = e;
|
|
1657
1655
|
let s;
|
|
1658
1656
|
try {
|
|
1659
|
-
s =
|
|
1657
|
+
s = Xe.decapsulate(this.deserializeKey(t), this.privkey);
|
|
1660
1658
|
} catch (a) {
|
|
1661
1659
|
return console.error("Wallet::decryptMessage() - Decapsulation failed", a), console.info("Wallet::decryptMessage() - my public key", this.pubkey), null;
|
|
1662
1660
|
}
|
|
@@ -1684,7 +1682,7 @@ class S {
|
|
|
1684
1682
|
* `shake256(pubkey, 64)` = 64 bits = 8 bytes, hex; hex-decode → standard base64. PQ Phase E.
|
|
1685
1683
|
*/
|
|
1686
1684
|
hashShare(e) {
|
|
1687
|
-
const t =
|
|
1685
|
+
const t = Ve(e, 64), n = Uint8Array.from(t.match(/.{2}/g).map((s) => parseInt(s, 16)));
|
|
1688
1686
|
return this.serializeKey(n);
|
|
1689
1687
|
}
|
|
1690
1688
|
/**
|
|
@@ -1740,7 +1738,7 @@ class S {
|
|
|
1740
1738
|
return new Uint8Array(i);
|
|
1741
1739
|
}
|
|
1742
1740
|
}
|
|
1743
|
-
class
|
|
1741
|
+
class be extends x {
|
|
1744
1742
|
/**
|
|
1745
1743
|
* Class constructor
|
|
1746
1744
|
*
|
|
@@ -1752,7 +1750,7 @@ class we extends x {
|
|
|
1752
1750
|
super(e, t, n), this.name = "AtomIndexException";
|
|
1753
1751
|
}
|
|
1754
1752
|
}
|
|
1755
|
-
class
|
|
1753
|
+
class rs extends x {
|
|
1756
1754
|
/**
|
|
1757
1755
|
* Class constructor
|
|
1758
1756
|
*
|
|
@@ -1764,7 +1762,7 @@ class as extends x {
|
|
|
1764
1762
|
super(e, t, n), this.name = "MolecularHashMismatchException";
|
|
1765
1763
|
}
|
|
1766
1764
|
}
|
|
1767
|
-
class
|
|
1765
|
+
class is extends x {
|
|
1768
1766
|
/**
|
|
1769
1767
|
* Class constructor
|
|
1770
1768
|
*
|
|
@@ -1776,7 +1774,7 @@ class ls extends x {
|
|
|
1776
1774
|
super(e, t, n), this.name = "MolecularHashMissingException";
|
|
1777
1775
|
}
|
|
1778
1776
|
}
|
|
1779
|
-
class
|
|
1777
|
+
class bt extends x {
|
|
1780
1778
|
/**
|
|
1781
1779
|
* Class constructor
|
|
1782
1780
|
*
|
|
@@ -1788,7 +1786,7 @@ class wt extends x {
|
|
|
1788
1786
|
super(e, t, n), this.name = "PolicyInvalidException";
|
|
1789
1787
|
}
|
|
1790
1788
|
}
|
|
1791
|
-
class
|
|
1789
|
+
class zt extends x {
|
|
1792
1790
|
/**
|
|
1793
1791
|
* Class constructor
|
|
1794
1792
|
*
|
|
@@ -1800,7 +1798,7 @@ class Jt extends x {
|
|
|
1800
1798
|
super(e, t, n), this.name = "SignatureMalformedException";
|
|
1801
1799
|
}
|
|
1802
1800
|
}
|
|
1803
|
-
class
|
|
1801
|
+
class os extends x {
|
|
1804
1802
|
/**
|
|
1805
1803
|
* Class constructor
|
|
1806
1804
|
*
|
|
@@ -1812,7 +1810,7 @@ class cs extends x {
|
|
|
1812
1810
|
super(e, t, n), this.name = "SignatureMismatchException";
|
|
1813
1811
|
}
|
|
1814
1812
|
}
|
|
1815
|
-
class
|
|
1813
|
+
class J extends x {
|
|
1816
1814
|
/**
|
|
1817
1815
|
* Class constructor
|
|
1818
1816
|
*
|
|
@@ -1824,7 +1822,7 @@ class G extends x {
|
|
|
1824
1822
|
super(e, t, n), this.name = "TransferBalanceException";
|
|
1825
1823
|
}
|
|
1826
1824
|
}
|
|
1827
|
-
class
|
|
1825
|
+
class we extends x {
|
|
1828
1826
|
/**
|
|
1829
1827
|
* Class constructor
|
|
1830
1828
|
*
|
|
@@ -1836,7 +1834,7 @@ class ke extends x {
|
|
|
1836
1834
|
super(e, t, n), this.name = "TransferMalformedException";
|
|
1837
1835
|
}
|
|
1838
1836
|
}
|
|
1839
|
-
class
|
|
1837
|
+
class wt extends x {
|
|
1840
1838
|
/**
|
|
1841
1839
|
* @param {string} message
|
|
1842
1840
|
* @param {string|null} fileName
|
|
@@ -1846,7 +1844,7 @@ class kt extends x {
|
|
|
1846
1844
|
super(e, t, n), this.name = "TransferMismatchedException";
|
|
1847
1845
|
}
|
|
1848
1846
|
}
|
|
1849
|
-
class
|
|
1847
|
+
class kt extends x {
|
|
1850
1848
|
/**
|
|
1851
1849
|
* Class constructor
|
|
1852
1850
|
*
|
|
@@ -1858,7 +1856,7 @@ class _t extends x {
|
|
|
1858
1856
|
super(e, t, n), this.name = "TransferRemainderException";
|
|
1859
1857
|
}
|
|
1860
1858
|
}
|
|
1861
|
-
class
|
|
1859
|
+
class as extends x {
|
|
1862
1860
|
/**
|
|
1863
1861
|
* Class constructor
|
|
1864
1862
|
*
|
|
@@ -1870,7 +1868,7 @@ class us extends x {
|
|
|
1870
1868
|
super(e, t, n), this.name = "TransferToSelfException";
|
|
1871
1869
|
}
|
|
1872
1870
|
}
|
|
1873
|
-
class
|
|
1871
|
+
class Ee extends x {
|
|
1874
1872
|
/**
|
|
1875
1873
|
* Class constructor
|
|
1876
1874
|
*
|
|
@@ -1894,7 +1892,7 @@ class H extends x {
|
|
|
1894
1892
|
super(e, t, n), this.name = "MetaMissingException";
|
|
1895
1893
|
}
|
|
1896
1894
|
}
|
|
1897
|
-
class
|
|
1895
|
+
class se extends x {
|
|
1898
1896
|
/**
|
|
1899
1897
|
* Class constructor
|
|
1900
1898
|
*
|
|
@@ -1906,7 +1904,7 @@ class re extends x {
|
|
|
1906
1904
|
super(e, t, n), this.name = "WrongTokenTypeException";
|
|
1907
1905
|
}
|
|
1908
1906
|
}
|
|
1909
|
-
class
|
|
1907
|
+
class We extends x {
|
|
1910
1908
|
/**
|
|
1911
1909
|
* @param {string|null} message
|
|
1912
1910
|
* @param {string|null} fileName
|
|
@@ -1916,7 +1914,7 @@ class Ue extends x {
|
|
|
1916
1914
|
super(e, t, n), this.name = "BatchIdException";
|
|
1917
1915
|
}
|
|
1918
1916
|
}
|
|
1919
|
-
class
|
|
1917
|
+
class _t {
|
|
1920
1918
|
constructor(e = {}) {
|
|
1921
1919
|
for (const t in e)
|
|
1922
1920
|
this[`__${t}`] = e[t];
|
|
@@ -1935,7 +1933,7 @@ class St {
|
|
|
1935
1933
|
return e;
|
|
1936
1934
|
}
|
|
1937
1935
|
}
|
|
1938
|
-
class
|
|
1936
|
+
class He extends x {
|
|
1939
1937
|
/**
|
|
1940
1938
|
* Class constructor
|
|
1941
1939
|
*
|
|
@@ -1947,7 +1945,7 @@ class Pe extends x {
|
|
|
1947
1945
|
super(e, t, n), this.name = "RuleArgumentException";
|
|
1948
1946
|
}
|
|
1949
1947
|
}
|
|
1950
|
-
class
|
|
1948
|
+
class Y extends x {
|
|
1951
1949
|
/**
|
|
1952
1950
|
* @param {string|null} message
|
|
1953
1951
|
* @param {string|null} fileName
|
|
@@ -1957,7 +1955,7 @@ class ee extends x {
|
|
|
1957
1955
|
super(e, t, n), this.name = "CodeException";
|
|
1958
1956
|
}
|
|
1959
1957
|
}
|
|
1960
|
-
class
|
|
1958
|
+
class _e {
|
|
1961
1959
|
/**
|
|
1962
1960
|
*
|
|
1963
1961
|
* @param {string} action
|
|
@@ -1980,7 +1978,7 @@ class Se {
|
|
|
1980
1978
|
comparison: c = null
|
|
1981
1979
|
}) {
|
|
1982
1980
|
if (s && (this.meta = s), !e)
|
|
1983
|
-
throw new
|
|
1981
|
+
throw new He('Callback structure violated, missing mandatory "action" parameter.');
|
|
1984
1982
|
this.__metaId = n, this.__metaType = t, this.__action = e, this.__address = r, this.__token = i, this.__amount = a, this.__comparison = c;
|
|
1985
1983
|
}
|
|
1986
1984
|
/**
|
|
@@ -1995,8 +1993,8 @@ class Se {
|
|
|
1995
1993
|
* @param {string} amount
|
|
1996
1994
|
*/
|
|
1997
1995
|
set amount(e) {
|
|
1998
|
-
if (!
|
|
1999
|
-
throw new
|
|
1996
|
+
if (!fn(e))
|
|
1997
|
+
throw new Y("Parameter amount should be a string containing numbers");
|
|
2000
1998
|
this.__amount = e;
|
|
2001
1999
|
}
|
|
2002
2000
|
/**
|
|
@@ -2018,7 +2016,7 @@ class Se {
|
|
|
2018
2016
|
* @param {Meta|object} meta
|
|
2019
2017
|
*/
|
|
2020
2018
|
set meta(e) {
|
|
2021
|
-
this.__meta = e instanceof
|
|
2019
|
+
this.__meta = e instanceof _t ? e : _t.toObject(e);
|
|
2022
2020
|
}
|
|
2023
2021
|
/**
|
|
2024
2022
|
*
|
|
@@ -2041,7 +2039,7 @@ class Se {
|
|
|
2041
2039
|
* @return Callback
|
|
2042
2040
|
*/
|
|
2043
2041
|
static toObject(e) {
|
|
2044
|
-
const t = new
|
|
2042
|
+
const t = new _e({
|
|
2045
2043
|
action: e.action
|
|
2046
2044
|
});
|
|
2047
2045
|
return e.metaType && (t.metaType = e.metaType), e.metaId && (t.metaId = e.metaId), e.meta && (t.meta = e.meta), e.address && (t.address = e.address), e.token && (t.token = e.token), e.amount && (t.amount = e.amount), e.comparison && (t.comparison = e.comparison), t;
|
|
@@ -2066,31 +2064,31 @@ class Se {
|
|
|
2066
2064
|
* @return {boolean}
|
|
2067
2065
|
*/
|
|
2068
2066
|
isMeta() {
|
|
2069
|
-
return
|
|
2067
|
+
return fe(Object.keys(this.toJSON()), ["action", "metaId", "metaType", "meta"]).length === 4 && this._is("meta");
|
|
2070
2068
|
}
|
|
2071
2069
|
/**
|
|
2072
2070
|
* @return {boolean}
|
|
2073
2071
|
*/
|
|
2074
2072
|
isCollect() {
|
|
2075
|
-
return
|
|
2073
|
+
return fe(Object.keys(this.toJSON()), ["action", "address", "token", "amount", "comparison"]).length === 5 && this._is("collect");
|
|
2076
2074
|
}
|
|
2077
2075
|
/**
|
|
2078
2076
|
* @return {boolean}
|
|
2079
2077
|
*/
|
|
2080
2078
|
isBuffer() {
|
|
2081
|
-
return
|
|
2079
|
+
return fe(Object.keys(this.toJSON()), ["action", "address", "token", "amount", "comparison"]).length === 5 && this._is("buffer");
|
|
2082
2080
|
}
|
|
2083
2081
|
/**
|
|
2084
2082
|
* @return {boolean}
|
|
2085
2083
|
*/
|
|
2086
2084
|
isRemit() {
|
|
2087
|
-
return
|
|
2085
|
+
return fe(Object.keys(this.toJSON()), ["action", "token", "amount"]).length === 3 && this._is("remit");
|
|
2088
2086
|
}
|
|
2089
2087
|
/**
|
|
2090
2088
|
* @return {boolean}
|
|
2091
2089
|
*/
|
|
2092
2090
|
isBurn() {
|
|
2093
|
-
return
|
|
2091
|
+
return fe(Object.keys(this.toJSON()), ["action", "token", "amount", "comparison"]).length === 4 && this._is("burn");
|
|
2094
2092
|
}
|
|
2095
2093
|
/**
|
|
2096
2094
|
* @param {string} type
|
|
@@ -2102,7 +2100,7 @@ class Se {
|
|
|
2102
2100
|
return this.__action.toLowerCase() === e.toLowerCase();
|
|
2103
2101
|
}
|
|
2104
2102
|
}
|
|
2105
|
-
class
|
|
2103
|
+
class Ze {
|
|
2106
2104
|
/**
|
|
2107
2105
|
*
|
|
2108
2106
|
* @param key
|
|
@@ -2115,7 +2113,7 @@ class Ye {
|
|
|
2115
2113
|
comparison: n
|
|
2116
2114
|
}) {
|
|
2117
2115
|
if ([e, t, n].some((s) => !s))
|
|
2118
|
-
throw new
|
|
2116
|
+
throw new He("Condition::constructor( { key, value, comparison } ) - not all class parameters are initialised!");
|
|
2119
2117
|
this.__key = e, this.__value = t, this.__comparison = n;
|
|
2120
2118
|
}
|
|
2121
2119
|
/**
|
|
@@ -2140,7 +2138,7 @@ class Ye {
|
|
|
2140
2138
|
};
|
|
2141
2139
|
}
|
|
2142
2140
|
}
|
|
2143
|
-
class
|
|
2141
|
+
class $e {
|
|
2144
2142
|
/**
|
|
2145
2143
|
*
|
|
2146
2144
|
* @param {Condition[]} condition
|
|
@@ -2151,11 +2149,11 @@ class Ae {
|
|
|
2151
2149
|
callback: t = []
|
|
2152
2150
|
}) {
|
|
2153
2151
|
for (const n of e)
|
|
2154
|
-
if (!(n instanceof
|
|
2155
|
-
throw new
|
|
2152
|
+
if (!(n instanceof Ze))
|
|
2153
|
+
throw new He();
|
|
2156
2154
|
for (const n of t)
|
|
2157
|
-
if (!(n instanceof
|
|
2158
|
-
throw new
|
|
2155
|
+
if (!(n instanceof _e))
|
|
2156
|
+
throw new He();
|
|
2159
2157
|
this.__condition = e, this.__callback = t;
|
|
2160
2158
|
}
|
|
2161
2159
|
/**
|
|
@@ -2163,13 +2161,13 @@ class Ae {
|
|
|
2163
2161
|
* @param {Condition[]|{}} condition
|
|
2164
2162
|
*/
|
|
2165
2163
|
set comparison(e) {
|
|
2166
|
-
this.__condition.push(e instanceof
|
|
2164
|
+
this.__condition.push(e instanceof Ze ? e : Ze.toObject(e));
|
|
2167
2165
|
}
|
|
2168
2166
|
/**
|
|
2169
2167
|
* @param {Callback[]|{}} callback
|
|
2170
2168
|
*/
|
|
2171
2169
|
set callback(e) {
|
|
2172
|
-
this.__callback.push(e instanceof
|
|
2170
|
+
this.__callback.push(e instanceof _e ? e : _e.toObject(e));
|
|
2173
2171
|
}
|
|
2174
2172
|
/**
|
|
2175
2173
|
*
|
|
@@ -2182,7 +2180,7 @@ class Ae {
|
|
|
2182
2180
|
throw new H("Rule::toObject() - Incorrect rule format! There is no condition field.");
|
|
2183
2181
|
if (!e.callback)
|
|
2184
2182
|
throw new H("Rule::toObject() - Incorrect rule format! There is no callback field.");
|
|
2185
|
-
const t = new
|
|
2183
|
+
const t = new $e({});
|
|
2186
2184
|
for (const n of e.condition)
|
|
2187
2185
|
t.comparison = n;
|
|
2188
2186
|
for (const n of e.callback)
|
|
@@ -2258,19 +2256,19 @@ class M {
|
|
|
2258
2256
|
return r[Number.isInteger(c) ? c : a] = n, e;
|
|
2259
2257
|
}
|
|
2260
2258
|
}
|
|
2261
|
-
class
|
|
2259
|
+
class Ae {
|
|
2262
2260
|
/**
|
|
2263
2261
|
*
|
|
2264
2262
|
* @param molecule
|
|
2265
2263
|
*/
|
|
2266
2264
|
constructor(e) {
|
|
2267
2265
|
if (e.molecularHash === null)
|
|
2268
|
-
throw new
|
|
2266
|
+
throw new is();
|
|
2269
2267
|
if (!e.atoms.length)
|
|
2270
|
-
throw new
|
|
2268
|
+
throw new oe();
|
|
2271
2269
|
for (const t of e.atoms)
|
|
2272
2270
|
if (t.index === null)
|
|
2273
|
-
throw new
|
|
2271
|
+
throw new be();
|
|
2274
2272
|
this.molecule = e;
|
|
2275
2273
|
}
|
|
2276
2274
|
/**
|
|
@@ -2287,7 +2285,7 @@ class ve {
|
|
|
2287
2285
|
*/
|
|
2288
2286
|
continuId() {
|
|
2289
2287
|
if (this.molecule.atoms[0].token === "USER" && this.molecule.getIsotopes("I").length < 1)
|
|
2290
|
-
throw new
|
|
2288
|
+
throw new oe("Check::continuId() - Molecule is missing required ContinuID Atom!");
|
|
2291
2289
|
return !0;
|
|
2292
2290
|
}
|
|
2293
2291
|
/**
|
|
@@ -2300,14 +2298,14 @@ class ve {
|
|
|
2300
2298
|
if (e.isotope === "V" && e.batchId !== null) {
|
|
2301
2299
|
const t = this.molecule.getIsotopes("V"), n = t[t.length - 1];
|
|
2302
2300
|
if (e.batchId !== n.batchId)
|
|
2303
|
-
throw new
|
|
2301
|
+
throw new We();
|
|
2304
2302
|
for (const s of t)
|
|
2305
2303
|
if (s.batchId === null)
|
|
2306
|
-
throw new
|
|
2304
|
+
throw new We();
|
|
2307
2305
|
}
|
|
2308
2306
|
return !0;
|
|
2309
2307
|
}
|
|
2310
|
-
throw new
|
|
2308
|
+
throw new We();
|
|
2311
2309
|
}
|
|
2312
2310
|
/**
|
|
2313
2311
|
*
|
|
@@ -2316,9 +2314,9 @@ class ve {
|
|
|
2316
2314
|
isotopeI() {
|
|
2317
2315
|
for (const e of this.molecule.getIsotopes("I")) {
|
|
2318
2316
|
if (e.token !== "USER")
|
|
2319
|
-
throw new
|
|
2317
|
+
throw new se(`Check::isotopeI() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2320
2318
|
if (e.index === 0)
|
|
2321
|
-
throw new
|
|
2319
|
+
throw new be(`Check::isotopeI() - Isotope "${e.isotope}" Atoms must have a non-zero index!`);
|
|
2322
2320
|
}
|
|
2323
2321
|
return !0;
|
|
2324
2322
|
}
|
|
@@ -2329,9 +2327,9 @@ class ve {
|
|
|
2329
2327
|
isotopeU() {
|
|
2330
2328
|
for (const e of this.molecule.getIsotopes("U")) {
|
|
2331
2329
|
if (e.token !== "AUTH")
|
|
2332
|
-
throw new
|
|
2330
|
+
throw new se(`Check::isotopeU() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2333
2331
|
if (e.index !== 0)
|
|
2334
|
-
throw new
|
|
2332
|
+
throw new be(`Check::isotopeU() - Isotope "${e.isotope}" Atoms must have an index equal to 0!`);
|
|
2335
2333
|
}
|
|
2336
2334
|
return !0;
|
|
2337
2335
|
}
|
|
@@ -2345,8 +2343,8 @@ class ve {
|
|
|
2345
2343
|
if (t.meta.length < 1)
|
|
2346
2344
|
throw new H();
|
|
2347
2345
|
if (t.token !== "USER")
|
|
2348
|
-
throw new
|
|
2349
|
-
const n =
|
|
2346
|
+
throw new se(`Check::isotopeM() - "${t.token}" is not a valid Token slug for "${t.isotope}" isotope Atoms!`);
|
|
2347
|
+
const n = he.aggregateMeta(t.meta);
|
|
2350
2348
|
for (const s of e) {
|
|
2351
2349
|
let r = n[s];
|
|
2352
2350
|
if (r) {
|
|
@@ -2354,10 +2352,10 @@ class ve {
|
|
|
2354
2352
|
for (const [i, a] of Object.entries(r))
|
|
2355
2353
|
if (!e.includes(i)) {
|
|
2356
2354
|
if (!Object.keys(n).includes(i))
|
|
2357
|
-
throw new
|
|
2355
|
+
throw new bt(`${i} is missing from the meta.`);
|
|
2358
2356
|
for (const c of a)
|
|
2359
2357
|
if (!S.isBundleHash(c) && !["all", "self"].includes(c))
|
|
2360
|
-
throw new
|
|
2358
|
+
throw new bt(`${c} does not correspond to the format of the policy.`);
|
|
2361
2359
|
}
|
|
2362
2360
|
}
|
|
2363
2361
|
}
|
|
@@ -2371,9 +2369,9 @@ class ve {
|
|
|
2371
2369
|
isotopeC() {
|
|
2372
2370
|
for (const e of this.molecule.getIsotopes("C")) {
|
|
2373
2371
|
if (e.token !== "USER")
|
|
2374
|
-
throw new
|
|
2372
|
+
throw new se(`Check::isotopeC() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2375
2373
|
if (e.index !== 0)
|
|
2376
|
-
throw new
|
|
2374
|
+
throw new be(`Check::isotopeC() - Isotope "${e.isotope}" Atoms must have an index equal to 0!`);
|
|
2377
2375
|
}
|
|
2378
2376
|
return !0;
|
|
2379
2377
|
}
|
|
@@ -2393,9 +2391,9 @@ class ve {
|
|
|
2393
2391
|
if (!Object.prototype.hasOwnProperty.call(t, s) || !t[s])
|
|
2394
2392
|
throw new H(`Check::isotopeT() - Required meta field "${s}" is missing!`);
|
|
2395
2393
|
if (e.token !== "USER")
|
|
2396
|
-
throw new
|
|
2394
|
+
throw new se(`Check::isotopeT() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2397
2395
|
if (e.index !== 0)
|
|
2398
|
-
throw new
|
|
2396
|
+
throw new be(`Check::isotopeT() - Isotope "${e.isotope}" Atoms must have an index equal to 0!`);
|
|
2399
2397
|
}
|
|
2400
2398
|
return !0;
|
|
2401
2399
|
}
|
|
@@ -2416,7 +2414,7 @@ class ve {
|
|
|
2416
2414
|
if (!Array.isArray(n))
|
|
2417
2415
|
throw new H("Check::isotopeR() - Incorrect rule format!");
|
|
2418
2416
|
for (const s of n)
|
|
2419
|
-
|
|
2417
|
+
$e.toObject(s);
|
|
2420
2418
|
if (n.length < 1)
|
|
2421
2419
|
throw new H("Check::isotopeR() - No rules!");
|
|
2422
2420
|
}
|
|
@@ -2431,7 +2429,7 @@ class ve {
|
|
|
2431
2429
|
isotopeP() {
|
|
2432
2430
|
for (const e of this.molecule.getIsotopes("P")) {
|
|
2433
2431
|
if (e.token !== "USER")
|
|
2434
|
-
throw new
|
|
2432
|
+
throw new se(`Check::isotopeP() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2435
2433
|
const t = e.aggregatedMeta();
|
|
2436
2434
|
if (!Object.prototype.hasOwnProperty.call(t, "peerHost") || !t.peerHost)
|
|
2437
2435
|
throw new H('Check::isotopeP() - Required meta field "peerHost" is missing!');
|
|
@@ -2446,7 +2444,7 @@ class ve {
|
|
|
2446
2444
|
isotopeA() {
|
|
2447
2445
|
for (const e of this.molecule.getIsotopes("A")) {
|
|
2448
2446
|
if (e.token !== "USER")
|
|
2449
|
-
throw new
|
|
2447
|
+
throw new se(`Check::isotopeA() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2450
2448
|
if (!e.metaType)
|
|
2451
2449
|
throw new H('Check::isotopeA() - Required field "metaType" is missing!');
|
|
2452
2450
|
if (!e.metaId)
|
|
@@ -2473,7 +2471,7 @@ class ve {
|
|
|
2473
2471
|
throw new H("Check::isotopeB() - B-isotope atoms must have a metaId!");
|
|
2474
2472
|
const s = Number(n.value);
|
|
2475
2473
|
if (Number.isNaN(s))
|
|
2476
|
-
throw new
|
|
2474
|
+
throw new we("Check::isotopeB() - B-isotope atom value is not a valid number!");
|
|
2477
2475
|
}
|
|
2478
2476
|
const t = this.molecule.getIsotopes("V");
|
|
2479
2477
|
if (t.length > 0) {
|
|
@@ -2483,7 +2481,7 @@ class ve {
|
|
|
2483
2481
|
Number.isNaN(r) || (n += r);
|
|
2484
2482
|
}
|
|
2485
2483
|
if (n !== 0)
|
|
2486
|
-
throw new
|
|
2484
|
+
throw new Ee("Check::isotopeB() - V+B atom values do not balance to zero!");
|
|
2487
2485
|
}
|
|
2488
2486
|
return !0;
|
|
2489
2487
|
}
|
|
@@ -2503,9 +2501,9 @@ class ve {
|
|
|
2503
2501
|
throw new H("Check::isotopeF() - F-isotope atoms must have a metaId!");
|
|
2504
2502
|
const s = Number(n.value);
|
|
2505
2503
|
if (Number.isNaN(s))
|
|
2506
|
-
throw new
|
|
2504
|
+
throw new we("Check::isotopeF() - F-isotope atom value is not a valid number!");
|
|
2507
2505
|
if (s < 0)
|
|
2508
|
-
throw new
|
|
2506
|
+
throw new we("Check::isotopeF() - F-isotope atom value must not be negative!");
|
|
2509
2507
|
}
|
|
2510
2508
|
const t = this.molecule.getIsotopes("V");
|
|
2511
2509
|
if (t.length > 0) {
|
|
@@ -2515,7 +2513,7 @@ class ve {
|
|
|
2515
2513
|
Number.isNaN(r) || (n += r);
|
|
2516
2514
|
}
|
|
2517
2515
|
if (n !== 0)
|
|
2518
|
-
throw new
|
|
2516
|
+
throw new Ee("Check::isotopeF() - V+F atom values do not balance to zero!");
|
|
2519
2517
|
}
|
|
2520
2518
|
return !0;
|
|
2521
2519
|
}
|
|
@@ -2532,11 +2530,11 @@ class ve {
|
|
|
2532
2530
|
if (!n && s.isotope === "V" && t.length === 2) {
|
|
2533
2531
|
const a = t[t.length - 1];
|
|
2534
2532
|
if (s.token !== a.token)
|
|
2535
|
-
throw new
|
|
2533
|
+
throw new wt();
|
|
2536
2534
|
if (a.value < 0)
|
|
2537
|
-
throw new
|
|
2535
|
+
throw new we();
|
|
2538
2536
|
if (Number(s.value) + Number(a.value) !== 0)
|
|
2539
|
-
throw new
|
|
2537
|
+
throw new Ee();
|
|
2540
2538
|
return !0;
|
|
2541
2539
|
}
|
|
2542
2540
|
let r = 0, i = 0;
|
|
@@ -2548,27 +2546,27 @@ class ve {
|
|
|
2548
2546
|
if (i = c.value * 1, Number.isNaN(i))
|
|
2549
2547
|
throw new TypeError('Invalid isotope "V" values');
|
|
2550
2548
|
if (c.token !== s.token)
|
|
2551
|
-
throw new
|
|
2549
|
+
throw new wt();
|
|
2552
2550
|
if (a > 0) {
|
|
2553
2551
|
if (i < 0)
|
|
2554
|
-
throw new
|
|
2552
|
+
throw new we();
|
|
2555
2553
|
if (c.walletAddress === s.walletAddress)
|
|
2556
|
-
throw new
|
|
2554
|
+
throw new as();
|
|
2557
2555
|
}
|
|
2558
2556
|
r += i;
|
|
2559
2557
|
}
|
|
2560
2558
|
if (!n && r !== 0)
|
|
2561
|
-
throw new
|
|
2559
|
+
throw new Ee();
|
|
2562
2560
|
if (e) {
|
|
2563
2561
|
if (i = s.value * 1, Number.isNaN(i))
|
|
2564
2562
|
throw new TypeError('Invalid isotope "V" values');
|
|
2565
2563
|
const a = Number(e.balance) + i;
|
|
2566
2564
|
if (a < 0)
|
|
2567
|
-
throw new
|
|
2565
|
+
throw new J();
|
|
2568
2566
|
if (!n && a !== r)
|
|
2569
|
-
throw new
|
|
2567
|
+
throw new kt();
|
|
2570
2568
|
} else if (i !== 0)
|
|
2571
|
-
throw new
|
|
2569
|
+
throw new kt();
|
|
2572
2570
|
return !0;
|
|
2573
2571
|
}
|
|
2574
2572
|
/**
|
|
@@ -2580,7 +2578,7 @@ class ve {
|
|
|
2580
2578
|
if (this.molecule.molecularHash !== g.hashAtoms({
|
|
2581
2579
|
atoms: this.molecule.atoms
|
|
2582
2580
|
}))
|
|
2583
|
-
throw new
|
|
2581
|
+
throw new rs();
|
|
2584
2582
|
return !0;
|
|
2585
2583
|
}
|
|
2586
2584
|
/**
|
|
@@ -2597,25 +2595,25 @@ class ve {
|
|
|
2597
2595
|
).reduce(
|
|
2598
2596
|
(p, d) => p + d
|
|
2599
2597
|
);
|
|
2600
|
-
if (t.length !== 2048 && (t =
|
|
2601
|
-
throw new
|
|
2602
|
-
const n =
|
|
2598
|
+
if (t.length !== 2048 && (t = pn(t), t.length !== 2048))
|
|
2599
|
+
throw new zt();
|
|
2600
|
+
const n = Ue(t, 128);
|
|
2603
2601
|
let s = "";
|
|
2604
2602
|
for (const p in n) {
|
|
2605
2603
|
let d = n[p];
|
|
2606
2604
|
for (let b = 0, A = 8 + e[p]; b < A; b++)
|
|
2607
|
-
d = new
|
|
2605
|
+
d = new F("SHAKE256", "TEXT").update(d).getHash("HEX", { outputLen: 512 });
|
|
2608
2606
|
s += d;
|
|
2609
2607
|
}
|
|
2610
|
-
const r = new
|
|
2608
|
+
const r = new F("SHAKE256", "TEXT");
|
|
2611
2609
|
r.update(s);
|
|
2612
|
-
const i = r.getHash("HEX", { outputLen: 8192 }), a = new
|
|
2610
|
+
const i = r.getHash("HEX", { outputLen: 8192 }), a = new F("SHAKE256", "TEXT");
|
|
2613
2611
|
a.update(i);
|
|
2614
2612
|
const c = a.getHash("HEX", { outputLen: 256 }), u = this.molecule.atoms[0];
|
|
2615
2613
|
let l = u.walletAddress;
|
|
2616
2614
|
const h = M.get(u.aggregatedMeta(), "signingWallet");
|
|
2617
2615
|
if (h && (l = M.get(JSON.parse(h), "address")), c !== l)
|
|
2618
|
-
throw new
|
|
2616
|
+
throw new os();
|
|
2619
2617
|
return !0;
|
|
2620
2618
|
}
|
|
2621
2619
|
/**
|
|
@@ -2668,7 +2666,7 @@ class ve {
|
|
|
2668
2666
|
createdAt: c.createdAt || null
|
|
2669
2667
|
};
|
|
2670
2668
|
});
|
|
2671
|
-
return
|
|
2669
|
+
return V.fromJSON({
|
|
2672
2670
|
molecularHash: e,
|
|
2673
2671
|
bundle: t,
|
|
2674
2672
|
cellSlug: n,
|
|
@@ -2686,8 +2684,8 @@ class ve {
|
|
|
2686
2684
|
*/
|
|
2687
2685
|
static verifyFromServerData(e) {
|
|
2688
2686
|
try {
|
|
2689
|
-
const t =
|
|
2690
|
-
return new
|
|
2687
|
+
const t = Ae.fromServerData(e);
|
|
2688
|
+
return new Ae(t).verify(), {
|
|
2691
2689
|
molecularHash: e.molecularHash,
|
|
2692
2690
|
verified: !0,
|
|
2693
2691
|
error: null
|
|
@@ -2701,7 +2699,7 @@ class ve {
|
|
|
2701
2699
|
}
|
|
2702
2700
|
}
|
|
2703
2701
|
}
|
|
2704
|
-
class
|
|
2702
|
+
class ue extends x {
|
|
2705
2703
|
/**
|
|
2706
2704
|
* Class constructor
|
|
2707
2705
|
*
|
|
@@ -2713,7 +2711,7 @@ class he extends x {
|
|
|
2713
2711
|
super(e, t, n), this.name = "BalanceInsufficientException";
|
|
2714
2712
|
}
|
|
2715
2713
|
}
|
|
2716
|
-
class
|
|
2714
|
+
class St extends x {
|
|
2717
2715
|
/**
|
|
2718
2716
|
* Class constructor
|
|
2719
2717
|
*
|
|
@@ -2725,7 +2723,7 @@ class $t extends x {
|
|
|
2725
2723
|
super(e, t, n), this.name = "NegativeAmountException";
|
|
2726
2724
|
}
|
|
2727
2725
|
}
|
|
2728
|
-
class
|
|
2726
|
+
class V {
|
|
2729
2727
|
/**
|
|
2730
2728
|
* Class constructor
|
|
2731
2729
|
*
|
|
@@ -2745,7 +2743,7 @@ class z {
|
|
|
2745
2743
|
version: i = null,
|
|
2746
2744
|
continuIdPosition: a = null
|
|
2747
2745
|
}) {
|
|
2748
|
-
this.status = null, this.molecularHash = null, this.createdAt = String(+/* @__PURE__ */ new Date()), this.cellSlugOrigin = this.cellSlug = r, this.secret = e, this.bundle = t, this.sourceWallet = n, this.continuIdPosition = a, this.atoms = [], this.parentHashes = [], i !== null && Object.prototype.hasOwnProperty.call(
|
|
2746
|
+
this.status = null, this.molecularHash = null, this.createdAt = String(+/* @__PURE__ */ new Date()), this.cellSlugOrigin = this.cellSlug = r, this.secret = e, this.bundle = t, this.sourceWallet = n, this.continuIdPosition = a, this.atoms = [], this.parentHashes = [], i !== null && Object.prototype.hasOwnProperty.call(Re, i) && (this.version = String(i)), (s || n) && (this.remainderWallet = s || S.create({
|
|
2749
2747
|
secret: e,
|
|
2750
2748
|
bundle: t,
|
|
2751
2749
|
token: n.token,
|
|
@@ -2797,14 +2795,14 @@ class z {
|
|
|
2797
2795
|
* @throws {AtomsMissingException}
|
|
2798
2796
|
*/
|
|
2799
2797
|
static jsonToObject(e) {
|
|
2800
|
-
const t = Object.assign(new
|
|
2798
|
+
const t = Object.assign(new V({}), JSON.parse(e)), n = Object.keys(new V({}));
|
|
2801
2799
|
if (!Array.isArray(t.atoms))
|
|
2802
|
-
throw new
|
|
2800
|
+
throw new oe();
|
|
2803
2801
|
for (const s in Object.keys(t.atoms)) {
|
|
2804
2802
|
t.atoms[s] = g.jsonToObject(JSON.stringify(t.atoms[s]));
|
|
2805
2803
|
for (const r of ["position", "walletAddress", "isotope"])
|
|
2806
2804
|
if (t.atoms[s].isotope.toLowerCase() !== "r" && (typeof t.atoms[s][r] > "u" || t.atoms[s][r] === null))
|
|
2807
|
-
throw new
|
|
2805
|
+
throw new oe("MolecularStructure::jsonToObject() - Required Atom properties are missing!");
|
|
2808
2806
|
}
|
|
2809
2807
|
for (const s in t)
|
|
2810
2808
|
Object.prototype.hasOwnProperty.call(t, s) && !n.includes(s) && delete t[s];
|
|
@@ -2876,7 +2874,7 @@ class z {
|
|
|
2876
2874
|
* @returns {*[]}
|
|
2877
2875
|
*/
|
|
2878
2876
|
getIsotopes(e) {
|
|
2879
|
-
return
|
|
2877
|
+
return V.isotopeFilter(e, this.atoms);
|
|
2880
2878
|
}
|
|
2881
2879
|
/**
|
|
2882
2880
|
* Generates the next atomic index
|
|
@@ -2884,7 +2882,7 @@ class z {
|
|
|
2884
2882
|
* @return {number}
|
|
2885
2883
|
*/
|
|
2886
2884
|
generateIndex() {
|
|
2887
|
-
return
|
|
2885
|
+
return V.generateNextAtomIndex(this.atoms);
|
|
2888
2886
|
}
|
|
2889
2887
|
/**
|
|
2890
2888
|
* Fills a Molecule's properties with the provided object
|
|
@@ -2955,7 +2953,7 @@ class z {
|
|
|
2955
2953
|
fuseToken(e, t) {
|
|
2956
2954
|
const n = e.length;
|
|
2957
2955
|
if (this.sourceWallet.balance - n < 0)
|
|
2958
|
-
throw new
|
|
2956
|
+
throw new ue();
|
|
2959
2957
|
return this.addAtom(g.create({
|
|
2960
2958
|
isotope: "V",
|
|
2961
2959
|
wallet: this.sourceWallet,
|
|
@@ -2986,9 +2984,9 @@ class z {
|
|
|
2986
2984
|
walletBundle: t = null
|
|
2987
2985
|
}) {
|
|
2988
2986
|
if (e < 0)
|
|
2989
|
-
throw new
|
|
2987
|
+
throw new St("Molecule::burnToken() - Amount to burn must be positive!");
|
|
2990
2988
|
if (this.sourceWallet.balance - e < 0)
|
|
2991
|
-
throw new
|
|
2989
|
+
throw new ue();
|
|
2992
2990
|
const n = new S({
|
|
2993
2991
|
bundle: "0000000000000000000000000000000000000000000000000000000000000000",
|
|
2994
2992
|
token: this.sourceWallet.token
|
|
@@ -3024,7 +3022,7 @@ class z {
|
|
|
3024
3022
|
units: t = []
|
|
3025
3023
|
}) {
|
|
3026
3024
|
if (e < 0)
|
|
3027
|
-
throw new
|
|
3025
|
+
throw new St("Molecule::replenishToken() - Amount to replenish must be positive!");
|
|
3028
3026
|
if (t.length) {
|
|
3029
3027
|
t = S.getTokenUnits(t), this.remainderWallet.tokenUnits = this.sourceWallet.tokenUnits;
|
|
3030
3028
|
for (const n of t)
|
|
@@ -3057,7 +3055,7 @@ class z {
|
|
|
3057
3055
|
amount: t
|
|
3058
3056
|
}) {
|
|
3059
3057
|
if (this.sourceWallet.balance - t < 0)
|
|
3060
|
-
throw new
|
|
3058
|
+
throw new ue();
|
|
3061
3059
|
return this.addAtom(g.create({
|
|
3062
3060
|
isotope: "V",
|
|
3063
3061
|
wallet: this.sourceWallet,
|
|
@@ -3097,7 +3095,7 @@ class z {
|
|
|
3097
3095
|
}) {
|
|
3098
3096
|
const n = t.reduce((s, r) => s + Number(r), 0);
|
|
3099
3097
|
if (this.sourceWallet.balance - n < 0)
|
|
3100
|
-
throw new
|
|
3098
|
+
throw new ue();
|
|
3101
3099
|
return this.addAtom(g.create({
|
|
3102
3100
|
isotope: "V",
|
|
3103
3101
|
wallet: this.sourceWallet,
|
|
@@ -3128,7 +3126,7 @@ class z {
|
|
|
3128
3126
|
tradeRates: t
|
|
3129
3127
|
}) {
|
|
3130
3128
|
if (this.sourceWallet.balance - e < 0)
|
|
3131
|
-
throw new
|
|
3129
|
+
throw new ue();
|
|
3132
3130
|
const n = S.create({
|
|
3133
3131
|
secret: this.secret,
|
|
3134
3132
|
bundle: this.bundle,
|
|
@@ -3167,7 +3165,7 @@ class z {
|
|
|
3167
3165
|
for (const r of Object.values(e || {}))
|
|
3168
3166
|
n += r;
|
|
3169
3167
|
if (this.sourceWallet.balance - n < 0)
|
|
3170
|
-
throw new
|
|
3168
|
+
throw new ue();
|
|
3171
3169
|
const s = new P();
|
|
3172
3170
|
t && s.setSigningWallet(t), this.addAtom(g.create({
|
|
3173
3171
|
isotope: "B",
|
|
@@ -3182,7 +3180,7 @@ class z {
|
|
|
3182
3180
|
isotope: "V",
|
|
3183
3181
|
token: this.sourceWallet.token,
|
|
3184
3182
|
value: i,
|
|
3185
|
-
batchId: this.sourceWallet.batchId ?
|
|
3183
|
+
batchId: this.sourceWallet.batchId ? Be({}) : null,
|
|
3186
3184
|
metaType: "walletBundle",
|
|
3187
3185
|
metaId: r
|
|
3188
3186
|
}));
|
|
@@ -3234,7 +3232,7 @@ class z {
|
|
|
3234
3232
|
}) {
|
|
3235
3233
|
const r = [];
|
|
3236
3234
|
for (const a of n)
|
|
3237
|
-
r.push(a instanceof
|
|
3235
|
+
r.push(a instanceof $e ? a : $e.toObject(a));
|
|
3238
3236
|
const i = new P({
|
|
3239
3237
|
rule: JSON.stringify(r)
|
|
3240
3238
|
});
|
|
@@ -3290,7 +3288,7 @@ class z {
|
|
|
3290
3288
|
}) {
|
|
3291
3289
|
const s = {
|
|
3292
3290
|
code: n,
|
|
3293
|
-
hash:
|
|
3291
|
+
hash: de(t.trim(), "Molecule::initIdentifierCreation")
|
|
3294
3292
|
};
|
|
3295
3293
|
return this.addAtom(g.create({
|
|
3296
3294
|
isotope: "C",
|
|
@@ -3428,29 +3426,29 @@ class z {
|
|
|
3428
3426
|
compressed: n = !0
|
|
3429
3427
|
}) {
|
|
3430
3428
|
if (this.atoms.length === 0 || this.atoms.filter((d) => !(d instanceof g)).length !== 0)
|
|
3431
|
-
throw new
|
|
3432
|
-
!t && !this.bundle && (this.bundle = e ||
|
|
3429
|
+
throw new oe();
|
|
3430
|
+
!t && !this.bundle && (this.bundle = e || de(this.secret, "Molecule::sign")), this.molecularHash = g.hashAtoms({
|
|
3433
3431
|
atoms: this.atoms
|
|
3434
3432
|
});
|
|
3435
3433
|
const s = this.atoms[0];
|
|
3436
3434
|
let r = s.position;
|
|
3437
3435
|
const i = M.get(s.aggregatedMeta(), "signingWallet");
|
|
3438
3436
|
if (i && (r = M.get(JSON.parse(i), "position")), !r)
|
|
3439
|
-
throw new
|
|
3437
|
+
throw new zt("Signing wallet must have a position!");
|
|
3440
3438
|
const a = S.generateKey({
|
|
3441
3439
|
secret: this.secret,
|
|
3442
3440
|
token: s.token,
|
|
3443
3441
|
position: s.position
|
|
3444
|
-
}), c =
|
|
3442
|
+
}), c = Ue(a, 128), u = this.normalizedHash();
|
|
3445
3443
|
let l = "";
|
|
3446
3444
|
for (const d in c) {
|
|
3447
3445
|
let b = c[d];
|
|
3448
3446
|
for (let A = 0, O = 8 - u[d]; A < O; A++)
|
|
3449
|
-
b = new
|
|
3447
|
+
b = new F("SHAKE256", "TEXT").update(b).getHash("HEX", { outputLen: 512 });
|
|
3450
3448
|
l += b;
|
|
3451
3449
|
}
|
|
3452
|
-
n && (l =
|
|
3453
|
-
const h =
|
|
3450
|
+
n && (l = dn(l));
|
|
3451
|
+
const h = Ue(l, Math.ceil(l.length / this.atoms.length));
|
|
3454
3452
|
let p = null;
|
|
3455
3453
|
for (let d = 0, b = h.length; d < b; d++)
|
|
3456
3454
|
this.atoms[d].otsFragment = h[d], p = this.atoms[d].position;
|
|
@@ -3558,7 +3556,7 @@ class z {
|
|
|
3558
3556
|
const r = typeof e == "string" ? JSON.parse(e) : e;
|
|
3559
3557
|
if (s && (!r.molecularHash || !Array.isArray(r.atoms)))
|
|
3560
3558
|
throw new Error("Invalid molecule data: missing molecularHash or atoms array");
|
|
3561
|
-
const i = new
|
|
3559
|
+
const i = new V({
|
|
3562
3560
|
secret: null,
|
|
3563
3561
|
bundle: r.bundle || null,
|
|
3564
3562
|
cellSlug: r.cellSlug || null,
|
|
@@ -3595,7 +3593,7 @@ class z {
|
|
|
3595
3593
|
* @param senderWallet
|
|
3596
3594
|
*/
|
|
3597
3595
|
check(e = null) {
|
|
3598
|
-
return new
|
|
3596
|
+
return new Ae(this).verify(e);
|
|
3599
3597
|
}
|
|
3600
3598
|
/**
|
|
3601
3599
|
* Convert Hm to numeric notation via EnumerateMolecule(Hm)
|
|
@@ -3603,10 +3601,10 @@ class z {
|
|
|
3603
3601
|
* @returns {Array}
|
|
3604
3602
|
*/
|
|
3605
3603
|
normalizedHash() {
|
|
3606
|
-
return
|
|
3604
|
+
return V.normalize(V.enumerate(this.molecularHash));
|
|
3607
3605
|
}
|
|
3608
3606
|
}
|
|
3609
|
-
class
|
|
3607
|
+
class ve {
|
|
3610
3608
|
/**
|
|
3611
3609
|
*
|
|
3612
3610
|
* @param {string} token
|
|
@@ -3629,7 +3627,7 @@ class xe {
|
|
|
3629
3627
|
* @returns {AuthToken}
|
|
3630
3628
|
*/
|
|
3631
3629
|
static create(e, t) {
|
|
3632
|
-
const n = new
|
|
3630
|
+
const n = new ve(e);
|
|
3633
3631
|
return n.setWallet(t), n;
|
|
3634
3632
|
}
|
|
3635
3633
|
/**
|
|
@@ -3645,7 +3643,7 @@ class xe {
|
|
|
3645
3643
|
position: e.wallet.position,
|
|
3646
3644
|
characters: e.wallet.characters
|
|
3647
3645
|
});
|
|
3648
|
-
return
|
|
3646
|
+
return ve.create({
|
|
3649
3647
|
token: e.token,
|
|
3650
3648
|
expiresAt: e.expiresAt,
|
|
3651
3649
|
pubkey: e.pubkey,
|
|
@@ -3722,14 +3720,14 @@ class xe {
|
|
|
3722
3720
|
};
|
|
3723
3721
|
}
|
|
3724
3722
|
}
|
|
3725
|
-
const
|
|
3726
|
-
class
|
|
3723
|
+
const Ye = 10 ** 18;
|
|
3724
|
+
class le {
|
|
3727
3725
|
/**
|
|
3728
3726
|
* @param {number} value
|
|
3729
3727
|
* @return {number}
|
|
3730
3728
|
*/
|
|
3731
3729
|
static val(e) {
|
|
3732
|
-
return Math.abs(e *
|
|
3730
|
+
return Math.abs(e * Ye) < 1 ? 0 : e;
|
|
3733
3731
|
}
|
|
3734
3732
|
/**
|
|
3735
3733
|
* @param {number} value1
|
|
@@ -3738,7 +3736,7 @@ class ce {
|
|
|
3738
3736
|
* @return {number}
|
|
3739
3737
|
*/
|
|
3740
3738
|
static cmp(e, t, n = !1) {
|
|
3741
|
-
const s =
|
|
3739
|
+
const s = le.val(e) * Ye, r = le.val(t) * Ye;
|
|
3742
3740
|
return Math.abs(s - r) < 1 ? 0 : s > r ? 1 : -1;
|
|
3743
3741
|
}
|
|
3744
3742
|
/**
|
|
@@ -3747,10 +3745,10 @@ class ce {
|
|
|
3747
3745
|
* @return {boolean}
|
|
3748
3746
|
*/
|
|
3749
3747
|
static equal(e, t) {
|
|
3750
|
-
return
|
|
3748
|
+
return le.cmp(e, t) === 0;
|
|
3751
3749
|
}
|
|
3752
3750
|
}
|
|
3753
|
-
class
|
|
3751
|
+
class ee extends x {
|
|
3754
3752
|
/**
|
|
3755
3753
|
* Class constructor
|
|
3756
3754
|
*
|
|
@@ -3762,7 +3760,7 @@ class te extends x {
|
|
|
3762
3760
|
super(e, t, n), this.name = "InvalidResponseException";
|
|
3763
3761
|
}
|
|
3764
3762
|
}
|
|
3765
|
-
class
|
|
3763
|
+
class Pe extends x {
|
|
3766
3764
|
/**
|
|
3767
3765
|
* Class constructor
|
|
3768
3766
|
*
|
|
@@ -3788,14 +3786,14 @@ let C = class {
|
|
|
3788
3786
|
dataKey: n = null
|
|
3789
3787
|
}) {
|
|
3790
3788
|
if (this.dataKey = n, this.errorKey = "exception", this.$__payload = null, this.$__query = e, this.$__originResponse = t, this.$__response = t, typeof this.$__response > "u" || this.$__response === null)
|
|
3791
|
-
throw new
|
|
3789
|
+
throw new ee();
|
|
3792
3790
|
if (M.has(this.$__response, this.errorKey)) {
|
|
3793
3791
|
const s = M.get(this.$__response, this.errorKey);
|
|
3794
|
-
throw String(s).includes("Unauthenticated") ? new
|
|
3792
|
+
throw String(s).includes("Unauthenticated") ? new Pe() : new ee();
|
|
3795
3793
|
}
|
|
3796
3794
|
if (this.$__response.errors && Array.isArray(this.$__response.errors) && this.$__response.errors.length > 0) {
|
|
3797
3795
|
const s = this.$__response.errors[0].message || "Unknown GraphQL error";
|
|
3798
|
-
throw s.includes("Unauthenticated") ? new
|
|
3796
|
+
throw s.includes("Unauthenticated") ? new Pe() : new ee(`GraphQL Error: ${s}`);
|
|
3799
3797
|
}
|
|
3800
3798
|
this.init();
|
|
3801
3799
|
}
|
|
@@ -3811,9 +3809,9 @@ let C = class {
|
|
|
3811
3809
|
if (!this.dataKey)
|
|
3812
3810
|
return this.response();
|
|
3813
3811
|
if (!this.response().data)
|
|
3814
|
-
throw new
|
|
3812
|
+
throw new ee("Response has no data field");
|
|
3815
3813
|
if (!M.has(this.response(), this.dataKey))
|
|
3816
|
-
throw new
|
|
3814
|
+
throw new ee(`Missing expected field: ${this.dataKey}`);
|
|
3817
3815
|
return M.get(this.response(), this.dataKey);
|
|
3818
3816
|
}
|
|
3819
3817
|
/**
|
|
@@ -3845,8 +3843,7 @@ let C = class {
|
|
|
3845
3843
|
* @return {boolean}
|
|
3846
3844
|
*/
|
|
3847
3845
|
success() {
|
|
3848
|
-
|
|
3849
|
-
return !((t = (e = this.$__response) == null ? void 0 : e.errors) != null && t.length);
|
|
3846
|
+
return !this.$__response?.errors?.length;
|
|
3850
3847
|
}
|
|
3851
3848
|
/**
|
|
3852
3849
|
* Get error message if any
|
|
@@ -3854,8 +3851,7 @@ let C = class {
|
|
|
3854
3851
|
* @return {string|null}
|
|
3855
3852
|
*/
|
|
3856
3853
|
error() {
|
|
3857
|
-
|
|
3858
|
-
return (t = (e = this.$__response) == null ? void 0 : e.errors) != null && t.length ? this.$__response.errors[0].message || "Unknown error" : null;
|
|
3854
|
+
return this.$__response?.errors?.length ? this.$__response.errors[0].message || "Unknown error" : null;
|
|
3859
3855
|
}
|
|
3860
3856
|
/**
|
|
3861
3857
|
* Enhanced interface methods for standardized response handling
|
|
@@ -3872,7 +3868,6 @@ let C = class {
|
|
|
3872
3868
|
* @return {object}
|
|
3873
3869
|
*/
|
|
3874
3870
|
toValidationResult() {
|
|
3875
|
-
var e;
|
|
3876
3871
|
return this.success() && this.payload() !== null ? {
|
|
3877
3872
|
success: !0,
|
|
3878
3873
|
data: this.payload(),
|
|
@@ -3882,7 +3877,7 @@ let C = class {
|
|
|
3882
3877
|
error: {
|
|
3883
3878
|
message: this.reason() || "Unknown error",
|
|
3884
3879
|
context: this.constructor.name,
|
|
3885
|
-
details:
|
|
3880
|
+
details: this.$__response?.errors || []
|
|
3886
3881
|
}
|
|
3887
3882
|
};
|
|
3888
3883
|
}
|
|
@@ -3920,15 +3915,14 @@ let C = class {
|
|
|
3920
3915
|
* @return {Response}
|
|
3921
3916
|
*/
|
|
3922
3917
|
debug(e = null) {
|
|
3923
|
-
var n, s, r;
|
|
3924
3918
|
const t = e ? `[${e}]` : `[${this.constructor.name}]`;
|
|
3925
3919
|
return this.success() ? console.debug(`${t} Success:`, {
|
|
3926
3920
|
payload: this.payload(),
|
|
3927
|
-
query:
|
|
3921
|
+
query: this.$__query?.constructor?.name,
|
|
3928
3922
|
dataKey: this.dataKey
|
|
3929
3923
|
}) : console.debug(`${t} Failure:`, {
|
|
3930
3924
|
error: this.reason(),
|
|
3931
|
-
errors:
|
|
3925
|
+
errors: this.$__response?.errors,
|
|
3932
3926
|
rawData: this.$__response
|
|
3933
3927
|
}), this;
|
|
3934
3928
|
}
|
|
@@ -4002,9 +3996,9 @@ class N {
|
|
|
4002
3996
|
*/
|
|
4003
3997
|
createQuery({ variables: e = null }) {
|
|
4004
3998
|
if (this.$__variables = this.compiledVariables(e), !this.uri())
|
|
4005
|
-
throw new
|
|
3999
|
+
throw new Y("Query::createQuery() - Node URI was not initialized for this client instance!");
|
|
4006
4000
|
if (this.$__query === null)
|
|
4007
|
-
throw new
|
|
4001
|
+
throw new Y("Query::createQuery() - GraphQL subscription was not initialized!");
|
|
4008
4002
|
return {
|
|
4009
4003
|
query: this.$__query,
|
|
4010
4004
|
variables: this.variables()
|
|
@@ -4067,7 +4061,7 @@ class N {
|
|
|
4067
4061
|
return {};
|
|
4068
4062
|
}
|
|
4069
4063
|
}
|
|
4070
|
-
class
|
|
4064
|
+
class ls extends C {
|
|
4071
4065
|
/**
|
|
4072
4066
|
* Class constructor
|
|
4073
4067
|
*
|
|
@@ -4098,7 +4092,7 @@ class hs extends C {
|
|
|
4098
4092
|
}), e.address = t.address, e.position = t.position, e.bundle = t.bundleHash, e.batchId = t.batchId, e.characters = t.characters, e.pubkey = t.pubkey, e.balance = String(t.amount != null ? t.amount : 0)), e;
|
|
4099
4093
|
}
|
|
4100
4094
|
}
|
|
4101
|
-
class
|
|
4095
|
+
class cs extends N {
|
|
4102
4096
|
/**
|
|
4103
4097
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4104
4098
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4132,13 +4126,13 @@ class ds extends N {
|
|
|
4132
4126
|
* @return {ResponseContinuId}
|
|
4133
4127
|
*/
|
|
4134
4128
|
createResponse(e) {
|
|
4135
|
-
return new
|
|
4129
|
+
return new ls({
|
|
4136
4130
|
query: this,
|
|
4137
4131
|
json: e
|
|
4138
4132
|
});
|
|
4139
4133
|
}
|
|
4140
4134
|
}
|
|
4141
|
-
class
|
|
4135
|
+
class us extends C {
|
|
4142
4136
|
/**
|
|
4143
4137
|
* Class constructor
|
|
4144
4138
|
*
|
|
@@ -4166,11 +4160,11 @@ class ps extends C {
|
|
|
4166
4160
|
return null;
|
|
4167
4161
|
const t = {};
|
|
4168
4162
|
return e.forEach((n) => {
|
|
4169
|
-
n.metas =
|
|
4163
|
+
n.metas = he.aggregateMeta(n.metas), t[n.bundleHash] = n;
|
|
4170
4164
|
}), t;
|
|
4171
4165
|
}
|
|
4172
4166
|
}
|
|
4173
|
-
class
|
|
4167
|
+
class hs extends N {
|
|
4174
4168
|
/**
|
|
4175
4169
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4176
4170
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4197,7 +4191,7 @@ class fs extends N {
|
|
|
4197
4191
|
* @return {ResponseWalletBundle}
|
|
4198
4192
|
*/
|
|
4199
4193
|
createResponse(e) {
|
|
4200
|
-
return new
|
|
4194
|
+
return new us({
|
|
4201
4195
|
query: this,
|
|
4202
4196
|
json: e
|
|
4203
4197
|
});
|
|
@@ -4245,7 +4239,7 @@ class Le extends C {
|
|
|
4245
4239
|
characters: e.characters
|
|
4246
4240
|
}), n.address = e.address, n.bundle = e.bundleHash), e.token && (n.tokenName = e.token.name, n.tokenAmount = e.token.amount, n.tokenSupply = e.token.supply, n.tokenFungibility = e.token.fungibility), e.tokenUnits.length)
|
|
4247
4241
|
for (const s of e.tokenUnits)
|
|
4248
|
-
n.tokenUnits.push(
|
|
4242
|
+
n.tokenUnits.push(pe.createFromGraphQL(s));
|
|
4249
4243
|
if (e.tradeRates.length)
|
|
4250
4244
|
for (const s of e.tradeRates)
|
|
4251
4245
|
n.tradeRates[s.tokenSlug] = s.amount;
|
|
@@ -4278,7 +4272,7 @@ class Le extends C {
|
|
|
4278
4272
|
return this.getWallets();
|
|
4279
4273
|
}
|
|
4280
4274
|
}
|
|
4281
|
-
class
|
|
4275
|
+
class ds extends N {
|
|
4282
4276
|
/**
|
|
4283
4277
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4284
4278
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4326,7 +4320,7 @@ class ms extends N {
|
|
|
4326
4320
|
});
|
|
4327
4321
|
}
|
|
4328
4322
|
}
|
|
4329
|
-
class
|
|
4323
|
+
class ps extends C {
|
|
4330
4324
|
/**
|
|
4331
4325
|
* Class constructor
|
|
4332
4326
|
*
|
|
@@ -4355,7 +4349,7 @@ class ys extends C {
|
|
|
4355
4349
|
});
|
|
4356
4350
|
}
|
|
4357
4351
|
}
|
|
4358
|
-
class
|
|
4352
|
+
class fs extends N {
|
|
4359
4353
|
/**
|
|
4360
4354
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4361
4355
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4390,13 +4384,13 @@ class gs extends N {
|
|
|
4390
4384
|
* @return {ResponseBalance}
|
|
4391
4385
|
*/
|
|
4392
4386
|
createResponse(e) {
|
|
4393
|
-
return new
|
|
4387
|
+
return new ps({
|
|
4394
4388
|
query: this,
|
|
4395
4389
|
json: e
|
|
4396
4390
|
});
|
|
4397
4391
|
}
|
|
4398
4392
|
}
|
|
4399
|
-
class
|
|
4393
|
+
class ms extends C {
|
|
4400
4394
|
/**
|
|
4401
4395
|
* Class constructor
|
|
4402
4396
|
*
|
|
@@ -4430,7 +4424,7 @@ class bs extends C {
|
|
|
4430
4424
|
return n.instances && (t.instances = n.instances), n.instanceCount && (t.instanceCount = n.instanceCount), n.paginatorInfo && (t.paginatorInfo = n.paginatorInfo), t;
|
|
4431
4425
|
}
|
|
4432
4426
|
}
|
|
4433
|
-
class
|
|
4427
|
+
class $t extends N {
|
|
4434
4428
|
/**
|
|
4435
4429
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4436
4430
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4499,13 +4493,13 @@ class At extends N {
|
|
|
4499
4493
|
* @return {ResponseMetaType}
|
|
4500
4494
|
*/
|
|
4501
4495
|
createResponse(e) {
|
|
4502
|
-
return new
|
|
4496
|
+
return new ms({
|
|
4503
4497
|
query: this,
|
|
4504
4498
|
json: e
|
|
4505
4499
|
});
|
|
4506
4500
|
}
|
|
4507
4501
|
}
|
|
4508
|
-
class
|
|
4502
|
+
class xe extends N {
|
|
4509
4503
|
/**
|
|
4510
4504
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4511
4505
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4513,9 +4507,9 @@ class Ie extends N {
|
|
|
4513
4507
|
constructor(e, t) {
|
|
4514
4508
|
super(e, t), this.$__query = E`query( $batchId: String ) {
|
|
4515
4509
|
Batch( batchId: $batchId ) {
|
|
4516
|
-
${
|
|
4510
|
+
${xe.getFields()},
|
|
4517
4511
|
children {
|
|
4518
|
-
${
|
|
4512
|
+
${xe.getFields()}
|
|
4519
4513
|
}
|
|
4520
4514
|
}
|
|
4521
4515
|
}`;
|
|
@@ -4586,7 +4580,7 @@ class Ie extends N {
|
|
|
4586
4580
|
return t.dataKey = "data.Batch", t;
|
|
4587
4581
|
}
|
|
4588
4582
|
}
|
|
4589
|
-
class
|
|
4583
|
+
class ys extends N {
|
|
4590
4584
|
/**
|
|
4591
4585
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4592
4586
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4594,7 +4588,7 @@ class ws extends N {
|
|
|
4594
4588
|
constructor(e, t) {
|
|
4595
4589
|
super(e, t), this.$__query = E`query( $batchId: String ) {
|
|
4596
4590
|
BatchHistory( batchId: $batchId ) {
|
|
4597
|
-
${
|
|
4591
|
+
${xe.getFields()}
|
|
4598
4592
|
}
|
|
4599
4593
|
}`;
|
|
4600
4594
|
}
|
|
@@ -4612,7 +4606,7 @@ class ws extends N {
|
|
|
4612
4606
|
return t.dataKey = "data.BatchHistory", t;
|
|
4613
4607
|
}
|
|
4614
4608
|
}
|
|
4615
|
-
class
|
|
4609
|
+
class D extends C {
|
|
4616
4610
|
/**
|
|
4617
4611
|
* Class constructor
|
|
4618
4612
|
*
|
|
@@ -4655,7 +4649,7 @@ class V extends C {
|
|
|
4655
4649
|
const e = this.data();
|
|
4656
4650
|
if (!e)
|
|
4657
4651
|
return null;
|
|
4658
|
-
const t = new
|
|
4652
|
+
const t = new V({});
|
|
4659
4653
|
return t.molecularHash = M.get(e, "molecularHash"), t.status = M.get(e, "status"), t.createdAt = M.get(e, "createdAt"), t;
|
|
4660
4654
|
}
|
|
4661
4655
|
/**
|
|
@@ -4691,7 +4685,7 @@ class V extends C {
|
|
|
4691
4685
|
return this.$__payload;
|
|
4692
4686
|
}
|
|
4693
4687
|
}
|
|
4694
|
-
class
|
|
4688
|
+
class Fe extends N {
|
|
4695
4689
|
/**
|
|
4696
4690
|
* Creates a new Request for the given parameters
|
|
4697
4691
|
*
|
|
@@ -4735,7 +4729,7 @@ class Qe extends N {
|
|
|
4735
4729
|
return {};
|
|
4736
4730
|
}
|
|
4737
4731
|
}
|
|
4738
|
-
class W extends
|
|
4732
|
+
class W extends Fe {
|
|
4739
4733
|
/**
|
|
4740
4734
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4741
4735
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -4773,7 +4767,7 @@ class W extends Qe {
|
|
|
4773
4767
|
* @return {ResponseProposeMolecule}
|
|
4774
4768
|
*/
|
|
4775
4769
|
createResponse(e) {
|
|
4776
|
-
return new
|
|
4770
|
+
return new D({
|
|
4777
4771
|
query: this,
|
|
4778
4772
|
json: e
|
|
4779
4773
|
});
|
|
@@ -4806,7 +4800,7 @@ class W extends Qe {
|
|
|
4806
4800
|
return this.$__molecule;
|
|
4807
4801
|
}
|
|
4808
4802
|
}
|
|
4809
|
-
class
|
|
4803
|
+
class gs extends D {
|
|
4810
4804
|
/**
|
|
4811
4805
|
* return the authorization key
|
|
4812
4806
|
*
|
|
@@ -4815,7 +4809,7 @@ class ks extends V {
|
|
|
4815
4809
|
*/
|
|
4816
4810
|
payloadKey(e) {
|
|
4817
4811
|
if (!M.has(this.payload(), e))
|
|
4818
|
-
throw new
|
|
4812
|
+
throw new ee(`ResponseRequestAuthorization::payloadKey() - '${e}' key was not found in the payload!`);
|
|
4819
4813
|
return M.get(this.payload(), e);
|
|
4820
4814
|
}
|
|
4821
4815
|
/**
|
|
@@ -4867,7 +4861,7 @@ class ks extends V {
|
|
|
4867
4861
|
return this.payloadKey("key");
|
|
4868
4862
|
}
|
|
4869
4863
|
}
|
|
4870
|
-
class
|
|
4864
|
+
class bs extends W {
|
|
4871
4865
|
/**
|
|
4872
4866
|
*
|
|
4873
4867
|
* @param {object} meta
|
|
@@ -4882,15 +4876,15 @@ class _s extends W {
|
|
|
4882
4876
|
* @return {ResponseRequestAuthorization}
|
|
4883
4877
|
*/
|
|
4884
4878
|
createResponse(e) {
|
|
4885
|
-
return new
|
|
4879
|
+
return new gs({
|
|
4886
4880
|
query: this,
|
|
4887
4881
|
json: e
|
|
4888
4882
|
});
|
|
4889
4883
|
}
|
|
4890
4884
|
}
|
|
4891
|
-
class
|
|
4885
|
+
class ws extends D {
|
|
4892
4886
|
}
|
|
4893
|
-
class
|
|
4887
|
+
class ks extends W {
|
|
4894
4888
|
/**
|
|
4895
4889
|
* @param {Wallet|null} recipientWallet
|
|
4896
4890
|
* @param {number|null} amount
|
|
@@ -4916,15 +4910,15 @@ class $s extends W {
|
|
|
4916
4910
|
* @return {ResponseCreateToken}
|
|
4917
4911
|
*/
|
|
4918
4912
|
createResponse(e) {
|
|
4919
|
-
return new
|
|
4913
|
+
return new ws({
|
|
4920
4914
|
query: this,
|
|
4921
4915
|
json: e
|
|
4922
4916
|
});
|
|
4923
4917
|
}
|
|
4924
4918
|
}
|
|
4925
|
-
class
|
|
4919
|
+
class _s extends D {
|
|
4926
4920
|
}
|
|
4927
|
-
class
|
|
4921
|
+
class Ss extends W {
|
|
4928
4922
|
/**
|
|
4929
4923
|
* Fills a Molecule with the appropriate atoms and prepares for broadcast
|
|
4930
4924
|
*
|
|
@@ -4959,13 +4953,13 @@ class vs extends W {
|
|
|
4959
4953
|
* @return {ResponseRequestTokens}
|
|
4960
4954
|
*/
|
|
4961
4955
|
createResponse(e) {
|
|
4962
|
-
return new
|
|
4956
|
+
return new _s({
|
|
4963
4957
|
query: this,
|
|
4964
4958
|
json: e
|
|
4965
4959
|
});
|
|
4966
4960
|
}
|
|
4967
4961
|
}
|
|
4968
|
-
class
|
|
4962
|
+
class $s extends D {
|
|
4969
4963
|
/**
|
|
4970
4964
|
* Returns result of the transfer
|
|
4971
4965
|
*
|
|
@@ -4979,7 +4973,7 @@ class xs extends V {
|
|
|
4979
4973
|
return e.reason = typeof t.reason > "u" ? "Invalid response from server" : t.reason, e.status = typeof t.status > "u" ? "rejected" : t.status, e;
|
|
4980
4974
|
}
|
|
4981
4975
|
}
|
|
4982
|
-
class
|
|
4976
|
+
class At extends W {
|
|
4983
4977
|
/**
|
|
4984
4978
|
* Fills the Molecule with provided wallet and amount data
|
|
4985
4979
|
*
|
|
@@ -5017,15 +5011,15 @@ class vt extends W {
|
|
|
5017
5011
|
* @return {ResponseTransferTokens}
|
|
5018
5012
|
*/
|
|
5019
5013
|
createResponse(e) {
|
|
5020
|
-
return new
|
|
5014
|
+
return new $s({
|
|
5021
5015
|
query: this,
|
|
5022
5016
|
json: e
|
|
5023
5017
|
});
|
|
5024
5018
|
}
|
|
5025
5019
|
}
|
|
5026
|
-
class
|
|
5020
|
+
class As extends D {
|
|
5027
5021
|
}
|
|
5028
|
-
class
|
|
5022
|
+
class vs extends W {
|
|
5029
5023
|
fillMolecule({
|
|
5030
5024
|
type: e,
|
|
5031
5025
|
contact: t,
|
|
@@ -5044,15 +5038,15 @@ class Ms extends W {
|
|
|
5044
5038
|
* @return {ResponseCreateIdentifier}
|
|
5045
5039
|
*/
|
|
5046
5040
|
createResponse(e) {
|
|
5047
|
-
return new
|
|
5041
|
+
return new As({
|
|
5048
5042
|
query: this,
|
|
5049
5043
|
json: e
|
|
5050
5044
|
});
|
|
5051
5045
|
}
|
|
5052
5046
|
}
|
|
5053
|
-
class
|
|
5047
|
+
class xs extends D {
|
|
5054
5048
|
}
|
|
5055
|
-
class
|
|
5049
|
+
class Is extends W {
|
|
5056
5050
|
/**
|
|
5057
5051
|
* Class constructor
|
|
5058
5052
|
*
|
|
@@ -5078,15 +5072,15 @@ class Cs extends W {
|
|
|
5078
5072
|
* @return {ResponseClaimShadowWallet}
|
|
5079
5073
|
*/
|
|
5080
5074
|
createResponse(e) {
|
|
5081
|
-
return new
|
|
5075
|
+
return new xs({
|
|
5082
5076
|
query: this,
|
|
5083
5077
|
json: e
|
|
5084
5078
|
});
|
|
5085
5079
|
}
|
|
5086
5080
|
}
|
|
5087
|
-
class
|
|
5081
|
+
class Ms extends D {
|
|
5088
5082
|
}
|
|
5089
|
-
class
|
|
5083
|
+
class Ts extends W {
|
|
5090
5084
|
/**
|
|
5091
5085
|
* Fills a molecule with an appropriate metadata atom
|
|
5092
5086
|
*
|
|
@@ -5115,15 +5109,15 @@ class Os extends W {
|
|
|
5115
5109
|
* @return {ResponseCreateMeta}
|
|
5116
5110
|
*/
|
|
5117
5111
|
createResponse(e) {
|
|
5118
|
-
return new
|
|
5112
|
+
return new Ms({
|
|
5119
5113
|
query: this,
|
|
5120
5114
|
json: e
|
|
5121
5115
|
});
|
|
5122
5116
|
}
|
|
5123
5117
|
}
|
|
5124
|
-
class
|
|
5118
|
+
class Cs extends D {
|
|
5125
5119
|
}
|
|
5126
|
-
class
|
|
5120
|
+
class Es extends W {
|
|
5127
5121
|
/**
|
|
5128
5122
|
* Fills a molecule with a P-isotope peering atom
|
|
5129
5123
|
*
|
|
@@ -5143,15 +5137,15 @@ class qs extends W {
|
|
|
5143
5137
|
* @return {ResponsePeering}
|
|
5144
5138
|
*/
|
|
5145
5139
|
createResponse(e) {
|
|
5146
|
-
return new
|
|
5140
|
+
return new Cs({
|
|
5147
5141
|
query: this,
|
|
5148
5142
|
json: e
|
|
5149
5143
|
});
|
|
5150
5144
|
}
|
|
5151
5145
|
}
|
|
5152
|
-
class
|
|
5146
|
+
class Os extends D {
|
|
5153
5147
|
}
|
|
5154
|
-
class
|
|
5148
|
+
class Rs extends W {
|
|
5155
5149
|
/**
|
|
5156
5150
|
* Fills a molecule with an A-isotope append request atom
|
|
5157
5151
|
*
|
|
@@ -5180,13 +5174,13 @@ class Us extends W {
|
|
|
5180
5174
|
* @return {ResponseAppendRequest}
|
|
5181
5175
|
*/
|
|
5182
5176
|
createResponse(e) {
|
|
5183
|
-
return new
|
|
5177
|
+
return new Os({
|
|
5184
5178
|
query: this,
|
|
5185
5179
|
json: e
|
|
5186
5180
|
});
|
|
5187
5181
|
}
|
|
5188
5182
|
}
|
|
5189
|
-
class
|
|
5183
|
+
class qs extends C {
|
|
5190
5184
|
/**
|
|
5191
5185
|
* Class constructor
|
|
5192
5186
|
*
|
|
@@ -5220,7 +5214,7 @@ class Bs extends C {
|
|
|
5220
5214
|
return M.get(this.data(), "message");
|
|
5221
5215
|
}
|
|
5222
5216
|
}
|
|
5223
|
-
class
|
|
5217
|
+
class Ws extends Fe {
|
|
5224
5218
|
/**
|
|
5225
5219
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5226
5220
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -5243,15 +5237,15 @@ class Hs extends Qe {
|
|
|
5243
5237
|
* @return {ResponseLinkIdentifier}
|
|
5244
5238
|
*/
|
|
5245
5239
|
createResponse(e) {
|
|
5246
|
-
return new
|
|
5240
|
+
return new qs({
|
|
5247
5241
|
query: this,
|
|
5248
5242
|
json: e
|
|
5249
5243
|
});
|
|
5250
5244
|
}
|
|
5251
5245
|
}
|
|
5252
|
-
class
|
|
5246
|
+
class Us extends D {
|
|
5253
5247
|
}
|
|
5254
|
-
class
|
|
5248
|
+
class Bs extends W {
|
|
5255
5249
|
fillMolecule(e) {
|
|
5256
5250
|
this.$__molecule.initWalletCreation(e), this.$__molecule.sign({}), this.$__molecule.check();
|
|
5257
5251
|
}
|
|
@@ -5262,13 +5256,13 @@ class Ks extends W {
|
|
|
5262
5256
|
* @return {ResponseCreateWallet}
|
|
5263
5257
|
*/
|
|
5264
5258
|
createResponse(e) {
|
|
5265
|
-
return new
|
|
5259
|
+
return new Us({
|
|
5266
5260
|
query: this,
|
|
5267
5261
|
json: e
|
|
5268
5262
|
});
|
|
5269
5263
|
}
|
|
5270
5264
|
}
|
|
5271
|
-
class
|
|
5265
|
+
class Hs extends C {
|
|
5272
5266
|
/**
|
|
5273
5267
|
* Class constructor
|
|
5274
5268
|
*
|
|
@@ -5317,7 +5311,7 @@ class Ns extends C {
|
|
|
5317
5311
|
*/
|
|
5318
5312
|
payloadKey(e) {
|
|
5319
5313
|
if (!M.has(this.payload(), e))
|
|
5320
|
-
throw new
|
|
5314
|
+
throw new ee(`ResponseAuthorizationGuest::payloadKey() - '${e}' key is not found in the payload!`);
|
|
5321
5315
|
return M.get(this.payload(), e);
|
|
5322
5316
|
}
|
|
5323
5317
|
/**
|
|
@@ -5370,7 +5364,7 @@ class Ns extends C {
|
|
|
5370
5364
|
return this.payloadKey("encrypt");
|
|
5371
5365
|
}
|
|
5372
5366
|
}
|
|
5373
|
-
class
|
|
5367
|
+
class Ps extends Fe {
|
|
5374
5368
|
/**
|
|
5375
5369
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5376
5370
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -5391,13 +5385,13 @@ class Fs extends Qe {
|
|
|
5391
5385
|
* @return {ResponseRequestAuthorizationGuest}
|
|
5392
5386
|
*/
|
|
5393
5387
|
createResponse(e) {
|
|
5394
|
-
return new
|
|
5388
|
+
return new Hs({
|
|
5395
5389
|
query: this,
|
|
5396
5390
|
json: e
|
|
5397
5391
|
});
|
|
5398
5392
|
}
|
|
5399
5393
|
}
|
|
5400
|
-
class
|
|
5394
|
+
class vt extends x {
|
|
5401
5395
|
/**
|
|
5402
5396
|
* Class constructor
|
|
5403
5397
|
*
|
|
@@ -5409,7 +5403,7 @@ class xt extends x {
|
|
|
5409
5403
|
super(e, t, n), this.name = "WalletShadowException";
|
|
5410
5404
|
}
|
|
5411
5405
|
}
|
|
5412
|
-
class
|
|
5406
|
+
class Ks extends x {
|
|
5413
5407
|
/**
|
|
5414
5408
|
* Class constructor
|
|
5415
5409
|
*
|
|
@@ -5421,7 +5415,7 @@ class Ls extends x {
|
|
|
5421
5415
|
super(e, t, n), this.name = "StackableUnitDecimalsException";
|
|
5422
5416
|
}
|
|
5423
5417
|
}
|
|
5424
|
-
class
|
|
5418
|
+
class ke extends x {
|
|
5425
5419
|
/**
|
|
5426
5420
|
* Class constructor
|
|
5427
5421
|
*
|
|
@@ -5433,7 +5427,7 @@ class _e extends x {
|
|
|
5433
5427
|
super(e, t, n), this.name = "StackableUnitAmountException";
|
|
5434
5428
|
}
|
|
5435
5429
|
}
|
|
5436
|
-
class
|
|
5430
|
+
class Qe {
|
|
5437
5431
|
/**
|
|
5438
5432
|
*
|
|
5439
5433
|
* @param {UrqlClientWrapper} graphQLClient
|
|
@@ -5451,9 +5445,9 @@ class je {
|
|
|
5451
5445
|
variables: e = null
|
|
5452
5446
|
}) {
|
|
5453
5447
|
if (this.$__variables = this.compiledVariables(e), !this.uri())
|
|
5454
|
-
throw new
|
|
5448
|
+
throw new Y("Subscribe::createSubscribe() - Node URI was not initialized for this client instance!");
|
|
5455
5449
|
if (this.$__subscribe === null)
|
|
5456
|
-
throw new
|
|
5450
|
+
throw new Y("Subscribe::createSubscribe() - GraphQL subscription was not initialized!");
|
|
5457
5451
|
return {
|
|
5458
5452
|
query: this.$__subscribe,
|
|
5459
5453
|
variables: this.variables(),
|
|
@@ -5472,7 +5466,7 @@ class je {
|
|
|
5472
5466
|
closure: t
|
|
5473
5467
|
}) {
|
|
5474
5468
|
if (!t)
|
|
5475
|
-
throw new
|
|
5469
|
+
throw new Y(`${this.constructor.name}::execute() - closure parameter is required!`);
|
|
5476
5470
|
return this.$__request = this.createSubscribe({
|
|
5477
5471
|
variables: e
|
|
5478
5472
|
}), this.client.subscribe(this.$__request, t);
|
|
@@ -5503,7 +5497,7 @@ class je {
|
|
|
5503
5497
|
return this.$__variables;
|
|
5504
5498
|
}
|
|
5505
5499
|
}
|
|
5506
|
-
class
|
|
5500
|
+
class Ns extends Qe {
|
|
5507
5501
|
constructor(e) {
|
|
5508
5502
|
super(e), this.$__subscribe = E`
|
|
5509
5503
|
subscription onCreateMolecule ( $bundle: String! ) {
|
|
@@ -5553,7 +5547,7 @@ class Qs extends je {
|
|
|
5553
5547
|
`;
|
|
5554
5548
|
}
|
|
5555
5549
|
}
|
|
5556
|
-
class
|
|
5550
|
+
class Ls extends Qe {
|
|
5557
5551
|
constructor(e) {
|
|
5558
5552
|
super(e), this.$__subscribe = E`
|
|
5559
5553
|
subscription onWalletStatus ( $bundle: String!, $token: String! ) {
|
|
@@ -5567,7 +5561,7 @@ class js extends je {
|
|
|
5567
5561
|
`;
|
|
5568
5562
|
}
|
|
5569
5563
|
}
|
|
5570
|
-
class
|
|
5564
|
+
class Fs extends Qe {
|
|
5571
5565
|
constructor(e) {
|
|
5572
5566
|
super(e), this.$__subscribe = E`
|
|
5573
5567
|
subscription onActiveWallet ( $bundle: String! ) {
|
|
@@ -5610,7 +5604,7 @@ class Ds extends je {
|
|
|
5610
5604
|
`;
|
|
5611
5605
|
}
|
|
5612
5606
|
}
|
|
5613
|
-
class
|
|
5607
|
+
class Qs extends Qe {
|
|
5614
5608
|
constructor(e) {
|
|
5615
5609
|
super(e), this.$__subscribe = E`
|
|
5616
5610
|
subscription onActiveUser ( $metaType: String!, $metaId: String! ) {
|
|
@@ -5625,7 +5619,7 @@ class Vs extends je {
|
|
|
5625
5619
|
}`;
|
|
5626
5620
|
}
|
|
5627
5621
|
}
|
|
5628
|
-
class
|
|
5622
|
+
class js extends C {
|
|
5629
5623
|
/**
|
|
5630
5624
|
* Class constructor
|
|
5631
5625
|
*
|
|
@@ -5643,7 +5637,7 @@ class zs extends C {
|
|
|
5643
5637
|
});
|
|
5644
5638
|
}
|
|
5645
5639
|
}
|
|
5646
|
-
class
|
|
5640
|
+
class Ds extends Fe {
|
|
5647
5641
|
/**
|
|
5648
5642
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5649
5643
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -5686,13 +5680,13 @@ class Js extends Qe {
|
|
|
5686
5680
|
* @return {ResponseActiveSession}
|
|
5687
5681
|
*/
|
|
5688
5682
|
createResponse(e) {
|
|
5689
|
-
return new
|
|
5683
|
+
return new js({
|
|
5690
5684
|
query: this,
|
|
5691
5685
|
json: e
|
|
5692
5686
|
});
|
|
5693
5687
|
}
|
|
5694
5688
|
}
|
|
5695
|
-
class
|
|
5689
|
+
class Vs extends C {
|
|
5696
5690
|
/**
|
|
5697
5691
|
* Class constructor
|
|
5698
5692
|
*
|
|
@@ -5721,7 +5715,7 @@ class Gs extends C {
|
|
|
5721
5715
|
return t;
|
|
5722
5716
|
}
|
|
5723
5717
|
}
|
|
5724
|
-
class
|
|
5718
|
+
class zs extends N {
|
|
5725
5719
|
/**
|
|
5726
5720
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5727
5721
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -5743,13 +5737,13 @@ class Xs extends N {
|
|
|
5743
5737
|
* @return {ResponseQueryActiveSession}
|
|
5744
5738
|
*/
|
|
5745
5739
|
createResponse(e) {
|
|
5746
|
-
return new
|
|
5740
|
+
return new Vs({
|
|
5747
5741
|
query: this,
|
|
5748
5742
|
json: e
|
|
5749
5743
|
});
|
|
5750
5744
|
}
|
|
5751
5745
|
}
|
|
5752
|
-
class
|
|
5746
|
+
class Js extends N {
|
|
5753
5747
|
/**
|
|
5754
5748
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5755
5749
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -5780,7 +5774,7 @@ class Zs extends N {
|
|
|
5780
5774
|
});
|
|
5781
5775
|
}
|
|
5782
5776
|
}
|
|
5783
|
-
class
|
|
5777
|
+
class xt extends x {
|
|
5784
5778
|
/**
|
|
5785
5779
|
* Class constructor
|
|
5786
5780
|
*
|
|
@@ -5792,7 +5786,7 @@ class It extends x {
|
|
|
5792
5786
|
super(e, t, n), this.name = "AuthorizationRejectedException";
|
|
5793
5787
|
}
|
|
5794
5788
|
}
|
|
5795
|
-
class
|
|
5789
|
+
class Gs extends C {
|
|
5796
5790
|
/**
|
|
5797
5791
|
* Class constructor
|
|
5798
5792
|
*
|
|
@@ -5840,7 +5834,7 @@ class Ys extends C {
|
|
|
5840
5834
|
return t;
|
|
5841
5835
|
}
|
|
5842
5836
|
}
|
|
5843
|
-
class
|
|
5837
|
+
class It extends N {
|
|
5844
5838
|
/**
|
|
5845
5839
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5846
5840
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -5990,13 +5984,13 @@ class Mt extends N {
|
|
|
5990
5984
|
* @return {ResponseAtom}
|
|
5991
5985
|
*/
|
|
5992
5986
|
createResponse(e) {
|
|
5993
|
-
return new
|
|
5987
|
+
return new Gs({
|
|
5994
5988
|
query: this,
|
|
5995
5989
|
json: e
|
|
5996
5990
|
});
|
|
5997
5991
|
}
|
|
5998
5992
|
}
|
|
5999
|
-
class
|
|
5993
|
+
class Xs extends C {
|
|
6000
5994
|
/**
|
|
6001
5995
|
* Class constructor
|
|
6002
5996
|
*
|
|
@@ -6021,7 +6015,7 @@ class er extends C {
|
|
|
6021
6015
|
return e && e.callback ? JSON.parse(e.callback) : null;
|
|
6022
6016
|
}
|
|
6023
6017
|
}
|
|
6024
|
-
class
|
|
6018
|
+
class Zs extends N {
|
|
6025
6019
|
/**
|
|
6026
6020
|
* @param {UrqlClientWrapper} graphQLClient
|
|
6027
6021
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -6047,13 +6041,13 @@ class tr extends N {
|
|
|
6047
6041
|
* @return {ResponsePolicy}
|
|
6048
6042
|
*/
|
|
6049
6043
|
createResponse(e) {
|
|
6050
|
-
return new
|
|
6044
|
+
return new Xs({
|
|
6051
6045
|
query: this,
|
|
6052
6046
|
json: e
|
|
6053
6047
|
});
|
|
6054
6048
|
}
|
|
6055
6049
|
}
|
|
6056
|
-
class
|
|
6050
|
+
class Ys extends C {
|
|
6057
6051
|
/**
|
|
6058
6052
|
* Class constructor
|
|
6059
6053
|
*
|
|
@@ -6082,7 +6076,7 @@ class nr extends C {
|
|
|
6082
6076
|
return n.instances && (t.instances = n.instances), n.instanceCount && (t.instanceCount = n.instanceCount), n.paginatorInfo && (t.paginatorInfo = n.paginatorInfo), t;
|
|
6083
6077
|
}
|
|
6084
6078
|
}
|
|
6085
|
-
class
|
|
6079
|
+
class Mt extends N {
|
|
6086
6080
|
/**
|
|
6087
6081
|
* @param {UrqlClientWrapper} graphQLClient
|
|
6088
6082
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -6168,13 +6162,13 @@ class Tt extends N {
|
|
|
6168
6162
|
* @return {ResponseMetaTypeViaAtom}
|
|
6169
6163
|
*/
|
|
6170
6164
|
createResponse(e) {
|
|
6171
|
-
return new
|
|
6165
|
+
return new Ys({
|
|
6172
6166
|
query: this,
|
|
6173
6167
|
json: e
|
|
6174
6168
|
});
|
|
6175
6169
|
}
|
|
6176
6170
|
}
|
|
6177
|
-
class
|
|
6171
|
+
class it extends C {
|
|
6178
6172
|
/**
|
|
6179
6173
|
* Class constructor
|
|
6180
6174
|
*
|
|
@@ -6243,7 +6237,7 @@ class ot extends C {
|
|
|
6243
6237
|
}, n = e.pop();
|
|
6244
6238
|
return n.instances && (t.instances = n.instances.map((s) => {
|
|
6245
6239
|
let r = s.metas;
|
|
6246
|
-
return (!r || r.length === 0) && (r =
|
|
6240
|
+
return (!r || r.length === 0) && (r = it.extractMetasFromMolecule(
|
|
6247
6241
|
s.molecule,
|
|
6248
6242
|
s.metaType,
|
|
6249
6243
|
s.metaId
|
|
@@ -6262,20 +6256,19 @@ class ot extends C {
|
|
|
6262
6256
|
* @return {{ verified: boolean, molecules: Array<{ molecularHash: string, verified: boolean, error: string|null }> }}
|
|
6263
6257
|
*/
|
|
6264
6258
|
verifyIntegrity() {
|
|
6265
|
-
var s;
|
|
6266
6259
|
const e = [], t = this.data();
|
|
6267
6260
|
if (!t || t.length === 0)
|
|
6268
6261
|
return { verified: !0, molecules: e };
|
|
6269
|
-
const n =
|
|
6270
|
-
for (const
|
|
6271
|
-
|
|
6262
|
+
const n = t[t.length - 1]?.instances || [];
|
|
6263
|
+
for (const s of n)
|
|
6264
|
+
s.molecule && e.push(Ae.verifyFromServerData(s.molecule));
|
|
6272
6265
|
return {
|
|
6273
|
-
verified: e.length === 0 || e.every((
|
|
6266
|
+
verified: e.length === 0 || e.every((s) => s.verified),
|
|
6274
6267
|
molecules: e
|
|
6275
6268
|
};
|
|
6276
6269
|
}
|
|
6277
6270
|
}
|
|
6278
|
-
class
|
|
6271
|
+
class Tt extends N {
|
|
6279
6272
|
/**
|
|
6280
6273
|
* @param {UrqlClientWrapper} graphQLClient
|
|
6281
6274
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -6382,13 +6375,13 @@ class Ct extends N {
|
|
|
6382
6375
|
* @return {ResponseMetaTypeViaMolecule}
|
|
6383
6376
|
*/
|
|
6384
6377
|
createResponse(e) {
|
|
6385
|
-
return new
|
|
6378
|
+
return new it({
|
|
6386
6379
|
query: this,
|
|
6387
6380
|
json: e
|
|
6388
6381
|
});
|
|
6389
6382
|
}
|
|
6390
6383
|
}
|
|
6391
|
-
class
|
|
6384
|
+
class er extends C {
|
|
6392
6385
|
/**
|
|
6393
6386
|
* Class constructor
|
|
6394
6387
|
*
|
|
@@ -6424,7 +6417,7 @@ class sr extends C {
|
|
|
6424
6417
|
return !e || !Array.isArray(e) || e.length === 0 ? null : e;
|
|
6425
6418
|
}
|
|
6426
6419
|
}
|
|
6427
|
-
class
|
|
6420
|
+
class Ct extends N {
|
|
6428
6421
|
/**
|
|
6429
6422
|
* @param {UrqlClientWrapper} graphQLClient
|
|
6430
6423
|
* @param {KnishIOClient} knishIOClient
|
|
@@ -6468,15 +6461,15 @@ class Et extends N {
|
|
|
6468
6461
|
* @return {ResponseEmbeddingStatus}
|
|
6469
6462
|
*/
|
|
6470
6463
|
createResponse(e) {
|
|
6471
|
-
return new
|
|
6464
|
+
return new er({
|
|
6472
6465
|
query: this,
|
|
6473
6466
|
json: e
|
|
6474
6467
|
});
|
|
6475
6468
|
}
|
|
6476
6469
|
}
|
|
6477
|
-
class
|
|
6470
|
+
class tr extends D {
|
|
6478
6471
|
}
|
|
6479
|
-
class
|
|
6472
|
+
class nr extends W {
|
|
6480
6473
|
/**
|
|
6481
6474
|
*
|
|
6482
6475
|
* @param {string} metaType
|
|
@@ -6504,13 +6497,13 @@ class ir extends W {
|
|
|
6504
6497
|
* @return {ResponseCreateRule}
|
|
6505
6498
|
*/
|
|
6506
6499
|
createResponse(e) {
|
|
6507
|
-
return new
|
|
6500
|
+
return new tr({
|
|
6508
6501
|
query: this,
|
|
6509
6502
|
json: e
|
|
6510
6503
|
});
|
|
6511
6504
|
}
|
|
6512
6505
|
}
|
|
6513
|
-
class
|
|
6506
|
+
class sr extends W {
|
|
6514
6507
|
/**
|
|
6515
6508
|
* Fills the Molecule with provided wallet and amount data
|
|
6516
6509
|
*
|
|
@@ -6527,7 +6520,7 @@ class or extends W {
|
|
|
6527
6520
|
}), this.$__molecule.sign({}), this.$__molecule.check(this.$__molecule.sourceWallet);
|
|
6528
6521
|
}
|
|
6529
6522
|
}
|
|
6530
|
-
class
|
|
6523
|
+
class rr extends W {
|
|
6531
6524
|
/**
|
|
6532
6525
|
*
|
|
6533
6526
|
* @param recipients
|
|
@@ -6543,7 +6536,7 @@ class ar extends W {
|
|
|
6543
6536
|
}), this.$__molecule.sign({}), this.$__molecule.check(this.$__molecule.sourceWallet);
|
|
6544
6537
|
}
|
|
6545
6538
|
}
|
|
6546
|
-
function
|
|
6539
|
+
function X(o, e, t, n) {
|
|
6547
6540
|
return new (t || (t = Promise))((function(s, r) {
|
|
6548
6541
|
function i(u) {
|
|
6549
6542
|
try {
|
|
@@ -6568,7 +6561,7 @@ function Z(o, e, t, n) {
|
|
|
6568
6561
|
c((n = n.apply(o, [])).next());
|
|
6569
6562
|
}));
|
|
6570
6563
|
}
|
|
6571
|
-
function
|
|
6564
|
+
function Z(o, e) {
|
|
6572
6565
|
var t, n, s, r, i = { label: 0, sent: function() {
|
|
6573
6566
|
if (1 & s[0]) throw s[1];
|
|
6574
6567
|
return s[1];
|
|
@@ -6627,38 +6620,38 @@ function Y(o, e) {
|
|
|
6627
6620
|
};
|
|
6628
6621
|
}
|
|
6629
6622
|
}
|
|
6630
|
-
var q = { exclude: [], include: [], logging: !0 },
|
|
6631
|
-
typeof window < "u" && (
|
|
6632
|
-
},
|
|
6633
|
-
return Object.fromEntries(Object.entries(
|
|
6623
|
+
var q = { exclude: [], include: [], logging: !0 }, Jt = {}, ir = { timeout: "true" }, z = function(o, e) {
|
|
6624
|
+
typeof window < "u" && (Jt[o] = e);
|
|
6625
|
+
}, or = function() {
|
|
6626
|
+
return Object.fromEntries(Object.entries(Jt).filter((function(o) {
|
|
6634
6627
|
var e, t = o[0];
|
|
6635
|
-
return !(!((e = q
|
|
6628
|
+
return !(!((e = q?.exclude) === null || e === void 0) && e.includes(t));
|
|
6636
6629
|
})).filter((function(o) {
|
|
6637
6630
|
var e, t, n, s, r = o[0];
|
|
6638
|
-
return !((e = q
|
|
6631
|
+
return !((e = q?.include) === null || e === void 0) && e.some((function(i) {
|
|
6639
6632
|
return i.includes(".");
|
|
6640
|
-
})) ? (t = q
|
|
6633
|
+
})) ? (t = q?.include) === null || t === void 0 ? void 0 : t.some((function(i) {
|
|
6641
6634
|
return i.startsWith(r);
|
|
6642
|
-
})) : ((n = q
|
|
6635
|
+
})) : ((n = q?.include) === null || n === void 0 ? void 0 : n.length) === 0 || ((s = q?.include) === null || s === void 0 ? void 0 : s.includes(r));
|
|
6643
6636
|
})).map((function(o) {
|
|
6644
6637
|
return [o[0], (0, o[1])()];
|
|
6645
6638
|
})));
|
|
6646
6639
|
};
|
|
6647
|
-
function
|
|
6640
|
+
function Oe(o) {
|
|
6648
6641
|
return o ^= o >>> 16, o = Math.imul(o, 2246822507), o ^= o >>> 13, o = Math.imul(o, 3266489909), (o ^= o >>> 16) >>> 0;
|
|
6649
6642
|
}
|
|
6650
6643
|
var B = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
|
|
6651
|
-
function
|
|
6644
|
+
function Q(o, e) {
|
|
6652
6645
|
return o << e | o >>> 32 - e;
|
|
6653
6646
|
}
|
|
6654
|
-
function
|
|
6647
|
+
function ot(o, e) {
|
|
6655
6648
|
var t;
|
|
6656
6649
|
if (e === void 0 && (e = 0), e = e ? 0 | e : 0, typeof o == "string" && (t = o, o = new TextEncoder().encode(t).buffer), !(o instanceof ArrayBuffer)) throw new TypeError("Expected key to be ArrayBuffer or string");
|
|
6657
6650
|
var n = new Uint32Array([e, e, e, e]);
|
|
6658
6651
|
(function(r, i) {
|
|
6659
6652
|
for (var a = r.byteLength / 16 | 0, c = new Uint32Array(r, 0, 4 * a), u = 0; u < a; u++) {
|
|
6660
6653
|
var l = c.subarray(4 * u, 4 * (u + 1));
|
|
6661
|
-
l[0] = Math.imul(l[0], B[0]), l[0] =
|
|
6654
|
+
l[0] = Math.imul(l[0], B[0]), l[0] = Q(l[0], 15), l[0] = Math.imul(l[0], B[1]), i[0] = i[0] ^ l[0], i[0] = Q(i[0], 19), i[0] = i[0] + i[1], i[0] = Math.imul(i[0], 5) + 1444728091, l[1] = Math.imul(l[1], B[1]), l[1] = Q(l[1], 16), l[1] = Math.imul(l[1], B[2]), i[1] = i[1] ^ l[1], i[1] = Q(i[1], 17), i[1] = i[1] + i[2], i[1] = Math.imul(i[1], 5) + 197830471, l[2] = Math.imul(l[2], B[2]), l[2] = Q(l[2], 17), l[2] = Math.imul(l[2], B[3]), i[2] = i[2] ^ l[2], i[2] = Q(i[2], 15), i[2] = i[2] + i[3], i[2] = Math.imul(i[2], 5) + 2530024501, l[3] = Math.imul(l[3], B[3]), l[3] = Q(l[3], 18), l[3] = Math.imul(l[3], B[0]), i[3] = i[3] ^ l[3], i[3] = Q(i[3], 13), i[3] = i[3] + i[0], i[3] = Math.imul(i[3], 5) + 850148119;
|
|
6662
6655
|
}
|
|
6663
6656
|
})(o, n), (function(r, i) {
|
|
6664
6657
|
var a = r.byteLength / 16 | 0, c = r.byteLength % 16, u = new Uint32Array(4), l = new Uint8Array(r, 16 * a, c);
|
|
@@ -6668,7 +6661,7 @@ function at(o, e) {
|
|
|
6668
6661
|
case 14:
|
|
6669
6662
|
u[3] = u[3] ^ l[13] << 8;
|
|
6670
6663
|
case 13:
|
|
6671
|
-
u[3] = u[3] ^ l[12] << 0, u[3] = Math.imul(u[3], B[3]), u[3] =
|
|
6664
|
+
u[3] = u[3] ^ l[12] << 0, u[3] = Math.imul(u[3], B[3]), u[3] = Q(u[3], 18), u[3] = Math.imul(u[3], B[0]), i[3] = i[3] ^ u[3];
|
|
6672
6665
|
case 12:
|
|
6673
6666
|
u[2] = u[2] ^ l[11] << 24;
|
|
6674
6667
|
case 11:
|
|
@@ -6676,7 +6669,7 @@ function at(o, e) {
|
|
|
6676
6669
|
case 10:
|
|
6677
6670
|
u[2] = u[2] ^ l[9] << 8;
|
|
6678
6671
|
case 9:
|
|
6679
|
-
u[2] = u[2] ^ l[8] << 0, u[2] = Math.imul(u[2], B[2]), u[2] =
|
|
6672
|
+
u[2] = u[2] ^ l[8] << 0, u[2] = Math.imul(u[2], B[2]), u[2] = Q(u[2], 17), u[2] = Math.imul(u[2], B[3]), i[2] = i[2] ^ u[2];
|
|
6680
6673
|
case 8:
|
|
6681
6674
|
u[1] = u[1] ^ l[7] << 24;
|
|
6682
6675
|
case 7:
|
|
@@ -6684,7 +6677,7 @@ function at(o, e) {
|
|
|
6684
6677
|
case 6:
|
|
6685
6678
|
u[1] = u[1] ^ l[5] << 8;
|
|
6686
6679
|
case 5:
|
|
6687
|
-
u[1] = u[1] ^ l[4] << 0, u[1] = Math.imul(u[1], B[1]), u[1] =
|
|
6680
|
+
u[1] = u[1] ^ l[4] << 0, u[1] = Math.imul(u[1], B[1]), u[1] = Q(u[1], 16), u[1] = Math.imul(u[1], B[2]), i[1] = i[1] ^ u[1];
|
|
6688
6681
|
case 4:
|
|
6689
6682
|
u[0] = u[0] ^ l[3] << 24;
|
|
6690
6683
|
case 3:
|
|
@@ -6692,45 +6685,45 @@ function at(o, e) {
|
|
|
6692
6685
|
case 2:
|
|
6693
6686
|
u[0] = u[0] ^ l[1] << 8;
|
|
6694
6687
|
case 1:
|
|
6695
|
-
u[0] = u[0] ^ l[0] << 0, u[0] = Math.imul(u[0], B[0]), u[0] =
|
|
6688
|
+
u[0] = u[0] ^ l[0] << 0, u[0] = Math.imul(u[0], B[0]), u[0] = Q(u[0], 15), u[0] = Math.imul(u[0], B[1]), i[0] = i[0] ^ u[0];
|
|
6696
6689
|
}
|
|
6697
6690
|
})(o, n), (function(r, i) {
|
|
6698
|
-
i[0] = i[0] ^ r.byteLength, i[1] = i[1] ^ r.byteLength, i[2] = i[2] ^ r.byteLength, i[3] = i[3] ^ r.byteLength, i[0] = i[0] + i[1] | 0, i[0] = i[0] + i[2] | 0, i[0] = i[0] + i[3] | 0, i[1] = i[1] + i[0] | 0, i[2] = i[2] + i[0] | 0, i[3] = i[3] + i[0] | 0, i[0] =
|
|
6691
|
+
i[0] = i[0] ^ r.byteLength, i[1] = i[1] ^ r.byteLength, i[2] = i[2] ^ r.byteLength, i[3] = i[3] ^ r.byteLength, i[0] = i[0] + i[1] | 0, i[0] = i[0] + i[2] | 0, i[0] = i[0] + i[3] | 0, i[1] = i[1] + i[0] | 0, i[2] = i[2] + i[0] | 0, i[3] = i[3] + i[0] | 0, i[0] = Oe(i[0]), i[1] = Oe(i[1]), i[2] = Oe(i[2]), i[3] = Oe(i[3]), i[0] = i[0] + i[1] | 0, i[0] = i[0] + i[2] | 0, i[0] = i[0] + i[3] | 0, i[1] = i[1] + i[0] | 0, i[2] = i[2] + i[0] | 0, i[3] = i[3] + i[0] | 0;
|
|
6699
6692
|
})(o, n);
|
|
6700
6693
|
var s = new Uint8Array(n.buffer);
|
|
6701
6694
|
return Array.from(s).map((function(r) {
|
|
6702
6695
|
return r.toString(16).padStart(2, "0");
|
|
6703
6696
|
})).join("");
|
|
6704
6697
|
}
|
|
6705
|
-
function
|
|
6698
|
+
function ar(o, e) {
|
|
6706
6699
|
return new Promise((function(t) {
|
|
6707
6700
|
setTimeout((function() {
|
|
6708
6701
|
return t(e);
|
|
6709
6702
|
}), o);
|
|
6710
6703
|
}));
|
|
6711
6704
|
}
|
|
6712
|
-
function
|
|
6705
|
+
function lr(o, e, t) {
|
|
6713
6706
|
return Promise.all(o.map((function(n) {
|
|
6714
|
-
return Promise.race([n,
|
|
6707
|
+
return Promise.race([n, ar(e, t)]);
|
|
6715
6708
|
})));
|
|
6716
6709
|
}
|
|
6717
|
-
var
|
|
6718
|
-
function
|
|
6719
|
-
return
|
|
6710
|
+
var cr = "0.19.1";
|
|
6711
|
+
function ur() {
|
|
6712
|
+
return cr;
|
|
6720
6713
|
}
|
|
6721
|
-
function
|
|
6722
|
-
return
|
|
6714
|
+
function Gt() {
|
|
6715
|
+
return X(this, void 0, void 0, (function() {
|
|
6723
6716
|
var o, e, t, n, s;
|
|
6724
|
-
return
|
|
6717
|
+
return Z(this, (function(r) {
|
|
6725
6718
|
switch (r.label) {
|
|
6726
6719
|
case 0:
|
|
6727
|
-
return r.trys.push([0, 2, , 3]), o =
|
|
6720
|
+
return r.trys.push([0, 2, , 3]), o = or(), e = Object.keys(o), [4, lr(Object.values(o), q?.timeout || 1e3, ir)];
|
|
6728
6721
|
case 1:
|
|
6729
6722
|
return t = r.sent(), n = t.filter((function(i) {
|
|
6730
6723
|
return i !== void 0;
|
|
6731
6724
|
})), s = {}, n.forEach((function(i, a) {
|
|
6732
6725
|
s[e[a]] = i;
|
|
6733
|
-
})), [2,
|
|
6726
|
+
})), [2, Xt(s, q.exclude || [], q.include || [], "")];
|
|
6734
6727
|
case 2:
|
|
6735
6728
|
throw r.sent();
|
|
6736
6729
|
case 3:
|
|
@@ -6739,7 +6732,7 @@ function Xt() {
|
|
|
6739
6732
|
}));
|
|
6740
6733
|
}));
|
|
6741
6734
|
}
|
|
6742
|
-
function
|
|
6735
|
+
function Xt(o, e, t, n) {
|
|
6743
6736
|
n === void 0 && (n = "");
|
|
6744
6737
|
for (var s = {}, r = function(u, l) {
|
|
6745
6738
|
var h = n + u + ".";
|
|
@@ -6751,7 +6744,7 @@ function Zt(o, e, t, n) {
|
|
|
6751
6744
|
}));
|
|
6752
6745
|
p && !d || (s[u] = l);
|
|
6753
6746
|
} else {
|
|
6754
|
-
var b =
|
|
6747
|
+
var b = Xt(l, e, t, h);
|
|
6755
6748
|
Object.keys(b).length > 0 && (s[u] = b);
|
|
6756
6749
|
}
|
|
6757
6750
|
}, i = 0, a = Object.entries(o); i < a.length; i++) {
|
|
@@ -6760,21 +6753,21 @@ function Zt(o, e, t, n) {
|
|
|
6760
6753
|
}
|
|
6761
6754
|
return s;
|
|
6762
6755
|
}
|
|
6763
|
-
function
|
|
6764
|
-
return
|
|
6756
|
+
function hr(o) {
|
|
6757
|
+
return X(this, void 0, void 0, (function() {
|
|
6765
6758
|
var e, t;
|
|
6766
|
-
return
|
|
6759
|
+
return Z(this, (function(n) {
|
|
6767
6760
|
switch (n.label) {
|
|
6768
6761
|
case 0:
|
|
6769
|
-
return n.trys.push([0, 2, , 3]), [4,
|
|
6762
|
+
return n.trys.push([0, 2, , 3]), [4, Gt()];
|
|
6770
6763
|
case 1:
|
|
6771
|
-
return e = n.sent(), t =
|
|
6772
|
-
|
|
6764
|
+
return e = n.sent(), t = ot(JSON.stringify(e)), Math.random() < 1e-3 && q.logging && (function(s, r) {
|
|
6765
|
+
X(this, void 0, void 0, (function() {
|
|
6773
6766
|
var i, a;
|
|
6774
|
-
return
|
|
6767
|
+
return Z(this, (function(c) {
|
|
6775
6768
|
switch (c.label) {
|
|
6776
6769
|
case 0:
|
|
6777
|
-
if (i = "https://logging.thumbmarkjs.com/v1/log", a = { thumbmark: s, components: r, version:
|
|
6770
|
+
if (i = "https://logging.thumbmarkjs.com/v1/log", a = { thumbmark: s, components: r, version: ur() }, sessionStorage.getItem("_tmjs_l")) return [3, 4];
|
|
6778
6771
|
sessionStorage.setItem("_tmjs_l", "1"), c.label = 1;
|
|
6779
6772
|
case 1:
|
|
6780
6773
|
return c.trys.push([1, 3, , 4]), [4, fetch(i, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(a) })];
|
|
@@ -6795,19 +6788,19 @@ function fr(o) {
|
|
|
6795
6788
|
}));
|
|
6796
6789
|
}));
|
|
6797
6790
|
}
|
|
6798
|
-
function
|
|
6791
|
+
function dr(o) {
|
|
6799
6792
|
for (var e = 0, t = 0; t < o.length; ++t) e += Math.abs(o[t]);
|
|
6800
6793
|
return e;
|
|
6801
6794
|
}
|
|
6802
|
-
function
|
|
6795
|
+
function Zt(o, e, t) {
|
|
6803
6796
|
for (var n = [], s = 0; s < o[0].data.length; s++) {
|
|
6804
6797
|
for (var r = [], i = 0; i < o.length; i++) r.push(o[i].data[s]);
|
|
6805
|
-
n.push(
|
|
6798
|
+
n.push(pr(r));
|
|
6806
6799
|
}
|
|
6807
6800
|
var a = new Uint8ClampedArray(n);
|
|
6808
6801
|
return new ImageData(a, e, t);
|
|
6809
6802
|
}
|
|
6810
|
-
function
|
|
6803
|
+
function pr(o) {
|
|
6811
6804
|
if (o.length === 0) return 0;
|
|
6812
6805
|
for (var e = {}, t = 0, n = o; t < n.length; t++)
|
|
6813
6806
|
e[r = n[t]] = (e[r] || 0) + 1;
|
|
@@ -6815,7 +6808,7 @@ function yr(o) {
|
|
|
6815
6808
|
for (var r in e) e[r] > e[s] && (s = parseInt(r, 10));
|
|
6816
6809
|
return s;
|
|
6817
6810
|
}
|
|
6818
|
-
function
|
|
6811
|
+
function Ie() {
|
|
6819
6812
|
if (typeof navigator > "u") return { name: "unknown", version: "unknown" };
|
|
6820
6813
|
for (var o = navigator.userAgent, e = { Edg: "Edge", OPR: "Opera" }, t = 0, n = [/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/, /(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/]; t < n.length; t++) {
|
|
6821
6814
|
var s = n[t], r = o.match(s);
|
|
@@ -6823,16 +6816,16 @@ function Me() {
|
|
|
6823
6816
|
}
|
|
6824
6817
|
return { name: "unknown", version: "unknown" };
|
|
6825
6818
|
}
|
|
6826
|
-
|
|
6827
|
-
return
|
|
6828
|
-
return
|
|
6819
|
+
z("audio", (function() {
|
|
6820
|
+
return X(this, void 0, void 0, (function() {
|
|
6821
|
+
return Z(this, (function(o) {
|
|
6829
6822
|
return [2, new Promise((function(e, t) {
|
|
6830
6823
|
try {
|
|
6831
6824
|
var n = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), s = n.createBufferSource(), r = n.createOscillator();
|
|
6832
6825
|
r.frequency.value = 1e3;
|
|
6833
6826
|
var i, a = n.createDynamicsCompressor();
|
|
6834
6827
|
a.threshold.value = -50, a.knee.value = 40, a.ratio.value = 12, a.attack.value = 0, a.release.value = 0.2, r.connect(a), a.connect(n.destination), r.start(), n.oncomplete = function(c) {
|
|
6835
|
-
i = c.renderedBuffer.getChannelData(0), e({ sampleHash:
|
|
6828
|
+
i = c.renderedBuffer.getChannelData(0), e({ sampleHash: dr(i), oscillator: r.type, maxChannels: n.destination.maxChannelCount, channelCountMode: s.channelCountMode });
|
|
6836
6829
|
}, n.startRendering();
|
|
6837
6830
|
} catch (c) {
|
|
6838
6831
|
console.error("Error creating audio fingerprint:", c), t(c);
|
|
@@ -6841,14 +6834,14 @@ J("audio", (function() {
|
|
|
6841
6834
|
}));
|
|
6842
6835
|
}));
|
|
6843
6836
|
}));
|
|
6844
|
-
var
|
|
6845
|
-
|
|
6837
|
+
var fr = Ie().name !== "SamsungBrowser" ? 1 : 3, Et = 280, Ot = 20;
|
|
6838
|
+
Ie().name != "Firefox" && z("canvas", (function() {
|
|
6846
6839
|
return document.createElement("canvas").getContext("2d"), new Promise((function(o) {
|
|
6847
|
-
var e = Array.from({ length:
|
|
6840
|
+
var e = Array.from({ length: fr }, (function() {
|
|
6848
6841
|
return (function() {
|
|
6849
6842
|
var t = document.createElement("canvas"), n = t.getContext("2d");
|
|
6850
6843
|
if (!n) return new ImageData(1, 1);
|
|
6851
|
-
t.width =
|
|
6844
|
+
t.width = Et, t.height = Ot;
|
|
6852
6845
|
var s = n.createLinearGradient(0, 0, t.width, t.height);
|
|
6853
6846
|
s.addColorStop(0, "red"), s.addColorStop(0.16666666666666666, "orange"), s.addColorStop(0.3333333333333333, "yellow"), s.addColorStop(0.5, "green"), s.addColorStop(0.6666666666666666, "blue"), s.addColorStop(0.8333333333333334, "indigo"), s.addColorStop(1, "violet"), n.fillStyle = s, n.fillRect(0, 0, t.width, t.height);
|
|
6854
6847
|
var r = "Random Text WMwmil10Oo";
|
|
@@ -6857,15 +6850,15 @@ Me().name != "Firefox" && J("canvas", (function() {
|
|
|
6857
6850
|
return i;
|
|
6858
6851
|
})();
|
|
6859
6852
|
}));
|
|
6860
|
-
o({ commonImageDataHash:
|
|
6853
|
+
o({ commonImageDataHash: ot(Zt(e, Et, Ot).data.toString()).toString() });
|
|
6861
6854
|
}));
|
|
6862
6855
|
}));
|
|
6863
|
-
var
|
|
6864
|
-
function
|
|
6856
|
+
var et, mr = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], yr = ["monospace", "sans-serif", "serif"];
|
|
6857
|
+
function Rt(o, e) {
|
|
6865
6858
|
if (!o) throw new Error("Canvas context not supported");
|
|
6866
6859
|
return o.font, o.font = "72px ".concat(e), o.measureText("WwMmLli0Oo").width;
|
|
6867
6860
|
}
|
|
6868
|
-
function
|
|
6861
|
+
function gr() {
|
|
6869
6862
|
var o, e = document.createElement("canvas"), t = (o = e.getContext("webgl")) !== null && o !== void 0 ? o : e.getContext("experimental-webgl");
|
|
6870
6863
|
if (t && "getParameter" in t) try {
|
|
6871
6864
|
var n = (t.getParameter(t.VENDOR) || "").toString(), s = (t.getParameter(t.RENDERER) || "").toString(), r = { vendor: n, renderer: s, version: (t.getParameter(t.VERSION) || "").toString(), shadingLanguageVersion: (t.getParameter(t.SHADING_LANGUAGE_VERSION) || "").toString() };
|
|
@@ -6881,11 +6874,11 @@ function kr() {
|
|
|
6881
6874
|
}
|
|
6882
6875
|
return "undefined";
|
|
6883
6876
|
}
|
|
6884
|
-
function
|
|
6877
|
+
function br() {
|
|
6885
6878
|
var o = new Float32Array(1), e = new Uint8Array(o.buffer);
|
|
6886
6879
|
return o[0] = 1 / 0, o[0] = o[0] - o[0], e[3];
|
|
6887
6880
|
}
|
|
6888
|
-
function
|
|
6881
|
+
function wr(o, e) {
|
|
6889
6882
|
var t = {};
|
|
6890
6883
|
return e.forEach((function(n) {
|
|
6891
6884
|
var s = (function(r) {
|
|
@@ -6907,7 +6900,7 @@ function Sr(o, e) {
|
|
|
6907
6900
|
s && (t[n] = s);
|
|
6908
6901
|
})), t;
|
|
6909
6902
|
}
|
|
6910
|
-
function
|
|
6903
|
+
function kr() {
|
|
6911
6904
|
var o = [], e = { "prefers-contrast": ["high", "more", "low", "less", "forced", "no-preference"], "any-hover": ["hover", "none"], "any-pointer": ["none", "coarse", "fine"], pointer: ["none", "coarse", "fine"], hover: ["hover", "none"], update: ["fast", "slow"], "inverted-colors": ["inverted", "none"], "prefers-reduced-motion": ["reduce", "no-preference"], "prefers-reduced-transparency": ["reduce", "no-preference"], scripting: ["none", "initial-only", "enabled"], "forced-colors": ["active", "none"] };
|
|
6912
6905
|
return Object.keys(e).forEach((function(t) {
|
|
6913
6906
|
e[t].forEach((function(n) {
|
|
@@ -6915,7 +6908,7 @@ function $r() {
|
|
|
6915
6908
|
}));
|
|
6916
6909
|
})), o;
|
|
6917
6910
|
}
|
|
6918
|
-
function
|
|
6911
|
+
function _r() {
|
|
6919
6912
|
if (window.location.protocol === "https:" && typeof window.ApplePaySession == "function") try {
|
|
6920
6913
|
for (var o = window.ApplePaySession.supportsVersion, e = 15; e > 0; e--) if (o(e)) return e;
|
|
6921
6914
|
} catch {
|
|
@@ -6923,15 +6916,15 @@ function Ar() {
|
|
|
6923
6916
|
}
|
|
6924
6917
|
return 0;
|
|
6925
6918
|
}
|
|
6926
|
-
|
|
6919
|
+
Ie().name != "Firefox" && z("fonts", (function() {
|
|
6927
6920
|
var o = this;
|
|
6928
6921
|
return new Promise((function(e, t) {
|
|
6929
6922
|
try {
|
|
6930
6923
|
(function(n) {
|
|
6931
6924
|
var s;
|
|
6932
|
-
|
|
6925
|
+
X(this, void 0, void 0, (function() {
|
|
6933
6926
|
var r, i, a;
|
|
6934
|
-
return
|
|
6927
|
+
return Z(this, (function(c) {
|
|
6935
6928
|
switch (c.label) {
|
|
6936
6929
|
case 0:
|
|
6937
6930
|
return document.body ? [3, 2] : [4, (u = 50, new Promise((function(h) {
|
|
@@ -6950,13 +6943,13 @@ Me().name != "Firefox" && J("fonts", (function() {
|
|
|
6950
6943
|
}));
|
|
6951
6944
|
})((function(n) {
|
|
6952
6945
|
var s = n.iframe;
|
|
6953
|
-
return
|
|
6946
|
+
return X(o, void 0, void 0, (function() {
|
|
6954
6947
|
var r, i, a, c;
|
|
6955
|
-
return
|
|
6956
|
-
return r = s.createElement("canvas"), i = r.getContext("2d"), a =
|
|
6957
|
-
return
|
|
6958
|
-
})), c = {},
|
|
6959
|
-
var h =
|
|
6948
|
+
return Z(this, (function(u) {
|
|
6949
|
+
return r = s.createElement("canvas"), i = r.getContext("2d"), a = yr.map((function(l) {
|
|
6950
|
+
return Rt(i, l);
|
|
6951
|
+
})), c = {}, mr.forEach((function(l) {
|
|
6952
|
+
var h = Rt(i, l);
|
|
6960
6953
|
a.includes(h) || (c[l] = h);
|
|
6961
6954
|
})), e(c), [2];
|
|
6962
6955
|
}));
|
|
@@ -6966,27 +6959,27 @@ Me().name != "Firefox" && J("fonts", (function() {
|
|
|
6966
6959
|
t({ error: "unsupported" });
|
|
6967
6960
|
}
|
|
6968
6961
|
}));
|
|
6969
|
-
})),
|
|
6962
|
+
})), z("hardware", (function() {
|
|
6970
6963
|
return new Promise((function(o, e) {
|
|
6971
6964
|
var t = navigator.deviceMemory !== void 0 ? navigator.deviceMemory : 0, n = window.performance && window.performance.memory ? window.performance.memory : 0;
|
|
6972
|
-
o({ videocard:
|
|
6965
|
+
o({ videocard: gr(), architecture: br(), deviceMemory: t.toString() || "undefined", jsHeapSizeLimit: n.jsHeapSizeLimit || 0 });
|
|
6973
6966
|
}));
|
|
6974
|
-
})),
|
|
6967
|
+
})), z("locales", (function() {
|
|
6975
6968
|
return new Promise((function(o) {
|
|
6976
6969
|
o({ languages: navigator.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
|
|
6977
6970
|
}));
|
|
6978
|
-
})),
|
|
6979
|
-
return
|
|
6971
|
+
})), z("permissions", (function() {
|
|
6972
|
+
return X(this, void 0, void 0, (function() {
|
|
6980
6973
|
var o;
|
|
6981
|
-
return
|
|
6982
|
-
return
|
|
6974
|
+
return Z(this, (function(e) {
|
|
6975
|
+
return et = q?.permissions_to_check || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], o = Array.from({ length: q?.retries || 3 }, (function() {
|
|
6983
6976
|
return (function() {
|
|
6984
|
-
return
|
|
6977
|
+
return X(this, void 0, void 0, (function() {
|
|
6985
6978
|
var t, n, s, r, i;
|
|
6986
|
-
return
|
|
6979
|
+
return Z(this, (function(a) {
|
|
6987
6980
|
switch (a.label) {
|
|
6988
6981
|
case 0:
|
|
6989
|
-
t = {}, n = 0, s =
|
|
6982
|
+
t = {}, n = 0, s = et, a.label = 1;
|
|
6990
6983
|
case 1:
|
|
6991
6984
|
if (!(n < s.length)) return [3, 6];
|
|
6992
6985
|
r = s[n], a.label = 2;
|
|
@@ -7005,11 +6998,11 @@ Me().name != "Firefox" && J("fonts", (function() {
|
|
|
7005
6998
|
}));
|
|
7006
6999
|
})();
|
|
7007
7000
|
})), [2, Promise.all(o).then((function(t) {
|
|
7008
|
-
return
|
|
7001
|
+
return wr(t, et);
|
|
7009
7002
|
}))];
|
|
7010
7003
|
}));
|
|
7011
7004
|
}));
|
|
7012
|
-
})),
|
|
7005
|
+
})), z("plugins", (function() {
|
|
7013
7006
|
var o = [];
|
|
7014
7007
|
if (navigator.plugins) for (var e = 0; e < navigator.plugins.length; e++) {
|
|
7015
7008
|
var t = navigator.plugins[e];
|
|
@@ -7018,25 +7011,25 @@ Me().name != "Firefox" && J("fonts", (function() {
|
|
|
7018
7011
|
return new Promise((function(n) {
|
|
7019
7012
|
n({ plugins: o });
|
|
7020
7013
|
}));
|
|
7021
|
-
})),
|
|
7014
|
+
})), z("screen", (function() {
|
|
7022
7015
|
return new Promise((function(o) {
|
|
7023
|
-
o({ is_touchscreen: navigator.maxTouchPoints > 0, maxTouchPoints: navigator.maxTouchPoints, colorDepth: screen.colorDepth, mediaMatches:
|
|
7016
|
+
o({ is_touchscreen: navigator.maxTouchPoints > 0, maxTouchPoints: navigator.maxTouchPoints, colorDepth: screen.colorDepth, mediaMatches: kr() });
|
|
7024
7017
|
}));
|
|
7025
|
-
})),
|
|
7018
|
+
})), z("system", (function() {
|
|
7026
7019
|
return new Promise((function(o) {
|
|
7027
|
-
var e =
|
|
7028
|
-
o({ platform: window.navigator.platform, cookieEnabled: window.navigator.cookieEnabled, productSub: navigator.productSub, product: navigator.product, useragent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, browser: { name: e.name, version: e.version }, applePayVersion:
|
|
7020
|
+
var e = Ie();
|
|
7021
|
+
o({ platform: window.navigator.platform, cookieEnabled: window.navigator.cookieEnabled, productSub: navigator.productSub, product: navigator.product, useragent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, browser: { name: e.name, version: e.version }, applePayVersion: _r() });
|
|
7029
7022
|
}));
|
|
7030
7023
|
}));
|
|
7031
|
-
var K,
|
|
7032
|
-
|
|
7033
|
-
return
|
|
7024
|
+
var K, Sr = Ie().name !== "SamsungBrowser" ? 1 : 3, y = null;
|
|
7025
|
+
z("webgl", (function() {
|
|
7026
|
+
return X(this, void 0, void 0, (function() {
|
|
7034
7027
|
var o;
|
|
7035
|
-
return
|
|
7028
|
+
return Z(this, (function(e) {
|
|
7036
7029
|
typeof document < "u" && ((K = document.createElement("canvas")).width = 200, K.height = 100, y = K.getContext("webgl"));
|
|
7037
7030
|
try {
|
|
7038
7031
|
if (!y) throw new Error("WebGL not supported");
|
|
7039
|
-
return o = Array.from({ length:
|
|
7032
|
+
return o = Array.from({ length: Sr }, (function() {
|
|
7040
7033
|
return (function() {
|
|
7041
7034
|
try {
|
|
7042
7035
|
if (!y) throw new Error("WebGL not supported");
|
|
@@ -7074,7 +7067,7 @@ J("webgl", (function() {
|
|
|
7074
7067
|
y && (y.bindBuffer(y.ARRAY_BUFFER, null), y.useProgram(null), y.viewport(0, 0, y.drawingBufferWidth, y.drawingBufferHeight), y.clearColor(0, 0, 0, 0));
|
|
7075
7068
|
}
|
|
7076
7069
|
})();
|
|
7077
|
-
})), [2, { commonImageHash:
|
|
7070
|
+
})), [2, { commonImageHash: ot(Zt(o, K.width, K.height).data.toString()).toString() }];
|
|
7078
7071
|
} catch {
|
|
7079
7072
|
return [2, { webgl: "unsupported" }];
|
|
7080
7073
|
}
|
|
@@ -7082,43 +7075,43 @@ J("webgl", (function() {
|
|
|
7082
7075
|
}));
|
|
7083
7076
|
}));
|
|
7084
7077
|
}));
|
|
7085
|
-
var
|
|
7078
|
+
var re = function(o, e, t, n) {
|
|
7086
7079
|
for (var s = (t - e) / n, r = 0, i = 0; i < n; i++)
|
|
7087
7080
|
r += o(e + (i + 0.5) * s);
|
|
7088
7081
|
return r * s;
|
|
7089
7082
|
};
|
|
7090
|
-
|
|
7091
|
-
return
|
|
7092
|
-
return
|
|
7093
|
-
return [2, { acos: Math.acos(0.5), asin:
|
|
7083
|
+
z("math", (function() {
|
|
7084
|
+
return X(void 0, void 0, void 0, (function() {
|
|
7085
|
+
return Z(this, (function(o) {
|
|
7086
|
+
return [2, { acos: Math.acos(0.5), asin: re(Math.asin, -1, 1, 97), atan: re(Math.atan, -1, 1, 97), cos: re(Math.cos, 0, Math.PI, 97), cosh: Math.cosh(9 / 7), e: Math.E, largeCos: Math.cos(1e20), largeSin: Math.sin(1e20), largeTan: Math.tan(1e20), log: Math.log(1e3), pi: Math.PI, sin: re(Math.sin, -Math.PI, Math.PI, 97), sinh: re(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: re(Math.tan, 0, 2 * Math.PI, 97), tanh: re(Math.tanh, -9 / 7, 7 / 9, 97) }];
|
|
7094
7087
|
}));
|
|
7095
7088
|
}));
|
|
7096
7089
|
}));
|
|
7097
|
-
const
|
|
7098
|
-
function
|
|
7090
|
+
const $r = "query ( $Hash: String! ) { CipherHash ( Hash: $Hash ) { hash } }";
|
|
7091
|
+
function Ar(o) {
|
|
7099
7092
|
const e = (o || "").match(/\b(query|mutation|subscription)\b/i), t = e ? e[1].toLowerCase() : "query", n = (o || "").indexOf("{"), s = n >= 0 ? o.slice(n + 1).match(/[A-Za-z_][A-Za-z0-9_]*/) : null;
|
|
7100
7093
|
return { type: t, name: s ? s[0] : "" };
|
|
7101
7094
|
}
|
|
7102
|
-
class
|
|
7095
|
+
class vr {
|
|
7103
7096
|
constructor({ serverUri: e, socket: t = null, encrypt: n = !1 }) {
|
|
7104
7097
|
this.$__client = this.createUrqlClient({ serverUri: e, socket: t, encrypt: n }), this.$__authToken = "", this.$__pubkey = null, this.$__wallet = null, this.serverUri = e, this.soketi = t, this.cipherLink = !!n, this.$__subscriptionManager = /* @__PURE__ */ new Map();
|
|
7105
7098
|
}
|
|
7106
7099
|
createUrqlClient({ serverUri: e, socket: t, encrypt: n }) {
|
|
7107
|
-
const s = [
|
|
7100
|
+
const s = [en, tn];
|
|
7108
7101
|
if (t && t.socketUri) {
|
|
7109
|
-
const r =
|
|
7102
|
+
const r = rn({
|
|
7110
7103
|
url: t.socketUri,
|
|
7111
7104
|
connectionParams: () => ({
|
|
7112
7105
|
authToken: this.$__authToken
|
|
7113
7106
|
})
|
|
7114
7107
|
});
|
|
7115
|
-
s.push(
|
|
7108
|
+
s.push(nn({
|
|
7116
7109
|
forwardSubscription: (i) => ({
|
|
7117
7110
|
subscribe: (a) => ({ unsubscribe: r.subscribe(i, a) })
|
|
7118
7111
|
})
|
|
7119
7112
|
}));
|
|
7120
7113
|
}
|
|
7121
|
-
return
|
|
7114
|
+
return sn({
|
|
7122
7115
|
url: e,
|
|
7123
7116
|
exchanges: s,
|
|
7124
7117
|
// PQ-transport Phase E: when encryption is on, route fetch through the CipherHash
|
|
@@ -7147,7 +7140,7 @@ class Mr {
|
|
|
7147
7140
|
} catch {
|
|
7148
7141
|
return !1;
|
|
7149
7142
|
}
|
|
7150
|
-
const { type: n, name: s } =
|
|
7143
|
+
const { type: n, name: s } = Ar(t.query);
|
|
7151
7144
|
return !(n === "query" && (s === "__schema" || s === "ContinuId") || n === "mutation" && s === "AccessToken" || n === "mutation" && s === "ProposeMolecule" && (t.variables && t.variables.molecule && t.variables.molecule.atoms && t.variables.molecule.atoms[0] && t.variables.molecule.atoms[0].isotope) === "U");
|
|
7152
7145
|
}
|
|
7153
7146
|
/**
|
|
@@ -7160,7 +7153,7 @@ class Mr {
|
|
|
7160
7153
|
let r = !1, i = t;
|
|
7161
7154
|
if (n && s && t && typeof t.body == "string" && this.shouldEncrypt(t.body)) {
|
|
7162
7155
|
const d = await n.encryptStringML768(t.body, s);
|
|
7163
|
-
i = { ...t, body: JSON.stringify({ query:
|
|
7156
|
+
i = { ...t, body: JSON.stringify({ query: $r, variables: { Hash: d } }) }, r = !0;
|
|
7164
7157
|
}
|
|
7165
7158
|
const a = await fetch(e, i);
|
|
7166
7159
|
if (!r)
|
|
@@ -7224,12 +7217,12 @@ class Mr {
|
|
|
7224
7217
|
return this.formatResponse(i);
|
|
7225
7218
|
}
|
|
7226
7219
|
subscribe(e, t) {
|
|
7227
|
-
const { query: n, variables: s, operationName: r } = e, i =
|
|
7220
|
+
const { query: n, variables: s, operationName: r } = e, i = on(
|
|
7228
7221
|
this.$__client.subscription(n, s),
|
|
7229
|
-
|
|
7222
|
+
an((a) => {
|
|
7230
7223
|
t(this.formatResponse(a));
|
|
7231
7224
|
}),
|
|
7232
|
-
|
|
7225
|
+
ln(() => {
|
|
7233
7226
|
})
|
|
7234
7227
|
);
|
|
7235
7228
|
return this.$__subscriptionManager.set(r, i), {
|
|
@@ -7297,7 +7290,7 @@ class Mr {
|
|
|
7297
7290
|
});
|
|
7298
7291
|
}
|
|
7299
7292
|
}
|
|
7300
|
-
class
|
|
7293
|
+
class Or {
|
|
7301
7294
|
/**
|
|
7302
7295
|
* Class constructor
|
|
7303
7296
|
*
|
|
@@ -7351,7 +7344,7 @@ class Ur {
|
|
|
7351
7344
|
const u = this.$__uris[c];
|
|
7352
7345
|
this.$__authTokenObjects[u] = null;
|
|
7353
7346
|
}
|
|
7354
|
-
this.log("info", `KnishIOClient::initialize() - Initializing new Knish.IO client session for SDK version ${r}...`), this.$__client = s || new
|
|
7347
|
+
this.log("info", `KnishIOClient::initialize() - Initializing new Knish.IO client session for SDK version ${r}...`), this.$__client = s || new vr({
|
|
7355
7348
|
socket: {
|
|
7356
7349
|
socketUri: null,
|
|
7357
7350
|
appKey: "knishio",
|
|
@@ -7390,7 +7383,7 @@ class Ur {
|
|
|
7390
7383
|
*/
|
|
7391
7384
|
subscribe() {
|
|
7392
7385
|
if (!this.client().getSocketUri())
|
|
7393
|
-
throw new
|
|
7386
|
+
throw new Y("KnishIOClient::subscribe() - Socket client not initialized!");
|
|
7394
7387
|
return this.client();
|
|
7395
7388
|
}
|
|
7396
7389
|
/**
|
|
@@ -7514,7 +7507,7 @@ class Ur {
|
|
|
7514
7507
|
* @returns {string}
|
|
7515
7508
|
*/
|
|
7516
7509
|
hashSecret(e, t = null) {
|
|
7517
|
-
return this.log("info", `KnishIOClient::hashSecret(${t ? `source: ${t}` : ""}) - Computing wallet bundle from secret...`),
|
|
7510
|
+
return this.log("info", `KnishIOClient::hashSecret(${t ? `source: ${t}` : ""}) - Computing wallet bundle from secret...`), de(e);
|
|
7518
7511
|
}
|
|
7519
7512
|
/**
|
|
7520
7513
|
* Retrieves the stored secret for this session
|
|
@@ -7523,7 +7516,7 @@ class Ur {
|
|
|
7523
7516
|
*/
|
|
7524
7517
|
getSecret() {
|
|
7525
7518
|
if (!this.hasSecret())
|
|
7526
|
-
throw new
|
|
7519
|
+
throw new Pe("KnishIOClient::getSecret() - Unable to find a stored secret! Have you set a secret?");
|
|
7527
7520
|
return this.$__secret;
|
|
7528
7521
|
}
|
|
7529
7522
|
/**
|
|
@@ -7541,7 +7534,7 @@ class Ur {
|
|
|
7541
7534
|
*/
|
|
7542
7535
|
getBundle() {
|
|
7543
7536
|
if (!this.hasBundle())
|
|
7544
|
-
throw new
|
|
7537
|
+
throw new Pe("KnishIOClient::getBundle() - Unable to find a stored bundle! Have you set a secret?");
|
|
7545
7538
|
return this.$__bundle;
|
|
7546
7539
|
}
|
|
7547
7540
|
/**
|
|
@@ -7550,10 +7543,10 @@ class Ur {
|
|
|
7550
7543
|
* @returns {Promise<string>} A promise that resolves to the device fingerprint as a string.
|
|
7551
7544
|
*/
|
|
7552
7545
|
getFingerprint() {
|
|
7553
|
-
return
|
|
7546
|
+
return hr();
|
|
7554
7547
|
}
|
|
7555
7548
|
getFingerprintData() {
|
|
7556
|
-
return
|
|
7549
|
+
return Gt();
|
|
7557
7550
|
}
|
|
7558
7551
|
/**
|
|
7559
7552
|
* Retrieves this session's wallet used for signing the next Molecule
|
|
@@ -7610,7 +7603,7 @@ class Ur {
|
|
|
7610
7603
|
token: "USER",
|
|
7611
7604
|
batchId: n.batchId,
|
|
7612
7605
|
characters: n.characters
|
|
7613
|
-
}), new
|
|
7606
|
+
}), new V({
|
|
7614
7607
|
secret: e,
|
|
7615
7608
|
sourceWallet: n,
|
|
7616
7609
|
remainderWallet: this.getRemainderWallet(),
|
|
@@ -7650,7 +7643,7 @@ class Ur {
|
|
|
7650
7643
|
this.log("info", `KnishIOClient::createMoleculeQuery() - Creating a new ${e.name} query...`);
|
|
7651
7644
|
const n = t || await this.createMolecule({}), s = new e(this.client(), this, n);
|
|
7652
7645
|
if (!(s instanceof W))
|
|
7653
|
-
throw new
|
|
7646
|
+
throw new Y(`${this.constructor.name}::createMoleculeMutation() - This method only accepts MutationProposeMolecule!`);
|
|
7654
7647
|
return this.lastMoleculeQuery = s, s;
|
|
7655
7648
|
}
|
|
7656
7649
|
/**
|
|
@@ -7715,7 +7708,7 @@ class Ur {
|
|
|
7715
7708
|
bundle: t = null,
|
|
7716
7709
|
type: n = "regular"
|
|
7717
7710
|
}) {
|
|
7718
|
-
const s = this.createQuery(
|
|
7711
|
+
const s = this.createQuery(fs);
|
|
7719
7712
|
return this.executeQuery(s, {
|
|
7720
7713
|
bundleHash: t || this.getBundle(),
|
|
7721
7714
|
token: e,
|
|
@@ -7738,10 +7731,10 @@ class Ur {
|
|
|
7738
7731
|
token: e,
|
|
7739
7732
|
type: n
|
|
7740
7733
|
})).payload();
|
|
7741
|
-
if (s === null ||
|
|
7742
|
-
throw new
|
|
7734
|
+
if (s === null || le.cmp(s.balance, t) < 0)
|
|
7735
|
+
throw new J();
|
|
7743
7736
|
if (!s.position || !s.address)
|
|
7744
|
-
throw new
|
|
7737
|
+
throw new J("Source wallet can not be a shadow wallet.");
|
|
7745
7738
|
return s;
|
|
7746
7739
|
}
|
|
7747
7740
|
/**
|
|
@@ -7753,7 +7746,7 @@ class Ur {
|
|
|
7753
7746
|
bundle: e,
|
|
7754
7747
|
closure: t
|
|
7755
7748
|
}) {
|
|
7756
|
-
return await this.createSubscribe(
|
|
7749
|
+
return await this.createSubscribe(Ns).execute({
|
|
7757
7750
|
variables: {
|
|
7758
7751
|
bundle: e || this.getBundle()
|
|
7759
7752
|
},
|
|
@@ -7774,8 +7767,8 @@ class Ur {
|
|
|
7774
7767
|
closure: n
|
|
7775
7768
|
}) {
|
|
7776
7769
|
if (!t)
|
|
7777
|
-
throw new
|
|
7778
|
-
return this.createSubscribe(
|
|
7770
|
+
throw new Y(`${this.constructor.name}::subscribeWalletStatus() - Token parameter is required!`);
|
|
7771
|
+
return this.createSubscribe(Ls).execute({
|
|
7779
7772
|
variables: {
|
|
7780
7773
|
bundle: e || this.getBundle(),
|
|
7781
7774
|
token: t
|
|
@@ -7794,7 +7787,7 @@ class Ur {
|
|
|
7794
7787
|
bundle: e,
|
|
7795
7788
|
closure: t
|
|
7796
7789
|
}) {
|
|
7797
|
-
return this.createSubscribe(
|
|
7790
|
+
return this.createSubscribe(Fs).execute({
|
|
7798
7791
|
variables: {
|
|
7799
7792
|
bundle: e || this.getBundle()
|
|
7800
7793
|
},
|
|
@@ -7814,7 +7807,7 @@ class Ur {
|
|
|
7814
7807
|
metaId: t,
|
|
7815
7808
|
closure: n
|
|
7816
7809
|
}) {
|
|
7817
|
-
return this.createSubscribe(
|
|
7810
|
+
return this.createSubscribe(Qs).execute({
|
|
7818
7811
|
variables: {
|
|
7819
7812
|
metaType: e,
|
|
7820
7813
|
metaId: t
|
|
@@ -7873,7 +7866,7 @@ class Ur {
|
|
|
7873
7866
|
}) {
|
|
7874
7867
|
this.log("info", `KnishIOClient::queryMeta() - Querying metaType: ${e}, metaId: ${t}...`);
|
|
7875
7868
|
let f, m;
|
|
7876
|
-
return p ? (f = this.createQuery(
|
|
7869
|
+
return p ? (f = this.createQuery(Tt), m = Tt.createVariables({
|
|
7877
7870
|
metaType: e,
|
|
7878
7871
|
metaId: t,
|
|
7879
7872
|
key: n,
|
|
@@ -7886,7 +7879,7 @@ class Ur {
|
|
|
7886
7879
|
keys: b,
|
|
7887
7880
|
atomValues: A,
|
|
7888
7881
|
cellSlug: this.getCellSlug()
|
|
7889
|
-
})) : h ? (f = this.createQuery(
|
|
7882
|
+
})) : h ? (f = this.createQuery(Mt), m = Mt.createVariables({
|
|
7890
7883
|
metaType: e,
|
|
7891
7884
|
metaId: t,
|
|
7892
7885
|
key: n,
|
|
@@ -7899,7 +7892,7 @@ class Ur {
|
|
|
7899
7892
|
keys: b,
|
|
7900
7893
|
atomValues: A,
|
|
7901
7894
|
cellSlug: this.getCellSlug()
|
|
7902
|
-
})) : (f = this.createQuery(
|
|
7895
|
+
})) : (f = this.createQuery($t), m = $t.createVariables({
|
|
7903
7896
|
metaType: e,
|
|
7904
7897
|
metaId: t,
|
|
7905
7898
|
key: n,
|
|
@@ -7934,18 +7927,17 @@ class Ur {
|
|
|
7934
7927
|
* @return {Promise<boolean>}
|
|
7935
7928
|
*/
|
|
7936
7929
|
async hasQueryField(e) {
|
|
7937
|
-
var s, r, i;
|
|
7938
7930
|
const n = `${this.getUri()}::${e}`;
|
|
7939
7931
|
if (typeof this.$__capabilityCache[n] == "boolean")
|
|
7940
7932
|
return this.$__capabilityCache[n];
|
|
7941
7933
|
try {
|
|
7942
|
-
const
|
|
7934
|
+
const i = ((await this.$__client.query({
|
|
7943
7935
|
query: "{ __schema { queryType { fields { name } } } }",
|
|
7944
7936
|
variables: {}
|
|
7945
|
-
})
|
|
7946
|
-
return this.$__capabilityCache[n] =
|
|
7947
|
-
} catch (
|
|
7948
|
-
return this.log("warn", `KnishIOClient::hasQueryField() - Capability probe for '${e}' failed: ${
|
|
7937
|
+
}))?.data?.__schema?.queryType?.fields || []).some((a) => a.name === e);
|
|
7938
|
+
return this.$__capabilityCache[n] = i, i;
|
|
7939
|
+
} catch (s) {
|
|
7940
|
+
return this.log("warn", `KnishIOClient::hasQueryField() - Capability probe for '${e}' failed: ${s.message}`), this.$__capabilityCache[n] = !1, !1;
|
|
7949
7941
|
}
|
|
7950
7942
|
}
|
|
7951
7943
|
/**
|
|
@@ -7969,7 +7961,7 @@ class Ur {
|
|
|
7969
7961
|
}) {
|
|
7970
7962
|
if (this.log("info", `KnishIOClient::queryEmbeddingStatus() - Checking embedding status for metaType: ${e || "(bulk)"}...`), !await this.hasQueryField("embeddingStatus"))
|
|
7971
7963
|
return this.log("warn", "KnishIOClient::queryEmbeddingStatus() - Server does not support embeddingStatus query. Returning null."), null;
|
|
7972
|
-
const r = this.createQuery(
|
|
7964
|
+
const r = this.createQuery(Ct), i = Ct.createVariables({ metaType: e, metaId: t, instances: n });
|
|
7973
7965
|
return this.executeQuery(r, i);
|
|
7974
7966
|
}
|
|
7975
7967
|
/**
|
|
@@ -7982,7 +7974,7 @@ class Ur {
|
|
|
7982
7974
|
batchId: e
|
|
7983
7975
|
}) {
|
|
7984
7976
|
this.log("info", `KnishIOClient::queryBatch() - Querying cascading meta instances for batchId: ${e}...`);
|
|
7985
|
-
const t = this.createQuery(
|
|
7977
|
+
const t = this.createQuery(xe);
|
|
7986
7978
|
return await this.executeQuery(t, {
|
|
7987
7979
|
batchId: e
|
|
7988
7980
|
});
|
|
@@ -7997,7 +7989,7 @@ class Ur {
|
|
|
7997
7989
|
batchId: e
|
|
7998
7990
|
}) {
|
|
7999
7991
|
this.log("info", `KnishIOClient::queryBatchHistory() - Querying cascading meta instances for batchId: ${e}...`);
|
|
8000
|
-
const t = this.createQuery(
|
|
7992
|
+
const t = this.createQuery(ys);
|
|
8001
7993
|
return await this.executeQuery(t, {
|
|
8002
7994
|
batchId: e
|
|
8003
7995
|
});
|
|
@@ -8070,8 +8062,8 @@ class Ur {
|
|
|
8070
8062
|
}
|
|
8071
8063
|
}) {
|
|
8072
8064
|
this.log("info", "KnishIOClient::queryAtom() - Querying atom instances");
|
|
8073
|
-
const
|
|
8074
|
-
return await this.executeQuery(
|
|
8065
|
+
const ce = this.createQuery(It);
|
|
8066
|
+
return await this.executeQuery(ce, It.createVariables({
|
|
8075
8067
|
molecularHashes: e,
|
|
8076
8068
|
molecularHash: t,
|
|
8077
8069
|
bundleHashes: n,
|
|
@@ -8114,7 +8106,7 @@ class Ur {
|
|
|
8114
8106
|
secret: this.getSecret(),
|
|
8115
8107
|
token: e
|
|
8116
8108
|
}), n = await this.createMoleculeMutation({
|
|
8117
|
-
mutationClass:
|
|
8109
|
+
mutationClass: Bs
|
|
8118
8110
|
});
|
|
8119
8111
|
return n.fillMolecule(t), await this.executeQuery(n);
|
|
8120
8112
|
}
|
|
@@ -8131,7 +8123,7 @@ class Ur {
|
|
|
8131
8123
|
metaType: t,
|
|
8132
8124
|
metaId: n
|
|
8133
8125
|
}) {
|
|
8134
|
-
const s = this.createQuery(
|
|
8126
|
+
const s = this.createQuery(zs);
|
|
8135
8127
|
return await this.executeQuery(s, {
|
|
8136
8128
|
bundleHash: e,
|
|
8137
8129
|
metaType: t,
|
|
@@ -8164,7 +8156,7 @@ class Ur {
|
|
|
8164
8156
|
timeZone: c,
|
|
8165
8157
|
json: u = {}
|
|
8166
8158
|
}) {
|
|
8167
|
-
const l = this.createQuery(
|
|
8159
|
+
const l = this.createQuery(Ds);
|
|
8168
8160
|
return await this.executeQuery(l, {
|
|
8169
8161
|
bundleHash: e,
|
|
8170
8162
|
metaType: t,
|
|
@@ -8200,11 +8192,11 @@ class Ur {
|
|
|
8200
8192
|
units: r = []
|
|
8201
8193
|
}) {
|
|
8202
8194
|
const i = M.get(n || {}, "fungibility");
|
|
8203
|
-
if (i === "stackable" && (n.batchId = s ||
|
|
8195
|
+
if (i === "stackable" && (n.batchId = s || Be({})), ["nonfungible", "stackable"].includes(i) && r.length > 0) {
|
|
8204
8196
|
if (M.get(n || {}, "decimals") > 0)
|
|
8205
|
-
throw new
|
|
8197
|
+
throw new Ks();
|
|
8206
8198
|
if (t > 0)
|
|
8207
|
-
throw new
|
|
8199
|
+
throw new ke();
|
|
8208
8200
|
t = r.length, n.splittable = 1, n.decimals = 0, n.tokenUnits = JSON.stringify(r);
|
|
8209
8201
|
}
|
|
8210
8202
|
const a = new S({
|
|
@@ -8213,7 +8205,7 @@ class Ur {
|
|
|
8213
8205
|
token: e,
|
|
8214
8206
|
batchId: s
|
|
8215
8207
|
}), c = await this.createMoleculeMutation({
|
|
8216
|
-
mutationClass:
|
|
8208
|
+
mutationClass: ks
|
|
8217
8209
|
});
|
|
8218
8210
|
return c.fillMolecule({
|
|
8219
8211
|
recipientWallet: a,
|
|
@@ -8238,7 +8230,7 @@ class Ur {
|
|
|
8238
8230
|
}) {
|
|
8239
8231
|
const r = await this.createMoleculeMutation(
|
|
8240
8232
|
{
|
|
8241
|
-
mutationClass:
|
|
8233
|
+
mutationClass: nr,
|
|
8242
8234
|
molecule: await this.createMolecule({
|
|
8243
8235
|
secret: this.getSecret()
|
|
8244
8236
|
})
|
|
@@ -8268,7 +8260,7 @@ class Ur {
|
|
|
8268
8260
|
}) {
|
|
8269
8261
|
const r = await this.createMoleculeMutation(
|
|
8270
8262
|
{
|
|
8271
|
-
mutationClass:
|
|
8263
|
+
mutationClass: Ts,
|
|
8272
8264
|
molecule: await this.createMolecule({
|
|
8273
8265
|
secret: this.getSecret()
|
|
8274
8266
|
})
|
|
@@ -8291,7 +8283,7 @@ class Ur {
|
|
|
8291
8283
|
host: e
|
|
8292
8284
|
}) {
|
|
8293
8285
|
const t = await this.createMoleculeMutation({
|
|
8294
|
-
mutationClass:
|
|
8286
|
+
mutationClass: Es,
|
|
8295
8287
|
molecule: await this.createMolecule({
|
|
8296
8288
|
secret: this.getSecret()
|
|
8297
8289
|
})
|
|
@@ -8316,7 +8308,7 @@ class Ur {
|
|
|
8316
8308
|
meta: s = {}
|
|
8317
8309
|
}) {
|
|
8318
8310
|
const r = await this.createMoleculeMutation({
|
|
8319
|
-
mutationClass:
|
|
8311
|
+
mutationClass: Rs,
|
|
8320
8312
|
molecule: await this.createMolecule({
|
|
8321
8313
|
secret: this.getSecret()
|
|
8322
8314
|
})
|
|
@@ -8342,7 +8334,7 @@ class Ur {
|
|
|
8342
8334
|
code: n
|
|
8343
8335
|
}) {
|
|
8344
8336
|
const s = await this.createMoleculeMutation({
|
|
8345
|
-
mutationClass:
|
|
8337
|
+
mutationClass: vs
|
|
8346
8338
|
});
|
|
8347
8339
|
return s.fillMolecule({
|
|
8348
8340
|
type: e,
|
|
@@ -8361,7 +8353,7 @@ class Ur {
|
|
|
8361
8353
|
type: e,
|
|
8362
8354
|
contact: t
|
|
8363
8355
|
}) {
|
|
8364
|
-
const n = this.createQuery(
|
|
8356
|
+
const n = this.createQuery(Ws);
|
|
8365
8357
|
return await this.executeQuery(n, {
|
|
8366
8358
|
bundle: this.getBundle(),
|
|
8367
8359
|
type: e,
|
|
@@ -8408,7 +8400,7 @@ class Ur {
|
|
|
8408
8400
|
metaType: e,
|
|
8409
8401
|
metaId: t
|
|
8410
8402
|
}) {
|
|
8411
|
-
const n = this.createQuery(
|
|
8403
|
+
const n = this.createQuery(Zs);
|
|
8412
8404
|
return await this.executeQuery(n, {
|
|
8413
8405
|
metaType: e,
|
|
8414
8406
|
metaId: t
|
|
@@ -8430,7 +8422,7 @@ class Ur {
|
|
|
8430
8422
|
unspent: n = !0
|
|
8431
8423
|
}) {
|
|
8432
8424
|
this.log("info", `KnishIOClient::queryWallets() - Querying wallets${e ? ` for ${e}` : ""}...`);
|
|
8433
|
-
const s = this.createQuery(
|
|
8425
|
+
const s = this.createQuery(ds);
|
|
8434
8426
|
return this.executeQuery(s, {
|
|
8435
8427
|
bundleHash: e || this.getBundle(),
|
|
8436
8428
|
token: t,
|
|
@@ -8452,7 +8444,7 @@ class Ur {
|
|
|
8452
8444
|
raw: n = !1
|
|
8453
8445
|
}) {
|
|
8454
8446
|
this.log("info", `KnishIOClient::queryBundle() - Querying wallet bundle metadata${e ? ` for ${e}` : ""}...`), e || (e = this.getBundle()), typeof e == "string" && (e = [e]);
|
|
8455
|
-
const s = this.createQuery(
|
|
8447
|
+
const s = this.createQuery(hs);
|
|
8456
8448
|
return this.executeQuery(s, { bundleHashes: e }).then((r) => n ? r : r.payload());
|
|
8457
8449
|
}
|
|
8458
8450
|
/**
|
|
@@ -8464,7 +8456,7 @@ class Ur {
|
|
|
8464
8456
|
async queryContinuId({
|
|
8465
8457
|
bundle: e
|
|
8466
8458
|
}) {
|
|
8467
|
-
const t = this.createQuery(
|
|
8459
|
+
const t = this.createQuery(cs);
|
|
8468
8460
|
return this.executeQuery(t, {
|
|
8469
8461
|
bundle: e
|
|
8470
8462
|
});
|
|
@@ -8496,14 +8488,14 @@ class Ur {
|
|
|
8496
8488
|
}) {
|
|
8497
8489
|
let a, c;
|
|
8498
8490
|
r = r || {};
|
|
8499
|
-
const u = this.createQuery(
|
|
8491
|
+
const u = this.createQuery(Js), l = await this.executeQuery(u, {
|
|
8500
8492
|
slug: e
|
|
8501
8493
|
}), h = M.get(l.data(), "0.fungibility") === "stackable";
|
|
8502
8494
|
if (!h && i !== null)
|
|
8503
|
-
throw new
|
|
8504
|
-
if (h && i === null && (i =
|
|
8495
|
+
throw new We("Expected Batch ID = null for non-stackable tokens.");
|
|
8496
|
+
if (h && i === null && (i = Be({})), s.length > 0) {
|
|
8505
8497
|
if (n > 0)
|
|
8506
|
-
throw new
|
|
8498
|
+
throw new ke();
|
|
8507
8499
|
n = s.length, r.tokenUnits = JSON.stringify(s);
|
|
8508
8500
|
}
|
|
8509
8501
|
t ? (Object.prototype.toString.call(t) === "[object String]" && (S.isBundleHash(t) ? (a = "walletBundle", c = t) : t = S.create({
|
|
@@ -8511,7 +8503,7 @@ class Ur {
|
|
|
8511
8503
|
token: e
|
|
8512
8504
|
})), t instanceof S && (a = "wallet", r.position = t.position, r.bundle = t.bundle, c = t.address)) : (a = "walletBundle", c = this.getBundle());
|
|
8513
8505
|
const p = await this.createMoleculeMutation({
|
|
8514
|
-
mutationClass:
|
|
8506
|
+
mutationClass: Ss
|
|
8515
8507
|
});
|
|
8516
8508
|
return p.fillMolecule({
|
|
8517
8509
|
token: e,
|
|
@@ -8537,7 +8529,7 @@ class Ur {
|
|
|
8537
8529
|
molecule: n = null
|
|
8538
8530
|
}) {
|
|
8539
8531
|
const s = await this.createMoleculeMutation({
|
|
8540
|
-
mutationClass:
|
|
8532
|
+
mutationClass: Is,
|
|
8541
8533
|
molecule: n
|
|
8542
8534
|
});
|
|
8543
8535
|
return s.fillMolecule({
|
|
@@ -8558,10 +8550,10 @@ class Ur {
|
|
|
8558
8550
|
}) {
|
|
8559
8551
|
const t = await this.queryWallets({ token: e });
|
|
8560
8552
|
if (!t || !Array.isArray(t))
|
|
8561
|
-
throw new
|
|
8553
|
+
throw new vt();
|
|
8562
8554
|
t.forEach((s) => {
|
|
8563
8555
|
if (!s.isShadow())
|
|
8564
|
-
throw new
|
|
8556
|
+
throw new vt();
|
|
8565
8557
|
});
|
|
8566
8558
|
const n = [];
|
|
8567
8559
|
for (const s of t)
|
|
@@ -8597,14 +8589,14 @@ class Ur {
|
|
|
8597
8589
|
}) {
|
|
8598
8590
|
if (s.length > 0) {
|
|
8599
8591
|
if (n > 0)
|
|
8600
|
-
throw new
|
|
8592
|
+
throw new ke();
|
|
8601
8593
|
n = s.length;
|
|
8602
8594
|
}
|
|
8603
8595
|
if (i === null && (i = await this.querySourceWallet({
|
|
8604
8596
|
token: t,
|
|
8605
8597
|
amount: n
|
|
8606
|
-
})), i === null ||
|
|
8607
|
-
throw new
|
|
8598
|
+
})), i === null || le.cmp(i.balance, n) < 0)
|
|
8599
|
+
throw new J();
|
|
8608
8600
|
const a = S.create({
|
|
8609
8601
|
bundle: e,
|
|
8610
8602
|
token: t
|
|
@@ -8622,7 +8614,7 @@ class Ur {
|
|
|
8622
8614
|
sourceWallet: i,
|
|
8623
8615
|
remainderWallet: c
|
|
8624
8616
|
}), l = await this.createMoleculeMutation({
|
|
8625
|
-
mutationClass:
|
|
8617
|
+
mutationClass: At,
|
|
8626
8618
|
molecule: u
|
|
8627
8619
|
});
|
|
8628
8620
|
return l.fillMolecule({
|
|
@@ -8658,7 +8650,7 @@ class Ur {
|
|
|
8658
8650
|
const h = l.units || [];
|
|
8659
8651
|
if (h.length > 0) {
|
|
8660
8652
|
if (l.amount > 0)
|
|
8661
|
-
throw new
|
|
8653
|
+
throw new ke();
|
|
8662
8654
|
return h.length;
|
|
8663
8655
|
}
|
|
8664
8656
|
return l.amount || 0;
|
|
@@ -8666,8 +8658,8 @@ class Ur {
|
|
|
8666
8658
|
if (n === null && (n = await this.querySourceWallet({
|
|
8667
8659
|
token: e,
|
|
8668
8660
|
amount: r
|
|
8669
|
-
})), n === null ||
|
|
8670
|
-
throw new
|
|
8661
|
+
})), n === null || le.cmp(n.balance, r) < 0)
|
|
8662
|
+
throw new J();
|
|
8671
8663
|
const i = t.map((l) => {
|
|
8672
8664
|
const h = S.create({
|
|
8673
8665
|
bundle: l.bundleHash,
|
|
@@ -8686,7 +8678,7 @@ class Ur {
|
|
|
8686
8678
|
sourceWallet: n,
|
|
8687
8679
|
remainderWallet: a
|
|
8688
8680
|
}), u = await this.createMoleculeMutation({
|
|
8689
|
-
mutationClass:
|
|
8681
|
+
mutationClass: At,
|
|
8690
8682
|
molecule: c
|
|
8691
8683
|
});
|
|
8692
8684
|
return u.fillMoleculeMulti({
|
|
@@ -8719,7 +8711,7 @@ class Ur {
|
|
|
8719
8711
|
sourceWallet: s,
|
|
8720
8712
|
remainderWallet: r
|
|
8721
8713
|
}), a = await this.createMoleculeMutation({
|
|
8722
|
-
mutationClass:
|
|
8714
|
+
mutationClass: sr,
|
|
8723
8715
|
molecule: i
|
|
8724
8716
|
});
|
|
8725
8717
|
return a.fillMolecule({
|
|
@@ -8752,7 +8744,7 @@ class Ur {
|
|
|
8752
8744
|
sourceWallet: n,
|
|
8753
8745
|
remainderWallet: r
|
|
8754
8746
|
}), a = await this.createMoleculeMutation({
|
|
8755
|
-
mutationClass:
|
|
8747
|
+
mutationClass: rr,
|
|
8756
8748
|
molecule: i
|
|
8757
8749
|
}), c = {};
|
|
8758
8750
|
return c[this.getBundle()] = t, a.fillMolecule({
|
|
@@ -8782,7 +8774,7 @@ class Ur {
|
|
|
8782
8774
|
const r = s.createRemainder(this.getSecret());
|
|
8783
8775
|
if (n.length > 0) {
|
|
8784
8776
|
if (t > 0)
|
|
8785
|
-
throw new
|
|
8777
|
+
throw new ke();
|
|
8786
8778
|
t = n.length, s.splitUnits(
|
|
8787
8779
|
n,
|
|
8788
8780
|
r
|
|
@@ -8817,7 +8809,7 @@ class Ur {
|
|
|
8817
8809
|
sourceWallet: s = null
|
|
8818
8810
|
}) {
|
|
8819
8811
|
if (s === null && (s = (await this.queryBalance({ token: e })).payload()), !s)
|
|
8820
|
-
throw new
|
|
8812
|
+
throw new J("Source wallet is missing or invalid.");
|
|
8821
8813
|
const r = s.createRemainder(this.getSecret()), i = await this.createMolecule({
|
|
8822
8814
|
sourceWallet: s,
|
|
8823
8815
|
remainderWallet: r
|
|
@@ -8851,17 +8843,17 @@ class Ur {
|
|
|
8851
8843
|
sourceWallet: r = null
|
|
8852
8844
|
}) {
|
|
8853
8845
|
if (r === null && (r = (await this.queryBalance({ token: t })).payload()), r === null)
|
|
8854
|
-
throw new
|
|
8846
|
+
throw new J("Source wallet is missing or invalid.");
|
|
8855
8847
|
if (!r.tokenUnits || !r.tokenUnits.length)
|
|
8856
|
-
throw new
|
|
8848
|
+
throw new J("Source wallet does not have token units.");
|
|
8857
8849
|
if (!s.length)
|
|
8858
|
-
throw new
|
|
8850
|
+
throw new J("Fused token unit list is empty.");
|
|
8859
8851
|
const i = [];
|
|
8860
8852
|
r.tokenUnits.forEach((h) => {
|
|
8861
8853
|
i.push(h.id);
|
|
8862
8854
|
}), s.forEach((h) => {
|
|
8863
8855
|
if (!i.includes(h))
|
|
8864
|
-
throw new
|
|
8856
|
+
throw new J(`Fused token unit ID = ${h} does not found in the source wallet.`);
|
|
8865
8857
|
});
|
|
8866
8858
|
const a = S.create({
|
|
8867
8859
|
bundle: e,
|
|
@@ -8869,7 +8861,7 @@ class Ur {
|
|
|
8869
8861
|
});
|
|
8870
8862
|
a.initBatchId({ sourceWallet: r });
|
|
8871
8863
|
const c = r.createRemainder(this.getSecret());
|
|
8872
|
-
r.splitUnits(s, c), typeof n == "string" && (n = new
|
|
8864
|
+
r.splitUnits(s, c), typeof n == "string" && (n = new pe(n, n, {})), n.metas.fusedTokenUnits = r.getTokenUnitsData(), a.tokenUnits = [n];
|
|
8873
8865
|
const u = await this.createMolecule({
|
|
8874
8866
|
sourceWallet: r,
|
|
8875
8867
|
remainderWallet: c
|
|
@@ -8896,15 +8888,15 @@ class Ur {
|
|
|
8896
8888
|
}) {
|
|
8897
8889
|
this.setCellSlug(e);
|
|
8898
8890
|
const n = new S({
|
|
8899
|
-
secret:
|
|
8891
|
+
secret: tt(await this.getFingerprint()),
|
|
8900
8892
|
token: "AUTH"
|
|
8901
|
-
}), s = await this.createQuery(
|
|
8893
|
+
}), s = await this.createQuery(Ps), r = {
|
|
8902
8894
|
cellSlug: e,
|
|
8903
8895
|
pubkey: n.pubkey,
|
|
8904
8896
|
encrypt: t
|
|
8905
8897
|
}, i = await s.execute({ variables: r });
|
|
8906
8898
|
if (i.success()) {
|
|
8907
|
-
const a =
|
|
8899
|
+
const a = ve.create({
|
|
8908
8900
|
token: i.token(),
|
|
8909
8901
|
expiresAt: i.expiresAt(),
|
|
8910
8902
|
pubkey: i.pubKey(),
|
|
@@ -8912,7 +8904,7 @@ class Ur {
|
|
|
8912
8904
|
}, n);
|
|
8913
8905
|
this.setAuthToken(a);
|
|
8914
8906
|
} else
|
|
8915
|
-
throw new
|
|
8907
|
+
throw new xt(`KnishIOClient::requestGuestAuthToken() - Authorization attempt rejected by ledger. Reason: ${i.reason()}`);
|
|
8916
8908
|
return i;
|
|
8917
8909
|
}
|
|
8918
8910
|
/**
|
|
@@ -8934,13 +8926,13 @@ class Ur {
|
|
|
8934
8926
|
secret: e,
|
|
8935
8927
|
sourceWallet: n
|
|
8936
8928
|
}), r = await this.createMoleculeMutation({
|
|
8937
|
-
mutationClass:
|
|
8929
|
+
mutationClass: bs,
|
|
8938
8930
|
molecule: s
|
|
8939
8931
|
}), i = { encrypt: t ? "true" : "false" };
|
|
8940
8932
|
n.pubkey && (i.walletPubkey = n.pubkey), r.fillMolecule({ meta: i });
|
|
8941
8933
|
const a = await r.execute({});
|
|
8942
8934
|
if (a.success()) {
|
|
8943
|
-
const c =
|
|
8935
|
+
const c = ve.create({
|
|
8944
8936
|
token: a.token(),
|
|
8945
8937
|
expiresAt: a.expiresAt(),
|
|
8946
8938
|
pubkey: a.pubKey(),
|
|
@@ -8948,7 +8940,7 @@ class Ur {
|
|
|
8948
8940
|
}, n);
|
|
8949
8941
|
this.setAuthToken(c);
|
|
8950
8942
|
} else
|
|
8951
|
-
throw new
|
|
8943
|
+
throw new xt(`KnishIOClient::requestProfileAuthToken() - Authorization attempt rejected by ledger. Reason: ${a.reason()}`);
|
|
8952
8944
|
return a;
|
|
8953
8945
|
}
|
|
8954
8946
|
/**
|
|
@@ -8968,7 +8960,7 @@ class Ur {
|
|
|
8968
8960
|
}) {
|
|
8969
8961
|
if (this.$__serverSdkVersion < 3)
|
|
8970
8962
|
return this.log("warn", "KnishIOClient::authorize() - Server SDK version does not require an authorization..."), null;
|
|
8971
|
-
e === null && t && (e =
|
|
8963
|
+
e === null && t && (e = tt(t)), n && this.setCellSlug(n), this.$__authInProcess = !0;
|
|
8972
8964
|
let r;
|
|
8973
8965
|
return e ? r = await this.requestProfileAuthToken({
|
|
8974
8966
|
secret: e,
|
|
@@ -9020,7 +9012,7 @@ class Ur {
|
|
|
9020
9012
|
}
|
|
9021
9013
|
}
|
|
9022
9014
|
}
|
|
9023
|
-
class
|
|
9015
|
+
class Rr extends C {
|
|
9024
9016
|
/**
|
|
9025
9017
|
* Class constructor
|
|
9026
9018
|
*
|
|
@@ -9069,7 +9061,7 @@ class Br extends C {
|
|
|
9069
9061
|
*/
|
|
9070
9062
|
payloadKey(e) {
|
|
9071
9063
|
if (!M.has(this.payload(), e))
|
|
9072
|
-
throw new
|
|
9064
|
+
throw new ee(`ResponseAuthorizationGuest::payloadKey() - '${e}' key is not found in the payload!`);
|
|
9073
9065
|
return M.get(this.payload(), e);
|
|
9074
9066
|
}
|
|
9075
9067
|
/**
|
|
@@ -9091,119 +9083,119 @@ class Br extends C {
|
|
|
9091
9083
|
}
|
|
9092
9084
|
export {
|
|
9093
9085
|
g as Atom,
|
|
9094
|
-
|
|
9086
|
+
be as AtomIndexException,
|
|
9095
9087
|
P as AtomMeta,
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9088
|
+
oe as AtomsMissingException,
|
|
9089
|
+
ve as AuthToken,
|
|
9090
|
+
xt as AuthorizationRejectedException,
|
|
9091
|
+
ue as BalanceInsufficientException,
|
|
9092
|
+
We as BatchIdException,
|
|
9093
|
+
Ae as CheckMolecule,
|
|
9094
|
+
Y as CodeException,
|
|
9095
|
+
le as Decimal,
|
|
9104
9096
|
M as Dot,
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9097
|
+
ee as InvalidResponseException,
|
|
9098
|
+
Or as KnishIOClient,
|
|
9099
|
+
he as Meta,
|
|
9108
9100
|
H as MetaMissingException,
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9101
|
+
rs as MolecularHashMismatchException,
|
|
9102
|
+
is as MolecularHashMissingException,
|
|
9103
|
+
V as Molecule,
|
|
9104
|
+
Fe as Mutation,
|
|
9105
|
+
Ds as MutationActiveSession,
|
|
9106
|
+
Rs as MutationAppendRequest,
|
|
9107
|
+
Is as MutationClaimShadowWallet,
|
|
9108
|
+
vs as MutationCreateIdentifier,
|
|
9109
|
+
Ts as MutationCreateMeta,
|
|
9110
|
+
nr as MutationCreateRule,
|
|
9111
|
+
ks as MutationCreateToken,
|
|
9112
|
+
Bs as MutationCreateWallet,
|
|
9113
|
+
sr as MutationDepositBufferToken,
|
|
9114
|
+
Ws as MutationLinkIdentifier,
|
|
9115
|
+
Es as MutationPeering,
|
|
9124
9116
|
W as MutationProposeMolecule,
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9117
|
+
bs as MutationRequestAuthorization,
|
|
9118
|
+
Ps as MutationRequestAuthorizationGuest,
|
|
9119
|
+
Ss as MutationRequestTokens,
|
|
9120
|
+
At as MutationTransferTokens,
|
|
9121
|
+
rr as MutationWithdrawBufferToken,
|
|
9122
|
+
St as NegativeAmountException,
|
|
9123
|
+
bt as PolicyInvalidException,
|
|
9124
|
+
st as PolicyMeta,
|
|
9133
9125
|
N as Query,
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9126
|
+
zs as QueryActiveSession,
|
|
9127
|
+
It as QueryAtom,
|
|
9128
|
+
fs as QueryBalance,
|
|
9129
|
+
xe as QueryBatch,
|
|
9130
|
+
ys as QueryBatchHistory,
|
|
9131
|
+
cs as QueryContinuId,
|
|
9132
|
+
Ct as QueryEmbeddingStatus,
|
|
9133
|
+
$t as QueryMetaType,
|
|
9134
|
+
Mt as QueryMetaTypeViaAtom,
|
|
9135
|
+
Tt as QueryMetaTypeViaMolecule,
|
|
9136
|
+
Zs as QueryPolicy,
|
|
9137
|
+
Js as QueryToken,
|
|
9138
|
+
hs as QueryWalletBundle,
|
|
9139
|
+
ds as QueryWalletList,
|
|
9148
9140
|
C as Response,
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9141
|
+
js as ResponseActiveSession,
|
|
9142
|
+
Os as ResponseAppendRequest,
|
|
9143
|
+
Gs as ResponseAtom,
|
|
9144
|
+
Rr as ResponseAuthorizationGuest,
|
|
9145
|
+
ps as ResponseBalance,
|
|
9146
|
+
xs as ResponseClaimShadowWallet,
|
|
9147
|
+
ls as ResponseContinuId,
|
|
9148
|
+
As as ResponseCreateIdentifier,
|
|
9149
|
+
Ms as ResponseCreateMeta,
|
|
9150
|
+
tr as ResponseCreateRule,
|
|
9151
|
+
ws as ResponseCreateToken,
|
|
9152
|
+
Us as ResponseCreateWallet,
|
|
9153
|
+
er as ResponseEmbeddingStatus,
|
|
9154
|
+
qs as ResponseLinkIdentifier,
|
|
9155
|
+
ms as ResponseMetaType,
|
|
9156
|
+
Ys as ResponseMetaTypeViaAtom,
|
|
9157
|
+
it as ResponseMetaTypeViaMolecule,
|
|
9158
|
+
Cs as ResponsePeering,
|
|
9159
|
+
Xs as ResponsePolicy,
|
|
9160
|
+
D as ResponseProposeMolecule,
|
|
9161
|
+
Vs as ResponseQueryActiveSession,
|
|
9162
|
+
gs as ResponseRequestAuthorization,
|
|
9163
|
+
Hs as ResponseRequestAuthorizationGuest,
|
|
9164
|
+
_s as ResponseRequestTokens,
|
|
9165
|
+
$s as ResponseTransferTokens,
|
|
9166
|
+
us as ResponseWalletBundle,
|
|
9175
9167
|
Le as ResponseWalletList,
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9168
|
+
zt as SignatureMalformedException,
|
|
9169
|
+
os as SignatureMismatchException,
|
|
9170
|
+
ke as StackableUnitAmountException,
|
|
9171
|
+
Ks as StackableUnitDecimalsException,
|
|
9172
|
+
pe as TokenUnit,
|
|
9173
|
+
J as TransferBalanceException,
|
|
9174
|
+
we as TransferMalformedException,
|
|
9175
|
+
wt as TransferMismatchedException,
|
|
9176
|
+
kt as TransferRemainderException,
|
|
9177
|
+
as as TransferToSelfException,
|
|
9178
|
+
Ee as TransferUnbalancedException,
|
|
9179
|
+
Pe as UnauthenticatedException,
|
|
9188
9180
|
S as Wallet,
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9181
|
+
vt as WalletShadowException,
|
|
9182
|
+
se as WrongTokenTypeException,
|
|
9183
|
+
pn as base64ToHex,
|
|
9184
|
+
un as bufferToHexString,
|
|
9185
|
+
cn as charsetBaseConvert,
|
|
9186
|
+
mn as chunkArray,
|
|
9187
|
+
Ue as chunkSubstr,
|
|
9188
|
+
yn as deepCloning,
|
|
9189
|
+
gn as diff,
|
|
9190
|
+
Be as generateBatchId,
|
|
9191
|
+
de as generateBundleHash,
|
|
9192
|
+
tt as generateSecret,
|
|
9193
|
+
hn as hexStringToBuffer,
|
|
9194
|
+
dn as hexToBase64,
|
|
9195
|
+
fe as intersect,
|
|
9196
|
+
De as isHex,
|
|
9197
|
+
fn as isNumeric,
|
|
9198
|
+
nt as randomString,
|
|
9199
|
+
Ve as shake256
|
|
9208
9200
|
};
|
|
9209
9201
|
//# sourceMappingURL=client.es.mjs.map
|