@0xpolygonid/js-sdk 1.21.1 → 1.21.3
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/browser/esm/index.js +36 -8
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +36 -8
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/proof/provers/inputs-generator.js +2 -1
- package/dist/node/cjs/storage/filters/jsonQuery.js +5 -3
- package/dist/node/esm/proof/provers/inputs-generator.js +2 -1
- package/dist/node/esm/storage/filters/jsonQuery.js +5 -3
- package/package.json +1 -1
|
@@ -7040,6 +7040,8 @@ function genBech32(encoding) {
|
|
|
7040
7040
|
function encode(prefix, words, limit = 90) {
|
|
7041
7041
|
if (typeof prefix !== 'string')
|
|
7042
7042
|
throw new Error(`bech32.encode prefix should be string, not ${typeof prefix}`);
|
|
7043
|
+
if (words instanceof Uint8Array)
|
|
7044
|
+
words = Array.from(words);
|
|
7043
7045
|
if (!Array.isArray(words) || (words.length && typeof words[0] !== 'number'))
|
|
7044
7046
|
throw new Error(`bech32.encode words should be array of numbers, not ${typeof words}`);
|
|
7045
7047
|
if (prefix.length === 0)
|
|
@@ -7078,7 +7080,19 @@ function genBech32(encoding) {
|
|
|
7078
7080
|
const { prefix, words } = decode(str, false);
|
|
7079
7081
|
return { prefix, words, bytes: fromWords(words) };
|
|
7080
7082
|
}
|
|
7081
|
-
|
|
7083
|
+
function encodeFromBytes(prefix, bytes) {
|
|
7084
|
+
return encode(prefix, toWords(bytes));
|
|
7085
|
+
}
|
|
7086
|
+
return {
|
|
7087
|
+
encode,
|
|
7088
|
+
decode,
|
|
7089
|
+
encodeFromBytes,
|
|
7090
|
+
decodeToBytes,
|
|
7091
|
+
decodeUnsafe,
|
|
7092
|
+
fromWords,
|
|
7093
|
+
fromWordsUnsafe,
|
|
7094
|
+
toWords,
|
|
7095
|
+
};
|
|
7082
7096
|
}
|
|
7083
7097
|
const bech32 = /* @__PURE__ */ genBech32('bech32');
|
|
7084
7098
|
|
|
@@ -30280,7 +30294,7 @@ const cacheLoader = (opts) => {
|
|
|
30280
30294
|
/**
|
|
30281
30295
|
* The current version of Ethers.
|
|
30282
30296
|
*/
|
|
30283
|
-
const version = "6.13.
|
|
30297
|
+
const version = "6.13.4";
|
|
30284
30298
|
|
|
30285
30299
|
/**
|
|
30286
30300
|
* Property helper functions.
|
|
@@ -46683,7 +46697,18 @@ class AbstractProvider {
|
|
|
46683
46697
|
}
|
|
46684
46698
|
this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls });
|
|
46685
46699
|
let errorMessage = "unknown error";
|
|
46686
|
-
|
|
46700
|
+
// Fetch the resource...
|
|
46701
|
+
let resp;
|
|
46702
|
+
try {
|
|
46703
|
+
resp = await request.send();
|
|
46704
|
+
}
|
|
46705
|
+
catch (error) {
|
|
46706
|
+
// ...low-level fetch error (missing host, bad SSL, etc.),
|
|
46707
|
+
// so try next URL
|
|
46708
|
+
errorMessages.push(error.message);
|
|
46709
|
+
this.emit("debug", { action: "receiveCcipReadFetchError", request, result: { error } });
|
|
46710
|
+
continue;
|
|
46711
|
+
}
|
|
46687
46712
|
try {
|
|
46688
46713
|
const result = resp.bodyJson;
|
|
46689
46714
|
if (result.data) {
|
|
@@ -48279,7 +48304,7 @@ class JsonRpcSigner extends AbstractSigner {
|
|
|
48279
48304
|
// If the network changed: calling again will also fail
|
|
48280
48305
|
// If unsupported: likely destroyed
|
|
48281
48306
|
if (isError(error, "CANCELLED") || isError(error, "BAD_DATA") ||
|
|
48282
|
-
isError(error, "NETWORK_ERROR")) {
|
|
48307
|
+
isError(error, "NETWORK_ERROR") || isError(error, "UNSUPPORTED_OPERATION")) {
|
|
48283
48308
|
if (error.info == null) {
|
|
48284
48309
|
error.info = {};
|
|
48285
48310
|
}
|
|
@@ -54188,10 +54213,12 @@ const betweenOperator = (a, b) => {
|
|
|
54188
54213
|
if (!Array.isArray(b) || b.length !== 2) {
|
|
54189
54214
|
throw new Error('$between/$nonbetween operator value should be 2 elements array');
|
|
54190
54215
|
}
|
|
54216
|
+
const [min, max] = b.map(BigInt);
|
|
54217
|
+
const predicate = (val) => val >= min && val <= max;
|
|
54191
54218
|
if (Array.isArray(a)) {
|
|
54192
|
-
return a.every(
|
|
54219
|
+
return a.map(BigInt).every(predicate);
|
|
54193
54220
|
}
|
|
54194
|
-
return a
|
|
54221
|
+
return predicate(BigInt(a));
|
|
54195
54222
|
};
|
|
54196
54223
|
const comparatorOptions = {
|
|
54197
54224
|
$noop: () => true,
|
|
@@ -54201,7 +54228,7 @@ const comparatorOptions = {
|
|
|
54201
54228
|
$in: (a, b) => inOperator(a, b),
|
|
54202
54229
|
$nin: (a, b) => !inOperator(a, b),
|
|
54203
54230
|
$gt: (a, b) => greaterThan(a, b),
|
|
54204
|
-
$lt: (a, b) => !
|
|
54231
|
+
$lt: (a, b) => !greaterThanOrEqual(a, b),
|
|
54205
54232
|
$ne: (a, b) => !equalsComparator(a, b),
|
|
54206
54233
|
$gte: (a, b) => greaterThanOrEqual(a, b),
|
|
54207
54234
|
$lte: (a, b) => lessThanOrEqual(a, b),
|
|
@@ -58531,7 +58558,8 @@ const v2Operations = [
|
|
|
58531
58558
|
Operators.GT,
|
|
58532
58559
|
Operators.IN,
|
|
58533
58560
|
Operators.NIN,
|
|
58534
|
-
Operators.NE
|
|
58561
|
+
Operators.NE,
|
|
58562
|
+
Operators.SD
|
|
58535
58563
|
];
|
|
58536
58564
|
const v2OnChainOperations = [
|
|
58537
58565
|
Operators.EQ,
|