@wishknish/knishio-client-js 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/client.cjs.js +5 -5
- package/dist/client.cjs.js.map +1 -1
- package/dist/client.es.mjs +332 -279
- package/dist/client.es.mjs.map +1 -1
- package/dist/client.iife.js +23 -23
- package/dist/client.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/Atom.js +18 -20
- package/src/KnishIOClient.js +50 -10
- package/src/Molecule.js +42 -38
- package/src/Wallet.js +3 -3
- package/src/instance/Rules/Callback.js +1 -0
- package/src/instance/Rules/Meta.js +1 -3
- package/src/instance/Rules/Rule.js +1 -0
- package/src/libraries/strings.js +1 -0
- package/src/libraries/urql/UrqlClientWrapper.js +45 -4
- package/src/query/QueryPolicy.js +1 -1
- package/src/response/Response.js +3 -3
- package/src/response/ResponseActiveSession.js +0 -1
- package/src/response/ResponseAtom.js +0 -1
- package/src/response/ResponseAuthorizationGuest.js +0 -1
- package/src/response/ResponseBalance.js +0 -1
- package/src/response/ResponseContinuId.js +0 -1
- package/src/response/ResponseLinkIdentifier.js +0 -1
- package/src/response/ResponseMetaType.js +0 -1
- package/src/response/ResponseMetaTypeViaAtom.js +0 -1
- package/src/response/ResponseMetaTypeViaMolecule.js +0 -1
- package/src/response/ResponsePolicy.js +0 -1
- package/src/response/ResponseQueryActiveSession.js +0 -1
- package/src/response/ResponseQueryUserActivity.js +0 -1
- package/src/response/ResponseWalletBundle.js +0 -1
- package/src/response/ResponseWalletList.js +0 -1
package/dist/client.es.mjs
CHANGED
|
@@ -2,11 +2,11 @@ var en = Object.defineProperty;
|
|
|
2
2
|
var tn = (o, e, t) => e in o ? en(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
3
|
var Q = (o, e, t) => tn(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import L from "jssha";
|
|
5
|
-
import { gql as
|
|
5
|
+
import { gql as E, cacheExchange as nn, fetchExchange as sn, subscriptionExchange as rn, createClient as on } from "@urql/core";
|
|
6
6
|
import { createClient as an } from "graphql-ws";
|
|
7
7
|
import { pipe as ln, map as cn, subscribe as un } from "wonka";
|
|
8
8
|
typeof self > "u" && (global.self = global);
|
|
9
|
-
class
|
|
9
|
+
class qt {
|
|
10
10
|
/**
|
|
11
11
|
* Converts the given buffer to a string containing its hexadecimal representation.
|
|
12
12
|
*
|
|
@@ -99,10 +99,10 @@ function hn(o, e, t, n, s) {
|
|
|
99
99
|
return a || "0";
|
|
100
100
|
}
|
|
101
101
|
function dn(o) {
|
|
102
|
-
return
|
|
102
|
+
return qt.toHex(o, {});
|
|
103
103
|
}
|
|
104
104
|
function pn(o) {
|
|
105
|
-
return
|
|
105
|
+
return qt.toUint8Array(o);
|
|
106
106
|
}
|
|
107
107
|
function fn(o) {
|
|
108
108
|
const e = pn(o);
|
|
@@ -437,7 +437,7 @@ class kn extends oe {
|
|
|
437
437
|
super(), this.position = e, this.walletAddress = t, this.isotope = n, this.token = s, this.value = r, this.batchId = i, this.metaType = a, this.metaId = c, this.meta = u, this.index = l, this.createdAt = h, this.version = p;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const We = {
|
|
441
441
|
4: kn
|
|
442
442
|
};
|
|
443
443
|
class g {
|
|
@@ -471,7 +471,7 @@ class g {
|
|
|
471
471
|
index: h = null,
|
|
472
472
|
version: p = null
|
|
473
473
|
}) {
|
|
474
|
-
this.position = e, this.walletAddress = t, this.isotope = n, this.token = s, this.value = r !== null ? String(r) : null, this.batchId = i, this.metaType = a, this.metaId = c, this.meta = u ? pe.normalizeMeta(u) : [], this.index = h, this.otsFragment = l, this.createdAt = String(+/* @__PURE__ */ new Date()), p !== null && Object.prototype.hasOwnProperty.call(
|
|
474
|
+
this.position = e, this.walletAddress = t, this.isotope = n, this.token = s, this.value = r !== null ? String(r) : null, this.batchId = i, this.metaType = a, this.metaId = c, this.meta = u ? pe.normalizeMeta(u) : [], this.index = h, this.otsFragment = l, this.createdAt = String(+/* @__PURE__ */ new Date()), p !== null && Object.prototype.hasOwnProperty.call(We, p) && (this.version = String(p));
|
|
475
475
|
}
|
|
476
476
|
/**
|
|
477
477
|
*
|
|
@@ -546,7 +546,7 @@ class g {
|
|
|
546
546
|
}
|
|
547
547
|
/**
|
|
548
548
|
* Returns JSON-ready object for cross-SDK compatibility (2025 JS best practices)
|
|
549
|
-
*
|
|
549
|
+
*
|
|
550
550
|
* Provides clean serialization of atomic operations with optional OTS fragments.
|
|
551
551
|
* Follows 2025 JavaScript best practices with proper type safety and validation.
|
|
552
552
|
*
|
|
@@ -589,7 +589,7 @@ class g {
|
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Creates an Atom instance from JSON data (2025 JS best practices)
|
|
592
|
-
*
|
|
592
|
+
*
|
|
593
593
|
* Handles cross-SDK atom deserialization with robust error handling.
|
|
594
594
|
* Essential for reconstructing atoms from other SDK implementations.
|
|
595
595
|
*
|
|
@@ -650,8 +650,8 @@ class g {
|
|
|
650
650
|
if (!(r instanceof g))
|
|
651
651
|
throw new ae();
|
|
652
652
|
return r;
|
|
653
|
-
}), s.every((r) => r.version && Object.prototype.hasOwnProperty.call(
|
|
654
|
-
n.update(JSON.stringify(s.map((r) =>
|
|
653
|
+
}), s.every((r) => r.version && Object.prototype.hasOwnProperty.call(We, r.version)))
|
|
654
|
+
n.update(JSON.stringify(s.map((r) => We[r.version].create(r).view())));
|
|
655
655
|
else {
|
|
656
656
|
const r = String(e.length);
|
|
657
657
|
let i = [];
|
|
@@ -808,14 +808,14 @@ class ze extends x {
|
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
const Ce = /* @__PURE__ */ BigInt(2 ** 32 - 1), ct = /* @__PURE__ */ BigInt(32);
|
|
811
|
-
function
|
|
811
|
+
function _n(o, e = !1) {
|
|
812
812
|
return e ? { h: Number(o & Ce), l: Number(o >> ct & Ce) } : { h: Number(o >> ct & Ce) | 0, l: Number(o & Ce) | 0 };
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Sn(o, e = !1) {
|
|
815
815
|
const t = o.length;
|
|
816
816
|
let n = new Uint32Array(t), s = new Uint32Array(t);
|
|
817
817
|
for (let r = 0; r < t; r++) {
|
|
818
|
-
const { h: i, l: a } =
|
|
818
|
+
const { h: i, l: a } = _n(o[r], e);
|
|
819
819
|
[n[r], s[r]] = [i, a];
|
|
820
820
|
}
|
|
821
821
|
return [n, s];
|
|
@@ -851,7 +851,7 @@ function Tn(o, e) {
|
|
|
851
851
|
if (o.length < t)
|
|
852
852
|
throw new Error('"digestInto() output" expected to be of length >=' + t);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Wt(o) {
|
|
855
855
|
return new Uint32Array(o.buffer, o.byteOffset, Math.floor(o.byteLength / 4));
|
|
856
856
|
}
|
|
857
857
|
function Ut(...o) {
|
|
@@ -880,15 +880,15 @@ function On(o = 32) {
|
|
|
880
880
|
}
|
|
881
881
|
const Ne = (o) => ({
|
|
882
882
|
oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, o])
|
|
883
|
-
}), Rn = BigInt(0), ge = BigInt(1),
|
|
883
|
+
}), Rn = BigInt(0), ge = BigInt(1), qn = BigInt(2), Wn = BigInt(7), Un = BigInt(256), Bn = BigInt(113), Ht = [], Pt = [], Kt = [];
|
|
884
884
|
for (let o = 0, e = ge, t = 1, n = 0; o < 24; o++) {
|
|
885
885
|
[t, n] = [n, (2 * t + 3 * n) % 5], Ht.push(2 * (5 * n + t)), Pt.push((o + 1) * (o + 2) / 2 % 64);
|
|
886
886
|
let s = Rn;
|
|
887
887
|
for (let r = 0; r < 7; r++)
|
|
888
|
-
e = (e << ge ^ (e >>
|
|
888
|
+
e = (e << ge ^ (e >> Wn) * Bn) % Un, e & qn && (s ^= ge << (ge << BigInt(r)) - ge);
|
|
889
889
|
Kt.push(s);
|
|
890
890
|
}
|
|
891
|
-
const Nt =
|
|
891
|
+
const Nt = Sn(Kt, !0), Hn = Nt[0], Pn = Nt[1], pt = (o, e, t) => t > 32 ? vn(o, e, t) : $n(o, e, t), ft = (o, e, t) => t > 32 ? xn(o, e, t) : An(o, e, t);
|
|
892
892
|
function Kn(o, e = 24) {
|
|
893
893
|
const t = new Uint32Array(10);
|
|
894
894
|
for (let n = 24 - e; n < 24; n++) {
|
|
@@ -930,7 +930,7 @@ class Fe {
|
|
|
930
930
|
Q(this, "rounds");
|
|
931
931
|
if (this.blockLen = e, this.suffix = t, this.outputLen = n, this.enableXOF = s, this.rounds = r, ut(n, "outputLen"), !(0 < e && e < 200))
|
|
932
932
|
throw new Error("only keccak-f1600 function is supported");
|
|
933
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
933
|
+
this.state = new Uint8Array(200), this.state32 = Wt(this.state);
|
|
934
934
|
}
|
|
935
935
|
clone() {
|
|
936
936
|
return this._cloneInto();
|
|
@@ -1043,14 +1043,14 @@ const yt = (o, e) => {
|
|
|
1043
1043
|
throw new Error("FFT: wrong Polynomial length");
|
|
1044
1044
|
s && a && mt(l);
|
|
1045
1045
|
for (let h = 0, p = 1; h < c - i; h++) {
|
|
1046
|
-
const d = s ? h + 1 + i : c - h, b = 1 << d, A = b >> 1,
|
|
1046
|
+
const d = s ? h + 1 + i : c - h, b = 1 << d, A = b >> 1, O = t >> d;
|
|
1047
1047
|
for (let f = 0; f < t; f += b)
|
|
1048
|
-
for (let
|
|
1049
|
-
const
|
|
1048
|
+
for (let m = 0, w = p++; m < A; m++) {
|
|
1049
|
+
const M = r ? s ? t - w : w : m * O, k = f + m, $ = f + m + A, v = n[M], I = l[$], _ = l[k];
|
|
1050
1050
|
if (u) {
|
|
1051
1051
|
const U = o.mul(I, v);
|
|
1052
|
-
l[k] = o.add(
|
|
1053
|
-
} else r ? (l[k] = o.add(I,
|
|
1052
|
+
l[k] = o.add(_, U), l[$] = o.sub(_, U);
|
|
1053
|
+
} else r ? (l[k] = o.add(I, _), l[$] = o.mul(o.sub(I, _), v)) : (l[k] = o.add(_, I), l[$] = o.mul(o.sub(_, I), v));
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
1056
|
return !s && a && mt(l), l;
|
|
@@ -1128,25 +1128,25 @@ function bt(o) {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
|
|
1130
1130
|
const jn = (o) => {
|
|
1131
|
-
const { newPoly: e, N: t, Q: n, F: s, ROOT_OF_UNITY: r, brvBits: i } = o, a = (f,
|
|
1132
|
-
const w = f %
|
|
1133
|
-
return (w >= 0 ? w | 0 :
|
|
1134
|
-
}, c = (f,
|
|
1135
|
-
const w = a(f,
|
|
1136
|
-
return (w >
|
|
1131
|
+
const { newPoly: e, N: t, Q: n, F: s, ROOT_OF_UNITY: r, brvBits: i } = o, a = (f, m = n) => {
|
|
1132
|
+
const w = f % m | 0;
|
|
1133
|
+
return (w >= 0 ? w | 0 : m + w | 0) | 0;
|
|
1134
|
+
}, c = (f, m = n) => {
|
|
1135
|
+
const w = a(f, m) | 0;
|
|
1136
|
+
return (w > m >> 1 ? w - m | 0 : w) | 0;
|
|
1137
1137
|
};
|
|
1138
1138
|
function u() {
|
|
1139
1139
|
const f = e(t);
|
|
1140
|
-
for (let
|
|
1141
|
-
const w = Dt(
|
|
1142
|
-
f[
|
|
1140
|
+
for (let m = 0; m < t; m++) {
|
|
1141
|
+
const w = Dt(m, i), M = BigInt(r) ** BigInt(w) % BigInt(n);
|
|
1142
|
+
f[m] = Number(M) | 0;
|
|
1143
1143
|
}
|
|
1144
1144
|
return f;
|
|
1145
1145
|
}
|
|
1146
1146
|
const l = u(), h = {
|
|
1147
|
-
add: (f,
|
|
1148
|
-
sub: (f,
|
|
1149
|
-
mul: (f,
|
|
1147
|
+
add: (f, m) => a((f | 0) + (m | 0)) | 0,
|
|
1148
|
+
sub: (f, m) => a((f | 0) - (m | 0)) | 0,
|
|
1149
|
+
mul: (f, m) => a((f | 0) * (m | 0)) | 0,
|
|
1150
1150
|
inv: (f) => {
|
|
1151
1151
|
throw new Error("not implemented");
|
|
1152
1152
|
}
|
|
@@ -1161,26 +1161,26 @@ const jn = (o) => {
|
|
|
1161
1161
|
encode: (f) => d(f),
|
|
1162
1162
|
decode: (f) => {
|
|
1163
1163
|
b(f);
|
|
1164
|
-
for (let
|
|
1165
|
-
f[
|
|
1164
|
+
for (let m = 0; m < f.length; m++)
|
|
1165
|
+
f[m] = a(s * f[m]);
|
|
1166
1166
|
return f;
|
|
1167
1167
|
}
|
|
1168
|
-
}, bitsCoder: (f,
|
|
1169
|
-
const w = bt(f),
|
|
1168
|
+
}, bitsCoder: (f, m) => {
|
|
1169
|
+
const w = bt(f), M = f * (t / 8);
|
|
1170
1170
|
return {
|
|
1171
|
-
bytesLen:
|
|
1171
|
+
bytesLen: M,
|
|
1172
1172
|
encode: (k) => {
|
|
1173
|
-
const $ = new Uint8Array(
|
|
1174
|
-
for (let v = 0, I = 0,
|
|
1175
|
-
for (I |= (
|
|
1176
|
-
$[U++] = I & bt(
|
|
1173
|
+
const $ = new Uint8Array(M);
|
|
1174
|
+
for (let v = 0, I = 0, _ = 0, U = 0; v < k.length; v++)
|
|
1175
|
+
for (I |= (m.encode(k[v]) & w) << _, _ += f; _ >= 8; _ -= 8, I >>= 8)
|
|
1176
|
+
$[U++] = I & bt(_);
|
|
1177
1177
|
return $;
|
|
1178
1178
|
},
|
|
1179
1179
|
decode: (k) => {
|
|
1180
1180
|
const $ = e(t);
|
|
1181
|
-
for (let v = 0, I = 0,
|
|
1182
|
-
for (I |= k[v] <<
|
|
1183
|
-
$[U++] =
|
|
1181
|
+
for (let v = 0, I = 0, _ = 0, U = 0; v < k.length; v++)
|
|
1182
|
+
for (I |= k[v] << _, _ += 8; _ >= f; _ -= f, I >>= f)
|
|
1183
|
+
$[U++] = m.decode(I & w);
|
|
1184
1184
|
return $;
|
|
1185
1185
|
}
|
|
1186
1186
|
};
|
|
@@ -1255,7 +1255,7 @@ function wt(o) {
|
|
|
1255
1255
|
return e;
|
|
1256
1256
|
}
|
|
1257
1257
|
function we(o, e, t, n) {
|
|
1258
|
-
const s = o(n * F / 4, e, t), r = new Uint16Array(F), i =
|
|
1258
|
+
const s = o(n * F / 4, e, t), r = new Uint16Array(F), i = Wt(s);
|
|
1259
1259
|
let a = 0;
|
|
1260
1260
|
for (let c = 0, u = 0, l = 0, h = 0; c < i.length; c++) {
|
|
1261
1261
|
let p = i[c];
|
|
@@ -1275,18 +1275,18 @@ const ns = (o) => {
|
|
|
1275
1275
|
publicKey: p.bytesLen,
|
|
1276
1276
|
cipherText: b.bytesLen
|
|
1277
1277
|
},
|
|
1278
|
-
keygen: (
|
|
1279
|
-
D(
|
|
1278
|
+
keygen: (O) => {
|
|
1279
|
+
D(O, 32, "seed");
|
|
1280
1280
|
const f = new Uint8Array(33);
|
|
1281
|
-
f.set(
|
|
1282
|
-
const
|
|
1283
|
-
for (let
|
|
1284
|
-
k.push(ne.encode(we(t,
|
|
1281
|
+
f.set(O), f[32] = e;
|
|
1282
|
+
const m = s(f), [w, M] = A.decode(m), k = [], $ = [];
|
|
1283
|
+
for (let _ = 0; _ < e; _++)
|
|
1284
|
+
k.push(ne.encode(we(t, M, _, r)));
|
|
1285
1285
|
const v = n(w);
|
|
1286
|
-
for (let
|
|
1287
|
-
const U = ne.encode(we(t,
|
|
1286
|
+
for (let _ = 0; _ < e; _++) {
|
|
1287
|
+
const U = ne.encode(we(t, M, e + _, r));
|
|
1288
1288
|
for (let R = 0; R < e; R++) {
|
|
1289
|
-
const ce = wt(v.get(R,
|
|
1289
|
+
const ce = wt(v.get(R, _));
|
|
1290
1290
|
se(U, Ee(ce, k[R]));
|
|
1291
1291
|
}
|
|
1292
1292
|
$.push(U);
|
|
@@ -1296,15 +1296,15 @@ const ns = (o) => {
|
|
|
1296
1296
|
publicKey: p.encode([$, w]),
|
|
1297
1297
|
secretKey: d.encode(k)
|
|
1298
1298
|
};
|
|
1299
|
-
return G(w,
|
|
1299
|
+
return G(w, M, k, $, f, m), I;
|
|
1300
1300
|
},
|
|
1301
|
-
encrypt: (
|
|
1302
|
-
const [w,
|
|
1301
|
+
encrypt: (O, f, m) => {
|
|
1302
|
+
const [w, M] = p.decode(O), k = [];
|
|
1303
1303
|
for (let R = 0; R < e; R++)
|
|
1304
|
-
k.push(ne.encode(we(t,
|
|
1305
|
-
const $ = n(
|
|
1304
|
+
k.push(ne.encode(we(t, m, R, r)));
|
|
1305
|
+
const $ = n(M), v = new Uint16Array(F), I = [];
|
|
1306
1306
|
for (let R = 0; R < e; R++) {
|
|
1307
|
-
const ce = we(t,
|
|
1307
|
+
const ce = we(t, m, e + R, i), De = new Uint16Array(F);
|
|
1308
1308
|
for (let Me = 0; Me < e; Me++) {
|
|
1309
1309
|
const Yt = wt($.get(R, Me));
|
|
1310
1310
|
se(De, Ee(Yt, k[Me]));
|
|
@@ -1312,16 +1312,16 @@ const ns = (o) => {
|
|
|
1312
1312
|
se(ce, ne.decode(De)), I.push(ce), se(v, Ee(w[R], k[R])), G(De);
|
|
1313
1313
|
}
|
|
1314
1314
|
$.clean();
|
|
1315
|
-
const
|
|
1316
|
-
se(
|
|
1315
|
+
const _ = we(t, m, 2 * e, i);
|
|
1316
|
+
se(_, ne.decode(v));
|
|
1317
1317
|
const U = u.decode(f);
|
|
1318
|
-
return se(U,
|
|
1318
|
+
return se(U, _), G(w, k, v, _), b.encode([I, U]);
|
|
1319
1319
|
},
|
|
1320
|
-
decrypt: (
|
|
1321
|
-
const [
|
|
1320
|
+
decrypt: (O, f) => {
|
|
1321
|
+
const [m, w] = b.decode(O), M = d.decode(f), k = new Uint16Array(F);
|
|
1322
1322
|
for (let $ = 0; $ < e; $++)
|
|
1323
|
-
se(k, Ee(
|
|
1324
|
-
return es(w, ne.decode(k)), G(k,
|
|
1323
|
+
se(k, Ee(M[$], ne.encode(m[$])));
|
|
1324
|
+
return es(w, ne.decode(k)), G(k, M, m), u.encode(w);
|
|
1325
1325
|
}
|
|
1326
1326
|
};
|
|
1327
1327
|
};
|
|
@@ -1359,7 +1359,7 @@ function ss(o) {
|
|
|
1359
1359
|
const p = a.bytesLen - 96, d = p + 32, b = t(h.subarray(p / 2, d));
|
|
1360
1360
|
if (!Je(b, h.subarray(d, d + 32)))
|
|
1361
1361
|
throw new Error("invalid secretKey: hash check failed");
|
|
1362
|
-
const [A,
|
|
1362
|
+
const [A, O, f, m] = a.decode(h), w = e.decrypt(l, A), M = n.create().update(w).update(f).digest(), k = M.subarray(0, 32), $ = e.encrypt(O, w, M.subarray(32, 64)), v = Je(l, $), I = s.create({ dkLen: 32 }).update(m).update(l).digest();
|
|
1363
1363
|
return G(w, $, v ? I : k), v ? k : I;
|
|
1364
1364
|
}
|
|
1365
1365
|
};
|
|
@@ -1377,7 +1377,7 @@ const is = {
|
|
|
1377
1377
|
...is,
|
|
1378
1378
|
...Zn[768]
|
|
1379
1379
|
});
|
|
1380
|
-
class
|
|
1380
|
+
class S {
|
|
1381
1381
|
/**
|
|
1382
1382
|
* Class constructor
|
|
1383
1383
|
*
|
|
@@ -1398,11 +1398,11 @@ class _ {
|
|
|
1398
1398
|
batchId: i = null,
|
|
1399
1399
|
characters: a = null
|
|
1400
1400
|
}) {
|
|
1401
|
-
this.token = n, this.balance = "0", this.molecules = {}, this.key = null, this.privkey = null, this.pubkey = null, this.tokenUnits = [], this.tradeRates = {}, this.address = s, this.position = r, this.bundle = t, this.batchId = i, this.characters = a, e && (this.bundle = this.bundle || fe(e, "Wallet::constructor"), this.position = this.position ||
|
|
1401
|
+
this.token = n, this.balance = "0", this.molecules = {}, this.key = null, this.privkey = null, this.pubkey = null, this.tokenUnits = [], this.tradeRates = {}, this.address = s, this.position = r, this.bundle = t, this.batchId = i, this.characters = a, e && (this.bundle = this.bundle || fe(e, "Wallet::constructor"), this.position = this.position || S.generatePosition(), this.key = S.generateKey({
|
|
1402
1402
|
secret: e,
|
|
1403
1403
|
token: this.token,
|
|
1404
1404
|
position: this.position
|
|
1405
|
-
}), this.address = this.address ||
|
|
1405
|
+
}), this.address = this.address || S.generateAddress(this.key), this.characters = this.characters || "BASE64", this.initializeMLKEM());
|
|
1406
1406
|
}
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Creates a new Wallet instance
|
|
@@ -1424,7 +1424,7 @@ class _ {
|
|
|
1424
1424
|
let i = null;
|
|
1425
1425
|
if (!e && !t)
|
|
1426
1426
|
throw new ze();
|
|
1427
|
-
return e && !t && (i =
|
|
1427
|
+
return e && !t && (i = S.generatePosition(), t = fe(e, "Wallet::create")), new S({
|
|
1428
1428
|
secret: e,
|
|
1429
1429
|
bundle: t,
|
|
1430
1430
|
token: n,
|
|
@@ -1586,7 +1586,7 @@ class _ {
|
|
|
1586
1586
|
* @param secret
|
|
1587
1587
|
*/
|
|
1588
1588
|
createRemainder(e) {
|
|
1589
|
-
const t =
|
|
1589
|
+
const t = S.create({
|
|
1590
1590
|
secret: e,
|
|
1591
1591
|
token: this.token,
|
|
1592
1592
|
characters: this.characters
|
|
@@ -1768,7 +1768,7 @@ class Y extends x {
|
|
|
1768
1768
|
super(e, t, n), this.name = "TransferBalanceException";
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
|
-
class
|
|
1771
|
+
class _e extends x {
|
|
1772
1772
|
/**
|
|
1773
1773
|
* Class constructor
|
|
1774
1774
|
*
|
|
@@ -1780,7 +1780,7 @@ class Se extends x {
|
|
|
1780
1780
|
super(e, t, n), this.name = "TransferMalformedException";
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
|
-
class
|
|
1783
|
+
class _t extends x {
|
|
1784
1784
|
/**
|
|
1785
1785
|
* @param {string} message
|
|
1786
1786
|
* @param {string|null} fileName
|
|
@@ -1790,7 +1790,7 @@ class St extends x {
|
|
|
1790
1790
|
super(e, t, n), this.name = "TransferMismatchedException";
|
|
1791
1791
|
}
|
|
1792
1792
|
}
|
|
1793
|
-
class
|
|
1793
|
+
class St extends x {
|
|
1794
1794
|
/**
|
|
1795
1795
|
* Class constructor
|
|
1796
1796
|
*
|
|
@@ -1861,8 +1861,7 @@ class Be extends x {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
1863
|
class $t {
|
|
1864
|
-
constructor({}) {
|
|
1865
|
-
const e = arguments[0];
|
|
1864
|
+
constructor(e = {}) {
|
|
1866
1865
|
for (const t in e)
|
|
1867
1866
|
this[`__${t}`] = e[t];
|
|
1868
1867
|
}
|
|
@@ -1902,7 +1901,7 @@ class ee extends x {
|
|
|
1902
1901
|
super(e, t, n), this.name = "CodeException";
|
|
1903
1902
|
}
|
|
1904
1903
|
}
|
|
1905
|
-
class
|
|
1904
|
+
class Se {
|
|
1906
1905
|
/**
|
|
1907
1906
|
*
|
|
1908
1907
|
* @param {string} action
|
|
@@ -1986,7 +1985,7 @@ class _e {
|
|
|
1986
1985
|
* @return Callback
|
|
1987
1986
|
*/
|
|
1988
1987
|
static toObject(e) {
|
|
1989
|
-
const t = new
|
|
1988
|
+
const t = new Se({
|
|
1990
1989
|
action: e.action
|
|
1991
1990
|
});
|
|
1992
1991
|
return e.metaType && (t.metaType = e.metaType), e.metaId && (t.metaId = e.metaId), e.meta && (t.meta = e.meta), e.address && (t.address = e.address), e.token && (t.token = e.token), e.amount && (t.amount = e.amount), e.comparison && (t.comparison = e.comparison), t;
|
|
@@ -2099,7 +2098,7 @@ class Ae {
|
|
|
2099
2098
|
if (!(n instanceof Ze))
|
|
2100
2099
|
throw new Pe();
|
|
2101
2100
|
for (const n of t)
|
|
2102
|
-
if (!(n instanceof
|
|
2101
|
+
if (!(n instanceof Se))
|
|
2103
2102
|
throw new Pe();
|
|
2104
2103
|
this.__condition = e, this.__callback = t;
|
|
2105
2104
|
}
|
|
@@ -2114,7 +2113,7 @@ class Ae {
|
|
|
2114
2113
|
* @param {Callback[]|{}} callback
|
|
2115
2114
|
*/
|
|
2116
2115
|
set callback(e) {
|
|
2117
|
-
this.__callback.push(e instanceof
|
|
2116
|
+
this.__callback.push(e instanceof Se ? e : Se.toObject(e));
|
|
2118
2117
|
}
|
|
2119
2118
|
/**
|
|
2120
2119
|
*
|
|
@@ -2301,7 +2300,7 @@ class ve {
|
|
|
2301
2300
|
if (!Object.keys(n).includes(i))
|
|
2302
2301
|
throw new kt(`${i} is missing from the meta.`);
|
|
2303
2302
|
for (const c of a)
|
|
2304
|
-
if (!
|
|
2303
|
+
if (!S.isBundleHash(c) && !["all", "self"].includes(c))
|
|
2305
2304
|
throw new kt(`${c} does not correspond to the format of the policy.`);
|
|
2306
2305
|
}
|
|
2307
2306
|
}
|
|
@@ -2418,7 +2417,7 @@ class ve {
|
|
|
2418
2417
|
throw new H("Check::isotopeB() - B-isotope atoms must have a metaId!");
|
|
2419
2418
|
const s = Number(n.value);
|
|
2420
2419
|
if (Number.isNaN(s))
|
|
2421
|
-
throw new
|
|
2420
|
+
throw new _e("Check::isotopeB() - B-isotope atom value is not a valid number!");
|
|
2422
2421
|
}
|
|
2423
2422
|
const t = this.molecule.getIsotopes("V");
|
|
2424
2423
|
if (t.length > 0) {
|
|
@@ -2448,9 +2447,9 @@ class ve {
|
|
|
2448
2447
|
throw new H("Check::isotopeF() - F-isotope atoms must have a metaId!");
|
|
2449
2448
|
const s = Number(n.value);
|
|
2450
2449
|
if (Number.isNaN(s))
|
|
2451
|
-
throw new
|
|
2450
|
+
throw new _e("Check::isotopeF() - F-isotope atom value is not a valid number!");
|
|
2452
2451
|
if (s < 0)
|
|
2453
|
-
throw new
|
|
2452
|
+
throw new _e("Check::isotopeF() - F-isotope atom value must not be negative!");
|
|
2454
2453
|
}
|
|
2455
2454
|
const t = this.molecule.getIsotopes("V");
|
|
2456
2455
|
if (t.length > 0) {
|
|
@@ -2477,9 +2476,9 @@ class ve {
|
|
|
2477
2476
|
if (!n && s.isotope === "V" && t.length === 2) {
|
|
2478
2477
|
const a = t[t.length - 1];
|
|
2479
2478
|
if (s.token !== a.token)
|
|
2480
|
-
throw new
|
|
2479
|
+
throw new _t();
|
|
2481
2480
|
if (a.value < 0)
|
|
2482
|
-
throw new
|
|
2481
|
+
throw new _e();
|
|
2483
2482
|
if (Number(s.value) + Number(a.value) !== 0)
|
|
2484
2483
|
throw new Oe();
|
|
2485
2484
|
return !0;
|
|
@@ -2493,10 +2492,10 @@ class ve {
|
|
|
2493
2492
|
if (i = c.value * 1, Number.isNaN(i))
|
|
2494
2493
|
throw new TypeError('Invalid isotope "V" values');
|
|
2495
2494
|
if (c.token !== s.token)
|
|
2496
|
-
throw new
|
|
2495
|
+
throw new _t();
|
|
2497
2496
|
if (a > 0) {
|
|
2498
2497
|
if (i < 0)
|
|
2499
|
-
throw new
|
|
2498
|
+
throw new _e();
|
|
2500
2499
|
if (c.walletAddress === s.walletAddress)
|
|
2501
2500
|
throw new cs();
|
|
2502
2501
|
}
|
|
@@ -2511,9 +2510,9 @@ class ve {
|
|
|
2511
2510
|
if (a < 0)
|
|
2512
2511
|
throw new Y();
|
|
2513
2512
|
if (!n && a !== r)
|
|
2514
|
-
throw new
|
|
2513
|
+
throw new St();
|
|
2515
2514
|
} else if (i !== 0)
|
|
2516
|
-
throw new
|
|
2515
|
+
throw new St();
|
|
2517
2516
|
return !0;
|
|
2518
2517
|
}
|
|
2519
2518
|
/**
|
|
@@ -2690,7 +2689,7 @@ class z {
|
|
|
2690
2689
|
version: i = null,
|
|
2691
2690
|
continuIdPosition: a = null
|
|
2692
2691
|
}) {
|
|
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(
|
|
2692
|
+
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(We, i) && (this.version = String(i)), (s || n) && (this.remainderWallet = s || S.create({
|
|
2694
2693
|
secret: e,
|
|
2695
2694
|
bundle: t,
|
|
2696
2695
|
token: n.token,
|
|
@@ -2854,7 +2853,7 @@ class z {
|
|
|
2854
2853
|
* @return {Molecule}
|
|
2855
2854
|
*/
|
|
2856
2855
|
addContinuIdAtom() {
|
|
2857
|
-
(!this.remainderWallet || this.remainderWallet.token !== "USER") && (this.remainderWallet =
|
|
2856
|
+
(!this.remainderWallet || this.remainderWallet.token !== "USER") && (this.remainderWallet = S.create({
|
|
2858
2857
|
secret: this.secret,
|
|
2859
2858
|
bundle: this.bundle
|
|
2860
2859
|
}));
|
|
@@ -2934,7 +2933,7 @@ class z {
|
|
|
2934
2933
|
throw new Ye("Molecule::burnToken() - Amount to burn must be positive!");
|
|
2935
2934
|
if (this.sourceWallet.balance - e < 0)
|
|
2936
2935
|
throw new ue();
|
|
2937
|
-
const n = new
|
|
2936
|
+
const n = new S({
|
|
2938
2937
|
bundle: "0000000000000000000000000000000000000000000000000000000000000000",
|
|
2939
2938
|
token: this.sourceWallet.token
|
|
2940
2939
|
});
|
|
@@ -2971,7 +2970,7 @@ class z {
|
|
|
2971
2970
|
if (e < 0)
|
|
2972
2971
|
throw new Ye("Molecule::replenishToken() - Amount to replenish must be positive!");
|
|
2973
2972
|
if (t.length) {
|
|
2974
|
-
t =
|
|
2973
|
+
t = S.getTokenUnits(t), this.remainderWallet.tokenUnits = this.sourceWallet.tokenUnits;
|
|
2975
2974
|
for (const n of t)
|
|
2976
2975
|
this.remainderWallet.tokenUnits.push(n);
|
|
2977
2976
|
this.remainderWallet.balance = String(this.remainderWallet.tokenUnits.length), this.sourceWallet.tokenUnits = t, this.sourceWallet.balance = String(this.sourceWallet.tokenUnits.length);
|
|
@@ -3071,7 +3070,7 @@ class z {
|
|
|
3071
3070
|
}) {
|
|
3072
3071
|
if (this.sourceWallet.balance - e < 0)
|
|
3073
3072
|
throw new ue();
|
|
3074
|
-
const n =
|
|
3073
|
+
const n = S.create({
|
|
3075
3074
|
secret: this.secret,
|
|
3076
3075
|
bundle: this.bundle,
|
|
3077
3076
|
token: this.sourceWallet.token,
|
|
@@ -3106,8 +3105,8 @@ class z {
|
|
|
3106
3105
|
signingWallet: t = null
|
|
3107
3106
|
}) {
|
|
3108
3107
|
let n = 0;
|
|
3109
|
-
for (const
|
|
3110
|
-
n +=
|
|
3108
|
+
for (const r of Object.values(e || {}))
|
|
3109
|
+
n += r;
|
|
3111
3110
|
if (this.sourceWallet.balance - n < 0)
|
|
3112
3111
|
throw new ue();
|
|
3113
3112
|
const s = new P();
|
|
@@ -3379,7 +3378,7 @@ class z {
|
|
|
3379
3378
|
const i = T.get(s.aggregatedMeta(), "signingWallet");
|
|
3380
3379
|
if (i && (r = T.get(JSON.parse(i), "position")), !r)
|
|
3381
3380
|
throw new zt("Signing wallet must have a position!");
|
|
3382
|
-
const a =
|
|
3381
|
+
const a = S.generateKey({
|
|
3383
3382
|
secret: this.secret,
|
|
3384
3383
|
token: s.token,
|
|
3385
3384
|
position: s.position
|
|
@@ -3387,7 +3386,7 @@ class z {
|
|
|
3387
3386
|
let l = "";
|
|
3388
3387
|
for (const d in c) {
|
|
3389
3388
|
let b = c[d];
|
|
3390
|
-
for (let A = 0,
|
|
3389
|
+
for (let A = 0, O = 8 - u[d]; A < O; A++)
|
|
3391
3390
|
b = new L("SHAKE256", "TEXT").update(b).getHash("HEX", { outputLen: 512 });
|
|
3392
3391
|
l += b;
|
|
3393
3392
|
}
|
|
@@ -3512,14 +3511,14 @@ class z {
|
|
|
3512
3511
|
} catch (u) {
|
|
3513
3512
|
throw new Error(`Failed to reconstruct atom ${c}: ${u.message}`);
|
|
3514
3513
|
}
|
|
3515
|
-
})), n && (r.sourceWallet && (i.sourceWallet = new
|
|
3514
|
+
})), n && (r.sourceWallet && (i.sourceWallet = new S({
|
|
3516
3515
|
secret: null,
|
|
3517
3516
|
token: r.sourceWallet.token,
|
|
3518
3517
|
position: r.sourceWallet.position,
|
|
3519
3518
|
bundle: r.sourceWallet.bundle,
|
|
3520
3519
|
batchId: r.sourceWallet.batchId,
|
|
3521
3520
|
characters: r.sourceWallet.characters
|
|
3522
|
-
}), i.sourceWallet.balance = String(r.sourceWallet.balance != null ? r.sourceWallet.balance : 0), i.sourceWallet.address = r.sourceWallet.address, r.sourceWallet.pubkey && (i.sourceWallet.pubkey = r.sourceWallet.pubkey), i.sourceWallet.tokenUnits = r.sourceWallet.tokenUnits || [], i.sourceWallet.tradeRates = r.sourceWallet.tradeRates || {}, i.sourceWallet.molecules = r.sourceWallet.molecules || {}), r.remainderWallet && (i.remainderWallet = new
|
|
3521
|
+
}), i.sourceWallet.balance = String(r.sourceWallet.balance != null ? r.sourceWallet.balance : 0), i.sourceWallet.address = r.sourceWallet.address, r.sourceWallet.pubkey && (i.sourceWallet.pubkey = r.sourceWallet.pubkey), i.sourceWallet.tokenUnits = r.sourceWallet.tokenUnits || [], i.sourceWallet.tradeRates = r.sourceWallet.tradeRates || {}, i.sourceWallet.molecules = r.sourceWallet.molecules || {}), r.remainderWallet && (i.remainderWallet = new S({
|
|
3523
3522
|
secret: null,
|
|
3524
3523
|
token: r.remainderWallet.token,
|
|
3525
3524
|
position: r.remainderWallet.position,
|
|
@@ -3581,7 +3580,7 @@ class xe {
|
|
|
3581
3580
|
* @return {AuthToken}
|
|
3582
3581
|
*/
|
|
3583
3582
|
static restore(e, t) {
|
|
3584
|
-
const n = new
|
|
3583
|
+
const n = new S({
|
|
3585
3584
|
secret: t,
|
|
3586
3585
|
token: "AUTH",
|
|
3587
3586
|
position: e.wallet.position,
|
|
@@ -3716,7 +3715,7 @@ class Ke extends x {
|
|
|
3716
3715
|
super(e, t, n), this.name = "UnauthenticatedException";
|
|
3717
3716
|
}
|
|
3718
3717
|
}
|
|
3719
|
-
class
|
|
3718
|
+
class C {
|
|
3720
3719
|
/**
|
|
3721
3720
|
* Class constructor
|
|
3722
3721
|
*
|
|
@@ -3931,7 +3930,7 @@ class K {
|
|
|
3931
3930
|
* @return {Response}
|
|
3932
3931
|
*/
|
|
3933
3932
|
createResponse(e) {
|
|
3934
|
-
return new
|
|
3933
|
+
return new C({
|
|
3935
3934
|
query: this,
|
|
3936
3935
|
json: e
|
|
3937
3936
|
});
|
|
@@ -3973,7 +3972,7 @@ class K {
|
|
|
3973
3972
|
return this.$__response = await this.createResponseRaw(s), this.$__response;
|
|
3974
3973
|
} catch (s) {
|
|
3975
3974
|
if (s.name === "AbortError")
|
|
3976
|
-
return this.knishIOClient.log("warn", "Query was cancelled"), new
|
|
3975
|
+
return this.knishIOClient.log("warn", "Query was cancelled"), new C({
|
|
3977
3976
|
query: this,
|
|
3978
3977
|
json: { data: null, errors: [{ message: "Query was cancelled" }] }
|
|
3979
3978
|
});
|
|
@@ -4009,7 +4008,7 @@ class K {
|
|
|
4009
4008
|
return {};
|
|
4010
4009
|
}
|
|
4011
4010
|
}
|
|
4012
|
-
class us extends
|
|
4011
|
+
class us extends C {
|
|
4013
4012
|
/**
|
|
4014
4013
|
* Class constructor
|
|
4015
4014
|
*
|
|
@@ -4034,7 +4033,7 @@ class us extends E {
|
|
|
4034
4033
|
payload() {
|
|
4035
4034
|
let e = null;
|
|
4036
4035
|
const t = this.data();
|
|
4037
|
-
return t && (e = new
|
|
4036
|
+
return t && (e = new S({
|
|
4038
4037
|
secret: null,
|
|
4039
4038
|
token: t.tokenSlug
|
|
4040
4039
|
}), 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;
|
|
@@ -4046,7 +4045,7 @@ class hs extends K {
|
|
|
4046
4045
|
* @param {KnishIOClient} knishIOClient
|
|
4047
4046
|
*/
|
|
4048
4047
|
constructor(e, t) {
|
|
4049
|
-
super(e, t), this.$__query =
|
|
4048
|
+
super(e, t), this.$__query = E`query ($bundle: String!) {
|
|
4050
4049
|
ContinuId(bundle: $bundle) {
|
|
4051
4050
|
address,
|
|
4052
4051
|
bundleHash,
|
|
@@ -4080,7 +4079,7 @@ class hs extends K {
|
|
|
4080
4079
|
});
|
|
4081
4080
|
}
|
|
4082
4081
|
}
|
|
4083
|
-
class ds extends
|
|
4082
|
+
class ds extends C {
|
|
4084
4083
|
/**
|
|
4085
4084
|
* Class constructor
|
|
4086
4085
|
*
|
|
@@ -4118,7 +4117,7 @@ class ps extends K {
|
|
|
4118
4117
|
* @param {KnishIOClient} knishIOClient
|
|
4119
4118
|
*/
|
|
4120
4119
|
constructor(e, t) {
|
|
4121
|
-
super(e, t), this.$__query =
|
|
4120
|
+
super(e, t), this.$__query = E`query( $bundleHashes: [ String! ] ) {
|
|
4122
4121
|
WalletBundle( bundleHashes: $bundleHashes ) {
|
|
4123
4122
|
bundleHash,
|
|
4124
4123
|
metas {
|
|
@@ -4145,7 +4144,7 @@ class ps extends K {
|
|
|
4145
4144
|
});
|
|
4146
4145
|
}
|
|
4147
4146
|
}
|
|
4148
|
-
class Le extends
|
|
4147
|
+
class Le extends C {
|
|
4149
4148
|
/**
|
|
4150
4149
|
* Class constructor
|
|
4151
4150
|
*
|
|
@@ -4174,12 +4173,12 @@ class Le extends E {
|
|
|
4174
4173
|
secret: t = null
|
|
4175
4174
|
}) {
|
|
4176
4175
|
let n;
|
|
4177
|
-
if (e.position === null || typeof e.position > "u" ? n =
|
|
4176
|
+
if (e.position === null || typeof e.position > "u" ? n = S.create({
|
|
4178
4177
|
bundle: e.bundleHash,
|
|
4179
4178
|
token: e.tokenSlug,
|
|
4180
4179
|
batchId: e.batchId,
|
|
4181
4180
|
characters: e.characters
|
|
4182
|
-
}) : (n = new
|
|
4181
|
+
}) : (n = new S({
|
|
4183
4182
|
secret: t,
|
|
4184
4183
|
token: e.tokenSlug,
|
|
4185
4184
|
position: e.position,
|
|
@@ -4226,7 +4225,7 @@ class fs extends K {
|
|
|
4226
4225
|
* @param {KnishIOClient} knishIOClient
|
|
4227
4226
|
*/
|
|
4228
4227
|
constructor(e, t) {
|
|
4229
|
-
super(e, t), this.$__query =
|
|
4228
|
+
super(e, t), this.$__query = E`query( $bundleHash: String, $token: String ) {
|
|
4230
4229
|
Wallet( bundleHash: $bundleHash, token: $token ) {
|
|
4231
4230
|
address,
|
|
4232
4231
|
bundleHash,
|
|
@@ -4268,7 +4267,7 @@ class fs extends K {
|
|
|
4268
4267
|
});
|
|
4269
4268
|
}
|
|
4270
4269
|
}
|
|
4271
|
-
class ms extends
|
|
4270
|
+
class ms extends C {
|
|
4272
4271
|
/**
|
|
4273
4272
|
* Class constructor
|
|
4274
4273
|
*
|
|
@@ -4303,7 +4302,7 @@ class ys extends K {
|
|
|
4303
4302
|
* @param {KnishIOClient} knishIOClient
|
|
4304
4303
|
*/
|
|
4305
4304
|
constructor(e, t) {
|
|
4306
|
-
super(e, t), this.$__query =
|
|
4305
|
+
super(e, t), this.$__query = E`query( $address: String, $bundleHash: String, $type: String, $token: String, $position: String ) {
|
|
4307
4306
|
Balance( address: $address, bundleHash: $bundleHash, type: $type, token: $token, position: $position ) {
|
|
4308
4307
|
address,
|
|
4309
4308
|
bundleHash,
|
|
@@ -4338,7 +4337,7 @@ class ys extends K {
|
|
|
4338
4337
|
});
|
|
4339
4338
|
}
|
|
4340
4339
|
}
|
|
4341
|
-
class gs extends
|
|
4340
|
+
class gs extends C {
|
|
4342
4341
|
/**
|
|
4343
4342
|
* Class constructor
|
|
4344
4343
|
*
|
|
@@ -4378,7 +4377,7 @@ class At extends K {
|
|
|
4378
4377
|
* @param {KnishIOClient} knishIOClient
|
|
4379
4378
|
*/
|
|
4380
4379
|
constructor(e, t) {
|
|
4381
|
-
super(e, t), this.$__query =
|
|
4380
|
+
super(e, t), this.$__query = E`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 ) {
|
|
4382
4381
|
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 ) {
|
|
4383
4382
|
metaType,
|
|
4384
4383
|
instanceCount {
|
|
@@ -4453,7 +4452,7 @@ class Ie extends K {
|
|
|
4453
4452
|
* @param {KnishIOClient} knishIOClient
|
|
4454
4453
|
*/
|
|
4455
4454
|
constructor(e, t) {
|
|
4456
|
-
super(e, t), this.$__query =
|
|
4455
|
+
super(e, t), this.$__query = E`query( $batchId: String ) {
|
|
4457
4456
|
Batch( batchId: $batchId ) {
|
|
4458
4457
|
${Ie.getFields()},
|
|
4459
4458
|
children {
|
|
@@ -4521,7 +4520,7 @@ class Ie extends K {
|
|
|
4521
4520
|
* @return {Response}
|
|
4522
4521
|
*/
|
|
4523
4522
|
createResponse(e) {
|
|
4524
|
-
const t = new
|
|
4523
|
+
const t = new C({
|
|
4525
4524
|
query: this,
|
|
4526
4525
|
json: e
|
|
4527
4526
|
});
|
|
@@ -4534,7 +4533,7 @@ class bs extends K {
|
|
|
4534
4533
|
* @param {KnishIOClient} knishIOClient
|
|
4535
4534
|
*/
|
|
4536
4535
|
constructor(e, t) {
|
|
4537
|
-
super(e, t), this.$__query =
|
|
4536
|
+
super(e, t), this.$__query = E`query( $batchId: String ) {
|
|
4538
4537
|
BatchHistory( batchId: $batchId ) {
|
|
4539
4538
|
${Ie.getFields()}
|
|
4540
4539
|
}
|
|
@@ -4547,14 +4546,14 @@ class bs extends K {
|
|
|
4547
4546
|
* @return {Response}
|
|
4548
4547
|
*/
|
|
4549
4548
|
createResponse(e) {
|
|
4550
|
-
const t = new
|
|
4549
|
+
const t = new C({
|
|
4551
4550
|
query: this,
|
|
4552
4551
|
json: e
|
|
4553
4552
|
});
|
|
4554
4553
|
return t.dataKey = "data.BatchHistory", t;
|
|
4555
4554
|
}
|
|
4556
4555
|
}
|
|
4557
|
-
class V extends
|
|
4556
|
+
class V extends C {
|
|
4558
4557
|
/**
|
|
4559
4558
|
* Class constructor
|
|
4560
4559
|
*
|
|
@@ -4666,7 +4665,7 @@ class Qe extends K {
|
|
|
4666
4665
|
return this.$__response = await this.createResponseRaw(r), this.$__response;
|
|
4667
4666
|
} catch (s) {
|
|
4668
4667
|
if (s.name === "AbortError")
|
|
4669
|
-
return this.knishIOClient.log("warn", "Mutation was cancelled"), new
|
|
4668
|
+
return this.knishIOClient.log("warn", "Mutation was cancelled"), new C({
|
|
4670
4669
|
query: this,
|
|
4671
4670
|
json: { data: null, errors: [{ message: "Mutation was cancelled" }] }
|
|
4672
4671
|
});
|
|
@@ -4677,14 +4676,14 @@ class Qe extends K {
|
|
|
4677
4676
|
return {};
|
|
4678
4677
|
}
|
|
4679
4678
|
}
|
|
4680
|
-
class
|
|
4679
|
+
class W extends Qe {
|
|
4681
4680
|
/**
|
|
4682
4681
|
* @param {UrqlClientWrapper} graphQLClient
|
|
4683
4682
|
* @param {KnishIOClient} knishIOClient
|
|
4684
4683
|
* @param molecule
|
|
4685
4684
|
*/
|
|
4686
4685
|
constructor(e, t, n) {
|
|
4687
|
-
super(e, t), this.$__molecule = n, this.$__remainderWallet = null, this.$__query =
|
|
4686
|
+
super(e, t), this.$__molecule = n, this.$__remainderWallet = null, this.$__query = E`mutation( $molecule: MoleculeInput! ) {
|
|
4688
4687
|
ProposeMolecule( molecule: $molecule ) {
|
|
4689
4688
|
molecularHash,
|
|
4690
4689
|
height,
|
|
@@ -4809,7 +4808,7 @@ class ws extends V {
|
|
|
4809
4808
|
return this.payloadKey("key");
|
|
4810
4809
|
}
|
|
4811
4810
|
}
|
|
4812
|
-
class ks extends
|
|
4811
|
+
class ks extends W {
|
|
4813
4812
|
/**
|
|
4814
4813
|
*
|
|
4815
4814
|
* @param {object} meta
|
|
@@ -4830,9 +4829,9 @@ class ks extends q {
|
|
|
4830
4829
|
});
|
|
4831
4830
|
}
|
|
4832
4831
|
}
|
|
4833
|
-
class
|
|
4832
|
+
class _s extends V {
|
|
4834
4833
|
}
|
|
4835
|
-
class
|
|
4834
|
+
class Ss extends W {
|
|
4836
4835
|
/**
|
|
4837
4836
|
* @param {Wallet|null} recipientWallet
|
|
4838
4837
|
* @param {number|null} amount
|
|
@@ -4858,7 +4857,7 @@ class _s extends q {
|
|
|
4858
4857
|
* @return {ResponseCreateToken}
|
|
4859
4858
|
*/
|
|
4860
4859
|
createResponse(e) {
|
|
4861
|
-
return new
|
|
4860
|
+
return new _s({
|
|
4862
4861
|
query: this,
|
|
4863
4862
|
json: e
|
|
4864
4863
|
});
|
|
@@ -4866,7 +4865,7 @@ class _s extends q {
|
|
|
4866
4865
|
}
|
|
4867
4866
|
class $s extends V {
|
|
4868
4867
|
}
|
|
4869
|
-
class As extends
|
|
4868
|
+
class As extends W {
|
|
4870
4869
|
/**
|
|
4871
4870
|
* Fills a Molecule with the appropriate atoms and prepares for broadcast
|
|
4872
4871
|
*
|
|
@@ -4921,7 +4920,7 @@ class vs extends V {
|
|
|
4921
4920
|
return e.reason = typeof t.reason > "u" ? "Invalid response from server" : t.reason, e.status = typeof t.status > "u" ? "rejected" : t.status, e;
|
|
4922
4921
|
}
|
|
4923
4922
|
}
|
|
4924
|
-
class xs extends
|
|
4923
|
+
class xs extends W {
|
|
4925
4924
|
/**
|
|
4926
4925
|
* Fills the Molecule with provided wallet and amount data
|
|
4927
4926
|
*
|
|
@@ -4952,7 +4951,7 @@ class xs extends q {
|
|
|
4952
4951
|
}
|
|
4953
4952
|
class Is extends V {
|
|
4954
4953
|
}
|
|
4955
|
-
class Ts extends
|
|
4954
|
+
class Ts extends W {
|
|
4956
4955
|
fillMolecule({
|
|
4957
4956
|
type: e,
|
|
4958
4957
|
contact: t,
|
|
@@ -4979,7 +4978,7 @@ class Ts extends q {
|
|
|
4979
4978
|
}
|
|
4980
4979
|
class Ms extends V {
|
|
4981
4980
|
}
|
|
4982
|
-
class Cs extends
|
|
4981
|
+
class Cs extends W {
|
|
4983
4982
|
/**
|
|
4984
4983
|
* Class constructor
|
|
4985
4984
|
*
|
|
@@ -4990,7 +4989,7 @@ class Cs extends q {
|
|
|
4990
4989
|
token: e,
|
|
4991
4990
|
batchId: t = null
|
|
4992
4991
|
}) {
|
|
4993
|
-
const n =
|
|
4992
|
+
const n = S.create({
|
|
4994
4993
|
secret: this.$__molecule.secret,
|
|
4995
4994
|
bundle: this.$__molecule.bundle,
|
|
4996
4995
|
token: e,
|
|
@@ -5013,7 +5012,7 @@ class Cs extends q {
|
|
|
5013
5012
|
}
|
|
5014
5013
|
class Es extends V {
|
|
5015
5014
|
}
|
|
5016
|
-
class Os extends
|
|
5015
|
+
class Os extends W {
|
|
5017
5016
|
/**
|
|
5018
5017
|
* Fills a molecule with an appropriate metadata atom
|
|
5019
5018
|
*
|
|
@@ -5050,7 +5049,7 @@ class Os extends q {
|
|
|
5050
5049
|
}
|
|
5051
5050
|
class Rs extends V {
|
|
5052
5051
|
}
|
|
5053
|
-
class
|
|
5052
|
+
class qs extends W {
|
|
5054
5053
|
/**
|
|
5055
5054
|
* Fills a molecule with a P-isotope peering atom
|
|
5056
5055
|
*
|
|
@@ -5076,9 +5075,9 @@ class Ws extends q {
|
|
|
5076
5075
|
});
|
|
5077
5076
|
}
|
|
5078
5077
|
}
|
|
5079
|
-
class
|
|
5078
|
+
class Ws extends V {
|
|
5080
5079
|
}
|
|
5081
|
-
class Us extends
|
|
5080
|
+
class Us extends W {
|
|
5082
5081
|
/**
|
|
5083
5082
|
* Fills a molecule with an A-isotope append request atom
|
|
5084
5083
|
*
|
|
@@ -5107,13 +5106,13 @@ class Us extends q {
|
|
|
5107
5106
|
* @return {ResponseAppendRequest}
|
|
5108
5107
|
*/
|
|
5109
5108
|
createResponse(e) {
|
|
5110
|
-
return new
|
|
5109
|
+
return new Ws({
|
|
5111
5110
|
query: this,
|
|
5112
5111
|
json: e
|
|
5113
5112
|
});
|
|
5114
5113
|
}
|
|
5115
5114
|
}
|
|
5116
|
-
class Bs extends
|
|
5115
|
+
class Bs extends C {
|
|
5117
5116
|
/**
|
|
5118
5117
|
* Class constructor
|
|
5119
5118
|
*
|
|
@@ -5153,7 +5152,7 @@ class Hs extends Qe {
|
|
|
5153
5152
|
* @param {KnishIOClient} knishIOClient
|
|
5154
5153
|
*/
|
|
5155
5154
|
constructor(e, t) {
|
|
5156
|
-
super(e, t), this.$__query =
|
|
5155
|
+
super(e, t), this.$__query = E`mutation( $bundle: String!, $type: String!, $content: String! ) {
|
|
5157
5156
|
LinkIdentifier( bundle: $bundle, type: $type, content: $content ) {
|
|
5158
5157
|
type,
|
|
5159
5158
|
bundle,
|
|
@@ -5178,7 +5177,7 @@ class Hs extends Qe {
|
|
|
5178
5177
|
}
|
|
5179
5178
|
class Ps extends V {
|
|
5180
5179
|
}
|
|
5181
|
-
class Ks extends
|
|
5180
|
+
class Ks extends W {
|
|
5182
5181
|
fillMolecule(e) {
|
|
5183
5182
|
this.$__molecule.initWalletCreation(e), this.$__molecule.sign({}), this.$__molecule.check();
|
|
5184
5183
|
}
|
|
@@ -5195,7 +5194,7 @@ class Ks extends q {
|
|
|
5195
5194
|
});
|
|
5196
5195
|
}
|
|
5197
5196
|
}
|
|
5198
|
-
class Ns extends
|
|
5197
|
+
class Ns extends C {
|
|
5199
5198
|
/**
|
|
5200
5199
|
* Class constructor
|
|
5201
5200
|
*
|
|
@@ -5303,7 +5302,7 @@ class Fs extends Qe {
|
|
|
5303
5302
|
* @param {KnishIOClient} knishIOClient
|
|
5304
5303
|
*/
|
|
5305
5304
|
constructor(e, t) {
|
|
5306
|
-
super(e, t), this.$__query =
|
|
5305
|
+
super(e, t), this.$__query = E`mutation( $cellSlug: String, $pubkey: String, $encrypt: Boolean ) {
|
|
5307
5306
|
AccessToken( cellSlug: $cellSlug, pubkey: $pubkey, encrypt: $encrypt ) {
|
|
5308
5307
|
token,
|
|
5309
5308
|
pubkey,
|
|
@@ -5432,7 +5431,7 @@ class je {
|
|
|
5432
5431
|
}
|
|
5433
5432
|
class Qs extends je {
|
|
5434
5433
|
constructor(e) {
|
|
5435
|
-
super(e), this.$__subscribe =
|
|
5434
|
+
super(e), this.$__subscribe = E`
|
|
5436
5435
|
subscription onCreateMolecule ( $bundle: String! ) {
|
|
5437
5436
|
CreateMolecule( bundle: $bundle ) {
|
|
5438
5437
|
molecularHash,
|
|
@@ -5482,7 +5481,7 @@ class Qs extends je {
|
|
|
5482
5481
|
}
|
|
5483
5482
|
class js extends je {
|
|
5484
5483
|
constructor(e) {
|
|
5485
|
-
super(e), this.$__subscribe =
|
|
5484
|
+
super(e), this.$__subscribe = E`
|
|
5486
5485
|
subscription onWalletStatus ( $bundle: String!, $token: String! ) {
|
|
5487
5486
|
WalletStatus( bundle: $bundle, token: $token ) {
|
|
5488
5487
|
bundle,
|
|
@@ -5496,7 +5495,7 @@ class js extends je {
|
|
|
5496
5495
|
}
|
|
5497
5496
|
class Ds extends je {
|
|
5498
5497
|
constructor(e) {
|
|
5499
|
-
super(e), this.$__subscribe =
|
|
5498
|
+
super(e), this.$__subscribe = E`
|
|
5500
5499
|
subscription onActiveWallet ( $bundle: String! ) {
|
|
5501
5500
|
ActiveWallet( bundle: $bundle ) {
|
|
5502
5501
|
address,
|
|
@@ -5539,7 +5538,7 @@ class Ds extends je {
|
|
|
5539
5538
|
}
|
|
5540
5539
|
class Vs extends je {
|
|
5541
5540
|
constructor(e) {
|
|
5542
|
-
super(e), this.$__subscribe =
|
|
5541
|
+
super(e), this.$__subscribe = E`
|
|
5543
5542
|
subscription onActiveUser ( $metaType: String!, $metaId: String! ) {
|
|
5544
5543
|
ActiveUser( metaType: $metaType, metaId: $metaId ) {
|
|
5545
5544
|
bundleHash,
|
|
@@ -5552,7 +5551,7 @@ class Vs extends je {
|
|
|
5552
5551
|
}`;
|
|
5553
5552
|
}
|
|
5554
5553
|
}
|
|
5555
|
-
class zs extends
|
|
5554
|
+
class zs extends C {
|
|
5556
5555
|
/**
|
|
5557
5556
|
* Class constructor
|
|
5558
5557
|
*
|
|
@@ -5576,7 +5575,7 @@ class Js extends Qe {
|
|
|
5576
5575
|
* @param {KnishIOClient} knishIOClient
|
|
5577
5576
|
*/
|
|
5578
5577
|
constructor(e, t) {
|
|
5579
|
-
super(e, t), this.$__query =
|
|
5578
|
+
super(e, t), this.$__query = E`mutation(
|
|
5580
5579
|
$bundleHash: String!,
|
|
5581
5580
|
$metaType: String!,
|
|
5582
5581
|
$metaId: String!,
|
|
@@ -5619,7 +5618,7 @@ class Js extends Qe {
|
|
|
5619
5618
|
});
|
|
5620
5619
|
}
|
|
5621
5620
|
}
|
|
5622
|
-
class Gs extends
|
|
5621
|
+
class Gs extends C {
|
|
5623
5622
|
/**
|
|
5624
5623
|
* Class constructor
|
|
5625
5624
|
*
|
|
@@ -5654,7 +5653,7 @@ class Xs extends K {
|
|
|
5654
5653
|
* @param {KnishIOClient} knishIOClient
|
|
5655
5654
|
*/
|
|
5656
5655
|
constructor(e, t) {
|
|
5657
|
-
super(e, t), this.$__query =
|
|
5656
|
+
super(e, t), this.$__query = E`query ActiveUserQuery ($bundleHash:String, $metaType: String, $metaId: String) {
|
|
5658
5657
|
ActiveUser (bundleHash: $bundleHash, metaType: $metaType, metaId: $metaId) {
|
|
5659
5658
|
bundleHash,
|
|
5660
5659
|
metaType,
|
|
@@ -5676,7 +5675,7 @@ class Xs extends K {
|
|
|
5676
5675
|
});
|
|
5677
5676
|
}
|
|
5678
5677
|
}
|
|
5679
|
-
class Zs extends
|
|
5678
|
+
class Zs extends C {
|
|
5680
5679
|
/**
|
|
5681
5680
|
* Class constructor
|
|
5682
5681
|
*
|
|
@@ -5707,7 +5706,7 @@ class Ys extends K {
|
|
|
5707
5706
|
* @param {KnishIOClient} knishIOClient
|
|
5708
5707
|
*/
|
|
5709
5708
|
constructor(e, t) {
|
|
5710
|
-
super(e, t), this.$__query =
|
|
5709
|
+
super(e, t), this.$__query = E`query UserActivity (
|
|
5711
5710
|
$bundleHash:String,
|
|
5712
5711
|
$metaType: String,
|
|
5713
5712
|
$metaId: String,
|
|
@@ -5801,7 +5800,7 @@ class er extends K {
|
|
|
5801
5800
|
* @param {KnishIOClient} knishIOClient
|
|
5802
5801
|
*/
|
|
5803
5802
|
constructor(e, t) {
|
|
5804
|
-
super(e, t), this.$__query =
|
|
5803
|
+
super(e, t), this.$__query = E`query( $slug: String, $slugs: [ String! ], $limit: Int, $order: String ) {
|
|
5805
5804
|
Token( slug: $slug, slugs: $slugs, limit: $limit, order: $order ) {
|
|
5806
5805
|
slug,
|
|
5807
5806
|
name,
|
|
@@ -5819,7 +5818,7 @@ class er extends K {
|
|
|
5819
5818
|
* @returns {Response}
|
|
5820
5819
|
*/
|
|
5821
5820
|
createResponse(e) {
|
|
5822
|
-
return new
|
|
5821
|
+
return new C({
|
|
5823
5822
|
query: this,
|
|
5824
5823
|
json: e,
|
|
5825
5824
|
dataKey: "data.Token"
|
|
@@ -5838,7 +5837,7 @@ class xt extends x {
|
|
|
5838
5837
|
super(e, t, n), this.name = "AuthorizationRejectedException";
|
|
5839
5838
|
}
|
|
5840
5839
|
}
|
|
5841
|
-
class tr extends
|
|
5840
|
+
class tr extends C {
|
|
5842
5841
|
/**
|
|
5843
5842
|
* Class constructor
|
|
5844
5843
|
*
|
|
@@ -5892,7 +5891,7 @@ class It extends K {
|
|
|
5892
5891
|
* @param {KnishIOClient} knishIOClient
|
|
5893
5892
|
*/
|
|
5894
5893
|
constructor(e, t) {
|
|
5895
|
-
super(e, t), this.$__query =
|
|
5894
|
+
super(e, t), this.$__query = E`query(
|
|
5896
5895
|
$molecularHashes: [String!],
|
|
5897
5896
|
$bundleHashes: [String!],
|
|
5898
5897
|
$positions:[String!],
|
|
@@ -5998,20 +5997,20 @@ class It extends K {
|
|
|
5998
5997
|
cellSlugs: d,
|
|
5999
5998
|
cellSlug: b,
|
|
6000
5999
|
batchIds: A,
|
|
6001
|
-
batchId:
|
|
6000
|
+
batchId: O,
|
|
6002
6001
|
values: f,
|
|
6003
|
-
value:
|
|
6002
|
+
value: m,
|
|
6004
6003
|
metaTypes: w,
|
|
6005
|
-
metaType:
|
|
6004
|
+
metaType: M,
|
|
6006
6005
|
metaIds: k,
|
|
6007
6006
|
metaId: $,
|
|
6008
6007
|
indexes: v,
|
|
6009
6008
|
index: I,
|
|
6010
|
-
filter:
|
|
6009
|
+
filter: _,
|
|
6011
6010
|
latest: U,
|
|
6012
6011
|
queryArgs: R
|
|
6013
6012
|
}) {
|
|
6014
|
-
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)),
|
|
6013
|
+
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)), O && (A = A || [], A.push(O)), m && (f = f || [], f.push(m)), M && (w = w || [], w.push(M)), $ && (k = k || [], k.push($)), I && (v = v || [], v.push(I)), {
|
|
6015
6014
|
molecularHashes: e,
|
|
6016
6015
|
bundleHashes: n,
|
|
6017
6016
|
positions: r,
|
|
@@ -6024,7 +6023,7 @@ class It extends K {
|
|
|
6024
6023
|
metaTypes: w,
|
|
6025
6024
|
metaIds: k,
|
|
6026
6025
|
indexes: v,
|
|
6027
|
-
filter:
|
|
6026
|
+
filter: _,
|
|
6028
6027
|
latest: U,
|
|
6029
6028
|
queryArgs: R
|
|
6030
6029
|
};
|
|
@@ -6042,7 +6041,7 @@ class It extends K {
|
|
|
6042
6041
|
});
|
|
6043
6042
|
}
|
|
6044
6043
|
}
|
|
6045
|
-
class nr extends
|
|
6044
|
+
class nr extends C {
|
|
6046
6045
|
/**
|
|
6047
6046
|
* Class constructor
|
|
6048
6047
|
*
|
|
@@ -6073,7 +6072,7 @@ class sr extends K {
|
|
|
6073
6072
|
* @param {KnishIOClient} knishIOClient
|
|
6074
6073
|
*/
|
|
6075
6074
|
constructor(e, t) {
|
|
6076
|
-
super(e, t), this.$__query =
|
|
6075
|
+
super(e, t), this.$__query = E`query( $metaType: String, $metaId: String, ) {
|
|
6077
6076
|
Policy( metaType: $metaType, metaId: $metaId ) {
|
|
6078
6077
|
molecularHash,
|
|
6079
6078
|
position,
|
|
@@ -6099,7 +6098,7 @@ class sr extends K {
|
|
|
6099
6098
|
});
|
|
6100
6099
|
}
|
|
6101
6100
|
}
|
|
6102
|
-
class rr extends
|
|
6101
|
+
class rr extends C {
|
|
6103
6102
|
/**
|
|
6104
6103
|
* Class constructor
|
|
6105
6104
|
*
|
|
@@ -6134,7 +6133,7 @@ class Tt extends K {
|
|
|
6134
6133
|
* @param {KnishIOClient} knishIOClient
|
|
6135
6134
|
*/
|
|
6136
6135
|
constructor(e, t) {
|
|
6137
|
-
super(e, t), this.$__query =
|
|
6136
|
+
super(e, t), this.$__query = E`query ($metaTypes: [String!], $metaIds: [String!], $values: [String!], $keys: [String!], $latest: Boolean, $filter: [MetaFilter!], $queryArgs: QueryArgs, $countBy: String, $atomValues: [String!], $cellSlugs: [String!] ) {
|
|
6138
6137
|
MetaTypeViaAtom(
|
|
6139
6138
|
metaTypes: $metaTypes
|
|
6140
6139
|
metaIds: $metaIds
|
|
@@ -6220,7 +6219,7 @@ class Tt extends K {
|
|
|
6220
6219
|
});
|
|
6221
6220
|
}
|
|
6222
6221
|
}
|
|
6223
|
-
class ot extends
|
|
6222
|
+
class ot extends C {
|
|
6224
6223
|
/**
|
|
6225
6224
|
* Class constructor
|
|
6226
6225
|
*
|
|
@@ -6327,7 +6326,7 @@ class Mt extends K {
|
|
|
6327
6326
|
* @param {KnishIOClient} knishIOClient
|
|
6328
6327
|
*/
|
|
6329
6328
|
constructor(e, t) {
|
|
6330
|
-
super(e, t), this.$__query =
|
|
6329
|
+
super(e, t), this.$__query = E`query ($metaTypes: [String!], $metaIds: [String!], $values: [String!], $keys: [String!], $latest: Boolean, $filter: [MetaFilter!], $queryArgs: QueryArgs, $countBy: String, $atomValues: [String!], $cellSlugs: [String!] ) {
|
|
6331
6330
|
MetaTypeViaAtom(
|
|
6332
6331
|
metaTypes: $metaTypes
|
|
6333
6332
|
metaIds: $metaIds
|
|
@@ -6434,7 +6433,7 @@ class Mt extends K {
|
|
|
6434
6433
|
});
|
|
6435
6434
|
}
|
|
6436
6435
|
}
|
|
6437
|
-
class ir extends
|
|
6436
|
+
class ir extends C {
|
|
6438
6437
|
/**
|
|
6439
6438
|
* Class constructor
|
|
6440
6439
|
*
|
|
@@ -6476,7 +6475,7 @@ class Ct extends K {
|
|
|
6476
6475
|
* @param {KnishIOClient} knishIOClient
|
|
6477
6476
|
*/
|
|
6478
6477
|
constructor(e, t) {
|
|
6479
|
-
super(e, t), this.$__query =
|
|
6478
|
+
super(e, t), this.$__query = E`query( $metaType: String, $metaId: String, $instances: [EmbeddingStatusInput!] ) {
|
|
6480
6479
|
embeddingStatus( metaType: $metaType, metaId: $metaId, instances: $instances ) {
|
|
6481
6480
|
metaType,
|
|
6482
6481
|
metaId,
|
|
@@ -6522,7 +6521,7 @@ class Ct extends K {
|
|
|
6522
6521
|
}
|
|
6523
6522
|
class or extends V {
|
|
6524
6523
|
}
|
|
6525
|
-
class ar extends
|
|
6524
|
+
class ar extends W {
|
|
6526
6525
|
/**
|
|
6527
6526
|
*
|
|
6528
6527
|
* @param {string} metaType
|
|
@@ -6556,7 +6555,7 @@ class ar extends q {
|
|
|
6556
6555
|
});
|
|
6557
6556
|
}
|
|
6558
6557
|
}
|
|
6559
|
-
class lr extends
|
|
6558
|
+
class lr extends W {
|
|
6560
6559
|
/**
|
|
6561
6560
|
* Fills the Molecule with provided wallet and amount data
|
|
6562
6561
|
*
|
|
@@ -6573,7 +6572,7 @@ class lr extends q {
|
|
|
6573
6572
|
}), this.$__molecule.sign({}), this.$__molecule.check(this.$__molecule.sourceWallet);
|
|
6574
6573
|
}
|
|
6575
6574
|
}
|
|
6576
|
-
class cr extends
|
|
6575
|
+
class cr extends W {
|
|
6577
6576
|
/**
|
|
6578
6577
|
*
|
|
6579
6578
|
* @param recipients
|
|
@@ -6673,24 +6672,24 @@ function Z(o, e) {
|
|
|
6673
6672
|
};
|
|
6674
6673
|
}
|
|
6675
6674
|
}
|
|
6676
|
-
var
|
|
6675
|
+
var q = { exclude: [], include: [], logging: !0 }, Jt = {}, ur = { timeout: "true" }, J = function(o, e) {
|
|
6677
6676
|
typeof window < "u" && (Jt[o] = e);
|
|
6678
6677
|
}, hr = function() {
|
|
6679
6678
|
return Object.fromEntries(Object.entries(Jt).filter((function(o) {
|
|
6680
6679
|
var e, t = o[0];
|
|
6681
|
-
return !(!((e =
|
|
6680
|
+
return !(!((e = q == null ? void 0 : q.exclude) === null || e === void 0) && e.includes(t));
|
|
6682
6681
|
})).filter((function(o) {
|
|
6683
6682
|
var e, t, n, s, r = o[0];
|
|
6684
|
-
return !((e =
|
|
6683
|
+
return !((e = q == null ? void 0 : q.include) === null || e === void 0) && e.some((function(i) {
|
|
6685
6684
|
return i.includes(".");
|
|
6686
|
-
})) ? (t =
|
|
6685
|
+
})) ? (t = q == null ? void 0 : q.include) === null || t === void 0 ? void 0 : t.some((function(i) {
|
|
6687
6686
|
return i.startsWith(r);
|
|
6688
|
-
})) : ((n =
|
|
6687
|
+
})) : ((n = q == null ? void 0 : q.include) === null || n === void 0 ? void 0 : n.length) === 0 || ((s = q == null ? void 0 : q.include) === null || s === void 0 ? void 0 : s.includes(r));
|
|
6689
6688
|
})).map((function(o) {
|
|
6690
6689
|
return [o[0], (0, o[1])()];
|
|
6691
6690
|
})));
|
|
6692
6691
|
};
|
|
6693
|
-
function
|
|
6692
|
+
function qe(o) {
|
|
6694
6693
|
return o ^= o >>> 16, o = Math.imul(o, 2246822507), o ^= o >>> 13, o = Math.imul(o, 3266489909), (o ^= o >>> 16) >>> 0;
|
|
6695
6694
|
}
|
|
6696
6695
|
var B = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
|
|
@@ -6741,7 +6740,7 @@ function at(o, e) {
|
|
|
6741
6740
|
u[0] = u[0] ^ l[0] << 0, u[0] = Math.imul(u[0], B[0]), u[0] = j(u[0], 15), u[0] = Math.imul(u[0], B[1]), i[0] = i[0] ^ u[0];
|
|
6742
6741
|
}
|
|
6743
6742
|
})(o, n), (function(r, i) {
|
|
6744
|
-
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] =
|
|
6743
|
+
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] = qe(i[0]), i[1] = qe(i[1]), i[2] = qe(i[2]), i[3] = qe(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;
|
|
6745
6744
|
})(o, n);
|
|
6746
6745
|
var s = new Uint8Array(n.buffer);
|
|
6747
6746
|
return Array.from(s).map((function(r) {
|
|
@@ -6770,13 +6769,13 @@ function Gt() {
|
|
|
6770
6769
|
return Z(this, (function(r) {
|
|
6771
6770
|
switch (r.label) {
|
|
6772
6771
|
case 0:
|
|
6773
|
-
return r.trys.push([0, 2, , 3]), o = hr(), e = Object.keys(o), [4, pr(Object.values(o), (
|
|
6772
|
+
return r.trys.push([0, 2, , 3]), o = hr(), e = Object.keys(o), [4, pr(Object.values(o), (q == null ? void 0 : q.timeout) || 1e3, ur)];
|
|
6774
6773
|
case 1:
|
|
6775
6774
|
return t = r.sent(), n = t.filter((function(i) {
|
|
6776
6775
|
return i !== void 0;
|
|
6777
6776
|
})), s = {}, n.forEach((function(i, a) {
|
|
6778
6777
|
s[e[a]] = i;
|
|
6779
|
-
})), [2, Xt(s,
|
|
6778
|
+
})), [2, Xt(s, q.exclude || [], q.include || [], "")];
|
|
6780
6779
|
case 2:
|
|
6781
6780
|
throw r.sent();
|
|
6782
6781
|
case 3:
|
|
@@ -6814,7 +6813,7 @@ function yr(o) {
|
|
|
6814
6813
|
case 0:
|
|
6815
6814
|
return n.trys.push([0, 2, , 3]), [4, Gt()];
|
|
6816
6815
|
case 1:
|
|
6817
|
-
return e = n.sent(), t = at(JSON.stringify(e)), Math.random() < 1e-3 &&
|
|
6816
|
+
return e = n.sent(), t = at(JSON.stringify(e)), Math.random() < 1e-3 && q.logging && (function(s, r) {
|
|
6818
6817
|
X(this, void 0, void 0, (function() {
|
|
6819
6818
|
var i, a;
|
|
6820
6819
|
return Z(this, (function(c) {
|
|
@@ -6906,12 +6905,12 @@ Te().name != "Firefox" && J("canvas", (function() {
|
|
|
6906
6905
|
o({ commonImageDataHash: at(Zt(e, Et, Ot).data.toString()).toString() });
|
|
6907
6906
|
}));
|
|
6908
6907
|
}));
|
|
6909
|
-
var tt, kr = ["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"],
|
|
6908
|
+
var tt, kr = ["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"], _r = ["monospace", "sans-serif", "serif"];
|
|
6910
6909
|
function Rt(o, e) {
|
|
6911
6910
|
if (!o) throw new Error("Canvas context not supported");
|
|
6912
6911
|
return o.font, o.font = "72px ".concat(e), o.measureText("WwMmLli0Oo").width;
|
|
6913
6912
|
}
|
|
6914
|
-
function
|
|
6913
|
+
function Sr() {
|
|
6915
6914
|
var o, e = document.createElement("canvas"), t = (o = e.getContext("webgl")) !== null && o !== void 0 ? o : e.getContext("experimental-webgl");
|
|
6916
6915
|
if (t && "getParameter" in t) try {
|
|
6917
6916
|
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() };
|
|
@@ -6999,7 +6998,7 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
6999
6998
|
return X(o, void 0, void 0, (function() {
|
|
7000
6999
|
var r, i, a, c;
|
|
7001
7000
|
return Z(this, (function(u) {
|
|
7002
|
-
return r = s.createElement("canvas"), i = r.getContext("2d"), a =
|
|
7001
|
+
return r = s.createElement("canvas"), i = r.getContext("2d"), a = _r.map((function(l) {
|
|
7003
7002
|
return Rt(i, l);
|
|
7004
7003
|
})), c = {}, kr.forEach((function(l) {
|
|
7005
7004
|
var h = Rt(i, l);
|
|
@@ -7015,7 +7014,7 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
7015
7014
|
})), J("hardware", (function() {
|
|
7016
7015
|
return new Promise((function(o, e) {
|
|
7017
7016
|
var t = navigator.deviceMemory !== void 0 ? navigator.deviceMemory : 0, n = window.performance && window.performance.memory ? window.performance.memory : 0;
|
|
7018
|
-
o({ videocard:
|
|
7017
|
+
o({ videocard: Sr(), architecture: $r(), deviceMemory: t.toString() || "undefined", jsHeapSizeLimit: n.jsHeapSizeLimit || 0 });
|
|
7019
7018
|
}));
|
|
7020
7019
|
})), J("locales", (function() {
|
|
7021
7020
|
return new Promise((function(o) {
|
|
@@ -7025,7 +7024,7 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
7025
7024
|
return X(this, void 0, void 0, (function() {
|
|
7026
7025
|
var o;
|
|
7027
7026
|
return Z(this, (function(e) {
|
|
7028
|
-
return tt = (
|
|
7027
|
+
return tt = (q == null ? void 0 : q.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], o = Array.from({ length: (q == null ? void 0 : q.retries) || 3 }, (function() {
|
|
7029
7028
|
return (function() {
|
|
7030
7029
|
return X(this, void 0, void 0, (function() {
|
|
7031
7030
|
var t, n, s, r, i;
|
|
@@ -7074,18 +7073,18 @@ Te().name != "Firefox" && J("fonts", (function() {
|
|
|
7074
7073
|
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: xr() });
|
|
7075
7074
|
}));
|
|
7076
7075
|
}));
|
|
7077
|
-
var N, Ir = Te().name !== "SamsungBrowser" ? 1 : 3,
|
|
7076
|
+
var N, Ir = Te().name !== "SamsungBrowser" ? 1 : 3, y = null;
|
|
7078
7077
|
J("webgl", (function() {
|
|
7079
7078
|
return X(this, void 0, void 0, (function() {
|
|
7080
7079
|
var o;
|
|
7081
7080
|
return Z(this, (function(e) {
|
|
7082
|
-
typeof document < "u" && ((N = document.createElement("canvas")).width = 200, N.height = 100,
|
|
7081
|
+
typeof document < "u" && ((N = document.createElement("canvas")).width = 200, N.height = 100, y = N.getContext("webgl"));
|
|
7083
7082
|
try {
|
|
7084
|
-
if (!
|
|
7083
|
+
if (!y) throw new Error("WebGL not supported");
|
|
7085
7084
|
return o = Array.from({ length: Ir }, (function() {
|
|
7086
7085
|
return (function() {
|
|
7087
7086
|
try {
|
|
7088
|
-
if (!
|
|
7087
|
+
if (!y) throw new Error("WebGL not supported");
|
|
7089
7088
|
var t = `
|
|
7090
7089
|
attribute vec2 position;
|
|
7091
7090
|
void main() {
|
|
@@ -7096,28 +7095,28 @@ J("webgl", (function() {
|
|
|
7096
7095
|
void main() {
|
|
7097
7096
|
gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
|
|
7098
7097
|
}
|
|
7099
|
-
`, s =
|
|
7098
|
+
`, s = y.createShader(y.VERTEX_SHADER), r = y.createShader(y.FRAGMENT_SHADER);
|
|
7100
7099
|
if (!s || !r) throw new Error("Failed to create shaders");
|
|
7101
|
-
if (
|
|
7102
|
-
if (
|
|
7103
|
-
var i =
|
|
7100
|
+
if (y.shaderSource(s, t), y.shaderSource(r, n), y.compileShader(s), !y.getShaderParameter(s, y.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + y.getShaderInfoLog(s));
|
|
7101
|
+
if (y.compileShader(r), !y.getShaderParameter(r, y.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + y.getShaderInfoLog(r));
|
|
7102
|
+
var i = y.createProgram();
|
|
7104
7103
|
if (!i) throw new Error("Failed to create shader program");
|
|
7105
|
-
if (
|
|
7106
|
-
|
|
7104
|
+
if (y.attachShader(i, s), y.attachShader(i, r), y.linkProgram(i), !y.getProgramParameter(i, y.LINK_STATUS)) throw new Error("Shader program linking failed: " + y.getProgramInfoLog(i));
|
|
7105
|
+
y.useProgram(i);
|
|
7107
7106
|
for (var a = 137, c = new Float32Array(4 * a), u = 2 * Math.PI / a, l = 0; l < a; l++) {
|
|
7108
7107
|
var h = l * u;
|
|
7109
7108
|
c[4 * l] = 0, c[4 * l + 1] = 0, c[4 * l + 2] = Math.cos(h) * (N.width / 2), c[4 * l + 3] = Math.sin(h) * (N.height / 2);
|
|
7110
7109
|
}
|
|
7111
|
-
var p =
|
|
7112
|
-
|
|
7113
|
-
var d =
|
|
7114
|
-
|
|
7110
|
+
var p = y.createBuffer();
|
|
7111
|
+
y.bindBuffer(y.ARRAY_BUFFER, p), y.bufferData(y.ARRAY_BUFFER, c, y.STATIC_DRAW);
|
|
7112
|
+
var d = y.getAttribLocation(i, "position");
|
|
7113
|
+
y.enableVertexAttribArray(d), y.vertexAttribPointer(d, 2, y.FLOAT, !1, 0, 0), y.viewport(0, 0, N.width, N.height), y.clearColor(0, 0, 0, 1), y.clear(y.COLOR_BUFFER_BIT), y.drawArrays(y.LINES, 0, 2 * a);
|
|
7115
7114
|
var b = new Uint8ClampedArray(N.width * N.height * 4);
|
|
7116
|
-
return
|
|
7115
|
+
return y.readPixels(0, 0, N.width, N.height, y.RGBA, y.UNSIGNED_BYTE, b), new ImageData(b, N.width, N.height);
|
|
7117
7116
|
} catch {
|
|
7118
7117
|
return new ImageData(1, 1);
|
|
7119
7118
|
} finally {
|
|
7120
|
-
|
|
7119
|
+
y && (y.bindBuffer(y.ARRAY_BUFFER, null), y.useProgram(null), y.viewport(0, 0, y.drawingBufferWidth, y.drawingBufferHeight), y.clearColor(0, 0, 0, 0));
|
|
7121
7120
|
}
|
|
7122
7121
|
})();
|
|
7123
7122
|
})), [2, { commonImageHash: at(Zt(o, N.width, N.height).data.toString()).toString() }];
|
|
@@ -7178,13 +7177,43 @@ class Tr {
|
|
|
7178
7177
|
encrypt: !!this.cipherLink
|
|
7179
7178
|
});
|
|
7180
7179
|
}
|
|
7180
|
+
/**
|
|
7181
|
+
* Builds the urql operation options forwarded with a query/mutation.
|
|
7182
|
+
*
|
|
7183
|
+
* Forwards the requestPolicy (so a long-lived client does not serve stale
|
|
7184
|
+
* cache-first reads) and, when the caller supplied a per-query abort signal,
|
|
7185
|
+
* the signal too — while re-supplying the X-Auth-Token header. urql REPLACES
|
|
7186
|
+
* (not merges) the client-level fetchOptions with any operation-context
|
|
7187
|
+
* fetchOptions (createRequestOperation builds the op context as
|
|
7188
|
+
* {...baseOpts, ...opts}), so forwarding fetchOptions WITHOUT the header would
|
|
7189
|
+
* drop X-Auth-Token and break auth. The header here is byte-identical to the
|
|
7190
|
+
* client-level one set in createUrqlClient.
|
|
7191
|
+
*
|
|
7192
|
+
* @param {object} context
|
|
7193
|
+
* @returns {object|undefined}
|
|
7194
|
+
*/
|
|
7195
|
+
buildRequestOptions(e) {
|
|
7196
|
+
if (!e)
|
|
7197
|
+
return;
|
|
7198
|
+
const t = {};
|
|
7199
|
+
e.requestPolicy && (t.requestPolicy = e.requestPolicy);
|
|
7200
|
+
const n = e.fetchOptions && e.fetchOptions.signal;
|
|
7201
|
+
if (n) {
|
|
7202
|
+
const s = typeof AbortSignal < "u" && typeof AbortSignal.any == "function" ? AbortSignal.any([n, AbortSignal.timeout(6e4)]) : n;
|
|
7203
|
+
t.fetchOptions = {
|
|
7204
|
+
headers: { "X-Auth-Token": this.$__authToken },
|
|
7205
|
+
signal: s
|
|
7206
|
+
};
|
|
7207
|
+
}
|
|
7208
|
+
return Object.keys(t).length ? t : void 0;
|
|
7209
|
+
}
|
|
7181
7210
|
async query(e) {
|
|
7182
|
-
const { query: t, variables: n } = e, s = await this.$__client.query(t, n).toPromise();
|
|
7183
|
-
return this.formatResponse(
|
|
7211
|
+
const { query: t, variables: n, context: s } = e, r = this.buildRequestOptions(s), i = await this.$__client.query(t, n || {}, r).toPromise();
|
|
7212
|
+
return this.formatResponse(i);
|
|
7184
7213
|
}
|
|
7185
7214
|
async mutate(e) {
|
|
7186
|
-
const { mutation: t, variables: n } = e, s = await this.$__client.mutation(t, n).toPromise();
|
|
7187
|
-
return this.formatResponse(
|
|
7215
|
+
const { mutation: t, variables: n, context: s } = e, r = this.buildRequestOptions(s), i = await this.$__client.mutation(t, n || {}, r).toPromise();
|
|
7216
|
+
return this.formatResponse(i);
|
|
7188
7217
|
}
|
|
7189
7218
|
subscribe(e, t) {
|
|
7190
7219
|
const { query: n, variables: s, operationName: r } = e, i = ln(
|
|
@@ -7260,7 +7289,7 @@ class Tr {
|
|
|
7260
7289
|
});
|
|
7261
7290
|
}
|
|
7262
7291
|
}
|
|
7263
|
-
class
|
|
7292
|
+
class Wr {
|
|
7264
7293
|
/**
|
|
7265
7294
|
* Class constructor
|
|
7266
7295
|
*
|
|
@@ -7277,7 +7306,8 @@ class qr {
|
|
|
7277
7306
|
client: n = null,
|
|
7278
7307
|
socket: s = null,
|
|
7279
7308
|
serverSdkVersion: r = 3,
|
|
7280
|
-
logging: i = !1
|
|
7309
|
+
logging: i = !1,
|
|
7310
|
+
defaultRequestPolicy: a = null
|
|
7281
7311
|
}) {
|
|
7282
7312
|
this.initialize({
|
|
7283
7313
|
uri: e,
|
|
@@ -7285,7 +7315,8 @@ class qr {
|
|
|
7285
7315
|
socket: s,
|
|
7286
7316
|
client: n,
|
|
7287
7317
|
serverSdkVersion: r,
|
|
7288
|
-
logging: i
|
|
7318
|
+
logging: i,
|
|
7319
|
+
defaultRequestPolicy: a
|
|
7289
7320
|
});
|
|
7290
7321
|
}
|
|
7291
7322
|
/**
|
|
@@ -7304,12 +7335,13 @@ class qr {
|
|
|
7304
7335
|
socket: n = null,
|
|
7305
7336
|
client: s = null,
|
|
7306
7337
|
serverSdkVersion: r = 3,
|
|
7307
|
-
logging: i = !1
|
|
7338
|
+
logging: i = !1,
|
|
7339
|
+
defaultRequestPolicy: a = null
|
|
7308
7340
|
}) {
|
|
7309
|
-
this.reset(), this.$__logging = i, this.$__authTokenObjects = {}, this.$__authInProcess = !1, this.abortControllers = /* @__PURE__ */ new Map(), this.setUri(e), t && this.setCellSlug(t);
|
|
7310
|
-
for (const
|
|
7311
|
-
const
|
|
7312
|
-
this.$__authTokenObjects[
|
|
7341
|
+
this.reset(), this.$__logging = i, this.$__defaultRequestPolicy = a, this.$__authTokenObjects = {}, this.$__authInProcess = !1, this.abortControllers = /* @__PURE__ */ new Map(), this.setUri(e), t && this.setCellSlug(t);
|
|
7342
|
+
for (const c in this.$__uris) {
|
|
7343
|
+
const u = this.$__uris[c];
|
|
7344
|
+
this.$__authTokenObjects[u] = null;
|
|
7313
7345
|
}
|
|
7314
7346
|
this.log("info", `KnishIOClient::initialize() - Initializing new Knish.IO client session for SDK version ${r}...`), this.$__client = s || new Tr({
|
|
7315
7347
|
socket: {
|
|
@@ -7361,11 +7393,28 @@ class qr {
|
|
|
7361
7393
|
getServerSdkVersion() {
|
|
7362
7394
|
return this.$__serverSdkVersion;
|
|
7363
7395
|
}
|
|
7396
|
+
/**
|
|
7397
|
+
* Returns the client-level default urql request policy (or null)
|
|
7398
|
+
*
|
|
7399
|
+
* @return {string|null}
|
|
7400
|
+
*/
|
|
7401
|
+
getDefaultRequestPolicy() {
|
|
7402
|
+
return this.$__defaultRequestPolicy || null;
|
|
7403
|
+
}
|
|
7404
|
+
/**
|
|
7405
|
+
* Sets the client-level default urql request policy applied to reads that
|
|
7406
|
+
* omit a per-call policy (e.g. 'network-only' for a long-lived server client)
|
|
7407
|
+
*
|
|
7408
|
+
* @param {string|null} policy - 'cache-first'|'cache-only'|'network-only'|'cache-and-network'|null
|
|
7409
|
+
*/
|
|
7410
|
+
setDefaultRequestPolicy(e) {
|
|
7411
|
+
this.$__defaultRequestPolicy = e;
|
|
7412
|
+
}
|
|
7364
7413
|
/**
|
|
7365
7414
|
* Reset common properties
|
|
7366
7415
|
*/
|
|
7367
7416
|
reset() {
|
|
7368
|
-
this.$__secret = "", this.$__bundle = "", this.remainderWallet = null, this.$__capabilityCache = {};
|
|
7417
|
+
this.$__secret = "", this.$__bundle = "", this.remainderWallet = null, this.$__capabilityCache = {}, this.$__defaultRequestPolicy = null;
|
|
7369
7418
|
}
|
|
7370
7419
|
/**
|
|
7371
7420
|
* Returns the currently defined Cell identifier for this session
|
|
@@ -7507,11 +7556,11 @@ class qr {
|
|
|
7507
7556
|
let e = (await this.queryContinuId({
|
|
7508
7557
|
bundle: this.getBundle()
|
|
7509
7558
|
})).payload();
|
|
7510
|
-
return e ? e.key =
|
|
7559
|
+
return e ? e.key = S.generateKey({
|
|
7511
7560
|
secret: this.getSecret(),
|
|
7512
7561
|
token: e.token,
|
|
7513
7562
|
position: e.position
|
|
7514
|
-
}) : e = new
|
|
7563
|
+
}) : e = new S({
|
|
7515
7564
|
secret: this.getSecret()
|
|
7516
7565
|
}), e;
|
|
7517
7566
|
}
|
|
@@ -7547,7 +7596,7 @@ class qr {
|
|
|
7547
7596
|
const i = await this.getSourceWallet();
|
|
7548
7597
|
r = i ? i.position : null;
|
|
7549
7598
|
}
|
|
7550
|
-
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 ||
|
|
7599
|
+
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 || S.create({
|
|
7551
7600
|
secret: e,
|
|
7552
7601
|
bundle: t,
|
|
7553
7602
|
token: "USER",
|
|
@@ -7592,7 +7641,7 @@ class qr {
|
|
|
7592
7641
|
}) {
|
|
7593
7642
|
this.log("info", `KnishIOClient::createMoleculeQuery() - Creating a new ${e.name} query...`);
|
|
7594
7643
|
const n = t || await this.createMolecule({}), s = new e(this.client(), this, n);
|
|
7595
|
-
if (!(s instanceof
|
|
7644
|
+
if (!(s instanceof W))
|
|
7596
7645
|
throw new ee(`${this.constructor.name}::createMoleculeMutation() - This method only accepts MutationProposeMolecule!`);
|
|
7597
7646
|
return this.lastMoleculeQuery = s, s;
|
|
7598
7647
|
}
|
|
@@ -7602,32 +7651,35 @@ class qr {
|
|
|
7602
7651
|
* @param variables
|
|
7603
7652
|
* @returns {Promise<*>}
|
|
7604
7653
|
*/
|
|
7605
|
-
async executeQuery(e, t = null) {
|
|
7654
|
+
async executeQuery(e, t = null, n = {}) {
|
|
7606
7655
|
this.$__authToken && this.$__authToken.isExpired() && !this.$__authInProcess && (this.log("info", "KnishIOClient::executeQuery() - Access token is expired. Getting new one..."), await this.requestAuthToken({
|
|
7607
7656
|
secret: this.$__secret,
|
|
7608
7657
|
cellSlug: this.$__cellSlug,
|
|
7609
7658
|
encrypt: this.$__encrypt
|
|
7610
7659
|
}));
|
|
7611
|
-
const
|
|
7660
|
+
const s = new AbortController(), r = JSON.stringify({
|
|
7612
7661
|
query: e.$__query,
|
|
7613
7662
|
variables: t
|
|
7614
7663
|
});
|
|
7615
|
-
this.abortControllers.set(
|
|
7664
|
+
this.abortControllers.set(r, s);
|
|
7616
7665
|
try {
|
|
7617
|
-
const
|
|
7666
|
+
const i = { ...n };
|
|
7667
|
+
this.$__defaultRequestPolicy && !i.requestPolicy && (i.requestPolicy = this.$__defaultRequestPolicy);
|
|
7668
|
+
const a = await e.execute({
|
|
7618
7669
|
variables: t,
|
|
7619
7670
|
context: {
|
|
7620
7671
|
fetchOptions: {
|
|
7621
|
-
signal:
|
|
7622
|
-
}
|
|
7672
|
+
signal: s.signal
|
|
7673
|
+
},
|
|
7674
|
+
...i
|
|
7623
7675
|
}
|
|
7624
7676
|
});
|
|
7625
|
-
return this.abortControllers.delete(
|
|
7626
|
-
} catch (
|
|
7627
|
-
if (
|
|
7677
|
+
return this.abortControllers.delete(r), a;
|
|
7678
|
+
} catch (i) {
|
|
7679
|
+
if (i.name === "AbortError")
|
|
7628
7680
|
this.log("warn", "Query was cancelled");
|
|
7629
7681
|
else
|
|
7630
|
-
throw
|
|
7682
|
+
throw i;
|
|
7631
7683
|
}
|
|
7632
7684
|
}
|
|
7633
7685
|
cancelQuery(e, t = null) {
|
|
@@ -7808,11 +7860,12 @@ class qr {
|
|
|
7808
7860
|
throughMolecule: p = !1,
|
|
7809
7861
|
values: d = null,
|
|
7810
7862
|
keys: b = null,
|
|
7811
|
-
atomValues: A = null
|
|
7863
|
+
atomValues: A = null,
|
|
7864
|
+
requestPolicy: O = null
|
|
7812
7865
|
}) {
|
|
7813
7866
|
this.log("info", `KnishIOClient::queryMeta() - Querying metaType: ${e}, metaId: ${t}...`);
|
|
7814
|
-
let
|
|
7815
|
-
return p ? (
|
|
7867
|
+
let f, m;
|
|
7868
|
+
return p ? (f = this.createQuery(Mt), m = Mt.createVariables({
|
|
7816
7869
|
metaType: e,
|
|
7817
7870
|
metaId: t,
|
|
7818
7871
|
key: n,
|
|
@@ -7825,7 +7878,7 @@ class qr {
|
|
|
7825
7878
|
keys: b,
|
|
7826
7879
|
atomValues: A,
|
|
7827
7880
|
cellSlug: this.getCellSlug()
|
|
7828
|
-
})) : h ? (
|
|
7881
|
+
})) : h ? (f = this.createQuery(Tt), m = Tt.createVariables({
|
|
7829
7882
|
metaType: e,
|
|
7830
7883
|
metaId: t,
|
|
7831
7884
|
key: n,
|
|
@@ -7838,7 +7891,7 @@ class qr {
|
|
|
7838
7891
|
keys: b,
|
|
7839
7892
|
atomValues: A,
|
|
7840
7893
|
cellSlug: this.getCellSlug()
|
|
7841
|
-
})) : (
|
|
7894
|
+
})) : (f = this.createQuery(At), m = At.createVariables({
|
|
7842
7895
|
metaType: e,
|
|
7843
7896
|
metaId: t,
|
|
7844
7897
|
key: n,
|
|
@@ -7849,7 +7902,7 @@ class qr {
|
|
|
7849
7902
|
count: u,
|
|
7850
7903
|
countBy: l,
|
|
7851
7904
|
cellSlug: this.getCellSlug()
|
|
7852
|
-
})), this.executeQuery(
|
|
7905
|
+
})), this.executeQuery(f, m, O ? { requestPolicy: O } : {});
|
|
7853
7906
|
}
|
|
7854
7907
|
/**
|
|
7855
7908
|
* Queries meta assets and verifies cryptographic integrity of associated molecules.
|
|
@@ -7992,16 +8045,16 @@ class qr {
|
|
|
7992
8045
|
cellSlugs: d,
|
|
7993
8046
|
cellSlug: b,
|
|
7994
8047
|
batchIds: A,
|
|
7995
|
-
batchId:
|
|
8048
|
+
batchId: O,
|
|
7996
8049
|
values: f,
|
|
7997
|
-
value:
|
|
8050
|
+
value: m,
|
|
7998
8051
|
metaTypes: w,
|
|
7999
|
-
metaType:
|
|
8052
|
+
metaType: M,
|
|
8000
8053
|
metaIds: k,
|
|
8001
8054
|
metaId: $,
|
|
8002
8055
|
indexes: v,
|
|
8003
8056
|
index: I,
|
|
8004
|
-
filter:
|
|
8057
|
+
filter: _,
|
|
8005
8058
|
latest: U,
|
|
8006
8059
|
queryArgs: R = {
|
|
8007
8060
|
limit: 15,
|
|
@@ -8026,16 +8079,16 @@ class qr {
|
|
|
8026
8079
|
cellSlugs: d,
|
|
8027
8080
|
cellSlug: b,
|
|
8028
8081
|
batchIds: A,
|
|
8029
|
-
batchId:
|
|
8082
|
+
batchId: O,
|
|
8030
8083
|
values: f,
|
|
8031
|
-
value:
|
|
8084
|
+
value: m,
|
|
8032
8085
|
metaTypes: w,
|
|
8033
|
-
metaType:
|
|
8086
|
+
metaType: M,
|
|
8034
8087
|
metaIds: k,
|
|
8035
8088
|
metaId: $,
|
|
8036
8089
|
indexes: v,
|
|
8037
8090
|
index: I,
|
|
8038
|
-
filter:
|
|
8091
|
+
filter: _,
|
|
8039
8092
|
latest: U,
|
|
8040
8093
|
queryArgs: R
|
|
8041
8094
|
}));
|
|
@@ -8049,7 +8102,7 @@ class qr {
|
|
|
8049
8102
|
async createWallet({
|
|
8050
8103
|
token: e
|
|
8051
8104
|
}) {
|
|
8052
|
-
const t = new
|
|
8105
|
+
const t = new S({
|
|
8053
8106
|
secret: this.getSecret(),
|
|
8054
8107
|
token: e
|
|
8055
8108
|
}), n = await this.createMoleculeMutation({
|
|
@@ -8188,13 +8241,13 @@ class qr {
|
|
|
8188
8241
|
throw new Re();
|
|
8189
8242
|
t = r.length, n.splittable = 1, n.decimals = 0, n.tokenUnits = JSON.stringify(r);
|
|
8190
8243
|
}
|
|
8191
|
-
const a = new
|
|
8244
|
+
const a = new S({
|
|
8192
8245
|
secret: this.getSecret(),
|
|
8193
8246
|
bundle: this.getBundle(),
|
|
8194
8247
|
token: e,
|
|
8195
8248
|
batchId: s
|
|
8196
8249
|
}), c = await this.createMoleculeMutation({
|
|
8197
|
-
mutationClass:
|
|
8250
|
+
mutationClass: Ss
|
|
8198
8251
|
});
|
|
8199
8252
|
return c.fillMolecule({
|
|
8200
8253
|
recipientWallet: a,
|
|
@@ -8272,7 +8325,7 @@ class qr {
|
|
|
8272
8325
|
host: e
|
|
8273
8326
|
}) {
|
|
8274
8327
|
const t = await this.createMoleculeMutation({
|
|
8275
|
-
mutationClass:
|
|
8328
|
+
mutationClass: qs,
|
|
8276
8329
|
molecule: await this.createMolecule({
|
|
8277
8330
|
secret: this.getSecret()
|
|
8278
8331
|
})
|
|
@@ -8373,7 +8426,7 @@ class qr {
|
|
|
8373
8426
|
bundle: this.getBundle()
|
|
8374
8427
|
}), s.check();
|
|
8375
8428
|
const r = await this.createMoleculeMutation({
|
|
8376
|
-
mutationClass:
|
|
8429
|
+
mutationClass: W,
|
|
8377
8430
|
molecule: s
|
|
8378
8431
|
});
|
|
8379
8432
|
return await this.executeQuery(r);
|
|
@@ -8487,10 +8540,10 @@ class qr {
|
|
|
8487
8540
|
throw new Re();
|
|
8488
8541
|
n = s.length, r.tokenUnits = JSON.stringify(s);
|
|
8489
8542
|
}
|
|
8490
|
-
t ? (Object.prototype.toString.call(t) === "[object String]" && (
|
|
8543
|
+
t ? (Object.prototype.toString.call(t) === "[object String]" && (S.isBundleHash(t) ? (a = "walletBundle", c = t) : t = S.create({
|
|
8491
8544
|
secret: t,
|
|
8492
8545
|
token: e
|
|
8493
|
-
})), t instanceof
|
|
8546
|
+
})), t instanceof S && (a = "wallet", r.position = t.position, r.bundle = t.bundle, c = t.address)) : (a = "walletBundle", c = this.getBundle());
|
|
8494
8547
|
const p = await this.createMoleculeMutation({
|
|
8495
8548
|
mutationClass: As
|
|
8496
8549
|
});
|
|
@@ -8586,7 +8639,7 @@ class qr {
|
|
|
8586
8639
|
amount: n
|
|
8587
8640
|
})), i === null || de.cmp(i.balance, n) < 0)
|
|
8588
8641
|
throw new Y();
|
|
8589
|
-
const a =
|
|
8642
|
+
const a = S.create({
|
|
8590
8643
|
bundle: e,
|
|
8591
8644
|
token: t
|
|
8592
8645
|
});
|
|
@@ -8713,7 +8766,7 @@ class qr {
|
|
|
8713
8766
|
bundle: this.getBundle()
|
|
8714
8767
|
}), i.check(s);
|
|
8715
8768
|
const a = await this.createMoleculeMutation({
|
|
8716
|
-
mutationClass:
|
|
8769
|
+
mutationClass: W,
|
|
8717
8770
|
molecule: i
|
|
8718
8771
|
});
|
|
8719
8772
|
return this.executeQuery(a);
|
|
@@ -8746,7 +8799,7 @@ class qr {
|
|
|
8746
8799
|
bundle: this.getBundle()
|
|
8747
8800
|
}), i.check();
|
|
8748
8801
|
const a = await this.createMoleculeMutation({
|
|
8749
|
-
mutationClass:
|
|
8802
|
+
mutationClass: W,
|
|
8750
8803
|
molecule: i
|
|
8751
8804
|
});
|
|
8752
8805
|
return this.executeQuery(a);
|
|
@@ -8780,7 +8833,7 @@ class qr {
|
|
|
8780
8833
|
if (!i.includes(h))
|
|
8781
8834
|
throw new Y(`Fused token unit ID = ${h} does not found in the source wallet.`);
|
|
8782
8835
|
});
|
|
8783
|
-
const a =
|
|
8836
|
+
const a = S.create({
|
|
8784
8837
|
bundle: e,
|
|
8785
8838
|
token: t
|
|
8786
8839
|
});
|
|
@@ -8795,7 +8848,7 @@ class qr {
|
|
|
8795
8848
|
bundle: this.getBundle()
|
|
8796
8849
|
}), u.check();
|
|
8797
8850
|
const l = await this.createMoleculeMutation({
|
|
8798
|
-
mutationClass:
|
|
8851
|
+
mutationClass: W,
|
|
8799
8852
|
molecule: u
|
|
8800
8853
|
});
|
|
8801
8854
|
return this.executeQuery(l);
|
|
@@ -8812,7 +8865,7 @@ class qr {
|
|
|
8812
8865
|
encrypt: t
|
|
8813
8866
|
}) {
|
|
8814
8867
|
this.setCellSlug(e);
|
|
8815
|
-
const n = new
|
|
8868
|
+
const n = new S({
|
|
8816
8869
|
secret: nt(await this.getFingerprint()),
|
|
8817
8870
|
token: "AUTH"
|
|
8818
8871
|
}), s = await this.createQuery(Fs), r = {
|
|
@@ -8844,7 +8897,7 @@ class qr {
|
|
|
8844
8897
|
encrypt: t
|
|
8845
8898
|
}) {
|
|
8846
8899
|
this.setSecret(e);
|
|
8847
|
-
const n = new
|
|
8900
|
+
const n = new S({
|
|
8848
8901
|
secret: e,
|
|
8849
8902
|
token: "AUTH"
|
|
8850
8903
|
}), s = await this.createMolecule({
|
|
@@ -8937,7 +8990,7 @@ class qr {
|
|
|
8937
8990
|
}
|
|
8938
8991
|
}
|
|
8939
8992
|
}
|
|
8940
|
-
class Ur extends
|
|
8993
|
+
class Ur extends C {
|
|
8941
8994
|
/**
|
|
8942
8995
|
* Class constructor
|
|
8943
8996
|
*
|
|
@@ -9020,7 +9073,7 @@ export {
|
|
|
9020
9073
|
de as Decimal,
|
|
9021
9074
|
T as Dot,
|
|
9022
9075
|
te as InvalidResponseException,
|
|
9023
|
-
|
|
9076
|
+
Wr as KnishIOClient,
|
|
9024
9077
|
pe as Meta,
|
|
9025
9078
|
H as MetaMissingException,
|
|
9026
9079
|
os as MolecularHashMismatchException,
|
|
@@ -9033,12 +9086,12 @@ export {
|
|
|
9033
9086
|
Ts as MutationCreateIdentifier,
|
|
9034
9087
|
Os as MutationCreateMeta,
|
|
9035
9088
|
ar as MutationCreateRule,
|
|
9036
|
-
|
|
9089
|
+
Ss as MutationCreateToken,
|
|
9037
9090
|
Ks as MutationCreateWallet,
|
|
9038
9091
|
lr as MutationDepositBufferToken,
|
|
9039
9092
|
Hs as MutationLinkIdentifier,
|
|
9040
|
-
|
|
9041
|
-
|
|
9093
|
+
qs as MutationPeering,
|
|
9094
|
+
W as MutationProposeMolecule,
|
|
9042
9095
|
ks as MutationRequestAuthorization,
|
|
9043
9096
|
Fs as MutationRequestAuthorizationGuest,
|
|
9044
9097
|
As as MutationRequestTokens,
|
|
@@ -9063,9 +9116,9 @@ export {
|
|
|
9063
9116
|
Ys as QueryUserActivity,
|
|
9064
9117
|
ps as QueryWalletBundle,
|
|
9065
9118
|
fs as QueryWalletList,
|
|
9066
|
-
|
|
9119
|
+
C as Response,
|
|
9067
9120
|
zs as ResponseActiveSession,
|
|
9068
|
-
|
|
9121
|
+
Ws as ResponseAppendRequest,
|
|
9069
9122
|
tr as ResponseAtom,
|
|
9070
9123
|
Ur as ResponseAuthorizationGuest,
|
|
9071
9124
|
ms as ResponseBalance,
|
|
@@ -9074,7 +9127,7 @@ export {
|
|
|
9074
9127
|
Is as ResponseCreateIdentifier,
|
|
9075
9128
|
Es as ResponseCreateMeta,
|
|
9076
9129
|
or as ResponseCreateRule,
|
|
9077
|
-
|
|
9130
|
+
_s as ResponseCreateToken,
|
|
9078
9131
|
Ps as ResponseCreateWallet,
|
|
9079
9132
|
ir as ResponseEmbeddingStatus,
|
|
9080
9133
|
Bs as ResponseLinkIdentifier,
|
|
@@ -9098,13 +9151,13 @@ export {
|
|
|
9098
9151
|
Ls as StackableUnitDecimalsException,
|
|
9099
9152
|
me as TokenUnit,
|
|
9100
9153
|
Y as TransferBalanceException,
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9154
|
+
_e as TransferMalformedException,
|
|
9155
|
+
_t as TransferMismatchedException,
|
|
9156
|
+
St as TransferRemainderException,
|
|
9104
9157
|
cs as TransferToSelfException,
|
|
9105
9158
|
Oe as TransferUnbalancedException,
|
|
9106
9159
|
Ke as UnauthenticatedException,
|
|
9107
|
-
|
|
9160
|
+
S as Wallet,
|
|
9108
9161
|
vt as WalletShadowException,
|
|
9109
9162
|
re as WrongTokenTypeException,
|
|
9110
9163
|
mn as base64ToHex,
|