@wishknish/knishio-client-js 0.7.5 → 0.7.7
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 +37 -29
- package/dist/client.cjs.js.map +1 -1
- package/dist/client.es.mjs +831 -511
- package/dist/client.es.mjs.map +1 -1
- package/dist/client.iife.js +37 -29
- package/dist/client.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/KnishIOClient.js +50 -13
- package/src/Molecule.js +28 -4
- package/src/index.js +229 -11
- package/src/query/QueryContinuId.js +8 -0
- package/src/query/QueryWalletList.js +2 -2
- package/src/response/ResponseRequestAuthorization.js +34 -1
- package/src/response/ResponseRequestAuthorizationGuest.js +32 -1
package/dist/client.es.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Yt = Object.defineProperty;
|
|
2
2
|
var en = (o, e, t) => e in o ? Yt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var Q = (o, e, t) => en(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import L from "jssha";
|
|
5
|
-
import { gql as
|
|
5
|
+
import { gql as O, cacheExchange as tn, fetchExchange as nn, subscriptionExchange as sn, createClient as rn } from "@urql/core";
|
|
6
6
|
import { createClient as on } from "graphql-ws";
|
|
7
7
|
import { pipe as an, map as ln } from "wonka";
|
|
8
8
|
typeof self > "u" && (global.self = global);
|
|
9
|
-
class
|
|
9
|
+
class Rt {
|
|
10
10
|
/**
|
|
11
11
|
* Converts the given buffer to a string containing its hexadecimal representation.
|
|
12
12
|
*
|
|
@@ -81,7 +81,7 @@ function He(o, e) {
|
|
|
81
81
|
n[s] = o.substr(r, e);
|
|
82
82
|
return n;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function st(o = 256, e = "abcdef0123456789") {
|
|
85
85
|
let t = new Uint8Array(o);
|
|
86
86
|
return t = crypto.getRandomValues(t), t = t.map((n) => e.charCodeAt(n % e.length)), String.fromCharCode.apply(null, t);
|
|
87
87
|
}
|
|
@@ -99,10 +99,10 @@ function cn(o, e, t, n, s) {
|
|
|
99
99
|
return a || "0";
|
|
100
100
|
}
|
|
101
101
|
function un(o) {
|
|
102
|
-
return
|
|
102
|
+
return Rt.toHex(o, {});
|
|
103
103
|
}
|
|
104
104
|
function hn(o) {
|
|
105
|
-
return
|
|
105
|
+
return Rt.toUint8Array(o);
|
|
106
106
|
}
|
|
107
107
|
function dn(o) {
|
|
108
108
|
const e = hn(o);
|
|
@@ -112,7 +112,7 @@ function pn(o) {
|
|
|
112
112
|
const e = new Uint8Array(atob(o).split("").map((t) => t.charCodeAt(0)));
|
|
113
113
|
return un(e);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Ve(o) {
|
|
116
116
|
return /^[A-F0-9]+$/i.test(o);
|
|
117
117
|
}
|
|
118
118
|
function fn(o) {
|
|
@@ -155,7 +155,24 @@ let pe = class {
|
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
function mn(
|
|
158
|
+
function mn(o, e) {
|
|
159
|
+
return o.length ? [o.slice(0, e)].concat(mn(o.slice(e), e)) : [];
|
|
160
|
+
}
|
|
161
|
+
function yn(o, e) {
|
|
162
|
+
let t, n, s;
|
|
163
|
+
const r = [Array, Date, Number, String, Boolean], i = Object.prototype.toString;
|
|
164
|
+
for (e = e || [], t = 0; t < e.length; t += 2)
|
|
165
|
+
o === e[t] && (n = e[t + 1]);
|
|
166
|
+
if (!n && o && typeof o == "object") {
|
|
167
|
+
for (n = {}, t = 0; t < r.length; t++)
|
|
168
|
+
i.call(o) === i.call(s = new r[t](o)) && (n = t ? s : []);
|
|
169
|
+
e.push(o, n);
|
|
170
|
+
for (t in o)
|
|
171
|
+
e.hasOwnProperty.call(o, t) && (n[t] = yn(o[t], e));
|
|
172
|
+
}
|
|
173
|
+
return n || o;
|
|
174
|
+
}
|
|
175
|
+
function gn(...o) {
|
|
159
176
|
return [].concat(...o.map((e, t) => {
|
|
160
177
|
const n = o.slice(0);
|
|
161
178
|
n.splice(t, 1);
|
|
@@ -166,14 +183,14 @@ function mn(...o) {
|
|
|
166
183
|
function ye(...o) {
|
|
167
184
|
return o.reduce((e, t) => e.filter((n) => t.includes(n)));
|
|
168
185
|
}
|
|
169
|
-
class
|
|
186
|
+
class rt {
|
|
170
187
|
/**
|
|
171
188
|
*
|
|
172
189
|
* @param policy
|
|
173
190
|
* @param metaKeys
|
|
174
191
|
*/
|
|
175
192
|
constructor(e = {}, t = {}) {
|
|
176
|
-
this.policy =
|
|
193
|
+
this.policy = rt.normalizePolicy(e), this.fillDefault(t);
|
|
177
194
|
}
|
|
178
195
|
/**
|
|
179
196
|
*
|
|
@@ -201,7 +218,7 @@ class st {
|
|
|
201
218
|
})) {
|
|
202
219
|
const i = r.map((a) => a.key);
|
|
203
220
|
this.policy[s] || (this.policy[s] = {});
|
|
204
|
-
for (const a of
|
|
221
|
+
for (const a of gn(e, i))
|
|
205
222
|
this.policy[s][a] || (this.policy[s][a] = s === "write" && !["characters", "pubkey"].includes(a) ? ["self"] : ["all"]);
|
|
206
223
|
}
|
|
207
224
|
}
|
|
@@ -303,7 +320,7 @@ class P {
|
|
|
303
320
|
* @returns {AtomMeta}
|
|
304
321
|
*/
|
|
305
322
|
addPolicy(e) {
|
|
306
|
-
const t = new
|
|
323
|
+
const t = new rt(e, Object.keys(this.meta));
|
|
307
324
|
return this.merge({
|
|
308
325
|
policy: t.toJson()
|
|
309
326
|
}), this;
|
|
@@ -348,7 +365,7 @@ class ae extends x {
|
|
|
348
365
|
super(e, t, n), this.name = "AtomsMissingException";
|
|
349
366
|
}
|
|
350
367
|
}
|
|
351
|
-
class
|
|
368
|
+
class oe {
|
|
352
369
|
/**
|
|
353
370
|
*
|
|
354
371
|
* @param {Atom} atom
|
|
@@ -369,7 +386,7 @@ class ie {
|
|
|
369
386
|
case "[object Array]": {
|
|
370
387
|
const t = [];
|
|
371
388
|
for (const n in e)
|
|
372
|
-
t.push(
|
|
389
|
+
t.push(oe.isStructure(e[n]) ? oe.structure(e[n]) : e[n]);
|
|
373
390
|
return t;
|
|
374
391
|
}
|
|
375
392
|
case "[object Object]": {
|
|
@@ -377,7 +394,7 @@ class ie {
|
|
|
377
394
|
for (const s of n)
|
|
378
395
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
379
396
|
const r = {};
|
|
380
|
-
r[s] =
|
|
397
|
+
r[s] = oe.isStructure(e[s]) ? oe.structure(e[s]) : e[s], t.push(r);
|
|
381
398
|
}
|
|
382
399
|
if (t.length > 0)
|
|
383
400
|
return t;
|
|
@@ -399,10 +416,10 @@ class ie {
|
|
|
399
416
|
* @returns {Object[]}
|
|
400
417
|
*/
|
|
401
418
|
view() {
|
|
402
|
-
return
|
|
419
|
+
return oe.structure(this);
|
|
403
420
|
}
|
|
404
421
|
}
|
|
405
|
-
class
|
|
422
|
+
class bn extends oe {
|
|
406
423
|
constructor({
|
|
407
424
|
position: e = null,
|
|
408
425
|
walletAddress: t = null,
|
|
@@ -421,7 +438,7 @@ class yn extends ie {
|
|
|
421
438
|
}
|
|
422
439
|
}
|
|
423
440
|
const Ue = {
|
|
424
|
-
4:
|
|
441
|
+
4: bn
|
|
425
442
|
};
|
|
426
443
|
class g {
|
|
427
444
|
/**
|
|
@@ -690,12 +707,12 @@ class g {
|
|
|
690
707
|
return e;
|
|
691
708
|
}
|
|
692
709
|
}
|
|
693
|
-
function
|
|
710
|
+
function nt(o = null, e = 2048) {
|
|
694
711
|
if (o) {
|
|
695
712
|
const t = new L("SHAKE256", "TEXT");
|
|
696
713
|
return t.update(o), t.getHash("HEX", { outputLen: e * 2 });
|
|
697
714
|
} else
|
|
698
|
-
return
|
|
715
|
+
return st(e);
|
|
699
716
|
}
|
|
700
717
|
function fe(o, e = null) {
|
|
701
718
|
const t = new L("SHAKE256", "TEXT");
|
|
@@ -709,7 +726,7 @@ function he({
|
|
|
709
726
|
molecularHash: o = null,
|
|
710
727
|
index: e = null
|
|
711
728
|
}) {
|
|
712
|
-
return o !== null && e !== null ? fe(String(o) + String(e), "generateBatchId") :
|
|
729
|
+
return o !== null && e !== null ? fe(String(o) + String(e), "generateBatchId") : st(64);
|
|
713
730
|
}
|
|
714
731
|
class me {
|
|
715
732
|
/**
|
|
@@ -778,7 +795,7 @@ class me {
|
|
|
778
795
|
};
|
|
779
796
|
}
|
|
780
797
|
}
|
|
781
|
-
class
|
|
798
|
+
class ze extends x {
|
|
782
799
|
/**
|
|
783
800
|
* Class constructor
|
|
784
801
|
*
|
|
@@ -791,31 +808,31 @@ class Ve extends x {
|
|
|
791
808
|
}
|
|
792
809
|
}
|
|
793
810
|
const Ce = /* @__PURE__ */ BigInt(2 ** 32 - 1), ct = /* @__PURE__ */ BigInt(32);
|
|
794
|
-
function
|
|
811
|
+
function wn(o, e = !1) {
|
|
795
812
|
return e ? { h: Number(o & Ce), l: Number(o >> ct & Ce) } : { h: Number(o >> ct & Ce) | 0, l: Number(o & Ce) | 0 };
|
|
796
813
|
}
|
|
797
|
-
function
|
|
814
|
+
function kn(o, e = !1) {
|
|
798
815
|
const t = o.length;
|
|
799
816
|
let n = new Uint32Array(t), s = new Uint32Array(t);
|
|
800
817
|
for (let r = 0; r < t; r++) {
|
|
801
|
-
const { h: i, l: a } =
|
|
818
|
+
const { h: i, l: a } = wn(o[r], e);
|
|
802
819
|
[n[r], s[r]] = [i, a];
|
|
803
820
|
}
|
|
804
821
|
return [n, s];
|
|
805
822
|
}
|
|
806
|
-
const
|
|
823
|
+
const Sn = (o, e, t) => o << t | e >>> 32 - t, _n = (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;
|
|
807
824
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
808
|
-
function
|
|
825
|
+
function vn(o) {
|
|
809
826
|
return o instanceof Uint8Array || ArrayBuffer.isView(o) && o.constructor.name === "Uint8Array";
|
|
810
827
|
}
|
|
811
828
|
function ut(o, e = "") {
|
|
812
829
|
if (!Number.isSafeInteger(o) || o < 0) {
|
|
813
830
|
const t = e && `"${e}" `;
|
|
814
|
-
throw new Error(`${t}expected integer
|
|
831
|
+
throw new Error(`${t}expected integer >= 0, got ${o}`);
|
|
815
832
|
}
|
|
816
833
|
}
|
|
817
834
|
function D(o, e, t = "") {
|
|
818
|
-
const n =
|
|
835
|
+
const n = vn(o), s = o == null ? void 0 : o.length, r = e !== void 0;
|
|
819
836
|
if (!n || r && s !== e) {
|
|
820
837
|
const i = t && `"${t}" `, a = r ? ` of length ${e}` : "", c = n ? `length=${s}` : `type=${typeof o}`;
|
|
821
838
|
throw new Error(i + "expected Uint8Array" + a + ", got " + c);
|
|
@@ -828,34 +845,34 @@ function ht(o, e = !0) {
|
|
|
828
845
|
if (e && o.finished)
|
|
829
846
|
throw new Error("Hash#digest() has already been called");
|
|
830
847
|
}
|
|
831
|
-
function
|
|
848
|
+
function xn(o, e) {
|
|
832
849
|
D(o, void 0, "digestInto() output");
|
|
833
850
|
const t = e.outputLen;
|
|
834
851
|
if (o.length < t)
|
|
835
852
|
throw new Error('"digestInto() output" expected to be of length >=' + t);
|
|
836
853
|
}
|
|
837
|
-
function
|
|
854
|
+
function Wt(o) {
|
|
838
855
|
return new Uint32Array(o.buffer, o.byteOffset, Math.floor(o.byteLength / 4));
|
|
839
856
|
}
|
|
840
857
|
function Ut(...o) {
|
|
841
858
|
for (let e = 0; e < o.length; e++)
|
|
842
859
|
o[e].fill(0);
|
|
843
860
|
}
|
|
844
|
-
const
|
|
845
|
-
function
|
|
861
|
+
const In = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
862
|
+
function Tn(o) {
|
|
846
863
|
return o << 24 & 4278190080 | o << 8 & 16711680 | o >>> 8 & 65280 | o >>> 24 & 255;
|
|
847
864
|
}
|
|
848
|
-
function
|
|
865
|
+
function Mn(o) {
|
|
849
866
|
for (let e = 0; e < o.length; e++)
|
|
850
|
-
o[e] =
|
|
867
|
+
o[e] = Tn(o[e]);
|
|
851
868
|
return o;
|
|
852
869
|
}
|
|
853
|
-
const dt =
|
|
870
|
+
const dt = In ? (o) => o : Mn;
|
|
854
871
|
function Bt(o, e = {}) {
|
|
855
872
|
const t = (s, r) => o(r).update(s).digest(), n = o(void 0);
|
|
856
873
|
return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = (s) => o(s), Object.assign(t, e), Object.freeze(t);
|
|
857
874
|
}
|
|
858
|
-
function
|
|
875
|
+
function Cn(o = 32) {
|
|
859
876
|
const e = typeof globalThis == "object" ? globalThis.crypto : null;
|
|
860
877
|
if (typeof (e == null ? void 0 : e.getRandomValues) != "function")
|
|
861
878
|
throw new Error("crypto.getRandomValues must be defined");
|
|
@@ -863,16 +880,16 @@ function Tn(o = 32) {
|
|
|
863
880
|
}
|
|
864
881
|
const Ne = (o) => ({
|
|
865
882
|
oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, o])
|
|
866
|
-
}),
|
|
883
|
+
}), En = BigInt(0), ge = BigInt(1), On = BigInt(2), Rn = BigInt(7), Wn = BigInt(256), Un = BigInt(113), qt = [], Ht = [], Pt = [];
|
|
867
884
|
for (let o = 0, e = ge, t = 1, n = 0; o < 24; o++) {
|
|
868
885
|
[t, n] = [n, (2 * t + 3 * n) % 5], qt.push(2 * (5 * n + t)), Ht.push((o + 1) * (o + 2) / 2 % 64);
|
|
869
|
-
let s =
|
|
886
|
+
let s = En;
|
|
870
887
|
for (let r = 0; r < 7; r++)
|
|
871
|
-
e = (e << ge ^ (e >>
|
|
888
|
+
e = (e << ge ^ (e >> Rn) * Un) % Wn, e & On && (s ^= ge << (ge << BigInt(r)) - ge);
|
|
872
889
|
Pt.push(s);
|
|
873
890
|
}
|
|
874
|
-
const Kt =
|
|
875
|
-
function
|
|
891
|
+
const Kt = kn(Pt, !0), Bn = Kt[0], qn = Kt[1], pt = (o, e, t) => t > 32 ? $n(o, e, t) : Sn(o, e, t), ft = (o, e, t) => t > 32 ? An(o, e, t) : _n(o, e, t);
|
|
892
|
+
function Hn(o, e = 24) {
|
|
876
893
|
const t = new Uint32Array(10);
|
|
877
894
|
for (let n = 24 - e; n < 24; n++) {
|
|
878
895
|
for (let i = 0; i < 10; i++)
|
|
@@ -893,33 +910,33 @@ function Bn(o, e = 24) {
|
|
|
893
910
|
for (let a = 0; a < 10; a++)
|
|
894
911
|
o[i + a] ^= ~t[(a + 2) % 10] & t[(a + 4) % 10];
|
|
895
912
|
}
|
|
896
|
-
o[0] ^=
|
|
913
|
+
o[0] ^= Bn[n], o[1] ^= qn[n];
|
|
897
914
|
}
|
|
898
915
|
Ut(t);
|
|
899
916
|
}
|
|
900
917
|
class Fe {
|
|
901
918
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
902
919
|
constructor(e, t, n, s = !1, r = 24) {
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
920
|
+
Q(this, "state");
|
|
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");
|
|
914
931
|
if (this.blockLen = e, this.suffix = t, this.outputLen = n, this.enableXOF = s, this.rounds = r, ut(n, "outputLen"), !(0 < e && e < 200))
|
|
915
932
|
throw new Error("only keccak-f1600 function is supported");
|
|
916
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
933
|
+
this.state = new Uint8Array(200), this.state32 = Wt(this.state);
|
|
917
934
|
}
|
|
918
935
|
clone() {
|
|
919
936
|
return this._cloneInto();
|
|
920
937
|
}
|
|
921
938
|
keccak() {
|
|
922
|
-
dt(this.state32),
|
|
939
|
+
dt(this.state32), Hn(this.state32, this.rounds), dt(this.state32), this.posOut = 0, this.pos = 0;
|
|
923
940
|
}
|
|
924
941
|
update(e) {
|
|
925
942
|
ht(this), D(e);
|
|
@@ -958,7 +975,7 @@ class Fe {
|
|
|
958
975
|
return ut(e), this.xofInto(new Uint8Array(e));
|
|
959
976
|
}
|
|
960
977
|
digestInto(e) {
|
|
961
|
-
if (
|
|
978
|
+
if (xn(e, this), this.finished)
|
|
962
979
|
throw new Error("digest() was already called");
|
|
963
980
|
return this.writeInto(e), this.destroy(), e;
|
|
964
981
|
}
|
|
@@ -973,42 +990,42 @@ class Fe {
|
|
|
973
990
|
return e || (e = new Fe(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;
|
|
974
991
|
}
|
|
975
992
|
}
|
|
976
|
-
const Nt = (o, e, t, n = {}) => Bt(() => new Fe(e, o, t), n),
|
|
993
|
+
const Nt = (o, e, t, n = {}) => Bt(() => new Fe(e, o, t), n), Pn = /* @__PURE__ */ Nt(
|
|
977
994
|
6,
|
|
978
995
|
136,
|
|
979
996
|
32,
|
|
980
997
|
/* @__PURE__ */ Ne(8)
|
|
981
|
-
),
|
|
998
|
+
), Kn = /* @__PURE__ */ Nt(
|
|
982
999
|
6,
|
|
983
1000
|
72,
|
|
984
1001
|
64,
|
|
985
1002
|
/* @__PURE__ */ Ne(10)
|
|
986
|
-
), Ft = (o, e, t, n = {}) => Bt((s = {}) => new Fe(e, o, s.dkLen === void 0 ? t : s.dkLen, !0), n),
|
|
987
|
-
function
|
|
1003
|
+
), Ft = (o, e, t, n = {}) => Bt((s = {}) => new Fe(e, o, s.dkLen === void 0 ? t : s.dkLen, !0), n), Nn = /* @__PURE__ */ Ft(31, 168, 16, /* @__PURE__ */ Ne(11)), Lt = /* @__PURE__ */ Ft(31, 136, 32, /* @__PURE__ */ Ne(12));
|
|
1004
|
+
function it(o) {
|
|
988
1005
|
if (!Number.isSafeInteger(o) || o < 0 || o > 4294967295)
|
|
989
1006
|
throw new Error("wrong u32 integer:" + o);
|
|
990
1007
|
return o;
|
|
991
1008
|
}
|
|
992
|
-
function
|
|
993
|
-
return
|
|
1009
|
+
function Qt(o) {
|
|
1010
|
+
return it(o), (o & o - 1) === 0 && o !== 0;
|
|
994
1011
|
}
|
|
995
|
-
function
|
|
996
|
-
|
|
1012
|
+
function jt(o, e) {
|
|
1013
|
+
it(o);
|
|
997
1014
|
let t = 0;
|
|
998
1015
|
for (let n = 0; n < e; n++, o >>>= 1)
|
|
999
1016
|
t = t << 1 | o & 1;
|
|
1000
1017
|
return t;
|
|
1001
1018
|
}
|
|
1002
1019
|
function Dt(o) {
|
|
1003
|
-
return
|
|
1020
|
+
return it(o), 31 - Math.clz32(o);
|
|
1004
1021
|
}
|
|
1005
1022
|
function mt(o) {
|
|
1006
1023
|
const e = o.length;
|
|
1007
|
-
if (e < 2 || !
|
|
1024
|
+
if (e < 2 || !Qt(e))
|
|
1008
1025
|
throw new Error("n must be a power of 2 and greater than 1. Got " + e);
|
|
1009
1026
|
const t = Dt(e);
|
|
1010
1027
|
for (let n = 0; n < e; n++) {
|
|
1011
|
-
const s =
|
|
1028
|
+
const s = jt(n, t);
|
|
1012
1029
|
if (n < s) {
|
|
1013
1030
|
const r = o[n];
|
|
1014
1031
|
o[n] = o[s], o[s] = r;
|
|
@@ -1018,7 +1035,7 @@ function mt(o) {
|
|
|
1018
1035
|
}
|
|
1019
1036
|
const yt = (o, e) => {
|
|
1020
1037
|
const { N: t, roots: n, dit: s, invertButterflies: r = !1, skipStages: i = 0, brp: a = !0 } = e, c = Dt(t);
|
|
1021
|
-
if (!
|
|
1038
|
+
if (!Qt(t))
|
|
1022
1039
|
throw new Error("FFT: Polynomial size should be power of two");
|
|
1023
1040
|
const u = s !== r;
|
|
1024
1041
|
return (l) => {
|
|
@@ -1026,10 +1043,10 @@ const yt = (o, e) => {
|
|
|
1026
1043
|
throw new Error("FFT: wrong Polynomial length");
|
|
1027
1044
|
s && a && mt(l);
|
|
1028
1045
|
for (let h = 0, p = 1; h < c - i; h++) {
|
|
1029
|
-
const d = s ? h + 1 + i : c - h,
|
|
1030
|
-
for (let f = 0; f < t; f +=
|
|
1031
|
-
for (let y = 0,
|
|
1032
|
-
const
|
|
1046
|
+
const d = s ? h + 1 + i : c - h, b = 1 << d, A = b >> 1, M = t >> d;
|
|
1047
|
+
for (let f = 0; f < t; f += b)
|
|
1048
|
+
for (let y = 0, w = p++; y < A; y++) {
|
|
1049
|
+
const C = r ? s ? t - w : w : y * M, k = f + y, $ = f + y + A, v = n[C], I = l[$], S = l[k];
|
|
1033
1050
|
if (u) {
|
|
1034
1051
|
const B = o.mul(I, v);
|
|
1035
1052
|
l[k] = o.add(S, B), l[$] = o.sub(S, B);
|
|
@@ -1040,8 +1057,8 @@ const yt = (o, e) => {
|
|
|
1040
1057
|
};
|
|
1041
1058
|
};
|
|
1042
1059
|
/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
|
|
1043
|
-
const gt =
|
|
1044
|
-
function
|
|
1060
|
+
const gt = Cn;
|
|
1061
|
+
function Je(o, e) {
|
|
1045
1062
|
if (o.length !== e.length)
|
|
1046
1063
|
return !1;
|
|
1047
1064
|
let t = 0;
|
|
@@ -1049,7 +1066,7 @@ function ze(o, e) {
|
|
|
1049
1066
|
t |= o[n] ^ e[n];
|
|
1050
1067
|
return t === 0;
|
|
1051
1068
|
}
|
|
1052
|
-
function
|
|
1069
|
+
function Fn(o) {
|
|
1053
1070
|
return Uint8Array.from(o);
|
|
1054
1071
|
}
|
|
1055
1072
|
function Be(o, ...e) {
|
|
@@ -1075,7 +1092,7 @@ function Be(o, ...e) {
|
|
|
1075
1092
|
}
|
|
1076
1093
|
};
|
|
1077
1094
|
}
|
|
1078
|
-
function
|
|
1095
|
+
function Ge(o, e) {
|
|
1079
1096
|
const t = e * o.bytesLen;
|
|
1080
1097
|
return {
|
|
1081
1098
|
bytesLen: t,
|
|
@@ -1106,23 +1123,23 @@ function G(...o) {
|
|
|
1106
1123
|
else
|
|
1107
1124
|
e.fill(0);
|
|
1108
1125
|
}
|
|
1109
|
-
function
|
|
1126
|
+
function bt(o) {
|
|
1110
1127
|
return (1 << o) - 1;
|
|
1111
1128
|
}
|
|
1112
1129
|
/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
|
|
1113
|
-
const
|
|
1130
|
+
const Ln = (o) => {
|
|
1114
1131
|
const { newPoly: e, N: t, Q: n, F: s, ROOT_OF_UNITY: r, brvBits: i } = o, a = (f, y = n) => {
|
|
1115
|
-
const
|
|
1116
|
-
return (
|
|
1132
|
+
const w = f % y | 0;
|
|
1133
|
+
return (w >= 0 ? w | 0 : y + w | 0) | 0;
|
|
1117
1134
|
}, c = (f, y = n) => {
|
|
1118
|
-
const
|
|
1119
|
-
return (
|
|
1135
|
+
const w = a(f, y) | 0;
|
|
1136
|
+
return (w > y >> 1 ? w - y | 0 : w) | 0;
|
|
1120
1137
|
};
|
|
1121
1138
|
function u() {
|
|
1122
1139
|
const f = e(t);
|
|
1123
1140
|
for (let y = 0; y < t; y++) {
|
|
1124
|
-
const
|
|
1125
|
-
f[y] = Number(
|
|
1141
|
+
const w = jt(y, i), C = BigInt(r) ** BigInt(w) % BigInt(n);
|
|
1142
|
+
f[y] = Number(C) | 0;
|
|
1126
1143
|
}
|
|
1127
1144
|
return f;
|
|
1128
1145
|
}
|
|
@@ -1139,36 +1156,36 @@ const Nn = (o) => {
|
|
|
1139
1156
|
invertButterflies: !0,
|
|
1140
1157
|
skipStages: 1,
|
|
1141
1158
|
brp: !1
|
|
1142
|
-
}, d = yt(h, { dit: !1, ...p }),
|
|
1159
|
+
}, d = yt(h, { dit: !1, ...p }), b = yt(h, { dit: !0, ...p });
|
|
1143
1160
|
return { mod: a, smod: c, nttZetas: l, NTT: {
|
|
1144
1161
|
encode: (f) => d(f),
|
|
1145
1162
|
decode: (f) => {
|
|
1146
|
-
|
|
1163
|
+
b(f);
|
|
1147
1164
|
for (let y = 0; y < f.length; y++)
|
|
1148
1165
|
f[y] = a(s * f[y]);
|
|
1149
1166
|
return f;
|
|
1150
1167
|
}
|
|
1151
1168
|
}, bitsCoder: (f, y) => {
|
|
1152
|
-
const
|
|
1169
|
+
const w = bt(f), C = f * (t / 8);
|
|
1153
1170
|
return {
|
|
1154
|
-
bytesLen:
|
|
1171
|
+
bytesLen: C,
|
|
1155
1172
|
encode: (k) => {
|
|
1156
|
-
const $ = new Uint8Array(
|
|
1173
|
+
const $ = new Uint8Array(C);
|
|
1157
1174
|
for (let v = 0, I = 0, S = 0, B = 0; v < k.length; v++)
|
|
1158
|
-
for (I |= (y.encode(k[v]) &
|
|
1159
|
-
$[B++] = I &
|
|
1175
|
+
for (I |= (y.encode(k[v]) & w) << S, S += f; S >= 8; S -= 8, I >>= 8)
|
|
1176
|
+
$[B++] = I & bt(S);
|
|
1160
1177
|
return $;
|
|
1161
1178
|
},
|
|
1162
1179
|
decode: (k) => {
|
|
1163
1180
|
const $ = e(t);
|
|
1164
1181
|
for (let v = 0, I = 0, S = 0, B = 0; v < k.length; v++)
|
|
1165
1182
|
for (I |= k[v] << S, S += 8; S >= f; S -= f, I >>= f)
|
|
1166
|
-
$[B++] = y.decode(I &
|
|
1183
|
+
$[B++] = y.decode(I & w);
|
|
1167
1184
|
return $;
|
|
1168
1185
|
}
|
|
1169
1186
|
};
|
|
1170
1187
|
} };
|
|
1171
|
-
},
|
|
1188
|
+
}, Qn = (o) => (e, t) => {
|
|
1172
1189
|
t || (t = o.blockLen);
|
|
1173
1190
|
const n = new Uint8Array(e.length + 2);
|
|
1174
1191
|
n.set(e);
|
|
@@ -1181,18 +1198,18 @@ const Nn = (o) => {
|
|
|
1181
1198
|
i.destroy(), G(r, n);
|
|
1182
1199
|
}
|
|
1183
1200
|
};
|
|
1184
|
-
},
|
|
1201
|
+
}, jn = /* @__PURE__ */ Qn(Nn);
|
|
1185
1202
|
/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
|
|
1186
|
-
const F = 256, le = 3329,
|
|
1203
|
+
const F = 256, le = 3329, Dn = 3303, Vn = 17, { mod: $e, nttZetas: zn, NTT: ne, bitsCoder: Jn } = Ln({
|
|
1187
1204
|
N: F,
|
|
1188
1205
|
Q: le,
|
|
1189
|
-
F:
|
|
1190
|
-
ROOT_OF_UNITY:
|
|
1206
|
+
F: Dn,
|
|
1207
|
+
ROOT_OF_UNITY: Vn,
|
|
1191
1208
|
newPoly: (o) => new Uint16Array(o),
|
|
1192
1209
|
brvBits: 7
|
|
1193
|
-
}),
|
|
1210
|
+
}), Gn = {
|
|
1194
1211
|
768: { N: F, Q: le, K: 3, ETA1: 2, ETA2: 2, du: 10, dv: 4, RBGstrength: 192 }
|
|
1195
|
-
},
|
|
1212
|
+
}, Xn = (o) => {
|
|
1196
1213
|
if (o >= 12)
|
|
1197
1214
|
return { encode: (t) => t, decode: (t) => t };
|
|
1198
1215
|
const e = 2 ** (o - 1);
|
|
@@ -1202,29 +1219,29 @@ const F = 256, le = 3329, jn = 3303, Qn = 17, { mod: $e, nttZetas: Dn, NTT: te,
|
|
|
1202
1219
|
// const decompress = (i: number) => round((Q / 2 ** d) * i);
|
|
1203
1220
|
decode: (t) => t * le + e >>> o
|
|
1204
1221
|
};
|
|
1205
|
-
},
|
|
1206
|
-
function
|
|
1222
|
+
}, be = (o) => Jn(o, Xn(o));
|
|
1223
|
+
function se(o, e) {
|
|
1207
1224
|
for (let t = 0; t < F; t++)
|
|
1208
1225
|
o[t] = $e(o[t] + e[t]);
|
|
1209
1226
|
}
|
|
1210
|
-
function
|
|
1227
|
+
function Zn(o, e) {
|
|
1211
1228
|
for (let t = 0; t < F; t++)
|
|
1212
1229
|
o[t] = $e(o[t] - e[t]);
|
|
1213
1230
|
}
|
|
1214
|
-
function
|
|
1231
|
+
function Yn(o, e, t, n, s) {
|
|
1215
1232
|
const r = $e(e * n * s + o * t), i = $e(o * n + e * t);
|
|
1216
1233
|
return { c0: r, c1: i };
|
|
1217
1234
|
}
|
|
1218
1235
|
function Ee(o, e) {
|
|
1219
1236
|
for (let t = 0; t < F / 2; t++) {
|
|
1220
|
-
let n =
|
|
1237
|
+
let n = zn[64 + (t >> 1)];
|
|
1221
1238
|
t & 1 && (n = -n);
|
|
1222
|
-
const { c0: s, c1: r } =
|
|
1239
|
+
const { c0: s, c1: r } = Yn(o[2 * t + 0], o[2 * t + 1], e[2 * t + 0], e[2 * t + 1], n);
|
|
1223
1240
|
o[2 * t + 0] = s, o[2 * t + 1] = r;
|
|
1224
1241
|
}
|
|
1225
1242
|
return o;
|
|
1226
1243
|
}
|
|
1227
|
-
function
|
|
1244
|
+
function wt(o) {
|
|
1228
1245
|
const e = new Uint16Array(F);
|
|
1229
1246
|
for (let t = 0; t < F; ) {
|
|
1230
1247
|
const n = o();
|
|
@@ -1237,8 +1254,8 @@ function bt(o) {
|
|
|
1237
1254
|
}
|
|
1238
1255
|
return e;
|
|
1239
1256
|
}
|
|
1240
|
-
function
|
|
1241
|
-
const s = o(n * F / 4, e, t), r = new Uint16Array(F), i =
|
|
1257
|
+
function we(o, e, t, n) {
|
|
1258
|
+
const s = o(n * F / 4, e, t), r = new Uint16Array(F), i = Wt(s);
|
|
1242
1259
|
let a = 0;
|
|
1243
1260
|
for (let c = 0, u = 0, l = 0, h = 0; c < i.length; c++) {
|
|
1244
1261
|
let p = i[c];
|
|
@@ -1249,67 +1266,67 @@ function be(o, e, t, n) {
|
|
|
1249
1266
|
throw new Error(`sampleCBD: leftover bits: ${a}`);
|
|
1250
1267
|
return r;
|
|
1251
1268
|
}
|
|
1252
|
-
const
|
|
1253
|
-
const { K: e, PRF: t, XOF: n, HASH512: s, ETA1: r, ETA2: i, du: a, dv: c } = o, u =
|
|
1269
|
+
const es = (o) => {
|
|
1270
|
+
const { K: e, PRF: t, XOF: n, HASH512: s, ETA1: r, ETA2: i, du: a, dv: c } = o, u = be(1), l = be(c), h = be(a), p = Be("publicKey", Ge(be(12), e), 32), d = Ge(be(12), e), b = Be("ciphertext", Ge(h, e), l), A = Be("seed", 32, 32);
|
|
1254
1271
|
return {
|
|
1255
1272
|
secretCoder: d,
|
|
1256
1273
|
lengths: {
|
|
1257
1274
|
secretKey: d.bytesLen,
|
|
1258
1275
|
publicKey: p.bytesLen,
|
|
1259
|
-
cipherText:
|
|
1276
|
+
cipherText: b.bytesLen
|
|
1260
1277
|
},
|
|
1261
|
-
keygen: (
|
|
1262
|
-
D(
|
|
1278
|
+
keygen: (M) => {
|
|
1279
|
+
D(M, 32, "seed");
|
|
1263
1280
|
const f = new Uint8Array(33);
|
|
1264
|
-
f.set(
|
|
1265
|
-
const y = s(f), [
|
|
1281
|
+
f.set(M), f[32] = e;
|
|
1282
|
+
const y = s(f), [w, C] = A.decode(y), k = [], $ = [];
|
|
1266
1283
|
for (let S = 0; S < e; S++)
|
|
1267
|
-
k.push(
|
|
1268
|
-
const v = n(
|
|
1284
|
+
k.push(ne.encode(we(t, C, S, r)));
|
|
1285
|
+
const v = n(w);
|
|
1269
1286
|
for (let S = 0; S < e; S++) {
|
|
1270
|
-
const B =
|
|
1271
|
-
for (let
|
|
1272
|
-
const ce =
|
|
1273
|
-
|
|
1287
|
+
const B = ne.encode(we(t, C, e + S, r));
|
|
1288
|
+
for (let R = 0; R < e; R++) {
|
|
1289
|
+
const ce = wt(v.get(R, S));
|
|
1290
|
+
se(B, Ee(ce, k[R]));
|
|
1274
1291
|
}
|
|
1275
1292
|
$.push(B);
|
|
1276
1293
|
}
|
|
1277
1294
|
v.clean();
|
|
1278
1295
|
const I = {
|
|
1279
|
-
publicKey: p.encode([$,
|
|
1296
|
+
publicKey: p.encode([$, w]),
|
|
1280
1297
|
secretKey: d.encode(k)
|
|
1281
1298
|
};
|
|
1282
|
-
return G(
|
|
1299
|
+
return G(w, C, k, $, f, y), I;
|
|
1283
1300
|
},
|
|
1284
|
-
encrypt: (
|
|
1285
|
-
const [
|
|
1286
|
-
for (let
|
|
1287
|
-
k.push(
|
|
1288
|
-
const $ = n(
|
|
1289
|
-
for (let
|
|
1290
|
-
const ce =
|
|
1301
|
+
encrypt: (M, f, y) => {
|
|
1302
|
+
const [w, C] = p.decode(M), k = [];
|
|
1303
|
+
for (let R = 0; R < e; R++)
|
|
1304
|
+
k.push(ne.encode(we(t, y, R, r)));
|
|
1305
|
+
const $ = n(C), v = new Uint16Array(F), I = [];
|
|
1306
|
+
for (let R = 0; R < e; R++) {
|
|
1307
|
+
const ce = we(t, y, e + R, i), De = new Uint16Array(F);
|
|
1291
1308
|
for (let Me = 0; Me < e; Me++) {
|
|
1292
|
-
const Zt =
|
|
1293
|
-
|
|
1309
|
+
const Zt = wt($.get(R, Me));
|
|
1310
|
+
se(De, Ee(Zt, k[Me]));
|
|
1294
1311
|
}
|
|
1295
|
-
|
|
1312
|
+
se(ce, ne.decode(De)), I.push(ce), se(v, Ee(w[R], k[R])), G(De);
|
|
1296
1313
|
}
|
|
1297
1314
|
$.clean();
|
|
1298
|
-
const S =
|
|
1299
|
-
|
|
1315
|
+
const S = we(t, y, 2 * e, i);
|
|
1316
|
+
se(S, ne.decode(v));
|
|
1300
1317
|
const B = u.decode(f);
|
|
1301
|
-
return
|
|
1318
|
+
return se(B, S), G(w, k, v, S), b.encode([I, B]);
|
|
1302
1319
|
},
|
|
1303
|
-
decrypt: (
|
|
1304
|
-
const [y,
|
|
1320
|
+
decrypt: (M, f) => {
|
|
1321
|
+
const [y, w] = b.decode(M), C = d.decode(f), k = new Uint16Array(F);
|
|
1305
1322
|
for (let $ = 0; $ < e; $++)
|
|
1306
|
-
|
|
1307
|
-
return
|
|
1323
|
+
se(k, Ee(C[$], ne.encode(y[$])));
|
|
1324
|
+
return Zn(w, ne.decode(k)), G(k, C, y), u.encode(w);
|
|
1308
1325
|
}
|
|
1309
1326
|
};
|
|
1310
1327
|
};
|
|
1311
|
-
function
|
|
1312
|
-
const e =
|
|
1328
|
+
function ts(o) {
|
|
1329
|
+
const e = es(o), { HASH256: t, HASH512: n, KDF: s } = o, { secretCoder: r, lengths: i } = e, a = Be("secretKey", i.secretKey, i.publicKey, 32, 32), c = 32, u = 64;
|
|
1313
1330
|
return {
|
|
1314
1331
|
info: { type: "ml-kem" },
|
|
1315
1332
|
lengths: {
|
|
@@ -1321,8 +1338,8 @@ function Yn(o) {
|
|
|
1321
1338
|
},
|
|
1322
1339
|
keygen: (l = gt(u)) => {
|
|
1323
1340
|
D(l, u, "seed");
|
|
1324
|
-
const { publicKey: h, secretKey: p } = e.keygen(l.subarray(0, 32)), d = t(h),
|
|
1325
|
-
return G(p, d), { publicKey: h, secretKey:
|
|
1341
|
+
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 G(p, d), { publicKey: h, secretKey: b };
|
|
1326
1343
|
},
|
|
1327
1344
|
getPublicKey: (l) => {
|
|
1328
1345
|
const [h, p] = a.decode(l);
|
|
@@ -1330,35 +1347,35 @@ function Yn(o) {
|
|
|
1330
1347
|
},
|
|
1331
1348
|
encapsulate: (l, h = gt(c)) => {
|
|
1332
1349
|
D(l, i.publicKey, "publicKey"), D(h, c, "message");
|
|
1333
|
-
const p = l.subarray(0, 384 * o.K), d = r.encode(r.decode(
|
|
1334
|
-
if (!
|
|
1350
|
+
const p = l.subarray(0, 384 * o.K), d = r.encode(r.decode(Fn(p)));
|
|
1351
|
+
if (!Je(d, p))
|
|
1335
1352
|
throw G(d), new Error("ML-KEM.encapsulate: wrong publicKey modulus");
|
|
1336
1353
|
G(d);
|
|
1337
|
-
const
|
|
1338
|
-
return G(
|
|
1354
|
+
const b = n.create().update(h).update(t(l)).digest(), A = e.encrypt(l, h, b.subarray(32, 64));
|
|
1355
|
+
return G(b.subarray(32)), { cipherText: A, sharedSecret: b.subarray(0, 32) };
|
|
1339
1356
|
},
|
|
1340
1357
|
decapsulate: (l, h) => {
|
|
1341
1358
|
D(h, a.bytesLen, "secretKey"), D(l, i.cipherText, "cipherText");
|
|
1342
|
-
const p = a.bytesLen - 96, d = p + 32,
|
|
1343
|
-
if (!
|
|
1359
|
+
const p = a.bytesLen - 96, d = p + 32, b = t(h.subarray(p / 2, d));
|
|
1360
|
+
if (!Je(b, h.subarray(d, d + 32)))
|
|
1344
1361
|
throw new Error("invalid secretKey: hash check failed");
|
|
1345
|
-
const [A,
|
|
1346
|
-
return G(
|
|
1362
|
+
const [A, M, f, y] = a.decode(h), w = e.decrypt(l, A), C = n.create().update(w).update(f).digest(), k = C.subarray(0, 32), $ = e.encrypt(M, w, C.subarray(32, 64)), v = Je(l, $), I = s.create({ dkLen: 32 }).update(y).update(l).digest();
|
|
1363
|
+
return G(w, $, v ? I : k), v ? k : I;
|
|
1347
1364
|
}
|
|
1348
1365
|
};
|
|
1349
1366
|
}
|
|
1350
|
-
function
|
|
1367
|
+
function ns(o, e, t) {
|
|
1351
1368
|
return Lt.create({ dkLen: o }).update(e).update(new Uint8Array([t])).digest();
|
|
1352
1369
|
}
|
|
1353
|
-
const
|
|
1354
|
-
HASH256:
|
|
1355
|
-
HASH512:
|
|
1370
|
+
const ss = {
|
|
1371
|
+
HASH256: Pn,
|
|
1372
|
+
HASH512: Kn,
|
|
1356
1373
|
KDF: Lt,
|
|
1357
|
-
XOF:
|
|
1358
|
-
PRF:
|
|
1359
|
-
},
|
|
1360
|
-
...
|
|
1361
|
-
...
|
|
1374
|
+
XOF: jn,
|
|
1375
|
+
PRF: ns
|
|
1376
|
+
}, Xe = /* @__PURE__ */ ts({
|
|
1377
|
+
...ss,
|
|
1378
|
+
...Gn[768]
|
|
1362
1379
|
});
|
|
1363
1380
|
class _ {
|
|
1364
1381
|
/**
|
|
@@ -1406,7 +1423,7 @@ class _ {
|
|
|
1406
1423
|
}) {
|
|
1407
1424
|
let i = null;
|
|
1408
1425
|
if (!e && !t)
|
|
1409
|
-
throw new
|
|
1426
|
+
throw new ze();
|
|
1410
1427
|
return e && !t && (i = _.generatePosition(), t = fe(e, "Wallet::create")), new _({
|
|
1411
1428
|
secret: e,
|
|
1412
1429
|
bundle: t,
|
|
@@ -1423,7 +1440,7 @@ class _ {
|
|
|
1423
1440
|
* @return {boolean}
|
|
1424
1441
|
*/
|
|
1425
1442
|
static isBundleHash(e) {
|
|
1426
|
-
return typeof e != "string" ? !1 : e.length === 64 &&
|
|
1443
|
+
return typeof e != "string" ? !1 : e.length === 64 && Ve(e);
|
|
1427
1444
|
}
|
|
1428
1445
|
/**
|
|
1429
1446
|
* Get formatted token units from the raw data
|
|
@@ -1451,10 +1468,10 @@ class _ {
|
|
|
1451
1468
|
position: n
|
|
1452
1469
|
}) {
|
|
1453
1470
|
if (!e)
|
|
1454
|
-
throw new
|
|
1471
|
+
throw new ze("Wallet::generateKey() - Secret is required!");
|
|
1455
1472
|
if (!n)
|
|
1456
|
-
throw new
|
|
1457
|
-
const s =
|
|
1473
|
+
throw new ze("Wallet::generateKey() - Position is required!");
|
|
1474
|
+
const s = Ve(e) ? e : lt(e, 1024), r = Ve(n) ? n : lt(n, 256), a = BigInt(`0x${s}`) + BigInt(`0x${r}`), c = new L("SHAKE256", "TEXT");
|
|
1458
1475
|
c.update(a.toString(16)), t && c.update(t);
|
|
1459
1476
|
const u = new L("SHAKE256", "TEXT");
|
|
1460
1477
|
return u.update(c.getHash("HEX", { outputLen: 8192 })), u.getHash("HEX", { outputLen: 8192 });
|
|
@@ -1484,16 +1501,16 @@ class _ {
|
|
|
1484
1501
|
* @returns {string}
|
|
1485
1502
|
*/
|
|
1486
1503
|
static generatePosition(e = 64) {
|
|
1487
|
-
return
|
|
1504
|
+
return st(e, "abcdef0123456789");
|
|
1488
1505
|
}
|
|
1489
1506
|
/**
|
|
1490
1507
|
* Initializes the ML-KEM key pair
|
|
1491
1508
|
*/
|
|
1492
1509
|
initializeMLKEM() {
|
|
1493
|
-
const e =
|
|
1510
|
+
const e = nt(this.key, 128), t = new Uint8Array(64);
|
|
1494
1511
|
for (let r = 0; r < 64; r++)
|
|
1495
1512
|
t[r] = parseInt(e.substr(r * 2, 2), 16);
|
|
1496
|
-
const { publicKey: n, secretKey: s } =
|
|
1513
|
+
const { publicKey: n, secretKey: s } = Xe.keygen(t);
|
|
1497
1514
|
this.pubkey = this.serializeKey(n), this.privkey = s;
|
|
1498
1515
|
}
|
|
1499
1516
|
serializeKey(e) {
|
|
@@ -1598,7 +1615,7 @@ class _ {
|
|
|
1598
1615
|
e.batchId && (this.batchId = t ? e.batchId : he({}));
|
|
1599
1616
|
}
|
|
1600
1617
|
async encryptMessage(e, t) {
|
|
1601
|
-
const n = JSON.stringify(e), s = new TextEncoder().encode(n), r = this.deserializeKey(t), { cipherText: i, sharedSecret: a } =
|
|
1618
|
+
const n = JSON.stringify(e), s = new TextEncoder().encode(n), r = this.deserializeKey(t), { cipherText: i, sharedSecret: a } = Xe.encapsulate(r), c = await this.encryptWithSharedSecret(s, a);
|
|
1602
1619
|
return {
|
|
1603
1620
|
cipherText: this.serializeKey(i),
|
|
1604
1621
|
encryptedMessage: this.serializeKey(c)
|
|
@@ -1608,7 +1625,7 @@ class _ {
|
|
|
1608
1625
|
const { cipherText: t, encryptedMessage: n } = e;
|
|
1609
1626
|
let s;
|
|
1610
1627
|
try {
|
|
1611
|
-
s =
|
|
1628
|
+
s = Xe.decapsulate(this.deserializeKey(t), this.privkey);
|
|
1612
1629
|
} catch (c) {
|
|
1613
1630
|
return console.error("Wallet::decryptMessage() - Decapsulation failed", c), console.info("Wallet::decryptMessage() - my public key", this.pubkey), null;
|
|
1614
1631
|
}
|
|
@@ -1679,7 +1696,7 @@ class ke extends x {
|
|
|
1679
1696
|
super(e, t, n), this.name = "AtomIndexException";
|
|
1680
1697
|
}
|
|
1681
1698
|
}
|
|
1682
|
-
class
|
|
1699
|
+
class rs extends x {
|
|
1683
1700
|
/**
|
|
1684
1701
|
* Class constructor
|
|
1685
1702
|
*
|
|
@@ -1691,7 +1708,7 @@ class ns extends x {
|
|
|
1691
1708
|
super(e, t, n), this.name = "MolecularHashMismatchException";
|
|
1692
1709
|
}
|
|
1693
1710
|
}
|
|
1694
|
-
class
|
|
1711
|
+
class is extends x {
|
|
1695
1712
|
/**
|
|
1696
1713
|
* Class constructor
|
|
1697
1714
|
*
|
|
@@ -1727,7 +1744,7 @@ class Vt extends x {
|
|
|
1727
1744
|
super(e, t, n), this.name = "SignatureMalformedException";
|
|
1728
1745
|
}
|
|
1729
1746
|
}
|
|
1730
|
-
class
|
|
1747
|
+
class os extends x {
|
|
1731
1748
|
/**
|
|
1732
1749
|
* Class constructor
|
|
1733
1750
|
*
|
|
@@ -1785,7 +1802,7 @@ class _t extends x {
|
|
|
1785
1802
|
super(e, t, n), this.name = "TransferRemainderException";
|
|
1786
1803
|
}
|
|
1787
1804
|
}
|
|
1788
|
-
class
|
|
1805
|
+
class as extends x {
|
|
1789
1806
|
/**
|
|
1790
1807
|
* Class constructor
|
|
1791
1808
|
*
|
|
@@ -1821,7 +1838,7 @@ class H extends x {
|
|
|
1821
1838
|
super(e, t, n), this.name = "MetaMissingException";
|
|
1822
1839
|
}
|
|
1823
1840
|
}
|
|
1824
|
-
class
|
|
1841
|
+
class re extends x {
|
|
1825
1842
|
/**
|
|
1826
1843
|
* Class constructor
|
|
1827
1844
|
*
|
|
@@ -2030,7 +2047,7 @@ class _e {
|
|
|
2030
2047
|
return this.__action.toLowerCase() === e.toLowerCase();
|
|
2031
2048
|
}
|
|
2032
2049
|
}
|
|
2033
|
-
class
|
|
2050
|
+
class Ze {
|
|
2034
2051
|
/**
|
|
2035
2052
|
*
|
|
2036
2053
|
* @param key
|
|
@@ -2079,7 +2096,7 @@ class Ae {
|
|
|
2079
2096
|
callback: t = []
|
|
2080
2097
|
}) {
|
|
2081
2098
|
for (const n of e)
|
|
2082
|
-
if (!(n instanceof
|
|
2099
|
+
if (!(n instanceof Ze))
|
|
2083
2100
|
throw new Pe();
|
|
2084
2101
|
for (const n of t)
|
|
2085
2102
|
if (!(n instanceof _e))
|
|
@@ -2091,7 +2108,7 @@ class Ae {
|
|
|
2091
2108
|
* @param {Condition[]|{}} condition
|
|
2092
2109
|
*/
|
|
2093
2110
|
set comparison(e) {
|
|
2094
|
-
this.__condition.push(e instanceof
|
|
2111
|
+
this.__condition.push(e instanceof Ze ? e : Ze.toObject(e));
|
|
2095
2112
|
}
|
|
2096
2113
|
/**
|
|
2097
2114
|
* @param {Callback[]|{}} callback
|
|
@@ -2127,7 +2144,7 @@ class Ae {
|
|
|
2127
2144
|
};
|
|
2128
2145
|
}
|
|
2129
2146
|
}
|
|
2130
|
-
class
|
|
2147
|
+
class T {
|
|
2131
2148
|
/**
|
|
2132
2149
|
* Initialize the Dot utility with the given object and key path
|
|
2133
2150
|
* @param {object|array} obj - The object or array to traverse
|
|
@@ -2193,7 +2210,7 @@ class ve {
|
|
|
2193
2210
|
*/
|
|
2194
2211
|
constructor(e) {
|
|
2195
2212
|
if (e.molecularHash === null)
|
|
2196
|
-
throw new
|
|
2213
|
+
throw new is();
|
|
2197
2214
|
if (!e.atoms.length)
|
|
2198
2215
|
throw new ae();
|
|
2199
2216
|
for (const t of e.atoms)
|
|
@@ -2244,7 +2261,7 @@ class ve {
|
|
|
2244
2261
|
isotopeI() {
|
|
2245
2262
|
for (const e of this.molecule.getIsotopes("I")) {
|
|
2246
2263
|
if (e.token !== "USER")
|
|
2247
|
-
throw new
|
|
2264
|
+
throw new re(`Check::isotopeI() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2248
2265
|
if (e.index === 0)
|
|
2249
2266
|
throw new ke(`Check::isotopeI() - Isotope "${e.isotope}" Atoms must have a non-zero index!`);
|
|
2250
2267
|
}
|
|
@@ -2257,7 +2274,7 @@ class ve {
|
|
|
2257
2274
|
isotopeU() {
|
|
2258
2275
|
for (const e of this.molecule.getIsotopes("U")) {
|
|
2259
2276
|
if (e.token !== "AUTH")
|
|
2260
|
-
throw new
|
|
2277
|
+
throw new re(`Check::isotopeU() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2261
2278
|
if (e.index !== 0)
|
|
2262
2279
|
throw new ke(`Check::isotopeU() - Isotope "${e.isotope}" Atoms must have an index equal to 0!`);
|
|
2263
2280
|
}
|
|
@@ -2273,7 +2290,7 @@ class ve {
|
|
|
2273
2290
|
if (t.meta.length < 1)
|
|
2274
2291
|
throw new H();
|
|
2275
2292
|
if (t.token !== "USER")
|
|
2276
|
-
throw new
|
|
2293
|
+
throw new re(`Check::isotopeM() - "${t.token}" is not a valid Token slug for "${t.isotope}" isotope Atoms!`);
|
|
2277
2294
|
const n = pe.aggregateMeta(t.meta);
|
|
2278
2295
|
for (const s of e) {
|
|
2279
2296
|
let r = n[s];
|
|
@@ -2299,7 +2316,7 @@ class ve {
|
|
|
2299
2316
|
isotopeC() {
|
|
2300
2317
|
for (const e of this.molecule.getIsotopes("C")) {
|
|
2301
2318
|
if (e.token !== "USER")
|
|
2302
|
-
throw new
|
|
2319
|
+
throw new re(`Check::isotopeC() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2303
2320
|
if (e.index !== 0)
|
|
2304
2321
|
throw new ke(`Check::isotopeC() - Isotope "${e.isotope}" Atoms must have an index equal to 0!`);
|
|
2305
2322
|
}
|
|
@@ -2321,7 +2338,7 @@ class ve {
|
|
|
2321
2338
|
if (!Object.prototype.hasOwnProperty.call(t, s) || !t[s])
|
|
2322
2339
|
throw new H(`Check::isotopeT() - Required meta field "${s}" is missing!`);
|
|
2323
2340
|
if (e.token !== "USER")
|
|
2324
|
-
throw new
|
|
2341
|
+
throw new re(`Check::isotopeT() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2325
2342
|
if (e.index !== 0)
|
|
2326
2343
|
throw new ke(`Check::isotopeT() - Isotope "${e.isotope}" Atoms must have an index equal to 0!`);
|
|
2327
2344
|
}
|
|
@@ -2359,7 +2376,7 @@ class ve {
|
|
|
2359
2376
|
isotopeP() {
|
|
2360
2377
|
for (const e of this.molecule.getIsotopes("P")) {
|
|
2361
2378
|
if (e.token !== "USER")
|
|
2362
|
-
throw new
|
|
2379
|
+
throw new re(`Check::isotopeP() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2363
2380
|
const t = e.aggregatedMeta();
|
|
2364
2381
|
if (!Object.prototype.hasOwnProperty.call(t, "peerHost") || !t.peerHost)
|
|
2365
2382
|
throw new H('Check::isotopeP() - Required meta field "peerHost" is missing!');
|
|
@@ -2374,7 +2391,7 @@ class ve {
|
|
|
2374
2391
|
isotopeA() {
|
|
2375
2392
|
for (const e of this.molecule.getIsotopes("A")) {
|
|
2376
2393
|
if (e.token !== "USER")
|
|
2377
|
-
throw new
|
|
2394
|
+
throw new re(`Check::isotopeA() - "${e.token}" is not a valid Token slug for "${e.isotope}" isotope Atoms!`);
|
|
2378
2395
|
if (!e.metaType)
|
|
2379
2396
|
throw new H('Check::isotopeA() - Required field "metaType" is missing!');
|
|
2380
2397
|
if (!e.metaId)
|
|
@@ -2481,7 +2498,7 @@ class ve {
|
|
|
2481
2498
|
if (i < 0)
|
|
2482
2499
|
throw new Se();
|
|
2483
2500
|
if (c.walletAddress === s.walletAddress)
|
|
2484
|
-
throw new
|
|
2501
|
+
throw new as();
|
|
2485
2502
|
}
|
|
2486
2503
|
r += i;
|
|
2487
2504
|
}
|
|
@@ -2508,7 +2525,7 @@ class ve {
|
|
|
2508
2525
|
if (this.molecule.molecularHash !== g.hashAtoms({
|
|
2509
2526
|
atoms: this.molecule.atoms
|
|
2510
2527
|
}))
|
|
2511
|
-
throw new
|
|
2528
|
+
throw new rs();
|
|
2512
2529
|
return !0;
|
|
2513
2530
|
}
|
|
2514
2531
|
/**
|
|
@@ -2531,7 +2548,7 @@ class ve {
|
|
|
2531
2548
|
let s = "";
|
|
2532
2549
|
for (const p in n) {
|
|
2533
2550
|
let d = n[p];
|
|
2534
|
-
for (let
|
|
2551
|
+
for (let b = 0, A = 8 + e[p]; b < A; b++)
|
|
2535
2552
|
d = new L("SHAKE256", "TEXT").update(d).getHash("HEX", { outputLen: 512 });
|
|
2536
2553
|
s += d;
|
|
2537
2554
|
}
|
|
@@ -2541,9 +2558,9 @@ class ve {
|
|
|
2541
2558
|
a.update(i);
|
|
2542
2559
|
const c = a.getHash("HEX", { outputLen: 256 }), u = this.molecule.atoms[0];
|
|
2543
2560
|
let l = u.walletAddress;
|
|
2544
|
-
const h =
|
|
2545
|
-
if (h && (l =
|
|
2546
|
-
throw new
|
|
2561
|
+
const h = T.get(u.aggregatedMeta(), "signingWallet");
|
|
2562
|
+
if (h && (l = T.get(JSON.parse(h), "address")), c !== l)
|
|
2563
|
+
throw new os();
|
|
2547
2564
|
return !0;
|
|
2548
2565
|
}
|
|
2549
2566
|
/**
|
|
@@ -2641,7 +2658,7 @@ class ue extends x {
|
|
|
2641
2658
|
super(e, t, n), this.name = "BalanceInsufficientException";
|
|
2642
2659
|
}
|
|
2643
2660
|
}
|
|
2644
|
-
class
|
|
2661
|
+
class Ye extends x {
|
|
2645
2662
|
/**
|
|
2646
2663
|
* Class constructor
|
|
2647
2664
|
*
|
|
@@ -2670,9 +2687,10 @@ class z {
|
|
|
2670
2687
|
sourceWallet: n = null,
|
|
2671
2688
|
remainderWallet: s = null,
|
|
2672
2689
|
cellSlug: r = null,
|
|
2673
|
-
version: i = null
|
|
2690
|
+
version: i = null,
|
|
2691
|
+
continuIdPosition: a = null
|
|
2674
2692
|
}) {
|
|
2675
|
-
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.atoms = [], this.parentHashes = [], i !== null && Object.prototype.hasOwnProperty.call(Ue, i) && (this.version = String(i)), (s || n) && (this.remainderWallet = s || _.create({
|
|
2693
|
+
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(Ue, i) && (this.version = String(i)), (s || n) && (this.remainderWallet = s || _.create({
|
|
2676
2694
|
secret: e,
|
|
2677
2695
|
bundle: t,
|
|
2678
2696
|
token: n.token,
|
|
@@ -2841,7 +2859,7 @@ class z {
|
|
|
2841
2859
|
bundle: this.bundle
|
|
2842
2860
|
}));
|
|
2843
2861
|
const e = {};
|
|
2844
|
-
return this.sourceWallet && this.sourceWallet.position && (e.previousPosition = this.sourceWallet.position), this.remainderWallet.pubkey && (e.pubkey = this.remainderWallet.pubkey), this.remainderWallet.characters && (e.characters = this.remainderWallet.characters), this.addAtom(g.create({
|
|
2862
|
+
return this.continuIdPosition ? e.previousPosition = this.continuIdPosition : this.sourceWallet && this.sourceWallet.position && (e.previousPosition = this.sourceWallet.position), this.remainderWallet.pubkey && (e.pubkey = this.remainderWallet.pubkey), this.remainderWallet.characters && (e.characters = this.remainderWallet.characters), this.addAtom(g.create({
|
|
2845
2863
|
isotope: "I",
|
|
2846
2864
|
wallet: this.remainderWallet,
|
|
2847
2865
|
metaType: "walletBundle",
|
|
@@ -2919,13 +2937,23 @@ class z {
|
|
|
2919
2937
|
walletBundle: t = null
|
|
2920
2938
|
}) {
|
|
2921
2939
|
if (e < 0)
|
|
2922
|
-
throw new
|
|
2940
|
+
throw new Ye("Molecule::burnToken() - Amount to burn must be positive!");
|
|
2923
2941
|
if (this.sourceWallet.balance - e < 0)
|
|
2924
2942
|
throw new ue();
|
|
2943
|
+
const n = new _({
|
|
2944
|
+
bundle: "0000000000000000000000000000000000000000000000000000000000000000",
|
|
2945
|
+
token: this.sourceWallet.token
|
|
2946
|
+
});
|
|
2925
2947
|
return this.addAtom(g.create({
|
|
2926
2948
|
isotope: "V",
|
|
2927
2949
|
wallet: this.sourceWallet,
|
|
2928
|
-
value: -
|
|
2950
|
+
value: -this.sourceWallet.balance
|
|
2951
|
+
})), this.addAtom(g.create({
|
|
2952
|
+
isotope: "V",
|
|
2953
|
+
wallet: n,
|
|
2954
|
+
value: e,
|
|
2955
|
+
metaType: "walletBundle",
|
|
2956
|
+
metaId: n.bundle
|
|
2929
2957
|
})), this.addAtom(g.create({
|
|
2930
2958
|
isotope: "V",
|
|
2931
2959
|
wallet: this.remainderWallet,
|
|
@@ -2947,7 +2975,7 @@ class z {
|
|
|
2947
2975
|
units: t = []
|
|
2948
2976
|
}) {
|
|
2949
2977
|
if (e < 0)
|
|
2950
|
-
throw new
|
|
2978
|
+
throw new Ye("Molecule::replenishToken() - Amount to replenish must be positive!");
|
|
2951
2979
|
if (t.length) {
|
|
2952
2980
|
t = _.getTokenUnits(t), this.remainderWallet.tokenUnits = this.sourceWallet.tokenUnits;
|
|
2953
2981
|
for (const n of t)
|
|
@@ -3013,7 +3041,7 @@ class z {
|
|
|
3013
3041
|
amount: t
|
|
3014
3042
|
}) {
|
|
3015
3043
|
if (t <= 0)
|
|
3016
|
-
throw new
|
|
3044
|
+
throw new Ye("Molecule::addStackableTransfer() - Amount must be positive!");
|
|
3017
3045
|
if (this.sourceWallet.balance - t < 0)
|
|
3018
3046
|
throw new ue();
|
|
3019
3047
|
const n = this.sourceWallet.batchId || he({});
|
|
@@ -3354,8 +3382,8 @@ class z {
|
|
|
3354
3382
|
});
|
|
3355
3383
|
const s = this.atoms[0];
|
|
3356
3384
|
let r = s.position;
|
|
3357
|
-
const i =
|
|
3358
|
-
if (i && (r =
|
|
3385
|
+
const i = T.get(s.aggregatedMeta(), "signingWallet");
|
|
3386
|
+
if (i && (r = T.get(JSON.parse(i), "position")), !r)
|
|
3359
3387
|
throw new Vt("Signing wallet must have a position!");
|
|
3360
3388
|
const a = _.generateKey({
|
|
3361
3389
|
secret: this.secret,
|
|
@@ -3364,15 +3392,15 @@ class z {
|
|
|
3364
3392
|
}), c = He(a, 128), u = this.normalizedHash();
|
|
3365
3393
|
let l = "";
|
|
3366
3394
|
for (const d in c) {
|
|
3367
|
-
let
|
|
3368
|
-
for (let A = 0,
|
|
3369
|
-
|
|
3370
|
-
l +=
|
|
3395
|
+
let b = c[d];
|
|
3396
|
+
for (let A = 0, M = 8 - u[d]; A < M; A++)
|
|
3397
|
+
b = new L("SHAKE256", "TEXT").update(b).getHash("HEX", { outputLen: 512 });
|
|
3398
|
+
l += b;
|
|
3371
3399
|
}
|
|
3372
3400
|
n && (l = dn(l));
|
|
3373
3401
|
const h = He(l, Math.ceil(l.length / this.atoms.length));
|
|
3374
3402
|
let p = null;
|
|
3375
|
-
for (let d = 0,
|
|
3403
|
+
for (let d = 0, b = h.length; d < b; d++)
|
|
3376
3404
|
this.atoms[d].otsFragment = h[d], p = this.atoms[d].position;
|
|
3377
3405
|
return p;
|
|
3378
3406
|
}
|
|
@@ -3526,34 +3554,6 @@ class z {
|
|
|
3526
3554
|
return z.normalize(z.enumerate(this.molecularHash));
|
|
3527
3555
|
}
|
|
3528
3556
|
}
|
|
3529
|
-
const Ye = 10 ** 18;
|
|
3530
|
-
class de {
|
|
3531
|
-
/**
|
|
3532
|
-
* @param {number} value
|
|
3533
|
-
* @return {number}
|
|
3534
|
-
*/
|
|
3535
|
-
static val(e) {
|
|
3536
|
-
return Math.abs(e * Ye) < 1 ? 0 : e;
|
|
3537
|
-
}
|
|
3538
|
-
/**
|
|
3539
|
-
* @param {number} value1
|
|
3540
|
-
* @param {number} value2
|
|
3541
|
-
* @param {boolean} debug
|
|
3542
|
-
* @return {number}
|
|
3543
|
-
*/
|
|
3544
|
-
static cmp(e, t, n = !1) {
|
|
3545
|
-
const s = de.val(e) * Ye, r = de.val(t) * Ye;
|
|
3546
|
-
return Math.abs(s - r) < 1 ? 0 : s > r ? 1 : -1;
|
|
3547
|
-
}
|
|
3548
|
-
/**
|
|
3549
|
-
* @param {number} value1
|
|
3550
|
-
* @param {number} value2
|
|
3551
|
-
* @return {boolean}
|
|
3552
|
-
*/
|
|
3553
|
-
static equal(e, t) {
|
|
3554
|
-
return de.cmp(e, t) === 0;
|
|
3555
|
-
}
|
|
3556
|
-
}
|
|
3557
3557
|
class xe {
|
|
3558
3558
|
/**
|
|
3559
3559
|
*
|
|
@@ -3670,7 +3670,35 @@ class xe {
|
|
|
3670
3670
|
};
|
|
3671
3671
|
}
|
|
3672
3672
|
}
|
|
3673
|
-
|
|
3673
|
+
const et = 10 ** 18;
|
|
3674
|
+
class de {
|
|
3675
|
+
/**
|
|
3676
|
+
* @param {number} value
|
|
3677
|
+
* @return {number}
|
|
3678
|
+
*/
|
|
3679
|
+
static val(e) {
|
|
3680
|
+
return Math.abs(e * et) < 1 ? 0 : e;
|
|
3681
|
+
}
|
|
3682
|
+
/**
|
|
3683
|
+
* @param {number} value1
|
|
3684
|
+
* @param {number} value2
|
|
3685
|
+
* @param {boolean} debug
|
|
3686
|
+
* @return {number}
|
|
3687
|
+
*/
|
|
3688
|
+
static cmp(e, t, n = !1) {
|
|
3689
|
+
const s = de.val(e) * et, r = de.val(t) * et;
|
|
3690
|
+
return Math.abs(s - r) < 1 ? 0 : s > r ? 1 : -1;
|
|
3691
|
+
}
|
|
3692
|
+
/**
|
|
3693
|
+
* @param {number} value1
|
|
3694
|
+
* @param {number} value2
|
|
3695
|
+
* @return {boolean}
|
|
3696
|
+
*/
|
|
3697
|
+
static equal(e, t) {
|
|
3698
|
+
return de.cmp(e, t) === 0;
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
class te extends x {
|
|
3674
3702
|
/**
|
|
3675
3703
|
* Class constructor
|
|
3676
3704
|
*
|
|
@@ -3694,7 +3722,7 @@ class Ke extends x {
|
|
|
3694
3722
|
super(e, t, n), this.name = "UnauthenticatedException";
|
|
3695
3723
|
}
|
|
3696
3724
|
}
|
|
3697
|
-
class
|
|
3725
|
+
class E {
|
|
3698
3726
|
/**
|
|
3699
3727
|
* Class constructor
|
|
3700
3728
|
*
|
|
@@ -3708,14 +3736,14 @@ class O {
|
|
|
3708
3736
|
dataKey: n = null
|
|
3709
3737
|
}) {
|
|
3710
3738
|
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)
|
|
3711
|
-
throw new
|
|
3712
|
-
if (
|
|
3713
|
-
const s =
|
|
3714
|
-
throw String(s).includes("Unauthenticated") ? new Ke() : new
|
|
3739
|
+
throw new te();
|
|
3740
|
+
if (T.has(this.$__response, this.errorKey)) {
|
|
3741
|
+
const s = T.get(this.$__response, this.errorKey);
|
|
3742
|
+
throw String(s).includes("Unauthenticated") ? new Ke() : new te();
|
|
3715
3743
|
}
|
|
3716
3744
|
if (this.$__response.errors && Array.isArray(this.$__response.errors) && this.$__response.errors.length > 0) {
|
|
3717
3745
|
const s = this.$__response.errors[0].message || "Unknown GraphQL error";
|
|
3718
|
-
throw s.includes("Unauthenticated") ? new Ke() : new
|
|
3746
|
+
throw s.includes("Unauthenticated") ? new Ke() : new te(`GraphQL Error: ${s}`);
|
|
3719
3747
|
}
|
|
3720
3748
|
this.init();
|
|
3721
3749
|
}
|
|
@@ -3731,10 +3759,10 @@ class O {
|
|
|
3731
3759
|
if (!this.dataKey)
|
|
3732
3760
|
return this.response();
|
|
3733
3761
|
if (!this.response().data)
|
|
3734
|
-
throw new
|
|
3735
|
-
if (!
|
|
3736
|
-
throw new
|
|
3737
|
-
return
|
|
3762
|
+
throw new te("Response has no data field");
|
|
3763
|
+
if (!T.has(this.response(), this.dataKey))
|
|
3764
|
+
throw new te(`Missing expected field: ${this.dataKey}`);
|
|
3765
|
+
return T.get(this.response(), this.dataKey);
|
|
3738
3766
|
}
|
|
3739
3767
|
/**
|
|
3740
3768
|
* @return {object}
|
|
@@ -3909,7 +3937,7 @@ class N {
|
|
|
3909
3937
|
* @return {Response}
|
|
3910
3938
|
*/
|
|
3911
3939
|
createResponse(e) {
|
|
3912
|
-
return new
|
|
3940
|
+
return new E({
|
|
3913
3941
|
query: this,
|
|
3914
3942
|
json: e
|
|
3915
3943
|
});
|
|
@@ -3951,7 +3979,7 @@ class N {
|
|
|
3951
3979
|
return this.$__response = await this.createResponseRaw(s), this.$__response;
|
|
3952
3980
|
} catch (s) {
|
|
3953
3981
|
if (s.name === "AbortError")
|
|
3954
|
-
return this.knishIOClient.log("warn", "Query was cancelled"), new
|
|
3982
|
+
return this.knishIOClient.log("warn", "Query was cancelled"), new E({
|
|
3955
3983
|
query: this,
|
|
3956
3984
|
json: { data: null, errors: [{ message: "Query was cancelled" }] }
|
|
3957
3985
|
});
|
|
@@ -3987,7 +4015,7 @@ class N {
|
|
|
3987
4015
|
return {};
|
|
3988
4016
|
}
|
|
3989
4017
|
}
|
|
3990
|
-
class
|
|
4018
|
+
class ls extends E {
|
|
3991
4019
|
/**
|
|
3992
4020
|
* Class constructor
|
|
3993
4021
|
*
|
|
@@ -4018,13 +4046,13 @@ class os extends O {
|
|
|
4018
4046
|
}), 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;
|
|
4019
4047
|
}
|
|
4020
4048
|
}
|
|
4021
|
-
class
|
|
4049
|
+
class cs extends N {
|
|
4022
4050
|
/**
|
|
4023
4051
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4024
4052
|
* @param {KnishIOClient} knishIOClient
|
|
4025
4053
|
*/
|
|
4026
4054
|
constructor(e, t) {
|
|
4027
|
-
super(e, t), this.$__query =
|
|
4055
|
+
super(e, t), this.$__query = O`query ($bundle: String!) {
|
|
4028
4056
|
ContinuId(bundle: $bundle) {
|
|
4029
4057
|
address,
|
|
4030
4058
|
bundleHash,
|
|
@@ -4038,6 +4066,13 @@ class as extends N {
|
|
|
4038
4066
|
}
|
|
4039
4067
|
}`;
|
|
4040
4068
|
}
|
|
4069
|
+
/**
|
|
4070
|
+
* Force network-only for ContinuID queries to prevent URQL cache from
|
|
4071
|
+
* returning stale wallet positions after mutations advance the ContinuID chain
|
|
4072
|
+
*/
|
|
4073
|
+
createQueryContext() {
|
|
4074
|
+
return { requestPolicy: "network-only" };
|
|
4075
|
+
}
|
|
4041
4076
|
/**
|
|
4042
4077
|
* Returns a Response object
|
|
4043
4078
|
*
|
|
@@ -4045,13 +4080,13 @@ class as extends N {
|
|
|
4045
4080
|
* @return {ResponseContinuId}
|
|
4046
4081
|
*/
|
|
4047
4082
|
createResponse(e) {
|
|
4048
|
-
return new
|
|
4083
|
+
return new ls({
|
|
4049
4084
|
query: this,
|
|
4050
4085
|
json: e
|
|
4051
4086
|
});
|
|
4052
4087
|
}
|
|
4053
4088
|
}
|
|
4054
|
-
class
|
|
4089
|
+
class us extends E {
|
|
4055
4090
|
/**
|
|
4056
4091
|
* Class constructor
|
|
4057
4092
|
*
|
|
@@ -4083,13 +4118,13 @@ class ls extends O {
|
|
|
4083
4118
|
}), t;
|
|
4084
4119
|
}
|
|
4085
4120
|
}
|
|
4086
|
-
class
|
|
4121
|
+
class hs extends N {
|
|
4087
4122
|
/**
|
|
4088
4123
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4089
4124
|
* @param {KnishIOClient} knishIOClient
|
|
4090
4125
|
*/
|
|
4091
4126
|
constructor(e, t) {
|
|
4092
|
-
super(e, t), this.$__query =
|
|
4127
|
+
super(e, t), this.$__query = O`query( $bundleHashes: [ String! ] ) {
|
|
4093
4128
|
WalletBundle( bundleHashes: $bundleHashes ) {
|
|
4094
4129
|
bundleHash,
|
|
4095
4130
|
metas {
|
|
@@ -4110,13 +4145,13 @@ class cs extends N {
|
|
|
4110
4145
|
* @return {ResponseWalletBundle}
|
|
4111
4146
|
*/
|
|
4112
4147
|
createResponse(e) {
|
|
4113
|
-
return new
|
|
4148
|
+
return new us({
|
|
4114
4149
|
query: this,
|
|
4115
4150
|
json: e
|
|
4116
4151
|
});
|
|
4117
4152
|
}
|
|
4118
4153
|
}
|
|
4119
|
-
class Le extends
|
|
4154
|
+
class Le extends E {
|
|
4120
4155
|
/**
|
|
4121
4156
|
* Class constructor
|
|
4122
4157
|
*
|
|
@@ -4191,14 +4226,14 @@ class Le extends O {
|
|
|
4191
4226
|
return this.getWallets();
|
|
4192
4227
|
}
|
|
4193
4228
|
}
|
|
4194
|
-
class
|
|
4229
|
+
class ds extends N {
|
|
4195
4230
|
/**
|
|
4196
4231
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4197
4232
|
* @param {KnishIOClient} knishIOClient
|
|
4198
4233
|
*/
|
|
4199
4234
|
constructor(e, t) {
|
|
4200
|
-
super(e, t), this.$__query =
|
|
4201
|
-
Wallet( bundleHash: $bundleHash,
|
|
4235
|
+
super(e, t), this.$__query = O`query( $bundleHash: String, $token: String ) {
|
|
4236
|
+
Wallet( bundleHash: $bundleHash, token: $token ) {
|
|
4202
4237
|
address,
|
|
4203
4238
|
bundleHash,
|
|
4204
4239
|
token {
|
|
@@ -4239,7 +4274,7 @@ class us extends N {
|
|
|
4239
4274
|
});
|
|
4240
4275
|
}
|
|
4241
4276
|
}
|
|
4242
|
-
class
|
|
4277
|
+
class ps extends E {
|
|
4243
4278
|
/**
|
|
4244
4279
|
* Class constructor
|
|
4245
4280
|
*
|
|
@@ -4268,13 +4303,13 @@ class hs extends O {
|
|
|
4268
4303
|
});
|
|
4269
4304
|
}
|
|
4270
4305
|
}
|
|
4271
|
-
class
|
|
4306
|
+
class fs extends N {
|
|
4272
4307
|
/**
|
|
4273
4308
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4274
4309
|
* @param {KnishIOClient} knishIOClient
|
|
4275
4310
|
*/
|
|
4276
4311
|
constructor(e, t) {
|
|
4277
|
-
super(e, t), this.$__query =
|
|
4312
|
+
super(e, t), this.$__query = O`query( $address: String, $bundleHash: String, $type: String, $token: String, $position: String ) {
|
|
4278
4313
|
Balance( address: $address, bundleHash: $bundleHash, type: $type, token: $token, position: $position ) {
|
|
4279
4314
|
address,
|
|
4280
4315
|
bundleHash,
|
|
@@ -4303,13 +4338,13 @@ class ds extends N {
|
|
|
4303
4338
|
* @return {ResponseBalance}
|
|
4304
4339
|
*/
|
|
4305
4340
|
createResponse(e) {
|
|
4306
|
-
return new
|
|
4341
|
+
return new ps({
|
|
4307
4342
|
query: this,
|
|
4308
4343
|
json: e
|
|
4309
4344
|
});
|
|
4310
4345
|
}
|
|
4311
4346
|
}
|
|
4312
|
-
class
|
|
4347
|
+
class ms extends E {
|
|
4313
4348
|
/**
|
|
4314
4349
|
* Class constructor
|
|
4315
4350
|
*
|
|
@@ -4349,7 +4384,7 @@ class At extends N {
|
|
|
4349
4384
|
* @param {KnishIOClient} knishIOClient
|
|
4350
4385
|
*/
|
|
4351
4386
|
constructor(e, t) {
|
|
4352
|
-
super(e, t), this.$__query =
|
|
4387
|
+
super(e, t), this.$__query = O`query( $metaType: String, $metaTypes: [ String! ], $metaId: String, $metaIds: [ String! ], $key: String, $keys: [ String! ], $value: String, $values: [ String! ], $count: String, $latest: Boolean, $filter: [ MetaFilter! ], $queryArgs: QueryArgs, $countBy: String, $cellSlug: String ) {
|
|
4353
4388
|
MetaType( metaType: $metaType, metaTypes: $metaTypes, metaId: $metaId, metaIds: $metaIds, key: $key, keys: $keys, value: $value, values: $values, count: $count, filter: $filter, queryArgs: $queryArgs, countBy: $countBy, cellSlug: $cellSlug ) {
|
|
4354
4389
|
metaType,
|
|
4355
4390
|
instanceCount {
|
|
@@ -4412,7 +4447,7 @@ class At extends N {
|
|
|
4412
4447
|
* @return {ResponseMetaType}
|
|
4413
4448
|
*/
|
|
4414
4449
|
createResponse(e) {
|
|
4415
|
-
return new
|
|
4450
|
+
return new ms({
|
|
4416
4451
|
query: this,
|
|
4417
4452
|
json: e
|
|
4418
4453
|
});
|
|
@@ -4424,7 +4459,7 @@ class Ie extends N {
|
|
|
4424
4459
|
* @param {KnishIOClient} knishIOClient
|
|
4425
4460
|
*/
|
|
4426
4461
|
constructor(e, t) {
|
|
4427
|
-
super(e, t), this.$__query =
|
|
4462
|
+
super(e, t), this.$__query = O`query( $batchId: String ) {
|
|
4428
4463
|
Batch( batchId: $batchId ) {
|
|
4429
4464
|
${Ie.getFields()},
|
|
4430
4465
|
children {
|
|
@@ -4492,20 +4527,20 @@ class Ie extends N {
|
|
|
4492
4527
|
* @return {Response}
|
|
4493
4528
|
*/
|
|
4494
4529
|
createResponse(e) {
|
|
4495
|
-
const t = new
|
|
4530
|
+
const t = new E({
|
|
4496
4531
|
query: this,
|
|
4497
4532
|
json: e
|
|
4498
4533
|
});
|
|
4499
4534
|
return t.dataKey = "data.Batch", t;
|
|
4500
4535
|
}
|
|
4501
4536
|
}
|
|
4502
|
-
class
|
|
4537
|
+
class ys extends N {
|
|
4503
4538
|
/**
|
|
4504
4539
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4505
4540
|
* @param {KnishIOClient} knishIOClient
|
|
4506
4541
|
*/
|
|
4507
4542
|
constructor(e, t) {
|
|
4508
|
-
super(e, t), this.$__query =
|
|
4543
|
+
super(e, t), this.$__query = O`query( $batchId: String ) {
|
|
4509
4544
|
BatchHistory( batchId: $batchId ) {
|
|
4510
4545
|
${Ie.getFields()}
|
|
4511
4546
|
}
|
|
@@ -4518,14 +4553,14 @@ class fs extends N {
|
|
|
4518
4553
|
* @return {Response}
|
|
4519
4554
|
*/
|
|
4520
4555
|
createResponse(e) {
|
|
4521
|
-
const t = new
|
|
4556
|
+
const t = new E({
|
|
4522
4557
|
query: this,
|
|
4523
4558
|
json: e
|
|
4524
4559
|
});
|
|
4525
4560
|
return t.dataKey = "data.BatchHistory", t;
|
|
4526
4561
|
}
|
|
4527
4562
|
}
|
|
4528
|
-
class V extends
|
|
4563
|
+
class V extends E {
|
|
4529
4564
|
/**
|
|
4530
4565
|
* Class constructor
|
|
4531
4566
|
*
|
|
@@ -4546,7 +4581,7 @@ class V extends O {
|
|
|
4546
4581
|
* Initialize response object with payload data
|
|
4547
4582
|
*/
|
|
4548
4583
|
init() {
|
|
4549
|
-
const e =
|
|
4584
|
+
const e = T.get(this.data(), "payload");
|
|
4550
4585
|
try {
|
|
4551
4586
|
this.$__payload = Object.prototype.toString.call(e) === "[object String]" ? JSON.parse(e) : e;
|
|
4552
4587
|
} catch {
|
|
@@ -4569,7 +4604,7 @@ class V extends O {
|
|
|
4569
4604
|
if (!e)
|
|
4570
4605
|
return null;
|
|
4571
4606
|
const t = new z({});
|
|
4572
|
-
return t.molecularHash =
|
|
4607
|
+
return t.molecularHash = T.get(e, "molecularHash"), t.status = T.get(e, "status"), t.createdAt = T.get(e, "createdAt"), t;
|
|
4573
4608
|
}
|
|
4574
4609
|
/**
|
|
4575
4610
|
* Returns whether molecule was accepted or not
|
|
@@ -4585,7 +4620,7 @@ class V extends O {
|
|
|
4585
4620
|
* @return {string}
|
|
4586
4621
|
*/
|
|
4587
4622
|
status() {
|
|
4588
|
-
return
|
|
4623
|
+
return T.get(this.data(), "status", "rejected");
|
|
4589
4624
|
}
|
|
4590
4625
|
/**
|
|
4591
4626
|
* Returns the reason for rejection
|
|
@@ -4593,7 +4628,7 @@ class V extends O {
|
|
|
4593
4628
|
* @return {string}
|
|
4594
4629
|
*/
|
|
4595
4630
|
reason() {
|
|
4596
|
-
return
|
|
4631
|
+
return T.get(this.data(), "reason", "Invalid response from server");
|
|
4597
4632
|
}
|
|
4598
4633
|
/**
|
|
4599
4634
|
* Returns payload object
|
|
@@ -4604,7 +4639,7 @@ class V extends O {
|
|
|
4604
4639
|
return this.$__payload;
|
|
4605
4640
|
}
|
|
4606
4641
|
}
|
|
4607
|
-
class
|
|
4642
|
+
class Qe extends N {
|
|
4608
4643
|
/**
|
|
4609
4644
|
* Creates a new Request for the given parameters
|
|
4610
4645
|
*
|
|
@@ -4637,7 +4672,7 @@ class it extends N {
|
|
|
4637
4672
|
return this.$__response = await this.createResponseRaw(r), this.$__response;
|
|
4638
4673
|
} catch (s) {
|
|
4639
4674
|
if (s.name === "AbortError")
|
|
4640
|
-
return this.knishIOClient.log("warn", "Mutation was cancelled"), new
|
|
4675
|
+
return this.knishIOClient.log("warn", "Mutation was cancelled"), new E({
|
|
4641
4676
|
query: this,
|
|
4642
4677
|
json: { data: null, errors: [{ message: "Mutation was cancelled" }] }
|
|
4643
4678
|
});
|
|
@@ -4648,14 +4683,14 @@ class it extends N {
|
|
|
4648
4683
|
return {};
|
|
4649
4684
|
}
|
|
4650
4685
|
}
|
|
4651
|
-
class U extends
|
|
4686
|
+
class U extends Qe {
|
|
4652
4687
|
/**
|
|
4653
4688
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4654
4689
|
* @param {KnishIOClient} knishIOClient
|
|
4655
4690
|
* @param molecule
|
|
4656
4691
|
*/
|
|
4657
4692
|
constructor(e, t, n) {
|
|
4658
|
-
super(e, t), this.$__molecule = n, this.$__remainderWallet = null, this.$__query =
|
|
4693
|
+
super(e, t), this.$__molecule = n, this.$__remainderWallet = null, this.$__query = O`mutation( $molecule: MoleculeInput! ) {
|
|
4659
4694
|
ProposeMolecule( molecule: $molecule ) {
|
|
4660
4695
|
molecularHash,
|
|
4661
4696
|
height,
|
|
@@ -4719,7 +4754,7 @@ class U extends it {
|
|
|
4719
4754
|
return this.$__molecule;
|
|
4720
4755
|
}
|
|
4721
4756
|
}
|
|
4722
|
-
class
|
|
4757
|
+
class gs extends V {
|
|
4723
4758
|
/**
|
|
4724
4759
|
* return the authorization key
|
|
4725
4760
|
*
|
|
@@ -4727,9 +4762,9 @@ class ms extends V {
|
|
|
4727
4762
|
* @return {*}
|
|
4728
4763
|
*/
|
|
4729
4764
|
payloadKey(e) {
|
|
4730
|
-
if (!
|
|
4731
|
-
throw new
|
|
4732
|
-
return
|
|
4765
|
+
if (!T.has(this.payload(), e))
|
|
4766
|
+
throw new te(`ResponseRequestAuthorization::payloadKey() - '${e}' key was not found in the payload!`);
|
|
4767
|
+
return T.get(this.payload(), e);
|
|
4733
4768
|
}
|
|
4734
4769
|
/**
|
|
4735
4770
|
* Returns the auth token
|
|
@@ -4740,13 +4775,31 @@ class ms extends V {
|
|
|
4740
4775
|
return this.payloadKey("token");
|
|
4741
4776
|
}
|
|
4742
4777
|
/**
|
|
4743
|
-
* Returns
|
|
4778
|
+
* Returns raw time value from payload
|
|
4744
4779
|
*
|
|
4745
4780
|
* @return {string}
|
|
4746
4781
|
*/
|
|
4747
4782
|
time() {
|
|
4748
4783
|
return this.payloadKey("time");
|
|
4749
4784
|
}
|
|
4785
|
+
/**
|
|
4786
|
+
* Returns the expiration timestamp as Unix seconds.
|
|
4787
|
+
* Handles both server formats:
|
|
4788
|
+
* - PHP server: time = lifetime in ms, expiresAt = Unix timestamp in payload
|
|
4789
|
+
* - Rust server: time = Unix timestamp in seconds
|
|
4790
|
+
*
|
|
4791
|
+
* @return {number}
|
|
4792
|
+
*/
|
|
4793
|
+
expiresAt() {
|
|
4794
|
+
try {
|
|
4795
|
+
const t = this.payloadKey("expiresAt");
|
|
4796
|
+
if (t)
|
|
4797
|
+
return Number(t);
|
|
4798
|
+
} catch {
|
|
4799
|
+
}
|
|
4800
|
+
const e = Number(this.time());
|
|
4801
|
+
return e >= 1577836800 ? e : Math.floor(Date.now() / 1e3) + Math.floor(e / 1e3);
|
|
4802
|
+
}
|
|
4750
4803
|
/**
|
|
4751
4804
|
*
|
|
4752
4805
|
* @return {string}
|
|
@@ -4762,7 +4815,7 @@ class ms extends V {
|
|
|
4762
4815
|
return this.payloadKey("key");
|
|
4763
4816
|
}
|
|
4764
4817
|
}
|
|
4765
|
-
class
|
|
4818
|
+
class bs extends U {
|
|
4766
4819
|
/**
|
|
4767
4820
|
*
|
|
4768
4821
|
* @param {object} meta
|
|
@@ -4777,15 +4830,15 @@ class ys extends U {
|
|
|
4777
4830
|
* @return {ResponseRequestAuthorization}
|
|
4778
4831
|
*/
|
|
4779
4832
|
createResponse(e) {
|
|
4780
|
-
return new
|
|
4833
|
+
return new gs({
|
|
4781
4834
|
query: this,
|
|
4782
4835
|
json: e
|
|
4783
4836
|
});
|
|
4784
4837
|
}
|
|
4785
4838
|
}
|
|
4786
|
-
class
|
|
4839
|
+
class ws extends V {
|
|
4787
4840
|
}
|
|
4788
|
-
class
|
|
4841
|
+
class ks extends U {
|
|
4789
4842
|
/**
|
|
4790
4843
|
* @param {Wallet|null} recipientWallet
|
|
4791
4844
|
* @param {number|null} amount
|
|
@@ -4811,15 +4864,15 @@ class ws extends U {
|
|
|
4811
4864
|
* @return {ResponseCreateToken}
|
|
4812
4865
|
*/
|
|
4813
4866
|
createResponse(e) {
|
|
4814
|
-
return new
|
|
4867
|
+
return new ws({
|
|
4815
4868
|
query: this,
|
|
4816
4869
|
json: e
|
|
4817
4870
|
});
|
|
4818
4871
|
}
|
|
4819
4872
|
}
|
|
4820
|
-
class
|
|
4873
|
+
class Ss extends V {
|
|
4821
4874
|
}
|
|
4822
|
-
class
|
|
4875
|
+
class _s extends U {
|
|
4823
4876
|
/**
|
|
4824
4877
|
* Fills a Molecule with the appropriate atoms and prepares for broadcast
|
|
4825
4878
|
*
|
|
@@ -4854,13 +4907,13 @@ class ks extends U {
|
|
|
4854
4907
|
* @return {ResponseRequestTokens}
|
|
4855
4908
|
*/
|
|
4856
4909
|
createResponse(e) {
|
|
4857
|
-
return new
|
|
4910
|
+
return new Ss({
|
|
4858
4911
|
query: this,
|
|
4859
4912
|
json: e
|
|
4860
4913
|
});
|
|
4861
4914
|
}
|
|
4862
4915
|
}
|
|
4863
|
-
class
|
|
4916
|
+
class $s extends V {
|
|
4864
4917
|
/**
|
|
4865
4918
|
* Returns result of the transfer
|
|
4866
4919
|
*
|
|
@@ -4874,7 +4927,7 @@ class Ss extends V {
|
|
|
4874
4927
|
return e.reason = typeof t.reason > "u" ? "Invalid response from server" : t.reason, e.status = typeof t.status > "u" ? "rejected" : t.status, e;
|
|
4875
4928
|
}
|
|
4876
4929
|
}
|
|
4877
|
-
class
|
|
4930
|
+
class As extends U {
|
|
4878
4931
|
/**
|
|
4879
4932
|
* Fills the Molecule with provided wallet and amount data
|
|
4880
4933
|
*
|
|
@@ -4897,15 +4950,15 @@ class _s extends U {
|
|
|
4897
4950
|
* @return {ResponseTransferTokens}
|
|
4898
4951
|
*/
|
|
4899
4952
|
createResponse(e) {
|
|
4900
|
-
return new
|
|
4953
|
+
return new $s({
|
|
4901
4954
|
query: this,
|
|
4902
4955
|
json: e
|
|
4903
4956
|
});
|
|
4904
4957
|
}
|
|
4905
4958
|
}
|
|
4906
|
-
class
|
|
4959
|
+
class vs extends V {
|
|
4907
4960
|
}
|
|
4908
|
-
class
|
|
4961
|
+
class xs extends U {
|
|
4909
4962
|
fillMolecule({
|
|
4910
4963
|
type: e,
|
|
4911
4964
|
contact: t,
|
|
@@ -4924,15 +4977,15 @@ class As extends U {
|
|
|
4924
4977
|
* @return {ResponseCreateIdentifier}
|
|
4925
4978
|
*/
|
|
4926
4979
|
createResponse(e) {
|
|
4927
|
-
return new
|
|
4980
|
+
return new vs({
|
|
4928
4981
|
query: this,
|
|
4929
4982
|
json: e
|
|
4930
4983
|
});
|
|
4931
4984
|
}
|
|
4932
4985
|
}
|
|
4933
|
-
class
|
|
4986
|
+
class Is extends V {
|
|
4934
4987
|
}
|
|
4935
|
-
class
|
|
4988
|
+
class Ts extends U {
|
|
4936
4989
|
/**
|
|
4937
4990
|
* Class constructor
|
|
4938
4991
|
*
|
|
@@ -4958,15 +5011,15 @@ class xs extends U {
|
|
|
4958
5011
|
* @return {ResponseClaimShadowWallet}
|
|
4959
5012
|
*/
|
|
4960
5013
|
createResponse(e) {
|
|
4961
|
-
return new
|
|
5014
|
+
return new Is({
|
|
4962
5015
|
query: this,
|
|
4963
5016
|
json: e
|
|
4964
5017
|
});
|
|
4965
5018
|
}
|
|
4966
5019
|
}
|
|
4967
|
-
class
|
|
5020
|
+
class Ms extends V {
|
|
4968
5021
|
}
|
|
4969
|
-
class
|
|
5022
|
+
class Cs extends U {
|
|
4970
5023
|
/**
|
|
4971
5024
|
* Fills a molecule with an appropriate metadata atom
|
|
4972
5025
|
*
|
|
@@ -4995,15 +5048,15 @@ class Ts extends U {
|
|
|
4995
5048
|
* @return {ResponseCreateMeta}
|
|
4996
5049
|
*/
|
|
4997
5050
|
createResponse(e) {
|
|
4998
|
-
return new
|
|
5051
|
+
return new Ms({
|
|
4999
5052
|
query: this,
|
|
5000
5053
|
json: e
|
|
5001
5054
|
});
|
|
5002
5055
|
}
|
|
5003
5056
|
}
|
|
5004
|
-
class
|
|
5057
|
+
class Es extends V {
|
|
5005
5058
|
}
|
|
5006
|
-
class
|
|
5059
|
+
class Os extends U {
|
|
5007
5060
|
/**
|
|
5008
5061
|
* Fills a molecule with a P-isotope peering atom
|
|
5009
5062
|
*
|
|
@@ -5023,15 +5076,15 @@ class Cs extends U {
|
|
|
5023
5076
|
* @return {ResponsePeering}
|
|
5024
5077
|
*/
|
|
5025
5078
|
createResponse(e) {
|
|
5026
|
-
return new
|
|
5079
|
+
return new Es({
|
|
5027
5080
|
query: this,
|
|
5028
5081
|
json: e
|
|
5029
5082
|
});
|
|
5030
5083
|
}
|
|
5031
5084
|
}
|
|
5032
|
-
class
|
|
5085
|
+
class Rs extends V {
|
|
5033
5086
|
}
|
|
5034
|
-
class
|
|
5087
|
+
class Ws extends U {
|
|
5035
5088
|
/**
|
|
5036
5089
|
* Fills a molecule with an A-isotope append request atom
|
|
5037
5090
|
*
|
|
@@ -5060,15 +5113,78 @@ class Os extends U {
|
|
|
5060
5113
|
* @return {ResponseAppendRequest}
|
|
5061
5114
|
*/
|
|
5062
5115
|
createResponse(e) {
|
|
5063
|
-
return new
|
|
5116
|
+
return new Rs({
|
|
5064
5117
|
query: this,
|
|
5065
5118
|
json: e
|
|
5066
5119
|
});
|
|
5067
5120
|
}
|
|
5068
5121
|
}
|
|
5069
|
-
class
|
|
5122
|
+
class Us extends E {
|
|
5123
|
+
/**
|
|
5124
|
+
* Class constructor
|
|
5125
|
+
*
|
|
5126
|
+
* @param {Query} query
|
|
5127
|
+
* @param {object} json
|
|
5128
|
+
*/
|
|
5129
|
+
constructor({
|
|
5130
|
+
query: e,
|
|
5131
|
+
json: t
|
|
5132
|
+
}) {
|
|
5133
|
+
super({
|
|
5134
|
+
query: e,
|
|
5135
|
+
json: t,
|
|
5136
|
+
dataKey: "data.LinkIdentifier"
|
|
5137
|
+
});
|
|
5138
|
+
}
|
|
5139
|
+
/**
|
|
5140
|
+
* Returns success status
|
|
5141
|
+
*
|
|
5142
|
+
* @return {*}
|
|
5143
|
+
*/
|
|
5144
|
+
success() {
|
|
5145
|
+
return T.get(this.data(), "set");
|
|
5146
|
+
}
|
|
5147
|
+
/**
|
|
5148
|
+
* Returns message
|
|
5149
|
+
*
|
|
5150
|
+
* @return {*}
|
|
5151
|
+
*/
|
|
5152
|
+
message() {
|
|
5153
|
+
return T.get(this.data(), "message");
|
|
5154
|
+
}
|
|
5070
5155
|
}
|
|
5071
|
-
class
|
|
5156
|
+
class Bs extends Qe {
|
|
5157
|
+
/**
|
|
5158
|
+
* @param {UrqlClientWrapper} graphQLClient
|
|
5159
|
+
* @param {KnishIOClient} knishIOClient
|
|
5160
|
+
*/
|
|
5161
|
+
constructor(e, t) {
|
|
5162
|
+
super(e, t), this.$__query = O`mutation( $bundle: String!, $type: String!, $content: String! ) {
|
|
5163
|
+
LinkIdentifier( bundle: $bundle, type: $type, content: $content ) {
|
|
5164
|
+
type,
|
|
5165
|
+
bundle,
|
|
5166
|
+
content,
|
|
5167
|
+
set,
|
|
5168
|
+
message
|
|
5169
|
+
}
|
|
5170
|
+
}`;
|
|
5171
|
+
}
|
|
5172
|
+
/**
|
|
5173
|
+
* Returns a Response object
|
|
5174
|
+
*
|
|
5175
|
+
* @param {object} json
|
|
5176
|
+
* @return {ResponseLinkIdentifier}
|
|
5177
|
+
*/
|
|
5178
|
+
createResponse(e) {
|
|
5179
|
+
return new Us({
|
|
5180
|
+
query: this,
|
|
5181
|
+
json: e
|
|
5182
|
+
});
|
|
5183
|
+
}
|
|
5184
|
+
}
|
|
5185
|
+
class qs extends V {
|
|
5186
|
+
}
|
|
5187
|
+
class Hs extends U {
|
|
5072
5188
|
fillMolecule(e) {
|
|
5073
5189
|
this.$__molecule.initWalletCreation(e), this.$__molecule.sign({}), this.$__molecule.check();
|
|
5074
5190
|
}
|
|
@@ -5079,13 +5195,13 @@ class Rs extends U {
|
|
|
5079
5195
|
* @return {ResponseCreateWallet}
|
|
5080
5196
|
*/
|
|
5081
5197
|
createResponse(e) {
|
|
5082
|
-
return new
|
|
5198
|
+
return new qs({
|
|
5083
5199
|
query: this,
|
|
5084
5200
|
json: e
|
|
5085
5201
|
});
|
|
5086
5202
|
}
|
|
5087
5203
|
}
|
|
5088
|
-
class
|
|
5204
|
+
class Ps extends E {
|
|
5089
5205
|
/**
|
|
5090
5206
|
* Class constructor
|
|
5091
5207
|
*
|
|
@@ -5133,9 +5249,9 @@ class Us extends O {
|
|
|
5133
5249
|
* @return {*}
|
|
5134
5250
|
*/
|
|
5135
5251
|
payloadKey(e) {
|
|
5136
|
-
if (!
|
|
5137
|
-
throw new
|
|
5138
|
-
return
|
|
5252
|
+
if (!T.has(this.payload(), e))
|
|
5253
|
+
throw new te(`ResponseAuthorizationGuest::payloadKey() - '${e}' key is not found in the payload!`);
|
|
5254
|
+
return T.get(this.payload(), e);
|
|
5139
5255
|
}
|
|
5140
5256
|
/**
|
|
5141
5257
|
* Returns the auth token
|
|
@@ -5146,13 +5262,31 @@ class Us extends O {
|
|
|
5146
5262
|
return this.payloadKey("token");
|
|
5147
5263
|
}
|
|
5148
5264
|
/**
|
|
5149
|
-
* Returns
|
|
5265
|
+
* Returns raw time value from payload
|
|
5150
5266
|
*
|
|
5151
5267
|
* @return {*}
|
|
5152
5268
|
*/
|
|
5153
5269
|
time() {
|
|
5154
5270
|
return this.payloadKey("time");
|
|
5155
5271
|
}
|
|
5272
|
+
/**
|
|
5273
|
+
* Returns the expiration timestamp as Unix seconds.
|
|
5274
|
+
* Handles both server formats:
|
|
5275
|
+
* - PHP server: time = lifetime in ms, expiresAt = Unix timestamp in payload
|
|
5276
|
+
* - Rust server: time = Unix timestamp in seconds
|
|
5277
|
+
*
|
|
5278
|
+
* @return {number}
|
|
5279
|
+
*/
|
|
5280
|
+
expiresAt() {
|
|
5281
|
+
try {
|
|
5282
|
+
const t = this.payloadKey("expiresAt");
|
|
5283
|
+
if (t)
|
|
5284
|
+
return Number(t);
|
|
5285
|
+
} catch {
|
|
5286
|
+
}
|
|
5287
|
+
const e = Number(this.time());
|
|
5288
|
+
return e >= 1577836800 ? e : Math.floor(Date.now() / 1e3) + Math.floor(e / 1e3);
|
|
5289
|
+
}
|
|
5156
5290
|
/**
|
|
5157
5291
|
* Returns timestamp
|
|
5158
5292
|
*
|
|
@@ -5169,13 +5303,13 @@ class Us extends O {
|
|
|
5169
5303
|
return this.payloadKey("encrypt");
|
|
5170
5304
|
}
|
|
5171
5305
|
}
|
|
5172
|
-
class
|
|
5306
|
+
class Ks extends Qe {
|
|
5173
5307
|
/**
|
|
5174
5308
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5175
5309
|
* @param {KnishIOClient} knishIOClient
|
|
5176
5310
|
*/
|
|
5177
5311
|
constructor(e, t) {
|
|
5178
|
-
super(e, t), this.$__query =
|
|
5312
|
+
super(e, t), this.$__query = O`mutation( $cellSlug: String, $pubkey: String, $encrypt: Boolean ) {
|
|
5179
5313
|
AccessToken( cellSlug: $cellSlug, pubkey: $pubkey, encrypt: $encrypt ) {
|
|
5180
5314
|
token,
|
|
5181
5315
|
pubkey,
|
|
@@ -5190,7 +5324,7 @@ class Bs extends it {
|
|
|
5190
5324
|
* @return {ResponseRequestAuthorizationGuest}
|
|
5191
5325
|
*/
|
|
5192
5326
|
createResponse(e) {
|
|
5193
|
-
return new
|
|
5327
|
+
return new Ps({
|
|
5194
5328
|
query: this,
|
|
5195
5329
|
json: e
|
|
5196
5330
|
});
|
|
@@ -5208,7 +5342,7 @@ class vt extends x {
|
|
|
5208
5342
|
super(e, t, n), this.name = "WalletShadowException";
|
|
5209
5343
|
}
|
|
5210
5344
|
}
|
|
5211
|
-
class
|
|
5345
|
+
class Ns extends x {
|
|
5212
5346
|
/**
|
|
5213
5347
|
* Class constructor
|
|
5214
5348
|
*
|
|
@@ -5220,7 +5354,7 @@ class qs extends x {
|
|
|
5220
5354
|
super(e, t, n), this.name = "StackableUnitDecimalsException";
|
|
5221
5355
|
}
|
|
5222
5356
|
}
|
|
5223
|
-
class
|
|
5357
|
+
class Re extends x {
|
|
5224
5358
|
/**
|
|
5225
5359
|
* Class constructor
|
|
5226
5360
|
*
|
|
@@ -5302,9 +5436,9 @@ class je {
|
|
|
5302
5436
|
return this.$__variables;
|
|
5303
5437
|
}
|
|
5304
5438
|
}
|
|
5305
|
-
class
|
|
5439
|
+
class Fs extends je {
|
|
5306
5440
|
constructor(e) {
|
|
5307
|
-
super(e), this.$__subscribe =
|
|
5441
|
+
super(e), this.$__subscribe = O`
|
|
5308
5442
|
subscription onCreateMolecule ( $bundle: String! ) {
|
|
5309
5443
|
CreateMolecule( bundle: $bundle ) {
|
|
5310
5444
|
molecularHash,
|
|
@@ -5352,9 +5486,9 @@ class Hs extends je {
|
|
|
5352
5486
|
`;
|
|
5353
5487
|
}
|
|
5354
5488
|
}
|
|
5355
|
-
class
|
|
5489
|
+
class Ls extends je {
|
|
5356
5490
|
constructor(e) {
|
|
5357
|
-
super(e), this.$__subscribe =
|
|
5491
|
+
super(e), this.$__subscribe = O`
|
|
5358
5492
|
subscription onWalletStatus ( $bundle: String!, $token: String! ) {
|
|
5359
5493
|
WalletStatus( bundle: $bundle, token: $token ) {
|
|
5360
5494
|
bundle,
|
|
@@ -5366,9 +5500,9 @@ class Ps extends je {
|
|
|
5366
5500
|
`;
|
|
5367
5501
|
}
|
|
5368
5502
|
}
|
|
5369
|
-
class
|
|
5503
|
+
class Qs extends je {
|
|
5370
5504
|
constructor(e) {
|
|
5371
|
-
super(e), this.$__subscribe =
|
|
5505
|
+
super(e), this.$__subscribe = O`
|
|
5372
5506
|
subscription onActiveWallet ( $bundle: String! ) {
|
|
5373
5507
|
ActiveWallet( bundle: $bundle ) {
|
|
5374
5508
|
address,
|
|
@@ -5409,9 +5543,9 @@ class Ks extends je {
|
|
|
5409
5543
|
`;
|
|
5410
5544
|
}
|
|
5411
5545
|
}
|
|
5412
|
-
class
|
|
5546
|
+
class js extends je {
|
|
5413
5547
|
constructor(e) {
|
|
5414
|
-
super(e), this.$__subscribe =
|
|
5548
|
+
super(e), this.$__subscribe = O`
|
|
5415
5549
|
subscription onActiveUser ( $metaType: String!, $metaId: String! ) {
|
|
5416
5550
|
ActiveUser( metaType: $metaType, metaId: $metaId ) {
|
|
5417
5551
|
bundleHash,
|
|
@@ -5424,7 +5558,7 @@ class Ns extends je {
|
|
|
5424
5558
|
}`;
|
|
5425
5559
|
}
|
|
5426
5560
|
}
|
|
5427
|
-
class
|
|
5561
|
+
class Ds extends E {
|
|
5428
5562
|
/**
|
|
5429
5563
|
* Class constructor
|
|
5430
5564
|
*
|
|
@@ -5442,13 +5576,13 @@ class Fs extends O {
|
|
|
5442
5576
|
});
|
|
5443
5577
|
}
|
|
5444
5578
|
}
|
|
5445
|
-
class
|
|
5579
|
+
class Vs extends Qe {
|
|
5446
5580
|
/**
|
|
5447
5581
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5448
5582
|
* @param {KnishIOClient} knishIOClient
|
|
5449
5583
|
*/
|
|
5450
5584
|
constructor(e, t) {
|
|
5451
|
-
super(e, t), this.$__query =
|
|
5585
|
+
super(e, t), this.$__query = O`mutation(
|
|
5452
5586
|
$bundleHash: String!,
|
|
5453
5587
|
$metaType: String!,
|
|
5454
5588
|
$metaId: String!,
|
|
@@ -5485,13 +5619,13 @@ class Ls extends it {
|
|
|
5485
5619
|
* @return {ResponseActiveSession}
|
|
5486
5620
|
*/
|
|
5487
5621
|
createResponse(e) {
|
|
5488
|
-
return new
|
|
5622
|
+
return new Ds({
|
|
5489
5623
|
query: this,
|
|
5490
5624
|
json: e
|
|
5491
5625
|
});
|
|
5492
5626
|
}
|
|
5493
5627
|
}
|
|
5494
|
-
class
|
|
5628
|
+
class zs extends E {
|
|
5495
5629
|
/**
|
|
5496
5630
|
* Class constructor
|
|
5497
5631
|
*
|
|
@@ -5520,13 +5654,13 @@ class js extends O {
|
|
|
5520
5654
|
return t;
|
|
5521
5655
|
}
|
|
5522
5656
|
}
|
|
5523
|
-
class
|
|
5657
|
+
class Js extends N {
|
|
5524
5658
|
/**
|
|
5525
5659
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5526
5660
|
* @param {KnishIOClient} knishIOClient
|
|
5527
5661
|
*/
|
|
5528
5662
|
constructor(e, t) {
|
|
5529
|
-
super(e, t), this.$__query =
|
|
5663
|
+
super(e, t), this.$__query = O`query ActiveUserQuery ($bundleHash:String, $metaType: String, $metaId: String) {
|
|
5530
5664
|
ActiveUser (bundleHash: $bundleHash, metaType: $metaType, metaId: $metaId) {
|
|
5531
5665
|
bundleHash,
|
|
5532
5666
|
metaType,
|
|
@@ -5542,13 +5676,13 @@ class Qs extends N {
|
|
|
5542
5676
|
* @return {ResponseQueryActiveSession}
|
|
5543
5677
|
*/
|
|
5544
5678
|
createResponse(e) {
|
|
5545
|
-
return new
|
|
5679
|
+
return new zs({
|
|
5546
5680
|
query: this,
|
|
5547
5681
|
json: e
|
|
5548
5682
|
});
|
|
5549
5683
|
}
|
|
5550
5684
|
}
|
|
5551
|
-
class
|
|
5685
|
+
class Gs extends E {
|
|
5552
5686
|
/**
|
|
5553
5687
|
* Class constructor
|
|
5554
5688
|
*
|
|
@@ -5573,13 +5707,13 @@ class Ds extends O {
|
|
|
5573
5707
|
return e;
|
|
5574
5708
|
}
|
|
5575
5709
|
}
|
|
5576
|
-
class
|
|
5710
|
+
class Xs extends N {
|
|
5577
5711
|
/**
|
|
5578
5712
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5579
5713
|
* @param {KnishIOClient} knishIOClient
|
|
5580
5714
|
*/
|
|
5581
5715
|
constructor(e, t) {
|
|
5582
|
-
super(e, t), this.$__query =
|
|
5716
|
+
super(e, t), this.$__query = O`query UserActivity (
|
|
5583
5717
|
$bundleHash:String,
|
|
5584
5718
|
$metaType: String,
|
|
5585
5719
|
$metaId: String,
|
|
@@ -5661,19 +5795,19 @@ class Vs extends N {
|
|
|
5661
5795
|
* @return {ResponseQueryUserActivity}
|
|
5662
5796
|
*/
|
|
5663
5797
|
createResponse(e) {
|
|
5664
|
-
return new
|
|
5798
|
+
return new Gs({
|
|
5665
5799
|
query: this,
|
|
5666
5800
|
json: e
|
|
5667
5801
|
});
|
|
5668
5802
|
}
|
|
5669
5803
|
}
|
|
5670
|
-
class
|
|
5804
|
+
class Zs extends N {
|
|
5671
5805
|
/**
|
|
5672
5806
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5673
5807
|
* @param {KnishIOClient} knishIOClient
|
|
5674
5808
|
*/
|
|
5675
5809
|
constructor(e, t) {
|
|
5676
|
-
super(e, t), this.$__query =
|
|
5810
|
+
super(e, t), this.$__query = O`query( $slug: String, $slugs: [ String! ], $limit: Int, $order: String ) {
|
|
5677
5811
|
Token( slug: $slug, slugs: $slugs, limit: $limit, order: $order ) {
|
|
5678
5812
|
slug,
|
|
5679
5813
|
name,
|
|
@@ -5691,7 +5825,7 @@ class zs extends N {
|
|
|
5691
5825
|
* @returns {Response}
|
|
5692
5826
|
*/
|
|
5693
5827
|
createResponse(e) {
|
|
5694
|
-
return new
|
|
5828
|
+
return new E({
|
|
5695
5829
|
query: this,
|
|
5696
5830
|
json: e,
|
|
5697
5831
|
dataKey: "data.Token"
|
|
@@ -5710,7 +5844,7 @@ class xt extends x {
|
|
|
5710
5844
|
super(e, t, n), this.name = "AuthorizationRejectedException";
|
|
5711
5845
|
}
|
|
5712
5846
|
}
|
|
5713
|
-
class
|
|
5847
|
+
class Ys extends E {
|
|
5714
5848
|
/**
|
|
5715
5849
|
* Class constructor
|
|
5716
5850
|
*
|
|
@@ -5764,7 +5898,7 @@ class It extends N {
|
|
|
5764
5898
|
* @param {KnishIOClient} knishIOClient
|
|
5765
5899
|
*/
|
|
5766
5900
|
constructor(e, t) {
|
|
5767
|
-
super(e, t), this.$__query =
|
|
5901
|
+
super(e, t), this.$__query = O`query(
|
|
5768
5902
|
$molecularHashes: [String!],
|
|
5769
5903
|
$bundleHashes: [String!],
|
|
5770
5904
|
$positions:[String!],
|
|
@@ -5868,22 +6002,22 @@ class It extends N {
|
|
|
5868
6002
|
tokenSlugs: h,
|
|
5869
6003
|
tokenSlug: p,
|
|
5870
6004
|
cellSlugs: d,
|
|
5871
|
-
cellSlug:
|
|
6005
|
+
cellSlug: b,
|
|
5872
6006
|
batchIds: A,
|
|
5873
|
-
batchId:
|
|
6007
|
+
batchId: M,
|
|
5874
6008
|
values: f,
|
|
5875
6009
|
value: y,
|
|
5876
|
-
metaTypes:
|
|
5877
|
-
metaType:
|
|
6010
|
+
metaTypes: w,
|
|
6011
|
+
metaType: C,
|
|
5878
6012
|
metaIds: k,
|
|
5879
6013
|
metaId: $,
|
|
5880
6014
|
indexes: v,
|
|
5881
6015
|
index: I,
|
|
5882
6016
|
filter: S,
|
|
5883
6017
|
latest: B,
|
|
5884
|
-
queryArgs:
|
|
6018
|
+
queryArgs: R
|
|
5885
6019
|
}) {
|
|
5886
|
-
return t && (e = e || [], e.push(t)), s && (n = n || [], n.push(s)), i && (r = r || [], r.push(i)), c && (a = a || [], a.push(c)), l && (u = u || [], u.push(l)), p && (h = h || [], h.push(p)),
|
|
6020
|
+
return t && (e = e || [], e.push(t)), s && (n = n || [], n.push(s)), i && (r = r || [], r.push(i)), c && (a = a || [], a.push(c)), l && (u = u || [], u.push(l)), p && (h = h || [], h.push(p)), b && (d = d || [], d.push(b)), M && (A = A || [], A.push(M)), y && (f = f || [], f.push(y)), C && (w = w || [], w.push(C)), $ && (k = k || [], k.push($)), I && (v = v || [], v.push(I)), {
|
|
5887
6021
|
molecularHashes: e,
|
|
5888
6022
|
bundleHashes: n,
|
|
5889
6023
|
positions: r,
|
|
@@ -5893,12 +6027,12 @@ class It extends N {
|
|
|
5893
6027
|
cellSlugs: d,
|
|
5894
6028
|
batchIds: A,
|
|
5895
6029
|
values: f,
|
|
5896
|
-
metaTypes:
|
|
6030
|
+
metaTypes: w,
|
|
5897
6031
|
metaIds: k,
|
|
5898
6032
|
indexes: v,
|
|
5899
6033
|
filter: S,
|
|
5900
6034
|
latest: B,
|
|
5901
|
-
queryArgs:
|
|
6035
|
+
queryArgs: R
|
|
5902
6036
|
};
|
|
5903
6037
|
}
|
|
5904
6038
|
/**
|
|
@@ -5908,13 +6042,13 @@ class It extends N {
|
|
|
5908
6042
|
* @return {ResponseAtom}
|
|
5909
6043
|
*/
|
|
5910
6044
|
createResponse(e) {
|
|
5911
|
-
return new
|
|
6045
|
+
return new Ys({
|
|
5912
6046
|
query: this,
|
|
5913
6047
|
json: e
|
|
5914
6048
|
});
|
|
5915
6049
|
}
|
|
5916
6050
|
}
|
|
5917
|
-
class
|
|
6051
|
+
class er extends E {
|
|
5918
6052
|
/**
|
|
5919
6053
|
* Class constructor
|
|
5920
6054
|
*
|
|
@@ -5939,13 +6073,13 @@ class Gs extends O {
|
|
|
5939
6073
|
return e && e.callback ? JSON.parse(e.callback) : null;
|
|
5940
6074
|
}
|
|
5941
6075
|
}
|
|
5942
|
-
class
|
|
6076
|
+
class tr extends N {
|
|
5943
6077
|
/**
|
|
5944
6078
|
* @param {UrqlClientWrapper} graphQLClient
|
|
5945
6079
|
* @param {KnishIOClient} knishIOClient
|
|
5946
6080
|
*/
|
|
5947
6081
|
constructor(e, t) {
|
|
5948
|
-
super(e, t), this.$__query =
|
|
6082
|
+
super(e, t), this.$__query = O`query( $metaType: String, $metaId: String, ) {
|
|
5949
6083
|
Policy( metaType: $metaType, metaId: $metaId ) {
|
|
5950
6084
|
molecularHash,
|
|
5951
6085
|
position,
|
|
@@ -5965,13 +6099,13 @@ class Xs extends N {
|
|
|
5965
6099
|
* @return {ResponsePolicy}
|
|
5966
6100
|
*/
|
|
5967
6101
|
createResponse(e) {
|
|
5968
|
-
return new
|
|
6102
|
+
return new er({
|
|
5969
6103
|
query: this,
|
|
5970
6104
|
json: e
|
|
5971
6105
|
});
|
|
5972
6106
|
}
|
|
5973
6107
|
}
|
|
5974
|
-
class
|
|
6108
|
+
class nr extends E {
|
|
5975
6109
|
/**
|
|
5976
6110
|
* Class constructor
|
|
5977
6111
|
*
|
|
@@ -6006,7 +6140,7 @@ class Tt extends N {
|
|
|
6006
6140
|
* @param {KnishIOClient} knishIOClient
|
|
6007
6141
|
*/
|
|
6008
6142
|
constructor(e, t) {
|
|
6009
|
-
super(e, t), this.$__query =
|
|
6143
|
+
super(e, t), this.$__query = O`query ($metaTypes: [String!], $metaIds: [String!], $values: [String!], $keys: [String!], $latest: Boolean, $filter: [MetaFilter!], $queryArgs: QueryArgs, $countBy: String, $atomValues: [String!], $cellSlugs: [String!] ) {
|
|
6010
6144
|
MetaTypeViaAtom(
|
|
6011
6145
|
metaTypes: $metaTypes
|
|
6012
6146
|
metaIds: $metaIds
|
|
@@ -6086,13 +6220,13 @@ class Tt extends N {
|
|
|
6086
6220
|
* @return {ResponseMetaTypeViaAtom}
|
|
6087
6221
|
*/
|
|
6088
6222
|
createResponse(e) {
|
|
6089
|
-
return new
|
|
6223
|
+
return new nr({
|
|
6090
6224
|
query: this,
|
|
6091
6225
|
json: e
|
|
6092
6226
|
});
|
|
6093
6227
|
}
|
|
6094
6228
|
}
|
|
6095
|
-
class ot extends
|
|
6229
|
+
class ot extends E {
|
|
6096
6230
|
/**
|
|
6097
6231
|
* Class constructor
|
|
6098
6232
|
*
|
|
@@ -6199,7 +6333,7 @@ class Mt extends N {
|
|
|
6199
6333
|
* @param {KnishIOClient} knishIOClient
|
|
6200
6334
|
*/
|
|
6201
6335
|
constructor(e, t) {
|
|
6202
|
-
super(e, t), this.$__query =
|
|
6336
|
+
super(e, t), this.$__query = O`query ($metaTypes: [String!], $metaIds: [String!], $values: [String!], $keys: [String!], $latest: Boolean, $filter: [MetaFilter!], $queryArgs: QueryArgs, $countBy: String, $atomValues: [String!], $cellSlugs: [String!] ) {
|
|
6203
6337
|
MetaTypeViaAtom(
|
|
6204
6338
|
metaTypes: $metaTypes
|
|
6205
6339
|
metaIds: $metaIds
|
|
@@ -6306,9 +6440,9 @@ class Mt extends N {
|
|
|
6306
6440
|
});
|
|
6307
6441
|
}
|
|
6308
6442
|
}
|
|
6309
|
-
class
|
|
6443
|
+
class sr extends V {
|
|
6310
6444
|
}
|
|
6311
|
-
class
|
|
6445
|
+
class rr extends U {
|
|
6312
6446
|
/**
|
|
6313
6447
|
*
|
|
6314
6448
|
* @param {string} metaType
|
|
@@ -6336,13 +6470,13 @@ class er extends U {
|
|
|
6336
6470
|
* @return {ResponseCreateRule}
|
|
6337
6471
|
*/
|
|
6338
6472
|
createResponse(e) {
|
|
6339
|
-
return new
|
|
6473
|
+
return new sr({
|
|
6340
6474
|
query: this,
|
|
6341
6475
|
json: e
|
|
6342
6476
|
});
|
|
6343
6477
|
}
|
|
6344
6478
|
}
|
|
6345
|
-
class
|
|
6479
|
+
class ir extends U {
|
|
6346
6480
|
/**
|
|
6347
6481
|
* Fills the Molecule with provided wallet and amount data
|
|
6348
6482
|
*
|
|
@@ -6359,7 +6493,7 @@ class tr extends U {
|
|
|
6359
6493
|
}), this.$__molecule.sign({}), this.$__molecule.check(this.$__molecule.sourceWallet);
|
|
6360
6494
|
}
|
|
6361
6495
|
}
|
|
6362
|
-
class
|
|
6496
|
+
class or extends U {
|
|
6363
6497
|
/**
|
|
6364
6498
|
*
|
|
6365
6499
|
* @param recipients
|
|
@@ -6459,28 +6593,28 @@ function Z(o, e) {
|
|
|
6459
6593
|
};
|
|
6460
6594
|
}
|
|
6461
6595
|
}
|
|
6462
|
-
var
|
|
6596
|
+
var W = { exclude: [], include: [], logging: !0 }, zt = {}, ar = { timeout: "true" }, J = function(o, e) {
|
|
6463
6597
|
typeof window < "u" && (zt[o] = e);
|
|
6464
|
-
},
|
|
6598
|
+
}, lr = function() {
|
|
6465
6599
|
return Object.fromEntries(Object.entries(zt).filter((function(o) {
|
|
6466
6600
|
var e, t = o[0];
|
|
6467
|
-
return !(!((e =
|
|
6601
|
+
return !(!((e = W == null ? void 0 : W.exclude) === null || e === void 0) && e.includes(t));
|
|
6468
6602
|
})).filter((function(o) {
|
|
6469
6603
|
var e, t, n, s, r = o[0];
|
|
6470
|
-
return !((e =
|
|
6604
|
+
return !((e = W == null ? void 0 : W.include) === null || e === void 0) && e.some((function(i) {
|
|
6471
6605
|
return i.includes(".");
|
|
6472
|
-
})) ? (t =
|
|
6606
|
+
})) ? (t = W == null ? void 0 : W.include) === null || t === void 0 ? void 0 : t.some((function(i) {
|
|
6473
6607
|
return i.startsWith(r);
|
|
6474
|
-
})) : ((n =
|
|
6608
|
+
})) : ((n = W == null ? void 0 : W.include) === null || n === void 0 ? void 0 : n.length) === 0 || ((s = W == null ? void 0 : W.include) === null || s === void 0 ? void 0 : s.includes(r));
|
|
6475
6609
|
})).map((function(o) {
|
|
6476
6610
|
return [o[0], (0, o[1])()];
|
|
6477
6611
|
})));
|
|
6478
6612
|
};
|
|
6479
|
-
function
|
|
6613
|
+
function We(o) {
|
|
6480
6614
|
return o ^= o >>> 16, o = Math.imul(o, 2246822507), o ^= o >>> 13, o = Math.imul(o, 3266489909), (o ^= o >>> 16) >>> 0;
|
|
6481
6615
|
}
|
|
6482
6616
|
var q = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
|
|
6483
|
-
function
|
|
6617
|
+
function j(o, e) {
|
|
6484
6618
|
return o << e | o >>> 32 - e;
|
|
6485
6619
|
}
|
|
6486
6620
|
function at(o, e) {
|
|
@@ -6490,7 +6624,7 @@ function at(o, e) {
|
|
|
6490
6624
|
(function(r, i) {
|
|
6491
6625
|
for (var a = r.byteLength / 16 | 0, c = new Uint32Array(r, 0, 4 * a), u = 0; u < a; u++) {
|
|
6492
6626
|
var l = c.subarray(4 * u, 4 * (u + 1));
|
|
6493
|
-
l[0] = Math.imul(l[0], q[0]), l[0] =
|
|
6627
|
+
l[0] = Math.imul(l[0], q[0]), l[0] = j(l[0], 15), l[0] = Math.imul(l[0], q[1]), i[0] = i[0] ^ l[0], i[0] = j(i[0], 19), i[0] = i[0] + i[1], i[0] = Math.imul(i[0], 5) + 1444728091, l[1] = Math.imul(l[1], q[1]), l[1] = j(l[1], 16), l[1] = Math.imul(l[1], q[2]), i[1] = i[1] ^ l[1], i[1] = j(i[1], 17), i[1] = i[1] + i[2], i[1] = Math.imul(i[1], 5) + 197830471, l[2] = Math.imul(l[2], q[2]), l[2] = j(l[2], 17), l[2] = Math.imul(l[2], q[3]), i[2] = i[2] ^ l[2], i[2] = j(i[2], 15), i[2] = i[2] + i[3], i[2] = Math.imul(i[2], 5) + 2530024501, l[3] = Math.imul(l[3], q[3]), l[3] = j(l[3], 18), l[3] = Math.imul(l[3], q[0]), i[3] = i[3] ^ l[3], i[3] = j(i[3], 13), i[3] = i[3] + i[0], i[3] = Math.imul(i[3], 5) + 850148119;
|
|
6494
6628
|
}
|
|
6495
6629
|
})(o, n), (function(r, i) {
|
|
6496
6630
|
var a = r.byteLength / 16 | 0, c = r.byteLength % 16, u = new Uint32Array(4), l = new Uint8Array(r, 16 * a, c);
|
|
@@ -6500,7 +6634,7 @@ function at(o, e) {
|
|
|
6500
6634
|
case 14:
|
|
6501
6635
|
u[3] = u[3] ^ l[13] << 8;
|
|
6502
6636
|
case 13:
|
|
6503
|
-
u[3] = u[3] ^ l[12] << 0, u[3] = Math.imul(u[3], q[3]), u[3] =
|
|
6637
|
+
u[3] = u[3] ^ l[12] << 0, u[3] = Math.imul(u[3], q[3]), u[3] = j(u[3], 18), u[3] = Math.imul(u[3], q[0]), i[3] = i[3] ^ u[3];
|
|
6504
6638
|
case 12:
|
|
6505
6639
|
u[2] = u[2] ^ l[11] << 24;
|
|
6506
6640
|
case 11:
|
|
@@ -6508,7 +6642,7 @@ function at(o, e) {
|
|
|
6508
6642
|
case 10:
|
|
6509
6643
|
u[2] = u[2] ^ l[9] << 8;
|
|
6510
6644
|
case 9:
|
|
6511
|
-
u[2] = u[2] ^ l[8] << 0, u[2] = Math.imul(u[2], q[2]), u[2] =
|
|
6645
|
+
u[2] = u[2] ^ l[8] << 0, u[2] = Math.imul(u[2], q[2]), u[2] = j(u[2], 17), u[2] = Math.imul(u[2], q[3]), i[2] = i[2] ^ u[2];
|
|
6512
6646
|
case 8:
|
|
6513
6647
|
u[1] = u[1] ^ l[7] << 24;
|
|
6514
6648
|
case 7:
|
|
@@ -6516,7 +6650,7 @@ function at(o, e) {
|
|
|
6516
6650
|
case 6:
|
|
6517
6651
|
u[1] = u[1] ^ l[5] << 8;
|
|
6518
6652
|
case 5:
|
|
6519
|
-
u[1] = u[1] ^ l[4] << 0, u[1] = Math.imul(u[1], q[1]), u[1] =
|
|
6653
|
+
u[1] = u[1] ^ l[4] << 0, u[1] = Math.imul(u[1], q[1]), u[1] = j(u[1], 16), u[1] = Math.imul(u[1], q[2]), i[1] = i[1] ^ u[1];
|
|
6520
6654
|
case 4:
|
|
6521
6655
|
u[0] = u[0] ^ l[3] << 24;
|
|
6522
6656
|
case 3:
|
|
@@ -6524,31 +6658,31 @@ function at(o, e) {
|
|
|
6524
6658
|
case 2:
|
|
6525
6659
|
u[0] = u[0] ^ l[1] << 8;
|
|
6526
6660
|
case 1:
|
|
6527
|
-
u[0] = u[0] ^ l[0] << 0, u[0] = Math.imul(u[0], q[0]), u[0] =
|
|
6661
|
+
u[0] = u[0] ^ l[0] << 0, u[0] = Math.imul(u[0], q[0]), u[0] = j(u[0], 15), u[0] = Math.imul(u[0], q[1]), i[0] = i[0] ^ u[0];
|
|
6528
6662
|
}
|
|
6529
6663
|
})(o, n), (function(r, i) {
|
|
6530
|
-
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] =
|
|
6664
|
+
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] = We(i[0]), i[1] = We(i[1]), i[2] = We(i[2]), i[3] = We(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;
|
|
6531
6665
|
})(o, n);
|
|
6532
6666
|
var s = new Uint8Array(n.buffer);
|
|
6533
6667
|
return Array.from(s).map((function(r) {
|
|
6534
6668
|
return r.toString(16).padStart(2, "0");
|
|
6535
6669
|
})).join("");
|
|
6536
6670
|
}
|
|
6537
|
-
function
|
|
6671
|
+
function cr(o, e) {
|
|
6538
6672
|
return new Promise((function(t) {
|
|
6539
6673
|
setTimeout((function() {
|
|
6540
6674
|
return t(e);
|
|
6541
6675
|
}), o);
|
|
6542
6676
|
}));
|
|
6543
6677
|
}
|
|
6544
|
-
function
|
|
6678
|
+
function ur(o, e, t) {
|
|
6545
6679
|
return Promise.all(o.map((function(n) {
|
|
6546
|
-
return Promise.race([n,
|
|
6680
|
+
return Promise.race([n, cr(e, t)]);
|
|
6547
6681
|
})));
|
|
6548
6682
|
}
|
|
6549
|
-
var
|
|
6550
|
-
function
|
|
6551
|
-
return
|
|
6683
|
+
var hr = "0.19.1";
|
|
6684
|
+
function dr() {
|
|
6685
|
+
return hr;
|
|
6552
6686
|
}
|
|
6553
6687
|
function Jt() {
|
|
6554
6688
|
return X(this, void 0, void 0, (function() {
|
|
@@ -6556,13 +6690,13 @@ function Jt() {
|
|
|
6556
6690
|
return Z(this, (function(r) {
|
|
6557
6691
|
switch (r.label) {
|
|
6558
6692
|
case 0:
|
|
6559
|
-
return r.trys.push([0, 2, , 3]), o =
|
|
6693
|
+
return r.trys.push([0, 2, , 3]), o = lr(), e = Object.keys(o), [4, ur(Object.values(o), (W == null ? void 0 : W.timeout) || 1e3, ar)];
|
|
6560
6694
|
case 1:
|
|
6561
6695
|
return t = r.sent(), n = t.filter((function(i) {
|
|
6562
6696
|
return i !== void 0;
|
|
6563
6697
|
})), s = {}, n.forEach((function(i, a) {
|
|
6564
6698
|
s[e[a]] = i;
|
|
6565
|
-
})), [2, Gt(s,
|
|
6699
|
+
})), [2, Gt(s, W.exclude || [], W.include || [], "")];
|
|
6566
6700
|
case 2:
|
|
6567
6701
|
throw r.sent();
|
|
6568
6702
|
case 3:
|
|
@@ -6583,8 +6717,8 @@ function Gt(o, e, t, n) {
|
|
|
6583
6717
|
}));
|
|
6584
6718
|
p && !d || (s[u] = l);
|
|
6585
6719
|
} else {
|
|
6586
|
-
var
|
|
6587
|
-
Object.keys(
|
|
6720
|
+
var b = Gt(l, e, t, h);
|
|
6721
|
+
Object.keys(b).length > 0 && (s[u] = b);
|
|
6588
6722
|
}
|
|
6589
6723
|
}, i = 0, a = Object.entries(o); i < a.length; i++) {
|
|
6590
6724
|
var c = a[i];
|
|
@@ -6592,7 +6726,7 @@ function Gt(o, e, t, n) {
|
|
|
6592
6726
|
}
|
|
6593
6727
|
return s;
|
|
6594
6728
|
}
|
|
6595
|
-
function
|
|
6729
|
+
function pr(o) {
|
|
6596
6730
|
return X(this, void 0, void 0, (function() {
|
|
6597
6731
|
var e, t;
|
|
6598
6732
|
return Z(this, (function(n) {
|
|
@@ -6600,13 +6734,13 @@ function cr(o) {
|
|
|
6600
6734
|
case 0:
|
|
6601
6735
|
return n.trys.push([0, 2, , 3]), [4, Jt()];
|
|
6602
6736
|
case 1:
|
|
6603
|
-
return e = n.sent(), t = at(JSON.stringify(e)), Math.random() < 1e-3 &&
|
|
6737
|
+
return e = n.sent(), t = at(JSON.stringify(e)), Math.random() < 1e-3 && W.logging && (function(s, r) {
|
|
6604
6738
|
X(this, void 0, void 0, (function() {
|
|
6605
6739
|
var i, a;
|
|
6606
6740
|
return Z(this, (function(c) {
|
|
6607
6741
|
switch (c.label) {
|
|
6608
6742
|
case 0:
|
|
6609
|
-
if (i = "https://logging.thumbmarkjs.com/v1/log", a = { thumbmark: s, components: r, version:
|
|
6743
|
+
if (i = "https://logging.thumbmarkjs.com/v1/log", a = { thumbmark: s, components: r, version: dr() }, sessionStorage.getItem("_tmjs_l")) return [3, 4];
|
|
6610
6744
|
sessionStorage.setItem("_tmjs_l", "1"), c.label = 1;
|
|
6611
6745
|
case 1:
|
|
6612
6746
|
return c.trys.push([1, 3, , 4]), [4, fetch(i, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(a) })];
|
|
@@ -6627,19 +6761,19 @@ function cr(o) {
|
|
|
6627
6761
|
}));
|
|
6628
6762
|
}));
|
|
6629
6763
|
}
|
|
6630
|
-
function
|
|
6764
|
+
function fr(o) {
|
|
6631
6765
|
for (var e = 0, t = 0; t < o.length; ++t) e += Math.abs(o[t]);
|
|
6632
6766
|
return e;
|
|
6633
6767
|
}
|
|
6634
6768
|
function Xt(o, e, t) {
|
|
6635
6769
|
for (var n = [], s = 0; s < o[0].data.length; s++) {
|
|
6636
6770
|
for (var r = [], i = 0; i < o.length; i++) r.push(o[i].data[s]);
|
|
6637
|
-
n.push(
|
|
6771
|
+
n.push(mr(r));
|
|
6638
6772
|
}
|
|
6639
6773
|
var a = new Uint8ClampedArray(n);
|
|
6640
6774
|
return new ImageData(a, e, t);
|
|
6641
6775
|
}
|
|
6642
|
-
function
|
|
6776
|
+
function mr(o) {
|
|
6643
6777
|
if (o.length === 0) return 0;
|
|
6644
6778
|
for (var e = {}, t = 0, n = o; t < n.length; t++)
|
|
6645
6779
|
e[r = n[t]] = (e[r] || 0) + 1;
|
|
@@ -6664,7 +6798,7 @@ J("audio", (function() {
|
|
|
6664
6798
|
r.frequency.value = 1e3;
|
|
6665
6799
|
var i, a = n.createDynamicsCompressor();
|
|
6666
6800
|
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) {
|
|
6667
|
-
i = c.renderedBuffer.getChannelData(0), e({ sampleHash:
|
|
6801
|
+
i = c.renderedBuffer.getChannelData(0), e({ sampleHash: fr(i), oscillator: r.type, maxChannels: n.destination.maxChannelCount, channelCountMode: s.channelCountMode });
|
|
6668
6802
|
}, n.startRendering();
|
|
6669
6803
|
} catch (c) {
|
|
6670
6804
|
console.error("Error creating audio fingerprint:", c), t(c);
|
|
@@ -6673,10 +6807,10 @@ J("audio", (function() {
|
|
|
6673
6807
|
}));
|
|
6674
6808
|
}));
|
|
6675
6809
|
}));
|
|
6676
|
-
var
|
|
6810
|
+
var yr = Te().name !== "SamsungBrowser" ? 1 : 3, Ct = 280, Et = 20;
|
|
6677
6811
|
Te().name != "Firefox" && J("canvas", (function() {
|
|
6678
6812
|
return document.createElement("canvas").getContext("2d"), new Promise((function(o) {
|
|
6679
|
-
var e = Array.from({ length:
|
|
6813
|
+
var e = Array.from({ length: yr }, (function() {
|
|
6680
6814
|
return (function() {
|
|
6681
6815
|
var t = document.createElement("canvas"), n = t.getContext("2d");
|
|
6682
6816
|
if (!n) return new ImageData(1, 1);
|
|
@@ -6692,12 +6826,12 @@ Te().name != "Firefox" && J("canvas", (function() {
|
|
|
6692
6826
|
o({ commonImageDataHash: at(Xt(e, Ct, Et).data.toString()).toString() });
|
|
6693
6827
|
}));
|
|
6694
6828
|
}));
|
|
6695
|
-
var
|
|
6829
|
+
var tt, gr = ["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"], br = ["monospace", "sans-serif", "serif"];
|
|
6696
6830
|
function Ot(o, e) {
|
|
6697
6831
|
if (!o) throw new Error("Canvas context not supported");
|
|
6698
6832
|
return o.font, o.font = "72px ".concat(e), o.measureText("WwMmLli0Oo").width;
|
|
6699
6833
|
}
|
|
6700
|
-
function
|
|
6834
|
+
function wr() {
|
|
6701
6835
|
var o, e = document.createElement("canvas"), t = (o = e.getContext("webgl")) !== null && o !== void 0 ? o : e.getContext("experimental-webgl");
|
|
6702
6836
|
if (t && "getParameter" in t) try {
|
|
6703
6837
|
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() };
|
|
@@ -6713,11 +6847,11 @@ function mr() {
|
|
|
6713
6847
|
}
|
|
6714
6848
|
return "undefined";
|
|
6715
6849
|
}
|
|
6716
|
-
function
|
|
6850
|
+
function kr() {
|
|
6717
6851
|
var o = new Float32Array(1), e = new Uint8Array(o.buffer);
|
|
6718
6852
|
return o[0] = 1 / 0, o[0] = o[0] - o[0], e[3];
|
|
6719
6853
|
}
|
|
6720
|
-
function
|
|
6854
|
+
function Sr(o, e) {
|
|
6721
6855
|
var t = {};
|
|
6722
6856
|
return e.forEach((function(n) {
|
|
6723
6857
|
var s = (function(r) {
|
|
@@ -6739,7 +6873,7 @@ function gr(o, e) {
|
|
|
6739
6873
|
s && (t[n] = s);
|
|
6740
6874
|
})), t;
|
|
6741
6875
|
}
|
|
6742
|
-
function
|
|
6876
|
+
function _r() {
|
|
6743
6877
|
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"] };
|
|
6744
6878
|
return Object.keys(e).forEach((function(t) {
|
|
6745
6879
|
e[t].forEach((function(n) {
|
|
@@ -6747,7 +6881,7 @@ function wr() {
|
|
|
6747
6881
|
}));
|
|
6748
6882
|
})), o;
|
|
6749
6883
|
}
|
|
6750
|
-
function
|
|
6884
|
+
function $r() {
|
|
6751
6885
|
if (window.location.protocol === "https:" && typeof window.ApplePaySession == "function") try {
|
|
6752
6886
|
for (var o = window.ApplePaySession.supportsVersion, e = 15; e > 0; e--) if (o(e)) return e;
|
|
6753
6887
|
} catch {
|
|
@@ -6785,9 +6919,9 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
6785
6919
|
return X(o, void 0, void 0, (function() {
|
|
6786
6920
|
var r, i, a, c;
|
|
6787
6921
|
return Z(this, (function(u) {
|
|
6788
|
-
return r = s.createElement("canvas"), i = r.getContext("2d"), a =
|
|
6922
|
+
return r = s.createElement("canvas"), i = r.getContext("2d"), a = br.map((function(l) {
|
|
6789
6923
|
return Ot(i, l);
|
|
6790
|
-
})), c = {},
|
|
6924
|
+
})), c = {}, gr.forEach((function(l) {
|
|
6791
6925
|
var h = Ot(i, l);
|
|
6792
6926
|
a.includes(h) || (c[l] = h);
|
|
6793
6927
|
})), e(c), [2];
|
|
@@ -6801,7 +6935,7 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
6801
6935
|
})), J("hardware", (function() {
|
|
6802
6936
|
return new Promise((function(o, e) {
|
|
6803
6937
|
var t = navigator.deviceMemory !== void 0 ? navigator.deviceMemory : 0, n = window.performance && window.performance.memory ? window.performance.memory : 0;
|
|
6804
|
-
o({ videocard:
|
|
6938
|
+
o({ videocard: wr(), architecture: kr(), deviceMemory: t.toString() || "undefined", jsHeapSizeLimit: n.jsHeapSizeLimit || 0 });
|
|
6805
6939
|
}));
|
|
6806
6940
|
})), J("locales", (function() {
|
|
6807
6941
|
return new Promise((function(o) {
|
|
@@ -6811,14 +6945,14 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
6811
6945
|
return X(this, void 0, void 0, (function() {
|
|
6812
6946
|
var o;
|
|
6813
6947
|
return Z(this, (function(e) {
|
|
6814
|
-
return
|
|
6948
|
+
return tt = (W == null ? void 0 : W.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: (W == null ? void 0 : W.retries) || 3 }, (function() {
|
|
6815
6949
|
return (function() {
|
|
6816
6950
|
return X(this, void 0, void 0, (function() {
|
|
6817
6951
|
var t, n, s, r, i;
|
|
6818
6952
|
return Z(this, (function(a) {
|
|
6819
6953
|
switch (a.label) {
|
|
6820
6954
|
case 0:
|
|
6821
|
-
t = {}, n = 0, s =
|
|
6955
|
+
t = {}, n = 0, s = tt, a.label = 1;
|
|
6822
6956
|
case 1:
|
|
6823
6957
|
if (!(n < s.length)) return [3, 6];
|
|
6824
6958
|
r = s[n], a.label = 2;
|
|
@@ -6837,7 +6971,7 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
6837
6971
|
}));
|
|
6838
6972
|
})();
|
|
6839
6973
|
})), [2, Promise.all(o).then((function(t) {
|
|
6840
|
-
return
|
|
6974
|
+
return Sr(t, tt);
|
|
6841
6975
|
}))];
|
|
6842
6976
|
}));
|
|
6843
6977
|
}));
|
|
@@ -6852,15 +6986,15 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
6852
6986
|
}));
|
|
6853
6987
|
})), J("screen", (function() {
|
|
6854
6988
|
return new Promise((function(o) {
|
|
6855
|
-
o({ is_touchscreen: navigator.maxTouchPoints > 0, maxTouchPoints: navigator.maxTouchPoints, colorDepth: screen.colorDepth, mediaMatches:
|
|
6989
|
+
o({ is_touchscreen: navigator.maxTouchPoints > 0, maxTouchPoints: navigator.maxTouchPoints, colorDepth: screen.colorDepth, mediaMatches: _r() });
|
|
6856
6990
|
}));
|
|
6857
6991
|
})), J("system", (function() {
|
|
6858
6992
|
return new Promise((function(o) {
|
|
6859
6993
|
var e = Te();
|
|
6860
|
-
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:
|
|
6994
|
+
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() });
|
|
6861
6995
|
}));
|
|
6862
6996
|
}));
|
|
6863
|
-
var K,
|
|
6997
|
+
var K, Ar = Te().name !== "SamsungBrowser" ? 1 : 3, m = null;
|
|
6864
6998
|
J("webgl", (function() {
|
|
6865
6999
|
return X(this, void 0, void 0, (function() {
|
|
6866
7000
|
var o;
|
|
@@ -6868,7 +7002,7 @@ J("webgl", (function() {
|
|
|
6868
7002
|
typeof document < "u" && ((K = document.createElement("canvas")).width = 200, K.height = 100, m = K.getContext("webgl"));
|
|
6869
7003
|
try {
|
|
6870
7004
|
if (!m) throw new Error("WebGL not supported");
|
|
6871
|
-
return o = Array.from({ length:
|
|
7005
|
+
return o = Array.from({ length: Ar }, (function() {
|
|
6872
7006
|
return (function() {
|
|
6873
7007
|
try {
|
|
6874
7008
|
if (!m) throw new Error("WebGL not supported");
|
|
@@ -6898,8 +7032,8 @@ J("webgl", (function() {
|
|
|
6898
7032
|
m.bindBuffer(m.ARRAY_BUFFER, p), m.bufferData(m.ARRAY_BUFFER, c, m.STATIC_DRAW);
|
|
6899
7033
|
var d = m.getAttribLocation(i, "position");
|
|
6900
7034
|
m.enableVertexAttribArray(d), m.vertexAttribPointer(d, 2, m.FLOAT, !1, 0, 0), m.viewport(0, 0, K.width, K.height), m.clearColor(0, 0, 0, 1), m.clear(m.COLOR_BUFFER_BIT), m.drawArrays(m.LINES, 0, 2 * a);
|
|
6901
|
-
var
|
|
6902
|
-
return m.readPixels(0, 0, K.width, K.height, m.RGBA, m.UNSIGNED_BYTE,
|
|
7035
|
+
var b = new Uint8ClampedArray(K.width * K.height * 4);
|
|
7036
|
+
return m.readPixels(0, 0, K.width, K.height, m.RGBA, m.UNSIGNED_BYTE, b), new ImageData(b, K.width, K.height);
|
|
6903
7037
|
} catch {
|
|
6904
7038
|
return new ImageData(1, 1);
|
|
6905
7039
|
} finally {
|
|
@@ -6914,7 +7048,7 @@ J("webgl", (function() {
|
|
|
6914
7048
|
}));
|
|
6915
7049
|
}));
|
|
6916
7050
|
}));
|
|
6917
|
-
var
|
|
7051
|
+
var ie = function(o, e, t, n) {
|
|
6918
7052
|
for (var s = (t - e) / n, r = 0, i = 0; i < n; i++)
|
|
6919
7053
|
r += o(e + (i + 0.5) * s);
|
|
6920
7054
|
return r * s;
|
|
@@ -6922,11 +7056,11 @@ var re = function(o, e, t, n) {
|
|
|
6922
7056
|
J("math", (function() {
|
|
6923
7057
|
return X(void 0, void 0, void 0, (function() {
|
|
6924
7058
|
return Z(this, (function(o) {
|
|
6925
|
-
return [2, { acos: Math.acos(0.5), asin:
|
|
7059
|
+
return [2, { acos: Math.acos(0.5), asin: ie(Math.asin, -1, 1, 97), atan: ie(Math.atan, -1, 1, 97), cos: ie(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: ie(Math.sin, -Math.PI, Math.PI, 97), sinh: ie(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: ie(Math.tan, 0, 2 * Math.PI, 97), tanh: ie(Math.tanh, -9 / 7, 7 / 9, 97) }];
|
|
6926
7060
|
}));
|
|
6927
7061
|
}));
|
|
6928
7062
|
}));
|
|
6929
|
-
class
|
|
7063
|
+
class vr {
|
|
6930
7064
|
constructor({ serverUri: e, socket: t = null, encrypt: n = !1 }) {
|
|
6931
7065
|
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();
|
|
6932
7066
|
}
|
|
@@ -7045,7 +7179,7 @@ class Sr {
|
|
|
7045
7179
|
});
|
|
7046
7180
|
}
|
|
7047
7181
|
}
|
|
7048
|
-
class
|
|
7182
|
+
class Or {
|
|
7049
7183
|
/**
|
|
7050
7184
|
* Class constructor
|
|
7051
7185
|
*
|
|
@@ -7096,7 +7230,7 @@ class Tr {
|
|
|
7096
7230
|
const c = this.$__uris[a];
|
|
7097
7231
|
this.$__authTokenObjects[c] = null;
|
|
7098
7232
|
}
|
|
7099
|
-
this.log("info", `KnishIOClient::initialize() - Initializing new Knish.IO client session for SDK version ${r}...`), this.$__client = s || new
|
|
7233
|
+
this.log("info", `KnishIOClient::initialize() - Initializing new Knish.IO client session for SDK version ${r}...`), this.$__client = s || new vr({
|
|
7100
7234
|
socket: {
|
|
7101
7235
|
socketUri: null,
|
|
7102
7236
|
appKey: "knishio",
|
|
@@ -7266,7 +7400,7 @@ class Tr {
|
|
|
7266
7400
|
* @returns {Promise<string>} A promise that resolves to the device fingerprint as a string.
|
|
7267
7401
|
*/
|
|
7268
7402
|
getFingerprint() {
|
|
7269
|
-
return
|
|
7403
|
+
return pr();
|
|
7270
7404
|
}
|
|
7271
7405
|
getFingerprintData() {
|
|
7272
7406
|
return Jt();
|
|
@@ -7311,7 +7445,16 @@ class Tr {
|
|
|
7311
7445
|
sourceWallet: n = null,
|
|
7312
7446
|
remainderWallet: s = null
|
|
7313
7447
|
}) {
|
|
7314
|
-
|
|
7448
|
+
this.log("info", "KnishIOClient::createMolecule() - Creating a new molecule..."), e = e || this.getSecret(), t = t || this.getBundle();
|
|
7449
|
+
let r = null;
|
|
7450
|
+
if (n && n.token !== "USER")
|
|
7451
|
+
if (this.lastMoleculeQuery && this.getRemainderWallet() && this.getRemainderWallet().token === "USER" && this.lastMoleculeQuery.response() && this.lastMoleculeQuery.response().success())
|
|
7452
|
+
r = this.getRemainderWallet().position;
|
|
7453
|
+
else {
|
|
7454
|
+
const i = await this.getSourceWallet();
|
|
7455
|
+
r = i ? i.position : null;
|
|
7456
|
+
}
|
|
7457
|
+
return !n && this.lastMoleculeQuery && this.getRemainderWallet().token === "USER" && this.lastMoleculeQuery.response() && this.lastMoleculeQuery.response().success() && (n = this.getRemainderWallet()), n === null && (n = await this.getSourceWallet()), this.remainderWallet = s || _.create({
|
|
7315
7458
|
secret: e,
|
|
7316
7459
|
bundle: t,
|
|
7317
7460
|
token: "USER",
|
|
@@ -7322,7 +7465,8 @@ class Tr {
|
|
|
7322
7465
|
sourceWallet: n,
|
|
7323
7466
|
remainderWallet: this.getRemainderWallet(),
|
|
7324
7467
|
cellSlug: this.getCellSlug(),
|
|
7325
|
-
version: this.getServerSdkVersion()
|
|
7468
|
+
version: this.getServerSdkVersion(),
|
|
7469
|
+
continuIdPosition: r
|
|
7326
7470
|
});
|
|
7327
7471
|
}
|
|
7328
7472
|
/**
|
|
@@ -7418,7 +7562,7 @@ class Tr {
|
|
|
7418
7562
|
bundle: t = null,
|
|
7419
7563
|
type: n = "regular"
|
|
7420
7564
|
}) {
|
|
7421
|
-
const s = this.createQuery(
|
|
7565
|
+
const s = this.createQuery(fs);
|
|
7422
7566
|
return this.executeQuery(s, {
|
|
7423
7567
|
bundleHash: t || this.getBundle(),
|
|
7424
7568
|
token: e,
|
|
@@ -7456,7 +7600,7 @@ class Tr {
|
|
|
7456
7600
|
bundle: e,
|
|
7457
7601
|
closure: t
|
|
7458
7602
|
}) {
|
|
7459
|
-
return await this.createSubscribe(
|
|
7603
|
+
return await this.createSubscribe(Fs).execute({
|
|
7460
7604
|
variables: {
|
|
7461
7605
|
bundle: e || this.getBundle()
|
|
7462
7606
|
},
|
|
@@ -7478,7 +7622,7 @@ class Tr {
|
|
|
7478
7622
|
}) {
|
|
7479
7623
|
if (!t)
|
|
7480
7624
|
throw new ee(`${this.constructor.name}::subscribeWalletStatus() - Token parameter is required!`);
|
|
7481
|
-
return this.createSubscribe(
|
|
7625
|
+
return this.createSubscribe(Ls).execute({
|
|
7482
7626
|
variables: {
|
|
7483
7627
|
bundle: e || this.getBundle(),
|
|
7484
7628
|
token: t
|
|
@@ -7497,7 +7641,7 @@ class Tr {
|
|
|
7497
7641
|
bundle: e,
|
|
7498
7642
|
closure: t
|
|
7499
7643
|
}) {
|
|
7500
|
-
return this.createSubscribe(
|
|
7644
|
+
return this.createSubscribe(Qs).execute({
|
|
7501
7645
|
variables: {
|
|
7502
7646
|
bundle: e || this.getBundle()
|
|
7503
7647
|
},
|
|
@@ -7517,7 +7661,7 @@ class Tr {
|
|
|
7517
7661
|
metaId: t,
|
|
7518
7662
|
closure: n
|
|
7519
7663
|
}) {
|
|
7520
|
-
return this.createSubscribe(
|
|
7664
|
+
return this.createSubscribe(js).execute({
|
|
7521
7665
|
variables: {
|
|
7522
7666
|
metaType: e,
|
|
7523
7667
|
metaId: t
|
|
@@ -7570,12 +7714,12 @@ class Tr {
|
|
|
7570
7714
|
throughAtom: h = !0,
|
|
7571
7715
|
throughMolecule: p = !1,
|
|
7572
7716
|
values: d = null,
|
|
7573
|
-
keys:
|
|
7717
|
+
keys: b = null,
|
|
7574
7718
|
atomValues: A = null
|
|
7575
7719
|
}) {
|
|
7576
7720
|
this.log("info", `KnishIOClient::queryMeta() - Querying metaType: ${e}, metaId: ${t}...`);
|
|
7577
|
-
let
|
|
7578
|
-
return p ? (
|
|
7721
|
+
let M, f;
|
|
7722
|
+
return p ? (M = this.createQuery(Mt), f = Mt.createVariables({
|
|
7579
7723
|
metaType: e,
|
|
7580
7724
|
metaId: t,
|
|
7581
7725
|
key: n,
|
|
@@ -7585,10 +7729,10 @@ class Tr {
|
|
|
7585
7729
|
queryArgs: c,
|
|
7586
7730
|
countBy: l,
|
|
7587
7731
|
values: d,
|
|
7588
|
-
keys:
|
|
7732
|
+
keys: b,
|
|
7589
7733
|
atomValues: A,
|
|
7590
7734
|
cellSlug: this.getCellSlug()
|
|
7591
|
-
})) : h ? (
|
|
7735
|
+
})) : h ? (M = this.createQuery(Tt), f = Tt.createVariables({
|
|
7592
7736
|
metaType: e,
|
|
7593
7737
|
metaId: t,
|
|
7594
7738
|
key: n,
|
|
@@ -7598,10 +7742,10 @@ class Tr {
|
|
|
7598
7742
|
queryArgs: c,
|
|
7599
7743
|
countBy: l,
|
|
7600
7744
|
values: d,
|
|
7601
|
-
keys:
|
|
7745
|
+
keys: b,
|
|
7602
7746
|
atomValues: A,
|
|
7603
7747
|
cellSlug: this.getCellSlug()
|
|
7604
|
-
})) : (
|
|
7748
|
+
})) : (M = this.createQuery(At), f = At.createVariables({
|
|
7605
7749
|
metaType: e,
|
|
7606
7750
|
metaId: t,
|
|
7607
7751
|
key: n,
|
|
@@ -7612,7 +7756,7 @@ class Tr {
|
|
|
7612
7756
|
count: u,
|
|
7613
7757
|
countBy: l,
|
|
7614
7758
|
cellSlug: this.getCellSlug()
|
|
7615
|
-
})), this.executeQuery(
|
|
7759
|
+
})), this.executeQuery(M, f);
|
|
7616
7760
|
}
|
|
7617
7761
|
/**
|
|
7618
7762
|
* Queries meta assets and verifies cryptographic integrity of associated molecules.
|
|
@@ -7651,7 +7795,7 @@ class Tr {
|
|
|
7651
7795
|
batchId: e
|
|
7652
7796
|
}) {
|
|
7653
7797
|
this.log("info", `KnishIOClient::queryBatchHistory() - Querying cascading meta instances for batchId: ${e}...`);
|
|
7654
|
-
const t = this.createQuery(
|
|
7798
|
+
const t = this.createQuery(ys);
|
|
7655
7799
|
return await this.executeQuery(t, {
|
|
7656
7800
|
batchId: e
|
|
7657
7801
|
});
|
|
@@ -7705,20 +7849,20 @@ class Tr {
|
|
|
7705
7849
|
tokenSlugs: h,
|
|
7706
7850
|
tokenSlug: p,
|
|
7707
7851
|
cellSlugs: d,
|
|
7708
|
-
cellSlug:
|
|
7852
|
+
cellSlug: b,
|
|
7709
7853
|
batchIds: A,
|
|
7710
|
-
batchId:
|
|
7854
|
+
batchId: M,
|
|
7711
7855
|
values: f,
|
|
7712
7856
|
value: y,
|
|
7713
|
-
metaTypes:
|
|
7714
|
-
metaType:
|
|
7857
|
+
metaTypes: w,
|
|
7858
|
+
metaType: C,
|
|
7715
7859
|
metaIds: k,
|
|
7716
7860
|
metaId: $,
|
|
7717
7861
|
indexes: v,
|
|
7718
7862
|
index: I,
|
|
7719
7863
|
filter: S,
|
|
7720
7864
|
latest: B,
|
|
7721
|
-
queryArgs:
|
|
7865
|
+
queryArgs: R = {
|
|
7722
7866
|
limit: 15,
|
|
7723
7867
|
offset: 1
|
|
7724
7868
|
}
|
|
@@ -7739,20 +7883,20 @@ class Tr {
|
|
|
7739
7883
|
tokenSlugs: h,
|
|
7740
7884
|
tokenSlug: p,
|
|
7741
7885
|
cellSlugs: d,
|
|
7742
|
-
cellSlug:
|
|
7886
|
+
cellSlug: b,
|
|
7743
7887
|
batchIds: A,
|
|
7744
|
-
batchId:
|
|
7888
|
+
batchId: M,
|
|
7745
7889
|
values: f,
|
|
7746
7890
|
value: y,
|
|
7747
|
-
metaTypes:
|
|
7748
|
-
metaType:
|
|
7891
|
+
metaTypes: w,
|
|
7892
|
+
metaType: C,
|
|
7749
7893
|
metaIds: k,
|
|
7750
7894
|
metaId: $,
|
|
7751
7895
|
indexes: v,
|
|
7752
7896
|
index: I,
|
|
7753
7897
|
filter: S,
|
|
7754
7898
|
latest: B,
|
|
7755
|
-
queryArgs:
|
|
7899
|
+
queryArgs: R
|
|
7756
7900
|
}));
|
|
7757
7901
|
}
|
|
7758
7902
|
/**
|
|
@@ -7768,7 +7912,7 @@ class Tr {
|
|
|
7768
7912
|
secret: this.getSecret(),
|
|
7769
7913
|
token: e
|
|
7770
7914
|
}), n = await this.createMoleculeMutation({
|
|
7771
|
-
mutationClass:
|
|
7915
|
+
mutationClass: Hs
|
|
7772
7916
|
});
|
|
7773
7917
|
return n.fillMolecule(t), await this.executeQuery(n);
|
|
7774
7918
|
}
|
|
@@ -7785,7 +7929,7 @@ class Tr {
|
|
|
7785
7929
|
metaType: t,
|
|
7786
7930
|
metaId: n
|
|
7787
7931
|
}) {
|
|
7788
|
-
const s = this.createQuery(
|
|
7932
|
+
const s = this.createQuery(Js);
|
|
7789
7933
|
return await this.executeQuery(s, {
|
|
7790
7934
|
bundleHash: e,
|
|
7791
7935
|
metaType: t,
|
|
@@ -7820,7 +7964,7 @@ class Tr {
|
|
|
7820
7964
|
countBy: u,
|
|
7821
7965
|
interval: l
|
|
7822
7966
|
}) {
|
|
7823
|
-
const h = this.createQuery(
|
|
7967
|
+
const h = this.createQuery(Xs);
|
|
7824
7968
|
return await this.executeQuery(h, {
|
|
7825
7969
|
bundleHash: e,
|
|
7826
7970
|
metaType: t,
|
|
@@ -7860,7 +8004,7 @@ class Tr {
|
|
|
7860
8004
|
timeZone: c,
|
|
7861
8005
|
json: u = {}
|
|
7862
8006
|
}) {
|
|
7863
|
-
const l = this.createQuery(
|
|
8007
|
+
const l = this.createQuery(Vs);
|
|
7864
8008
|
return await this.executeQuery(l, {
|
|
7865
8009
|
bundleHash: e,
|
|
7866
8010
|
metaType: t,
|
|
@@ -7895,12 +8039,12 @@ class Tr {
|
|
|
7895
8039
|
batchId: s = null,
|
|
7896
8040
|
units: r = []
|
|
7897
8041
|
}) {
|
|
7898
|
-
const i =
|
|
8042
|
+
const i = T.get(n || {}, "fungibility");
|
|
7899
8043
|
if (i === "stackable" && (n.batchId = s || he({})), ["nonfungible", "stackable"].includes(i) && r.length > 0) {
|
|
7900
|
-
if (
|
|
7901
|
-
throw new
|
|
8044
|
+
if (T.get(n || {}, "decimals") > 0)
|
|
8045
|
+
throw new Ns();
|
|
7902
8046
|
if (t > 0)
|
|
7903
|
-
throw new
|
|
8047
|
+
throw new Re();
|
|
7904
8048
|
t = r.length, n.splittable = 1, n.decimals = 0, n.tokenUnits = JSON.stringify(r);
|
|
7905
8049
|
}
|
|
7906
8050
|
const a = new _({
|
|
@@ -7909,7 +8053,7 @@ class Tr {
|
|
|
7909
8053
|
token: e,
|
|
7910
8054
|
batchId: s
|
|
7911
8055
|
}), c = await this.createMoleculeMutation({
|
|
7912
|
-
mutationClass:
|
|
8056
|
+
mutationClass: ks
|
|
7913
8057
|
});
|
|
7914
8058
|
return c.fillMolecule({
|
|
7915
8059
|
recipientWallet: a,
|
|
@@ -7934,10 +8078,9 @@ class Tr {
|
|
|
7934
8078
|
}) {
|
|
7935
8079
|
const r = await this.createMoleculeMutation(
|
|
7936
8080
|
{
|
|
7937
|
-
mutationClass:
|
|
8081
|
+
mutationClass: rr,
|
|
7938
8082
|
molecule: await this.createMolecule({
|
|
7939
|
-
secret: this.getSecret()
|
|
7940
|
-
sourceWallet: await this.getSourceWallet()
|
|
8083
|
+
secret: this.getSecret()
|
|
7941
8084
|
})
|
|
7942
8085
|
}
|
|
7943
8086
|
);
|
|
@@ -7965,10 +8108,9 @@ class Tr {
|
|
|
7965
8108
|
}) {
|
|
7966
8109
|
const r = await this.createMoleculeMutation(
|
|
7967
8110
|
{
|
|
7968
|
-
mutationClass:
|
|
8111
|
+
mutationClass: Cs,
|
|
7969
8112
|
molecule: await this.createMolecule({
|
|
7970
|
-
secret: this.getSecret()
|
|
7971
|
-
sourceWallet: await this.getSourceWallet()
|
|
8113
|
+
secret: this.getSecret()
|
|
7972
8114
|
})
|
|
7973
8115
|
}
|
|
7974
8116
|
), i = n || {};
|
|
@@ -7989,10 +8131,9 @@ class Tr {
|
|
|
7989
8131
|
host: e
|
|
7990
8132
|
}) {
|
|
7991
8133
|
const t = await this.createMoleculeMutation({
|
|
7992
|
-
mutationClass:
|
|
8134
|
+
mutationClass: Os,
|
|
7993
8135
|
molecule: await this.createMolecule({
|
|
7994
|
-
secret: this.getSecret()
|
|
7995
|
-
sourceWallet: await this.getSourceWallet()
|
|
8136
|
+
secret: this.getSecret()
|
|
7996
8137
|
})
|
|
7997
8138
|
});
|
|
7998
8139
|
return t.fillMolecule({
|
|
@@ -8015,10 +8156,9 @@ class Tr {
|
|
|
8015
8156
|
meta: s = {}
|
|
8016
8157
|
}) {
|
|
8017
8158
|
const r = await this.createMoleculeMutation({
|
|
8018
|
-
mutationClass:
|
|
8159
|
+
mutationClass: Ws,
|
|
8019
8160
|
molecule: await this.createMolecule({
|
|
8020
|
-
secret: this.getSecret()
|
|
8021
|
-
sourceWallet: await this.getSourceWallet()
|
|
8161
|
+
secret: this.getSecret()
|
|
8022
8162
|
})
|
|
8023
8163
|
});
|
|
8024
8164
|
return r.fillMolecule({
|
|
@@ -8042,7 +8182,7 @@ class Tr {
|
|
|
8042
8182
|
code: n
|
|
8043
8183
|
}) {
|
|
8044
8184
|
const s = await this.createMoleculeMutation({
|
|
8045
|
-
mutationClass:
|
|
8185
|
+
mutationClass: xs
|
|
8046
8186
|
});
|
|
8047
8187
|
return s.fillMolecule({
|
|
8048
8188
|
type: e,
|
|
@@ -8050,6 +8190,24 @@ class Tr {
|
|
|
8050
8190
|
code: n
|
|
8051
8191
|
}), await this.executeQuery(s);
|
|
8052
8192
|
}
|
|
8193
|
+
/**
|
|
8194
|
+
* Links an identifier to the current wallet bundle
|
|
8195
|
+
*
|
|
8196
|
+
* @param {string} type - The type of the identifier.
|
|
8197
|
+
* @param {string} contact - The contact associated with the identifier.
|
|
8198
|
+
* @returns {Promise<ResponseLinkIdentifier>} - A promise that resolves to the link result.
|
|
8199
|
+
*/
|
|
8200
|
+
async linkIdentifier({
|
|
8201
|
+
type: e,
|
|
8202
|
+
contact: t
|
|
8203
|
+
}) {
|
|
8204
|
+
const n = this.createQuery(Bs);
|
|
8205
|
+
return await this.executeQuery(n, {
|
|
8206
|
+
bundle: this.getBundle(),
|
|
8207
|
+
type: e,
|
|
8208
|
+
content: t
|
|
8209
|
+
});
|
|
8210
|
+
}
|
|
8053
8211
|
/**
|
|
8054
8212
|
* Creates a policy for a given metaType and metaId.
|
|
8055
8213
|
*
|
|
@@ -8090,7 +8248,7 @@ class Tr {
|
|
|
8090
8248
|
metaType: e,
|
|
8091
8249
|
metaId: t
|
|
8092
8250
|
}) {
|
|
8093
|
-
const n = this.createQuery(
|
|
8251
|
+
const n = this.createQuery(tr);
|
|
8094
8252
|
return await this.executeQuery(n, {
|
|
8095
8253
|
metaType: e,
|
|
8096
8254
|
metaId: t
|
|
@@ -8112,10 +8270,10 @@ class Tr {
|
|
|
8112
8270
|
unspent: n = !0
|
|
8113
8271
|
}) {
|
|
8114
8272
|
this.log("info", `KnishIOClient::queryWallets() - Querying wallets${e ? ` for ${e}` : ""}...`);
|
|
8115
|
-
const s = this.createQuery(
|
|
8273
|
+
const s = this.createQuery(ds);
|
|
8116
8274
|
return this.executeQuery(s, {
|
|
8117
8275
|
bundleHash: e || this.getBundle(),
|
|
8118
|
-
|
|
8276
|
+
token: t,
|
|
8119
8277
|
unspent: n
|
|
8120
8278
|
}).then((r) => r.payload());
|
|
8121
8279
|
}
|
|
@@ -8134,7 +8292,7 @@ class Tr {
|
|
|
8134
8292
|
raw: n = !1
|
|
8135
8293
|
}) {
|
|
8136
8294
|
this.log("info", `KnishIOClient::queryBundle() - Querying wallet bundle metadata${e ? ` for ${e}` : ""}...`), e || (e = this.getBundle()), typeof e == "string" && (e = [e]);
|
|
8137
|
-
const s = this.createQuery(
|
|
8295
|
+
const s = this.createQuery(hs);
|
|
8138
8296
|
return this.executeQuery(s, { bundleHashes: e }).then((r) => n ? r : r.payload());
|
|
8139
8297
|
}
|
|
8140
8298
|
/**
|
|
@@ -8146,7 +8304,7 @@ class Tr {
|
|
|
8146
8304
|
async queryContinuId({
|
|
8147
8305
|
bundle: e
|
|
8148
8306
|
}) {
|
|
8149
|
-
const t = this.createQuery(
|
|
8307
|
+
const t = this.createQuery(cs);
|
|
8150
8308
|
return this.executeQuery(t, {
|
|
8151
8309
|
bundle: e
|
|
8152
8310
|
});
|
|
@@ -8178,14 +8336,14 @@ class Tr {
|
|
|
8178
8336
|
}) {
|
|
8179
8337
|
let a, c;
|
|
8180
8338
|
r = r || {};
|
|
8181
|
-
const u = this.createQuery(
|
|
8339
|
+
const u = this.createQuery(Zs), l = await this.executeQuery(u, {
|
|
8182
8340
|
slug: e
|
|
8183
|
-
}), h =
|
|
8341
|
+
}), h = T.get(l.data(), "0.fungibility") === "stackable";
|
|
8184
8342
|
if (!h && i !== null)
|
|
8185
8343
|
throw new qe("Expected Batch ID = null for non-stackable tokens.");
|
|
8186
8344
|
if (h && i === null && (i = he({})), s.length > 0) {
|
|
8187
8345
|
if (n > 0)
|
|
8188
|
-
throw new
|
|
8346
|
+
throw new Re();
|
|
8189
8347
|
n = s.length, r.tokenUnits = JSON.stringify(s);
|
|
8190
8348
|
}
|
|
8191
8349
|
t ? (Object.prototype.toString.call(t) === "[object String]" && (_.isBundleHash(t) ? (a = "walletBundle", c = t) : t = _.create({
|
|
@@ -8193,7 +8351,7 @@ class Tr {
|
|
|
8193
8351
|
token: e
|
|
8194
8352
|
})), t instanceof _ && (a = "wallet", r.position = t.position, r.bundle = t.bundle, c = t.address)) : (a = "walletBundle", c = this.getBundle());
|
|
8195
8353
|
const p = await this.createMoleculeMutation({
|
|
8196
|
-
mutationClass:
|
|
8354
|
+
mutationClass: _s
|
|
8197
8355
|
});
|
|
8198
8356
|
return p.fillMolecule({
|
|
8199
8357
|
token: e,
|
|
@@ -8219,7 +8377,7 @@ class Tr {
|
|
|
8219
8377
|
molecule: n = null
|
|
8220
8378
|
}) {
|
|
8221
8379
|
const s = await this.createMoleculeMutation({
|
|
8222
|
-
mutationClass:
|
|
8380
|
+
mutationClass: Ts,
|
|
8223
8381
|
molecule: n
|
|
8224
8382
|
});
|
|
8225
8383
|
return s.fillMolecule({
|
|
@@ -8279,7 +8437,7 @@ class Tr {
|
|
|
8279
8437
|
}) {
|
|
8280
8438
|
if (s.length > 0) {
|
|
8281
8439
|
if (n > 0)
|
|
8282
|
-
throw new
|
|
8440
|
+
throw new Re();
|
|
8283
8441
|
n = s.length;
|
|
8284
8442
|
}
|
|
8285
8443
|
if (i === null && (i = await this.querySourceWallet({
|
|
@@ -8304,7 +8462,7 @@ class Tr {
|
|
|
8304
8462
|
sourceWallet: i,
|
|
8305
8463
|
remainderWallet: c
|
|
8306
8464
|
}), l = await this.createMoleculeMutation({
|
|
8307
|
-
mutationClass:
|
|
8465
|
+
mutationClass: As,
|
|
8308
8466
|
molecule: u
|
|
8309
8467
|
});
|
|
8310
8468
|
return l.fillMolecule({
|
|
@@ -8337,7 +8495,7 @@ class Tr {
|
|
|
8337
8495
|
sourceWallet: s,
|
|
8338
8496
|
remainderWallet: r
|
|
8339
8497
|
}), a = await this.createMoleculeMutation({
|
|
8340
|
-
mutationClass:
|
|
8498
|
+
mutationClass: ir,
|
|
8341
8499
|
molecule: i
|
|
8342
8500
|
});
|
|
8343
8501
|
return a.fillMolecule({
|
|
@@ -8370,7 +8528,7 @@ class Tr {
|
|
|
8370
8528
|
sourceWallet: n,
|
|
8371
8529
|
remainderWallet: r
|
|
8372
8530
|
}), a = await this.createMoleculeMutation({
|
|
8373
|
-
mutationClass:
|
|
8531
|
+
mutationClass: or,
|
|
8374
8532
|
molecule: i
|
|
8375
8533
|
}), c = {};
|
|
8376
8534
|
return c[this.getBundle()] = t, a.fillMolecule({
|
|
@@ -8400,7 +8558,7 @@ class Tr {
|
|
|
8400
8558
|
const r = s.createRemainder(this.getSecret());
|
|
8401
8559
|
if (n.length > 0) {
|
|
8402
8560
|
if (t > 0)
|
|
8403
|
-
throw new
|
|
8561
|
+
throw new Re();
|
|
8404
8562
|
t = n.length, s.splitUnits(
|
|
8405
8563
|
n,
|
|
8406
8564
|
r
|
|
@@ -8412,7 +8570,7 @@ class Tr {
|
|
|
8412
8570
|
});
|
|
8413
8571
|
i.burnToken({ amount: t }), i.sign({
|
|
8414
8572
|
bundle: this.getBundle()
|
|
8415
|
-
}), i.check();
|
|
8573
|
+
}), i.check(s);
|
|
8416
8574
|
const a = await this.createMoleculeMutation({
|
|
8417
8575
|
mutationClass: U,
|
|
8418
8576
|
molecule: i
|
|
@@ -8514,9 +8672,9 @@ class Tr {
|
|
|
8514
8672
|
}) {
|
|
8515
8673
|
this.setCellSlug(e);
|
|
8516
8674
|
const n = new _({
|
|
8517
|
-
secret:
|
|
8675
|
+
secret: nt(await this.getFingerprint()),
|
|
8518
8676
|
token: "AUTH"
|
|
8519
|
-
}), s = await this.createQuery(
|
|
8677
|
+
}), s = await this.createQuery(Ks), r = {
|
|
8520
8678
|
cellSlug: e,
|
|
8521
8679
|
pubkey: n.pubkey,
|
|
8522
8680
|
encrypt: t
|
|
@@ -8524,7 +8682,7 @@ class Tr {
|
|
|
8524
8682
|
if (i.success()) {
|
|
8525
8683
|
const a = xe.create({
|
|
8526
8684
|
token: i.token(),
|
|
8527
|
-
expiresAt: i.
|
|
8685
|
+
expiresAt: i.expiresAt(),
|
|
8528
8686
|
pubkey: i.pubKey(),
|
|
8529
8687
|
encrypt: i.encrypt()
|
|
8530
8688
|
}, n);
|
|
@@ -8552,7 +8710,7 @@ class Tr {
|
|
|
8552
8710
|
secret: e,
|
|
8553
8711
|
sourceWallet: n
|
|
8554
8712
|
}), r = await this.createMoleculeMutation({
|
|
8555
|
-
mutationClass:
|
|
8713
|
+
mutationClass: bs,
|
|
8556
8714
|
molecule: s
|
|
8557
8715
|
});
|
|
8558
8716
|
r.fillMolecule({ meta: { encrypt: t ? "true" : "false" } });
|
|
@@ -8560,7 +8718,7 @@ class Tr {
|
|
|
8560
8718
|
if (i.success()) {
|
|
8561
8719
|
const a = xe.create({
|
|
8562
8720
|
token: i.token(),
|
|
8563
|
-
expiresAt: i.
|
|
8721
|
+
expiresAt: i.expiresAt(),
|
|
8564
8722
|
pubkey: i.pubKey(),
|
|
8565
8723
|
encrypt: i.encrypt()
|
|
8566
8724
|
}, n);
|
|
@@ -8586,7 +8744,7 @@ class Tr {
|
|
|
8586
8744
|
}) {
|
|
8587
8745
|
if (this.$__serverSdkVersion < 3)
|
|
8588
8746
|
return this.log("warn", "KnishIOClient::authorize() - Server SDK version does not require an authorization..."), null;
|
|
8589
|
-
e === null && t && (e =
|
|
8747
|
+
e === null && t && (e = nt(t)), n && this.setCellSlug(n), this.$__authInProcess = !0;
|
|
8590
8748
|
let r;
|
|
8591
8749
|
return e ? r = await this.requestProfileAuthToken({
|
|
8592
8750
|
secret: e,
|
|
@@ -8638,28 +8796,190 @@ class Tr {
|
|
|
8638
8796
|
}
|
|
8639
8797
|
}
|
|
8640
8798
|
}
|
|
8799
|
+
class Rr extends E {
|
|
8800
|
+
/**
|
|
8801
|
+
* Class constructor
|
|
8802
|
+
*
|
|
8803
|
+
* @param {Query} query
|
|
8804
|
+
* @param {object} json
|
|
8805
|
+
*/
|
|
8806
|
+
constructor({
|
|
8807
|
+
query: e,
|
|
8808
|
+
json: t
|
|
8809
|
+
}) {
|
|
8810
|
+
super({
|
|
8811
|
+
query: e,
|
|
8812
|
+
json: t,
|
|
8813
|
+
dataKey: "data.AccessToken"
|
|
8814
|
+
});
|
|
8815
|
+
}
|
|
8816
|
+
/**
|
|
8817
|
+
* Returns the reason for rejection
|
|
8818
|
+
*
|
|
8819
|
+
* @return {string}
|
|
8820
|
+
*/
|
|
8821
|
+
reason() {
|
|
8822
|
+
return "Invalid response from server";
|
|
8823
|
+
}
|
|
8824
|
+
/**
|
|
8825
|
+
* Returns whether molecule was accepted or not
|
|
8826
|
+
*
|
|
8827
|
+
* @return {boolean}
|
|
8828
|
+
*/
|
|
8829
|
+
success() {
|
|
8830
|
+
return this.payload() !== null;
|
|
8831
|
+
}
|
|
8832
|
+
/**
|
|
8833
|
+
* Returns a wallet with balance
|
|
8834
|
+
*
|
|
8835
|
+
* @return {null|Wallet}
|
|
8836
|
+
*/
|
|
8837
|
+
payload() {
|
|
8838
|
+
return this.data();
|
|
8839
|
+
}
|
|
8840
|
+
/**
|
|
8841
|
+
* Returns the authorization key
|
|
8842
|
+
*
|
|
8843
|
+
* @param key
|
|
8844
|
+
* @return {*}
|
|
8845
|
+
*/
|
|
8846
|
+
payloadKey(e) {
|
|
8847
|
+
if (!T.has(this.payload(), e))
|
|
8848
|
+
throw new te(`ResponseAuthorizationGuest::payloadKey() - '${e}' key is not found in the payload!`);
|
|
8849
|
+
return T.get(this.payload(), e);
|
|
8850
|
+
}
|
|
8851
|
+
/**
|
|
8852
|
+
* Returns the auth token
|
|
8853
|
+
*
|
|
8854
|
+
* @return {*}
|
|
8855
|
+
*/
|
|
8856
|
+
token() {
|
|
8857
|
+
return this.payloadKey("token");
|
|
8858
|
+
}
|
|
8859
|
+
/**
|
|
8860
|
+
* Returns timestamp
|
|
8861
|
+
*
|
|
8862
|
+
* @return {*}
|
|
8863
|
+
*/
|
|
8864
|
+
time() {
|
|
8865
|
+
return this.payloadKey("time");
|
|
8866
|
+
}
|
|
8867
|
+
}
|
|
8641
8868
|
export {
|
|
8642
8869
|
g as Atom,
|
|
8643
|
-
|
|
8870
|
+
ke as AtomIndexException,
|
|
8871
|
+
P as AtomMeta,
|
|
8872
|
+
ae as AtomsMissingException,
|
|
8873
|
+
xe as AuthToken,
|
|
8874
|
+
xt as AuthorizationRejectedException,
|
|
8875
|
+
ue as BalanceInsufficientException,
|
|
8876
|
+
qe as BatchIdException,
|
|
8877
|
+
ve as CheckMolecule,
|
|
8878
|
+
ee as CodeException,
|
|
8879
|
+
de as Decimal,
|
|
8880
|
+
T as Dot,
|
|
8881
|
+
te as InvalidResponseException,
|
|
8882
|
+
Or as KnishIOClient,
|
|
8644
8883
|
pe as Meta,
|
|
8884
|
+
H as MetaMissingException,
|
|
8885
|
+
rs as MolecularHashMismatchException,
|
|
8886
|
+
is as MolecularHashMissingException,
|
|
8645
8887
|
z as Molecule,
|
|
8646
|
-
|
|
8647
|
-
|
|
8888
|
+
Qe as Mutation,
|
|
8889
|
+
Vs as MutationActiveSession,
|
|
8890
|
+
Ws as MutationAppendRequest,
|
|
8891
|
+
Ts as MutationClaimShadowWallet,
|
|
8892
|
+
xs as MutationCreateIdentifier,
|
|
8893
|
+
Cs as MutationCreateMeta,
|
|
8894
|
+
rr as MutationCreateRule,
|
|
8895
|
+
ks as MutationCreateToken,
|
|
8896
|
+
Hs as MutationCreateWallet,
|
|
8897
|
+
ir as MutationDepositBufferToken,
|
|
8898
|
+
Bs as MutationLinkIdentifier,
|
|
8899
|
+
Os as MutationPeering,
|
|
8900
|
+
U as MutationProposeMolecule,
|
|
8901
|
+
bs as MutationRequestAuthorization,
|
|
8902
|
+
Ks as MutationRequestAuthorizationGuest,
|
|
8903
|
+
_s as MutationRequestTokens,
|
|
8904
|
+
As as MutationTransferTokens,
|
|
8905
|
+
or as MutationWithdrawBufferToken,
|
|
8906
|
+
Ye as NegativeAmountException,
|
|
8907
|
+
kt as PolicyInvalidException,
|
|
8908
|
+
rt as PolicyMeta,
|
|
8909
|
+
N as Query,
|
|
8910
|
+
Js as QueryActiveSession,
|
|
8911
|
+
It as QueryAtom,
|
|
8912
|
+
fs as QueryBalance,
|
|
8913
|
+
Ie as QueryBatch,
|
|
8914
|
+
ys as QueryBatchHistory,
|
|
8915
|
+
cs as QueryContinuId,
|
|
8916
|
+
At as QueryMetaType,
|
|
8917
|
+
Tt as QueryMetaTypeViaAtom,
|
|
8648
8918
|
Mt as QueryMetaTypeViaMolecule,
|
|
8649
|
-
|
|
8919
|
+
tr as QueryPolicy,
|
|
8920
|
+
Zs as QueryToken,
|
|
8921
|
+
Xs as QueryUserActivity,
|
|
8922
|
+
hs as QueryWalletBundle,
|
|
8923
|
+
ds as QueryWalletList,
|
|
8924
|
+
E as Response,
|
|
8925
|
+
Ds as ResponseActiveSession,
|
|
8926
|
+
Rs as ResponseAppendRequest,
|
|
8927
|
+
Ys as ResponseAtom,
|
|
8928
|
+
Rr as ResponseAuthorizationGuest,
|
|
8929
|
+
ps as ResponseBalance,
|
|
8930
|
+
Is as ResponseClaimShadowWallet,
|
|
8931
|
+
ls as ResponseContinuId,
|
|
8932
|
+
vs as ResponseCreateIdentifier,
|
|
8933
|
+
Ms as ResponseCreateMeta,
|
|
8934
|
+
sr as ResponseCreateRule,
|
|
8935
|
+
ws as ResponseCreateToken,
|
|
8936
|
+
qs as ResponseCreateWallet,
|
|
8937
|
+
Us as ResponseLinkIdentifier,
|
|
8938
|
+
ms as ResponseMetaType,
|
|
8939
|
+
nr as ResponseMetaTypeViaAtom,
|
|
8650
8940
|
ot as ResponseMetaTypeViaMolecule,
|
|
8651
|
-
|
|
8941
|
+
Es as ResponsePeering,
|
|
8942
|
+
er as ResponsePolicy,
|
|
8943
|
+
V as ResponseProposeMolecule,
|
|
8944
|
+
zs as ResponseQueryActiveSession,
|
|
8945
|
+
Gs as ResponseQueryUserActivity,
|
|
8946
|
+
gs as ResponseRequestAuthorization,
|
|
8947
|
+
Ps as ResponseRequestAuthorizationGuest,
|
|
8948
|
+
Ss as ResponseRequestTokens,
|
|
8949
|
+
$s as ResponseTransferTokens,
|
|
8950
|
+
us as ResponseWalletBundle,
|
|
8951
|
+
Le as ResponseWalletList,
|
|
8952
|
+
Vt as SignatureMalformedException,
|
|
8953
|
+
os as SignatureMismatchException,
|
|
8954
|
+
Re as StackableUnitAmountException,
|
|
8955
|
+
Ns as StackableUnitDecimalsException,
|
|
8956
|
+
me as TokenUnit,
|
|
8957
|
+
Y as TransferBalanceException,
|
|
8958
|
+
Se as TransferMalformedException,
|
|
8959
|
+
St as TransferMismatchedException,
|
|
8960
|
+
_t as TransferRemainderException,
|
|
8961
|
+
as as TransferToSelfException,
|
|
8962
|
+
Oe as TransferUnbalancedException,
|
|
8963
|
+
Ke as UnauthenticatedException,
|
|
8652
8964
|
_ as Wallet,
|
|
8965
|
+
vt as WalletShadowException,
|
|
8966
|
+
re as WrongTokenTypeException,
|
|
8653
8967
|
pn as base64ToHex,
|
|
8654
8968
|
un as bufferToHexString,
|
|
8655
8969
|
cn as charsetBaseConvert,
|
|
8970
|
+
mn as chunkArray,
|
|
8656
8971
|
He as chunkSubstr,
|
|
8972
|
+
yn as deepCloning,
|
|
8973
|
+
gn as diff,
|
|
8974
|
+
he as generateBatchId,
|
|
8657
8975
|
fe as generateBundleHash,
|
|
8658
|
-
|
|
8976
|
+
nt as generateSecret,
|
|
8659
8977
|
hn as hexStringToBuffer,
|
|
8660
8978
|
dn as hexToBase64,
|
|
8661
|
-
|
|
8662
|
-
|
|
8979
|
+
ye as intersect,
|
|
8980
|
+
Ve as isHex,
|
|
8981
|
+
fn as isNumeric,
|
|
8982
|
+
st as randomString,
|
|
8663
8983
|
lt as shake256
|
|
8664
8984
|
};
|
|
8665
8985
|
//# sourceMappingURL=client.es.mjs.map
|