Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Commit 8d747b3

Browse files
author
Nikolas Haimerl
committed
merged with main
2 parents 1f35d65 + cb0d03a commit 8d747b3

File tree

2 files changed

+68
-67
lines changed

2 files changed

+68
-67
lines changed

deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export {
1414
getIndexProviderPeerId,
1515
MINER_TO_PEERID_CONTRACT_ADDRESS,
1616
MINER_TO_PEERID_CONTRACT_ABI,
17-
} from 'https://cdn.jsdelivr.net/npm/index-provider-peer-id@1.0.0/index.js/+esm'
17+
} from 'https://cdn.jsdelivr.net/npm/index-provider-peer-id@1.0.1/index.js/+esm'
1818
export { ethers } from 'https://cdn.jsdelivr.net/npm/ethers@6.13.5/dist/ethers.min.js'
1919

2020
export {

vendor/deno-deps.js

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,31 +3387,31 @@ function u1() {
33873387
for(var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = 0; r < 64; ++r)e3[r] = t[r], n1[t.charCodeAt(r)] = r;
33883388
n1["-".charCodeAt(0)] = 62, n1["_".charCodeAt(0)] = 63;
33893389
}
3390-
function f(t, r, n) {
3391-
for(var o, i, u = [], f = r; f < n; f += 3)o = (t[f] << 16) + (t[f + 1] << 8) + t[f + 2], u.push(e3[(i = o) >> 18 & 63] + e3[i >> 12 & 63] + e3[i >> 6 & 63] + e3[63 & i]);
3390+
function a(t, r, n) {
3391+
for(var o, i, u = [], a = r; a < n; a += 3)o = (t[a] << 16) + (t[a + 1] << 8) + t[a + 2], u.push(e3[(i = o) >> 18 & 63] + e3[i >> 12 & 63] + e3[i >> 6 & 63] + e3[63 & i]);
33923392
return u.join("");
33933393
}
3394-
function a(t) {
3394+
function f(t) {
33953395
var r;
33963396
i1 || u1();
3397-
for(var n = t.length, o = n % 3, a = "", s = [], c = 16383, h = 0, l = n - o; h < l; h += c)s.push(f(t, h, h + c > l ? l : h + c));
3398-
return 1 === o ? (r = t[n - 1], a += e3[r >> 2], a += e3[r << 4 & 63], a += "==") : 2 === o && (r = (t[n - 2] << 8) + t[n - 1], a += e3[r >> 10], a += e3[r >> 4 & 63], a += e3[r << 2 & 63], a += "="), s.push(a), s.join("");
3397+
for(var n = t.length, o = n % 3, f = "", s = [], c = 16383, h = 0, l = n - o; h < l; h += c)s.push(a(t, h, h + c > l ? l : h + c));
3398+
return 1 === o ? (r = t[n - 1], f += e3[r >> 2], f += e3[r << 4 & 63], f += "==") : 2 === o && (r = (t[n - 2] << 8) + t[n - 1], f += e3[r >> 10], f += e3[r >> 4 & 63], f += e3[r << 2 & 63], f += "="), s.push(f), s.join("");
33993399
}
34003400
function s2(t, r, e, n, o) {
3401-
var i, u, f = 8 * o - n - 1, a = (1 << f) - 1, s = a >> 1, c = -7, h = e ? o - 1 : 0, l = e ? -1 : 1, p = t[r + h];
3402-
for(h += l, i = p & (1 << -c) - 1, p >>= -c, c += f; c > 0; i = 256 * i + t[r + h], h += l, c -= 8);
3401+
var i, u, a = 8 * o - n - 1, f = (1 << a) - 1, s = f >> 1, c = -7, h = e ? o - 1 : 0, l = e ? -1 : 1, p = t[r + h];
3402+
for(h += l, i = p & (1 << -c) - 1, p >>= -c, c += a; c > 0; i = 256 * i + t[r + h], h += l, c -= 8);
34033403
for(u = i & (1 << -c) - 1, i >>= -c, c += n; c > 0; u = 256 * u + t[r + h], h += l, c -= 8);
34043404
if (0 === i) i = 1 - s;
34053405
else {
3406-
if (i === a) return u ? NaN : 1 / 0 * (p ? -1 : 1);
3406+
if (i === f) return u ? NaN : 1 / 0 * (p ? -1 : 1);
34073407
u += Math.pow(2, n), i -= s;
34083408
}
34093409
return (p ? -1 : 1) * u * Math.pow(2, i - n);
34103410
}
34113411
function c(t, r, e, n, o, i) {
3412-
var u, f, a, s = 8 * i - o - 1, c = (1 << s) - 1, h = c >> 1, l = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : i - 1, g = n ? 1 : -1, y = r < 0 || 0 === r && 1 / r < 0 ? 1 : 0;
3413-
for(r = Math.abs(r), isNaN(r) || r === 1 / 0 ? (f = isNaN(r) ? 1 : 0, u = c) : (u = Math.floor(Math.log(r) / Math.LN2), r * (a = Math.pow(2, -u)) < 1 && (u--, a *= 2), (r += u + h >= 1 ? l / a : l * Math.pow(2, 1 - h)) * a >= 2 && (u++, a /= 2), u + h >= c ? (f = 0, u = c) : u + h >= 1 ? (f = (r * a - 1) * Math.pow(2, o), u += h) : (f = r * Math.pow(2, h - 1) * Math.pow(2, o), u = 0)); o >= 8; t[e + p] = 255 & f, p += g, f /= 256, o -= 8);
3414-
for(u = u << o | f, s += o; s > 0; t[e + p] = 255 & u, p += g, u /= 256, s -= 8);
3412+
var u, a, f, s = 8 * i - o - 1, c = (1 << s) - 1, h = c >> 1, l = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : i - 1, g = n ? 1 : -1, y = r < 0 || 0 === r && 1 / r < 0 ? 1 : 0;
3413+
for(r = Math.abs(r), isNaN(r) || r === 1 / 0 ? (a = isNaN(r) ? 1 : 0, u = c) : (u = Math.floor(Math.log(r) / Math.LN2), r * (f = Math.pow(2, -u)) < 1 && (u--, f *= 2), (r += u + h >= 1 ? l / f : l * Math.pow(2, 1 - h)) * f >= 2 && (u++, f /= 2), u + h >= c ? (a = 0, u = c) : u + h >= 1 ? (a = (r * f - 1) * Math.pow(2, o), u += h) : (a = r * Math.pow(2, h - 1) * Math.pow(2, o), u = 0)); o >= 8; t[e + p] = 255 & a, p += g, a /= 256, o -= 8);
3414+
for(u = u << o | a, s += o; s > 0; t[e + p] = 255 & u, p += g, u /= 256, s -= 8);
34153415
t[e + p - g] |= 128 * y;
34163416
}
34173417
var h = {}.toString, l = Array.isArray || function(t) {
@@ -3559,21 +3559,21 @@ function _(t, r, e, n, o) {
35593559
throw new TypeError("val must be string, number or Buffer");
35603560
}
35613561
function S(t, r, e, n, o) {
3562-
var i, u = 1, f = t.length, a = r.length;
3562+
var i, u = 1, a = t.length, f = r.length;
35633563
if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
35643564
if (t.length < 2 || r.length < 2) return -1;
3565-
u = 2, f /= 2, a /= 2, e /= 2;
3565+
u = 2, a /= 2, f /= 2, e /= 2;
35663566
}
35673567
function s(t, r) {
35683568
return 1 === u ? t[r] : t.readUInt16BE(r * u);
35693569
}
35703570
if (o) {
35713571
var c = -1;
3572-
for(i = e; i < f; i++)if (s(t, i) === s(r, -1 === c ? 0 : i - c)) {
3573-
if (-1 === c && (c = i), i - c + 1 === a) return c * u;
3572+
for(i = e; i < a; i++)if (s(t, i) === s(r, -1 === c ? 0 : i - c)) {
3573+
if (-1 === c && (c = i), i - c + 1 === f) return c * u;
35743574
} else -1 !== c && (i -= i - c), c = -1;
3575-
} else for(e + a > f && (e = f - a), i = e; i >= 0; i--){
3576-
for(var h = !0, l = 0; l < a; l++)if (s(t, i + l) !== s(r, l)) {
3575+
} else for(e + f > a && (e = a - f), i = e; i >= 0; i--){
3576+
for(var h = !0, l = 0; l < f; l++)if (s(t, i + l) !== s(r, l)) {
35773577
h = !1;
35783578
break;
35793579
}
@@ -3589,9 +3589,9 @@ function T(t, r, e, n) {
35893589
if (i % 2 != 0) throw new TypeError("Invalid hex string");
35903590
n > i / 2 && (n = i / 2);
35913591
for(var u = 0; u < n; ++u){
3592-
var f = parseInt(r.substr(2 * u, 2), 16);
3593-
if (isNaN(f)) return u;
3594-
t[e + u] = f;
3592+
var a = parseInt(r.substr(2 * u, 2), 16);
3593+
if (isNaN(a)) return u;
3594+
t[e + u] = a;
35953595
}
35963596
return u;
35973597
}
@@ -3617,24 +3617,24 @@ function B(t, r, e, n) {
36173617
}(r, t.length - e), t, e, n);
36183618
}
36193619
function D(t, r, e) {
3620-
return 0 === r && e === t.length ? a(t) : a(t.slice(r, e));
3620+
return 0 === r && e === t.length ? f(t) : f(t.slice(r, e));
36213621
}
36223622
function C(t, r, e) {
36233623
e = Math.min(t.length, e);
36243624
for(var n = [], o = r; o < e;){
3625-
var i, u, f, a, s = t[o], c = null, h = s > 239 ? 4 : s > 223 ? 3 : s > 191 ? 2 : 1;
3625+
var i, u, a, f, s = t[o], c = null, h = s > 239 ? 4 : s > 223 ? 3 : s > 191 ? 2 : 1;
36263626
if (o + h <= e) switch(h){
36273627
case 1:
36283628
s < 128 && (c = s);
36293629
break;
36303630
case 2:
3631-
128 == (192 & (i = t[o + 1])) && (a = (31 & s) << 6 | 63 & i) > 127 && (c = a);
3631+
128 == (192 & (i = t[o + 1])) && (f = (31 & s) << 6 | 63 & i) > 127 && (c = f);
36323632
break;
36333633
case 3:
3634-
i = t[o + 1], u = t[o + 2], 128 == (192 & i) && 128 == (192 & u) && (a = (15 & s) << 12 | (63 & i) << 6 | 63 & u) > 2047 && (a < 55296 || a > 57343) && (c = a);
3634+
i = t[o + 1], u = t[o + 2], 128 == (192 & i) && 128 == (192 & u) && (f = (15 & s) << 12 | (63 & i) << 6 | 63 & u) > 2047 && (f < 55296 || f > 57343) && (c = f);
36353635
break;
36363636
case 4:
3637-
i = t[o + 1], u = t[o + 2], f = t[o + 3], 128 == (192 & i) && 128 == (192 & u) && 128 == (192 & f) && (a = (15 & s) << 18 | (63 & i) << 12 | (63 & u) << 6 | 63 & f) > 65535 && a < 1114112 && (c = a);
3637+
i = t[o + 1], u = t[o + 2], a = t[o + 3], 128 == (192 & i) && 128 == (192 & u) && 128 == (192 & a) && (f = (15 & s) << 18 | (63 & i) << 12 | (63 & u) << 6 | 63 & a) > 65535 && f < 1114112 && (c = f);
36383638
}
36393639
null === c ? (c = 65533, h = 1) : c > 65535 && (c -= 65536, n.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c), n.push(c), o += h;
36403640
}
@@ -3726,8 +3726,8 @@ y.TYPED_ARRAY_SUPPORT = void 0 === r2.TYPED_ARRAY_SUPPORT || r2.TYPED_ARRAY_SUPP
37263726
if (n >= o) return -1;
37273727
if (r >= e) return 1;
37283728
if (this === t) return 0;
3729-
for(var i = (o >>>= 0) - (n >>>= 0), u = (e >>>= 0) - (r >>>= 0), f = Math.min(i, u), a = this.slice(n, o), s = t.slice(r, e), c = 0; c < f; ++c)if (a[c] !== s[c]) {
3730-
i = a[c], u = s[c];
3729+
for(var i = (o >>>= 0) - (n >>>= 0), u = (e >>>= 0) - (r >>>= 0), a = Math.min(i, u), f = this.slice(n, o), s = t.slice(r, e), c = 0; c < a; ++c)if (f[c] !== s[c]) {
3730+
i = f[c], u = s[c];
37313731
break;
37323732
}
37333733
return i < u ? -1 : u < i ? 1 : 0;
@@ -3907,16 +3907,16 @@ y.prototype.slice = function(t, r) {
39073907
var o = Math.pow(2, 8 * e - 1);
39083908
N(this, t, r, e, o - 1, -o);
39093909
}
3910-
var i = 0, u = 1, f = 0;
3911-
for(this[r] = 255 & t; ++i < e && (u *= 256);)t < 0 && 0 === f && 0 !== this[r + i - 1] && (f = 1), this[r + i] = (t / u | 0) - f & 255;
3910+
var i = 0, u = 1, a = 0;
3911+
for(this[r] = 255 & t; ++i < e && (u *= 256);)t < 0 && 0 === a && 0 !== this[r + i - 1] && (a = 1), this[r + i] = (t / u | 0) - a & 255;
39123912
return r + e;
39133913
}, y.prototype.writeIntBE = function(t, r, e, n) {
39143914
if (t = +t, r |= 0, !n) {
39153915
var o = Math.pow(2, 8 * e - 1);
39163916
N(this, t, r, e, o - 1, -o);
39173917
}
3918-
var i = e - 1, u = 1, f = 0;
3919-
for(this[r + i] = 255 & t; --i >= 0 && (u *= 256);)t < 0 && 0 === f && 0 !== this[r + i + 1] && (f = 1), this[r + i] = (t / u | 0) - f & 255;
3918+
var i = e - 1, u = 1, a = 0;
3919+
for(this[r + i] = 255 & t; --i >= 0 && (u *= 256);)t < 0 && 0 === a && 0 !== this[r + i + 1] && (a = 1), this[r + i] = (t / u | 0) - a & 255;
39203920
return r + e;
39213921
}, y.prototype.writeInt8 = function(t, r, e) {
39223922
return t = +t, r |= 0, e || N(this, t, r, 1, 127, -128), y.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), t < 0 && (t = 255 + t + 1), this[r] = 255 & t, r + 1;
@@ -3962,8 +3962,8 @@ y.prototype.slice = function(t, r) {
39623962
var i;
39633963
if (r >>>= 0, e = void 0 === e ? this.length : e >>> 0, t || (t = 0), "number" == typeof t) for(i = r; i < e; ++i)this[i] = t;
39643964
else {
3965-
var u = E(t) ? t : Z(new y(t, n).toString()), f = u.length;
3966-
for(i = 0; i < e - r; ++i)this[i + r] = u[i % f];
3965+
var u = E(t) ? t : Z(new y(t, n).toString()), a = u.length;
3966+
for(i = 0; i < e - r; ++i)this[i + r] = u[i % a];
39673967
}
39683968
return this;
39693969
};
@@ -4013,14 +4013,14 @@ function Z(t, r) {
40134013
}
40144014
function K(t) {
40154015
return function(t) {
4016-
var r, e, f, a, s, c;
4016+
var r, e, a, f, s, c;
40174017
i1 || u1();
40184018
var h = t.length;
40194019
if (h % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
4020-
s = "=" === t[h - 2] ? 2 : "=" === t[h - 1] ? 1 : 0, c = new o2(3 * h / 4 - s), f = s > 0 ? h - 4 : h;
4020+
s = "=" === t[h - 2] ? 2 : "=" === t[h - 1] ? 1 : 0, c = new o2(3 * h / 4 - s), a = s > 0 ? h - 4 : h;
40214021
var l = 0;
4022-
for(r = 0, e = 0; r < f; r += 4, e += 3)a = n1[t.charCodeAt(r)] << 18 | n1[t.charCodeAt(r + 1)] << 12 | n1[t.charCodeAt(r + 2)] << 6 | n1[t.charCodeAt(r + 3)], c[l++] = a >> 16 & 255, c[l++] = a >> 8 & 255, c[l++] = 255 & a;
4023-
return 2 === s ? (a = n1[t.charCodeAt(r)] << 2 | n1[t.charCodeAt(r + 1)] >> 4, c[l++] = 255 & a) : 1 === s && (a = n1[t.charCodeAt(r)] << 10 | n1[t.charCodeAt(r + 1)] << 4 | n1[t.charCodeAt(r + 2)] >> 2, c[l++] = a >> 8 & 255, c[l++] = 255 & a), c;
4022+
for(r = 0, e = 0; r < a; r += 4, e += 3)f = n1[t.charCodeAt(r)] << 18 | n1[t.charCodeAt(r + 1)] << 12 | n1[t.charCodeAt(r + 2)] << 6 | n1[t.charCodeAt(r + 3)], c[l++] = f >> 16 & 255, c[l++] = f >> 8 & 255, c[l++] = 255 & f;
4023+
return 2 === s ? (f = n1[t.charCodeAt(r)] << 2 | n1[t.charCodeAt(r + 1)] >> 4, c[l++] = 255 & f) : 1 === s && (f = n1[t.charCodeAt(r)] << 10 | n1[t.charCodeAt(r + 1)] << 4 | n1[t.charCodeAt(r + 2)] >> 2, c[l++] = f >> 8 & 255, c[l++] = 255 & f), c;
40244024
}(function(t) {
40254025
if ((t = (function(t) {
40264026
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
@@ -4060,7 +4060,7 @@ function rt(t, r) {
40604060
seen: [],
40614061
stylize: nt
40624062
};
4063-
return arguments.length >= 3 && (e.depth = arguments[2]), arguments.length >= 4 && (e.colors = arguments[3]), ft(r) ? e.showHidden = r : r && function(t, r) {
4063+
return arguments.length >= 3 && (e.depth = arguments[2]), arguments.length >= 4 && (e.colors = arguments[3]), at(r) ? e.showHidden = r : r && function(t, r) {
40644064
if (!r || !lt(r)) return t;
40654065
var e = Object.keys(r), n = e.length;
40664066
for(; n--;)t[e[n]] = r[e[n]];
@@ -4086,8 +4086,8 @@ function ot(t, r, e) {
40864086
}
40874087
if (n = r, "number" == typeof n) return t.stylize("" + r, "number");
40884088
var n;
4089-
if (ft(r)) return t.stylize("" + r, "boolean");
4090-
if (at(r)) return t.stylize("null", "null");
4089+
if (at(r)) return t.stylize("" + r, "boolean");
4090+
if (ft(r)) return t.stylize("null", "null");
40914091
}(t, r);
40924092
if (o) return o;
40934093
var i = Object.keys(r), u = function(t) {
@@ -4099,23 +4099,23 @@ function ot(t, r, e) {
40994099
if (t.showHidden && (i = Object.getOwnPropertyNames(r)), gt(r) && (i.indexOf("message") >= 0 || i.indexOf("description") >= 0)) return it(r);
41004100
if (0 === i.length) {
41014101
if (yt(r)) {
4102-
var f = r.name ? ": " + r.name : "";
4103-
return t.stylize("[Function" + f + "]", "special");
4102+
var a = r.name ? ": " + r.name : "";
4103+
return t.stylize("[Function" + a + "]", "special");
41044104
}
41054105
if (ht(r)) return t.stylize(RegExp.prototype.toString.call(r), "regexp");
41064106
if (pt(r)) return t.stylize(Date.prototype.toString.call(r), "date");
41074107
if (gt(r)) return it(r);
41084108
}
4109-
var a, s, c = "", h = !1, l = [
4109+
var f, s, c = "", h = !1, l = [
41104110
"{",
41114111
"}"
41124112
];
4113-
(a = r, Array.isArray(a) && (h = !0, l = [
4113+
(f = r, Array.isArray(f) && (h = !0, l = [
41144114
"[",
41154115
"]"
41164116
]), yt(r)) && (c = " [Function" + (r.name ? ": " + r.name : "") + "]");
41174117
return ht(r) && (c = " " + RegExp.prototype.toString.call(r)), pt(r) && (c = " " + Date.prototype.toUTCString.call(r)), gt(r) && (c = " " + it(r)), 0 !== i.length || h && 0 != r.length ? e < 0 ? ht(r) ? t.stylize(RegExp.prototype.toString.call(r), "regexp") : t.stylize("[Object]", "special") : (t.seen.push(r), s = h ? function(t, r, e, n, o) {
4118-
for(var i = [], u = 0, f = r.length; u < f; ++u)vt(r, String(u)) ? i.push(ut(t, r, e, n, String(u), !0)) : i.push("");
4118+
for(var i = [], u = 0, a = r.length; u < a; ++u)vt(r, String(u)) ? i.push(ut(t, r, e, n, String(u), !0)) : i.push("");
41194119
return o.forEach(function(o) {
41204120
o.match(/^\d+$/) || i.push(ut(t, r, e, n, o, !0));
41214121
}), i;
@@ -4133,23 +4133,23 @@ function it(t) {
41334133
return "[" + Error.prototype.toString.call(t) + "]";
41344134
}
41354135
function ut(t, r, e, n, o, i) {
4136-
var u, f, a;
4137-
if ((a = Object.getOwnPropertyDescriptor(r, o) || {
4136+
var u, a, f;
4137+
if ((f = Object.getOwnPropertyDescriptor(r, o) || {
41384138
value: r[o]
4139-
}).get ? f = a.set ? t.stylize("[Getter/Setter]", "special") : t.stylize("[Getter]", "special") : a.set && (f = t.stylize("[Setter]", "special")), vt(n, o) || (u = "[" + o + "]"), f || (t.seen.indexOf(a.value) < 0 ? (f = at(e) ? ot(t, a.value, null) : ot(t, a.value, e - 1)).indexOf("\n") > -1 && (f = i ? f.split("\n").map(function(t) {
4139+
}).get ? a = f.set ? t.stylize("[Getter/Setter]", "special") : t.stylize("[Getter]", "special") : f.set && (a = t.stylize("[Setter]", "special")), vt(n, o) || (u = "[" + o + "]"), a || (t.seen.indexOf(f.value) < 0 ? (a = ft(e) ? ot(t, f.value, null) : ot(t, f.value, e - 1)).indexOf("\n") > -1 && (a = i ? a.split("\n").map(function(t) {
41404140
return " " + t;
4141-
}).join("\n").substr(2) : "\n" + f.split("\n").map(function(t) {
4141+
}).join("\n").substr(2) : "\n" + a.split("\n").map(function(t) {
41424142
return " " + t;
4143-
}).join("\n")) : f = t.stylize("[Circular]", "special")), ct(u)) {
4144-
if (i && o.match(/^\d+$/)) return f;
4143+
}).join("\n")) : a = t.stylize("[Circular]", "special")), ct(u)) {
4144+
if (i && o.match(/^\d+$/)) return a;
41454145
(u = JSON.stringify("" + o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (u = u.substr(1, u.length - 2), u = t.stylize(u, "name")) : (u = u.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), u = t.stylize(u, "string"));
41464146
}
4147-
return u + ": " + f;
4147+
return u + ": " + a;
41484148
}
4149-
function ft(t) {
4149+
function at(t) {
41504150
return "boolean" == typeof t;
41514151
}
4152-
function at(t) {
4152+
function ft(t) {
41534153
return null === t;
41544154
}
41554155
function st(t) {
@@ -4335,10 +4335,10 @@ function Yt(t, r, e, n) {
43354335
var o = jt(t), i = jt(r);
43364336
if (o && !i || !o && i) return !1;
43374337
if (o) return Yt(t = Rt.call(t), r = Rt.call(r), e);
4338-
var u, f, a = At(t), s = At(r);
4339-
if (a.length !== s.length) return !1;
4340-
for(a.sort(), s.sort(), f = a.length - 1; f >= 0; f--)if (a[f] !== s[f]) return !1;
4341-
for(f = a.length - 1; f >= 0; f--)if (!Yt(t[u = a[f]], r[u], e, n)) return !1;
4338+
var u, a, f = At(t), s = At(r);
4339+
if (f.length !== s.length) return !1;
4340+
for(f.sort(), s.sort(), a = f.length - 1; a >= 0; a--)if (f[a] !== s[a]) return !1;
4341+
for(a = f.length - 1; a >= 0; a--)if (!Yt(t[u = f[a]], r[u], e, n)) return !1;
43424342
return !0;
43434343
}(t, r, e, n));
43444344
}
@@ -4440,10 +4440,10 @@ class Nt extends Error {
44404440
const Ft = "0x14183aD016Ddc83D638425D6328009aa390339Ce", qt = [
44414441
"function getPeerData(uint64 minerID) view returns (tuple(string peerID, bytes signature))"
44424442
];
4443-
async function $t(t, r, { maxAttempts: e = 5, rpcUrl: n, rpcAuth: o, rpcFn: i } = {}) {
4443+
async function $t(t, r, { maxAttempts: e = 5, rpcUrl: n, rpcAuth: o, rpcFn: i, signal: u } = {}) {
44444444
try {
44454445
Tt.ok(!(n && i), "Cannot provide both rpcUrl and rpcFn");
4446-
const [u, f] = await Promise.all([
4446+
const [a, f] = await Promise.all([
44474447
Lt(t, r),
44484448
zt(t, i ?? async function(t, r) {
44494449
return await async function(t, r, e, { rpcAuth: n, fetch: o = globalThis.fetch, signal: i } = {}) {
@@ -4455,7 +4455,7 @@ async function $t(t, r, { maxAttempts: e = 5, rpcUrl: n, rpcAuth: o, rpcFn: i }
44554455
...u,
44564456
Authorization: `Bearer ${n}`
44574457
});
4458-
const f = new Request(e, {
4458+
const a = new Request(e, {
44594459
method: "POST",
44604460
headers: u,
44614461
body: JSON.stringify({
@@ -4464,22 +4464,23 @@ async function $t(t, r, { maxAttempts: e = 5, rpcUrl: n, rpcAuth: o, rpcFn: i }
44644464
method: t,
44654465
params: r
44664466
})
4467-
}), a = await o(f, {
4467+
}), f = await o(a, {
44684468
signal: i
4469-
}), s = await a.json();
4469+
}), s = await f.json();
44704470
if (!s || "object" != typeof s) throw new Nt("INVALID_RPC_RESPONSE", `Response body is not an object: ${s}`, t);
44714471
if ("error" in s) throw new Nt("RPC_ERROR", `Error while calling RPC method ${t}: ${JSON.stringify(s.error)}`, t);
44724472
if (!("result" in s)) throw new Nt("NO_RESULT_IN_RESPONSE", `Response body does not contain result: ${s}`, t);
44734473
return s.result;
44744474
}(t, r, n ?? "https://api.node.glif.io/", {
4475-
rpcAuth: o
4475+
rpcAuth: o,
4476+
signal: u
44764477
});
44774478
}, {
44784479
maxAttempts: e
44794480
})
44804481
]);
4481-
return u ? (console.log("Using PeerID from the smart contract."), {
4482-
peerId: u,
4482+
return a ? (console.log("Using PeerID from the smart contract."), {
4483+
peerId: a,
44834484
source: "smartContract"
44844485
}) : {
44854486
peerId: f,

0 commit comments

Comments
 (0)