@gardenfi/core 0.2.0-beta.72 → 0.2.0-beta.74
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/index.cjs +1 -1
- package/dist/index.js +15 -14
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +55 -41
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +37 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +369 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +23 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +58 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +5 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +51 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +28 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +4 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +4 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +64 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +37 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +7 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +4 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +60 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +4 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +42 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +45 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +20 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +111 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +23 -0
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +228 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +6 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +160 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +4 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +75 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +107 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +15 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +35 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +4 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +32 -0
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +21 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +4 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +358 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +241 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +70 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +64 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +14 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +47 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +65 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +228 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +2 -2
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +5 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +171 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +30 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +23 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +72 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +130 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +9 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +4 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +28 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +4 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +30 -136
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +25 -2
- package/dist/index18.cjs +1 -3
- package/dist/index18.js +29 -26
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +32 -17
- package/dist/index20.cjs +1 -2
- package/dist/index20.js +53 -25
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +6 -38
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -199
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +138 -2
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +13 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +36 -27
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +41 -14
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +26 -173
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +15 -22
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +24 -2
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +25 -34
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +54 -8
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +28 -2
- package/dist/index34.cjs +3 -6
- package/dist/index34.js +30 -949
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +17 -4
- package/dist/index36.cjs +2 -1
- package/dist/index36.js +23 -18
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +38 -29
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +197 -60
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +2 -33
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -87
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +2 -49
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +12 -25
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +12 -2
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +4 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +45 -19
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +38 -30
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +165 -360
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +13 -21
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -54
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +17 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +9 -70
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +175 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +21 -57
- package/dist/index54.js +2 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +34 -39
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +9 -43
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +34 -17
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +50 -103
- package/dist/index59.cjs +2 -1
- package/dist/index59.js +58 -19
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +3 -225
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +128 -4
- package/dist/index62.cjs +2 -1
- package/dist/index62.js +37 -152
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +9 -2
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +11 -13
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +12 -2
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +13 -32
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +7 -2
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +17 -355
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +75 -235
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +14 -67
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +17 -60
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +6 -11
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +20 -43
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +13 -62
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -226
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +2 -3
- package/dist/index77.cjs +2 -1
- package/dist/index77.js +32 -166
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +5 -27
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -19
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +30 -68
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -128
- package/dist/index82.cjs +6 -1
- package/dist/index82.js +949 -9
- package/dist/index83.cjs +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +61 -25
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +33 -2
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +89 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +15 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +9 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +115 -0
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +9 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +35 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +4 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +40 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +31 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +23 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +9 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +7 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +13 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +22 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +3 -1
- package/package.json +2 -2
package/dist/index51.js
CHANGED
|
@@ -1,75 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
var E = N.Buffer;
|
|
3
|
-
function R(w) {
|
|
4
|
-
if (w.length >= 255)
|
|
5
|
-
throw new TypeError("Alphabet too long");
|
|
6
|
-
for (var d = new Uint8Array(256), b = 0; b < d.length; b++)
|
|
7
|
-
d[b] = 255;
|
|
8
|
-
for (var p = 0; p < w.length; p++) {
|
|
9
|
-
var A = w.charAt(p), z = A.charCodeAt(0);
|
|
10
|
-
if (d[z] !== 255)
|
|
11
|
-
throw new TypeError(A + " is ambiguous");
|
|
12
|
-
d[z] = p;
|
|
13
|
-
}
|
|
14
|
-
var g = w.length, U = w.charAt(0), M = Math.log(g) / Math.log(256), m = Math.log(256) / Math.log(g);
|
|
15
|
-
function C(r) {
|
|
16
|
-
if ((Array.isArray(r) || r instanceof Uint8Array) && (r = E.from(r)), !E.isBuffer(r))
|
|
17
|
-
throw new TypeError("Expected Buffer");
|
|
18
|
-
if (r.length === 0)
|
|
19
|
-
return "";
|
|
20
|
-
for (var e = 0, l = 0, n = 0, o = r.length; n !== o && r[n] === 0; )
|
|
21
|
-
n++, e++;
|
|
22
|
-
for (var f = (o - n) * m + 1 >>> 0, a = new Uint8Array(f); n !== o; ) {
|
|
23
|
-
for (var h = r[n], i = 0, t = f - 1; (h !== 0 || i < l) && t !== -1; t--, i++)
|
|
24
|
-
h += 256 * a[t] >>> 0, a[t] = h % g >>> 0, h = h / g >>> 0;
|
|
25
|
-
if (h !== 0)
|
|
26
|
-
throw new Error("Non-zero carry");
|
|
27
|
-
l = i, n++;
|
|
28
|
-
}
|
|
29
|
-
for (var v = f - l; v !== f && a[v] === 0; )
|
|
30
|
-
v++;
|
|
31
|
-
for (var s = U.repeat(e); v < f; ++v)
|
|
32
|
-
s += w.charAt(a[v]);
|
|
33
|
-
return s;
|
|
34
|
-
}
|
|
35
|
-
function u(r) {
|
|
36
|
-
if (typeof r != "string")
|
|
37
|
-
throw new TypeError("Expected String");
|
|
38
|
-
if (r.length === 0)
|
|
39
|
-
return E.alloc(0);
|
|
40
|
-
for (var e = 0, l = 0, n = 0; r[e] === U; )
|
|
41
|
-
l++, e++;
|
|
42
|
-
for (var o = (r.length - e) * M + 1 >>> 0, f = new Uint8Array(o); e < r.length; ) {
|
|
43
|
-
var a = d[r.charCodeAt(e)];
|
|
44
|
-
if (a === 255)
|
|
45
|
-
return;
|
|
46
|
-
for (var h = 0, i = o - 1; (a !== 0 || h < n) && i !== -1; i--, h++)
|
|
47
|
-
a += g * f[i] >>> 0, f[i] = a % 256 >>> 0, a = a / 256 >>> 0;
|
|
48
|
-
if (a !== 0)
|
|
49
|
-
throw new Error("Non-zero carry");
|
|
50
|
-
n = h, e++;
|
|
51
|
-
}
|
|
52
|
-
for (var t = o - n; t !== o && f[t] === 0; )
|
|
53
|
-
t++;
|
|
54
|
-
var v = E.allocUnsafe(l + (o - t));
|
|
55
|
-
v.fill(0, 0, l);
|
|
56
|
-
for (var s = l; t !== o; )
|
|
57
|
-
v[s++] = f[t++];
|
|
58
|
-
return v;
|
|
59
|
-
}
|
|
60
|
-
function x(r) {
|
|
61
|
-
var e = u(r);
|
|
62
|
-
if (e)
|
|
63
|
-
return e;
|
|
64
|
-
throw new Error("Non-base" + g + " character");
|
|
65
|
-
}
|
|
1
|
+
function r(n, { args: t, eventName: a } = {}) {
|
|
66
2
|
return {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
3
|
+
...n,
|
|
4
|
+
blockHash: n.blockHash ? n.blockHash : null,
|
|
5
|
+
blockNumber: n.blockNumber ? BigInt(n.blockNumber) : null,
|
|
6
|
+
logIndex: n.logIndex ? Number(n.logIndex) : null,
|
|
7
|
+
transactionHash: n.transactionHash ? n.transactionHash : null,
|
|
8
|
+
transactionIndex: n.transactionIndex ? Number(n.transactionIndex) : null,
|
|
9
|
+
...a ? { args: t, eventName: a } : {}
|
|
70
10
|
};
|
|
71
11
|
}
|
|
72
|
-
var y = R;
|
|
73
12
|
export {
|
|
74
|
-
|
|
13
|
+
r as formatLog
|
|
75
14
|
};
|
package/dist/index52.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index84.cjs"),J=require("./index85.cjs"),j=require("./index86.cjs");var d=_.errors,u=J.native,h=d.tfJSON,S=d.TfTypeError,b=d.TfPropertyTypeError,v=d.tfSubError,w=d.getValueTypeName,g={arrayOf:function(n,r){n=l(n),r=r||{};function t(f,i){return!u.Array(f)||u.Nil(f)||r.minLength!==void 0&&f.length<r.minLength||r.maxLength!==void 0&&f.length>r.maxLength||r.length!==void 0&&f.length!==r.length?!1:f.every(function(a,o){try{return c(n,a,i)}catch(m){throw v(m,o)}})}return t.toJSON=function(){var f="["+h(n)+"]";return r.length!==void 0?f+="{"+r.length+"}":(r.minLength!==void 0||r.maxLength!==void 0)&&(f+="{"+(r.minLength===void 0?0:r.minLength)+","+(r.maxLength===void 0?1/0:r.maxLength)+"}"),f},t},maybe:function e(n){n=l(n);function r(t,f){return u.Nil(t)||n(t,f,e)}return r.toJSON=function(){return"?"+h(n)},r},map:function(n,r){n=l(n),r&&(r=l(r));function t(f,i){if(!u.Object(f)||u.Nil(f))return!1;for(var a in f){try{r&&c(r,a,i)}catch(m){throw v(m,a,"key")}try{var o=f[a];c(n,o,i)}catch(m){throw v(m,a)}}return!0}return r?t.toJSON=function(){return"{"+h(r)+": "+h(n)+"}"}:t.toJSON=function(){return"{"+h(n)+"}"},t},object:function(n){var r={};for(var t in n)r[t]=l(n[t]);function f(i,a){if(!u.Object(i)||u.Nil(i))return!1;var o;try{for(o in r){var m=r[o],E=i[o];c(m,E,a)}}catch(L){throw v(L,o)}if(a){for(o in i)if(!r[o])throw new b(void 0,o)}return!0}return f.toJSON=function(){return h(r)},f},anyOf:function(){var n=[].slice.call(arguments).map(l);function r(t,f){return n.some(function(i){try{return c(i,t,f)}catch{return!1}})}return r.toJSON=function(){return n.map(h).join("|")},r},allOf:function(){var n=[].slice.call(arguments).map(l);function r(t,f){return n.every(function(i){try{return c(i,t,f)}catch{return!1}})}return r.toJSON=function(){return n.map(h).join(" & ")},r},quacksLike:function(n){function r(t){return n===w(t)}return r.toJSON=function(){return n},r},tuple:function(){var n=[].slice.call(arguments).map(l);function r(t,f){return u.Nil(t)||u.Nil(t.length)||f&&t.length!==n.length?!1:n.every(function(i,a){try{return c(i,t[a],f)}catch(o){throw v(o,a)}})}return r.toJSON=function(){return"("+n.map(h).join(", ")+")"},r},value:function(n){function r(t){return t===n}return r.toJSON=function(){return n},r}};g.oneOf=g.anyOf;function l(e){if(u.String(e))return e[0]==="?"?g.maybe(e.slice(1)):u[e]||g.quacksLike(e);if(e&&u.Object(e)){if(u.Array(e)){if(e.length!==1)throw new TypeError("Expected compile() parameter of type Array of length 1");return g.arrayOf(e[0])}return g.object(e)}else if(u.Function(e))return e;return g.value(e)}function c(e,n,r,t){if(u.Function(e)){if(e(n,r))return!0;throw new S(t||e,n)}return c(l(e),n,r)}for(var O in u)c[O]=u[O];for(O in g)c[O]=g[O];var s=j.__require();for(O in s)c[O]=s[O];c.compile=l;c.TfTypeError=S;c.TfPropertyTypeError=b;var N=c;exports.typeforce_1=N;
|
package/dist/index52.js
CHANGED
|
@@ -1,4 +1,177 @@
|
|
|
1
|
-
|
|
1
|
+
import { e as J } from "./index84.js";
|
|
2
|
+
import { n as _ } from "./index85.js";
|
|
3
|
+
import { __require as w } from "./index86.js";
|
|
4
|
+
var d = J, u = _, h = d.tfJSON, S = d.TfTypeError, E = d.TfPropertyTypeError, v = d.tfSubError, N = d.getValueTypeName, g = {
|
|
5
|
+
arrayOf: function(n, r) {
|
|
6
|
+
n = l(n), r = r || {};
|
|
7
|
+
function f(t, i) {
|
|
8
|
+
return !u.Array(t) || u.Nil(t) || r.minLength !== void 0 && t.length < r.minLength || r.maxLength !== void 0 && t.length > r.maxLength || r.length !== void 0 && t.length !== r.length ? !1 : t.every(function(c, o) {
|
|
9
|
+
try {
|
|
10
|
+
return a(n, c, i);
|
|
11
|
+
} catch (O) {
|
|
12
|
+
throw v(O, o);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return f.toJSON = function() {
|
|
17
|
+
var t = "[" + h(n) + "]";
|
|
18
|
+
return r.length !== void 0 ? t += "{" + r.length + "}" : (r.minLength !== void 0 || r.maxLength !== void 0) && (t += "{" + (r.minLength === void 0 ? 0 : r.minLength) + "," + (r.maxLength === void 0 ? 1 / 0 : r.maxLength) + "}"), t;
|
|
19
|
+
}, f;
|
|
20
|
+
},
|
|
21
|
+
maybe: function e(n) {
|
|
22
|
+
n = l(n);
|
|
23
|
+
function r(f, t) {
|
|
24
|
+
return u.Nil(f) || n(f, t, e);
|
|
25
|
+
}
|
|
26
|
+
return r.toJSON = function() {
|
|
27
|
+
return "?" + h(n);
|
|
28
|
+
}, r;
|
|
29
|
+
},
|
|
30
|
+
map: function(n, r) {
|
|
31
|
+
n = l(n), r && (r = l(r));
|
|
32
|
+
function f(t, i) {
|
|
33
|
+
if (!u.Object(t) || u.Nil(t)) return !1;
|
|
34
|
+
for (var c in t) {
|
|
35
|
+
try {
|
|
36
|
+
r && a(r, c, i);
|
|
37
|
+
} catch (O) {
|
|
38
|
+
throw v(O, c, "key");
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
var o = t[c];
|
|
42
|
+
a(n, o, i);
|
|
43
|
+
} catch (O) {
|
|
44
|
+
throw v(O, c);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return !0;
|
|
48
|
+
}
|
|
49
|
+
return r ? f.toJSON = function() {
|
|
50
|
+
return "{" + h(r) + ": " + h(n) + "}";
|
|
51
|
+
} : f.toJSON = function() {
|
|
52
|
+
return "{" + h(n) + "}";
|
|
53
|
+
}, f;
|
|
54
|
+
},
|
|
55
|
+
object: function(n) {
|
|
56
|
+
var r = {};
|
|
57
|
+
for (var f in n)
|
|
58
|
+
r[f] = l(n[f]);
|
|
59
|
+
function t(i, c) {
|
|
60
|
+
if (!u.Object(i) || u.Nil(i)) return !1;
|
|
61
|
+
var o;
|
|
62
|
+
try {
|
|
63
|
+
for (o in r) {
|
|
64
|
+
var O = r[o], L = i[o];
|
|
65
|
+
a(O, L, c);
|
|
66
|
+
}
|
|
67
|
+
} catch (b) {
|
|
68
|
+
throw v(b, o);
|
|
69
|
+
}
|
|
70
|
+
if (c) {
|
|
71
|
+
for (o in i)
|
|
72
|
+
if (!r[o])
|
|
73
|
+
throw new E(void 0, o);
|
|
74
|
+
}
|
|
75
|
+
return !0;
|
|
76
|
+
}
|
|
77
|
+
return t.toJSON = function() {
|
|
78
|
+
return h(r);
|
|
79
|
+
}, t;
|
|
80
|
+
},
|
|
81
|
+
anyOf: function() {
|
|
82
|
+
var n = [].slice.call(arguments).map(l);
|
|
83
|
+
function r(f, t) {
|
|
84
|
+
return n.some(function(i) {
|
|
85
|
+
try {
|
|
86
|
+
return a(i, f, t);
|
|
87
|
+
} catch {
|
|
88
|
+
return !1;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return r.toJSON = function() {
|
|
93
|
+
return n.map(h).join("|");
|
|
94
|
+
}, r;
|
|
95
|
+
},
|
|
96
|
+
allOf: function() {
|
|
97
|
+
var n = [].slice.call(arguments).map(l);
|
|
98
|
+
function r(f, t) {
|
|
99
|
+
return n.every(function(i) {
|
|
100
|
+
try {
|
|
101
|
+
return a(i, f, t);
|
|
102
|
+
} catch {
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return r.toJSON = function() {
|
|
108
|
+
return n.map(h).join(" & ");
|
|
109
|
+
}, r;
|
|
110
|
+
},
|
|
111
|
+
quacksLike: function(n) {
|
|
112
|
+
function r(f) {
|
|
113
|
+
return n === N(f);
|
|
114
|
+
}
|
|
115
|
+
return r.toJSON = function() {
|
|
116
|
+
return n;
|
|
117
|
+
}, r;
|
|
118
|
+
},
|
|
119
|
+
tuple: function() {
|
|
120
|
+
var n = [].slice.call(arguments).map(l);
|
|
121
|
+
function r(f, t) {
|
|
122
|
+
return u.Nil(f) || u.Nil(f.length) || t && f.length !== n.length ? !1 : n.every(function(i, c) {
|
|
123
|
+
try {
|
|
124
|
+
return a(i, f[c], t);
|
|
125
|
+
} catch (o) {
|
|
126
|
+
throw v(o, c);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return r.toJSON = function() {
|
|
131
|
+
return "(" + n.map(h).join(", ") + ")";
|
|
132
|
+
}, r;
|
|
133
|
+
},
|
|
134
|
+
value: function(n) {
|
|
135
|
+
function r(f) {
|
|
136
|
+
return f === n;
|
|
137
|
+
}
|
|
138
|
+
return r.toJSON = function() {
|
|
139
|
+
return n;
|
|
140
|
+
}, r;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
g.oneOf = g.anyOf;
|
|
144
|
+
function l(e) {
|
|
145
|
+
if (u.String(e))
|
|
146
|
+
return e[0] === "?" ? g.maybe(e.slice(1)) : u[e] || g.quacksLike(e);
|
|
147
|
+
if (e && u.Object(e)) {
|
|
148
|
+
if (u.Array(e)) {
|
|
149
|
+
if (e.length !== 1) throw new TypeError("Expected compile() parameter of type Array of length 1");
|
|
150
|
+
return g.arrayOf(e[0]);
|
|
151
|
+
}
|
|
152
|
+
return g.object(e);
|
|
153
|
+
} else if (u.Function(e))
|
|
154
|
+
return e;
|
|
155
|
+
return g.value(e);
|
|
156
|
+
}
|
|
157
|
+
function a(e, n, r, f) {
|
|
158
|
+
if (u.Function(e)) {
|
|
159
|
+
if (e(n, r)) return !0;
|
|
160
|
+
throw new S(f || e, n);
|
|
161
|
+
}
|
|
162
|
+
return a(l(e), n, r);
|
|
163
|
+
}
|
|
164
|
+
for (var m in u)
|
|
165
|
+
a[m] = u[m];
|
|
166
|
+
for (m in g)
|
|
167
|
+
a[m] = g[m];
|
|
168
|
+
var s = w();
|
|
169
|
+
for (m in s)
|
|
170
|
+
a[m] = s[m];
|
|
171
|
+
a.compile = l;
|
|
172
|
+
a.TfTypeError = S;
|
|
173
|
+
a.TfPropertyTypeError = E;
|
|
174
|
+
var x = a;
|
|
2
175
|
export {
|
|
3
|
-
|
|
176
|
+
x as t
|
|
4
177
|
};
|
package/dist/index53.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t}exports.commonjsGlobal=u;exports.getAugmentedNamespace=f;
|
package/dist/index53.js
CHANGED
|
@@ -1,60 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function u(e) {
|
|
3
|
+
if (e.__esModule) return e;
|
|
4
|
+
var r = e.default;
|
|
5
|
+
if (typeof r == "function") {
|
|
6
|
+
var t = function o() {
|
|
7
|
+
return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
8
|
+
};
|
|
9
|
+
t.prototype = r.prototype;
|
|
10
|
+
} else t = {};
|
|
11
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
12
|
+
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
13
|
+
Object.defineProperty(t, o, n.get ? n : {
|
|
14
|
+
enumerable: !0,
|
|
15
|
+
get: function() {
|
|
16
|
+
return e[o];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}), t;
|
|
8
20
|
}
|
|
9
|
-
function i(t) {
|
|
10
|
-
l.call(this), this._block = n.allocUnsafe(t), this._blockSize = t, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
|
|
11
|
-
}
|
|
12
|
-
u(i, l);
|
|
13
|
-
i.prototype._transform = function(t, r, e) {
|
|
14
|
-
var s = null;
|
|
15
|
-
try {
|
|
16
|
-
this.update(t, r);
|
|
17
|
-
} catch (f) {
|
|
18
|
-
s = f;
|
|
19
|
-
}
|
|
20
|
-
e(s);
|
|
21
|
-
};
|
|
22
|
-
i.prototype._flush = function(t) {
|
|
23
|
-
var r = null;
|
|
24
|
-
try {
|
|
25
|
-
this.push(this.digest());
|
|
26
|
-
} catch (e) {
|
|
27
|
-
r = e;
|
|
28
|
-
}
|
|
29
|
-
t(r);
|
|
30
|
-
};
|
|
31
|
-
i.prototype.update = function(t, r) {
|
|
32
|
-
if (c(t, "Data"), this._finalized) throw new Error("Digest already called");
|
|
33
|
-
n.isBuffer(t) || (t = n.from(t, r));
|
|
34
|
-
for (var e = this._block, s = 0; this._blockOffset + t.length - s >= this._blockSize; ) {
|
|
35
|
-
for (var f = this._blockOffset; f < this._blockSize; ) e[f++] = t[s++];
|
|
36
|
-
this._update(), this._blockOffset = 0;
|
|
37
|
-
}
|
|
38
|
-
for (; s < t.length; ) e[this._blockOffset++] = t[s++];
|
|
39
|
-
for (var h = 0, o = t.length * 8; o > 0; ++h)
|
|
40
|
-
this._length[h] += o, o = this._length[h] / 4294967296 | 0, o > 0 && (this._length[h] -= 4294967296 * o);
|
|
41
|
-
return this;
|
|
42
|
-
};
|
|
43
|
-
i.prototype._update = function() {
|
|
44
|
-
throw new Error("_update is not implemented");
|
|
45
|
-
};
|
|
46
|
-
i.prototype.digest = function(t) {
|
|
47
|
-
if (this._finalized) throw new Error("Digest already called");
|
|
48
|
-
this._finalized = !0;
|
|
49
|
-
var r = this._digest();
|
|
50
|
-
t !== void 0 && (r = r.toString(t)), this._block.fill(0), this._blockOffset = 0;
|
|
51
|
-
for (var e = 0; e < 4; ++e) this._length[e] = 0;
|
|
52
|
-
return r;
|
|
53
|
-
};
|
|
54
|
-
i.prototype._digest = function() {
|
|
55
|
-
throw new Error("_digest is not implemented");
|
|
56
|
-
};
|
|
57
|
-
var m = i;
|
|
58
21
|
export {
|
|
59
|
-
|
|
22
|
+
f as commonjsGlobal,
|
|
23
|
+
u as getAugmentedNamespace
|
|
60
24
|
};
|
package/dist/index54.js
CHANGED
package/dist/index55.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index81.cjs");require("./index82.cjs");const p=require("./index83.cjs");/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(m,a){var n=p.__exports,r=n.Buffer;function i(e,o){for(var t in e)o[t]=e[t]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?m.exports=n:(i(n,a),a.Buffer=f);function f(e,o,t){return r(e,o,t)}f.prototype=Object.create(r.prototype),i(r,f),f.from=function(e,o,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return r(e,o,t)},f.alloc=function(e,o,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var u=r(e);return o!==void 0?typeof t=="string"?u.fill(o,t):u.fill(o):u.fill(0),u},f.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return r(e)},f.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}})(l.__module,l.__module.exports);var s=l.__module.exports;exports.safeBufferExports=s;
|
package/dist/index55.js
CHANGED
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
]
|
|
10
|
-
function h() {
|
|
11
|
-
this.init(), this._w = b, c.call(this, 64, 56);
|
|
12
|
-
}
|
|
13
|
-
d(h, c);
|
|
14
|
-
h.prototype.init = function() {
|
|
15
|
-
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
16
|
-
};
|
|
17
|
-
function E(t) {
|
|
18
|
-
return t << 5 | t >>> 27;
|
|
19
|
-
}
|
|
20
|
-
function l(t) {
|
|
21
|
-
return t << 30 | t >>> 2;
|
|
22
|
-
}
|
|
23
|
-
function I(t, r, s, a) {
|
|
24
|
-
return t === 0 ? r & s | ~r & a : t === 2 ? r & s | r & a | s & a : r ^ s ^ a;
|
|
25
|
-
}
|
|
26
|
-
h.prototype._update = function(t) {
|
|
27
|
-
for (var r = this._w, s = this._a | 0, a = this._b | 0, e = this._c | 0, n = this._d | 0, o = this._e | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
|
|
28
|
-
for (; i < 80; ++i) r[i] = r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16];
|
|
29
|
-
for (var _ = 0; _ < 80; ++_) {
|
|
30
|
-
var f = ~~(_ / 20), v = E(s) + I(f, a, e, n) + o + r[_] + B[f] | 0;
|
|
31
|
-
o = n, n = e, e = l(a), a = s, s = v;
|
|
1
|
+
import { __module as a } from "./index81.js";
|
|
2
|
+
import "./index82.js";
|
|
3
|
+
import { __exports as s } from "./index83.js";
|
|
4
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
5
|
+
(function(l, m) {
|
|
6
|
+
var n = s, e = n.Buffer;
|
|
7
|
+
function p(r, f) {
|
|
8
|
+
for (var o in r)
|
|
9
|
+
f[o] = r[o];
|
|
32
10
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
11
|
+
e.from && e.alloc && e.allocUnsafe && e.allocUnsafeSlow ? l.exports = n : (p(n, m), m.Buffer = t);
|
|
12
|
+
function t(r, f, o) {
|
|
13
|
+
return e(r, f, o);
|
|
14
|
+
}
|
|
15
|
+
t.prototype = Object.create(e.prototype), p(e, t), t.from = function(r, f, o) {
|
|
16
|
+
if (typeof r == "number")
|
|
17
|
+
throw new TypeError("Argument must not be a number");
|
|
18
|
+
return e(r, f, o);
|
|
19
|
+
}, t.alloc = function(r, f, o) {
|
|
20
|
+
if (typeof r != "number")
|
|
21
|
+
throw new TypeError("Argument must be a number");
|
|
22
|
+
var u = e(r);
|
|
23
|
+
return f !== void 0 ? typeof o == "string" ? u.fill(f, o) : u.fill(f) : u.fill(0), u;
|
|
24
|
+
}, t.allocUnsafe = function(r) {
|
|
25
|
+
if (typeof r != "number")
|
|
26
|
+
throw new TypeError("Argument must be a number");
|
|
27
|
+
return e(r);
|
|
28
|
+
}, t.allocUnsafeSlow = function(r) {
|
|
29
|
+
if (typeof r != "number")
|
|
30
|
+
throw new TypeError("Argument must be a number");
|
|
31
|
+
return n.SlowBuffer(r);
|
|
32
|
+
};
|
|
33
|
+
})(a, a.exports);
|
|
34
|
+
var w = a.exports;
|
|
40
35
|
export {
|
|
41
|
-
|
|
36
|
+
w as s
|
|
42
37
|
};
|
package/dist/index56.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index79.cjs"),t=require("./index80.cjs");var e=a.browser,c=t.base;function b(r){var s=e("sha256").update(r).digest();return e("sha256").update(s).digest()}var o=c(b);exports.bs58check=o;
|
package/dist/index56.js
CHANGED
|
@@ -1,45 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
], b = new Array(80);
|
|
10
|
-
function h() {
|
|
11
|
-
this.init(), this._w = b, c.call(this, 64, 56);
|
|
12
|
-
}
|
|
13
|
-
d(h, c);
|
|
14
|
-
h.prototype.init = function() {
|
|
15
|
-
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
16
|
-
};
|
|
17
|
-
function E(t) {
|
|
18
|
-
return t << 1 | t >>> 31;
|
|
19
|
-
}
|
|
20
|
-
function l(t) {
|
|
21
|
-
return t << 5 | t >>> 27;
|
|
22
|
-
}
|
|
23
|
-
function I(t) {
|
|
24
|
-
return t << 30 | t >>> 2;
|
|
25
|
-
}
|
|
26
|
-
function y(t, r, s, a) {
|
|
27
|
-
return t === 0 ? r & s | ~r & a : t === 2 ? r & s | r & a | s & a : r ^ s ^ a;
|
|
28
|
-
}
|
|
29
|
-
h.prototype._update = function(t) {
|
|
30
|
-
for (var r = this._w, s = this._a | 0, a = this._b | 0, e = this._c | 0, n = this._d | 0, _ = this._e | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
|
|
31
|
-
for (; i < 80; ++i) r[i] = E(r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16]);
|
|
32
|
-
for (var o = 0; o < 80; ++o) {
|
|
33
|
-
var f = ~~(o / 20), u = l(s) + y(f, a, e, n) + _ + r[o] + B[f] | 0;
|
|
34
|
-
_ = n, n = e, e = I(a), a = s, s = u;
|
|
35
|
-
}
|
|
36
|
-
this._a = s + this._a | 0, this._b = a + this._b | 0, this._c = e + this._c | 0, this._d = n + this._d | 0, this._e = _ + this._e | 0;
|
|
37
|
-
};
|
|
38
|
-
h.prototype._hash = function() {
|
|
39
|
-
var t = w.allocUnsafe(20);
|
|
40
|
-
return t.writeInt32BE(this._a | 0, 0), t.writeInt32BE(this._b | 0, 4), t.writeInt32BE(this._c | 0, 8), t.writeInt32BE(this._d | 0, 12), t.writeInt32BE(this._e | 0, 16), t;
|
|
41
|
-
};
|
|
42
|
-
var A = h;
|
|
1
|
+
import { b as e } from "./index79.js";
|
|
2
|
+
import { b as t } from "./index80.js";
|
|
3
|
+
var a = e, b = t;
|
|
4
|
+
function o(r) {
|
|
5
|
+
var s = a("sha256").update(r).digest();
|
|
6
|
+
return a("sha256").update(s).digest();
|
|
7
|
+
}
|
|
8
|
+
var p = b(o);
|
|
43
9
|
export {
|
|
44
|
-
|
|
10
|
+
p as b
|
|
45
11
|
};
|
package/dist/index57.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index87.cjs");function p(e,{dir:n,size:t=32}={}){return typeof e=="string"?o(e,{dir:n,size:t}):l(e,{dir:n,size:t})}function o(e,{dir:n,size:t=32}={}){if(t===null)return e;const r=e.replace("0x","");if(r.length>t*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(r.length/2),targetSize:t,type:"hex"});return`0x${r[n==="right"?"padEnd":"padStart"](t*2,"0")}`}function l(e,{dir:n,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new i.SizeExceedsPaddingSizeError({size:e.length,targetSize:t,type:"bytes"});const r=new Uint8Array(t);for(let a=0;a<t;a++){const d=n==="right";r[d?a:t-a-1]=e[d?a:e.length-a-1]}return r}exports.pad=p;exports.padBytes=l;exports.padHex=o;
|
package/dist/index57.js
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { SizeExceedsPaddingSizeError as d } from "./index87.js";
|
|
2
|
+
function f(n, { dir: r, size: t = 32 } = {}) {
|
|
3
|
+
return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
|
|
4
|
+
}
|
|
5
|
+
function p(n, { dir: r, size: t = 32 } = {}) {
|
|
6
|
+
if (t === null)
|
|
7
|
+
return n;
|
|
8
|
+
const e = n.replace("0x", "");
|
|
9
|
+
if (e.length > t * 2)
|
|
10
|
+
throw new d({
|
|
11
|
+
size: Math.ceil(e.length / 2),
|
|
12
|
+
targetSize: t,
|
|
13
|
+
type: "hex"
|
|
14
|
+
});
|
|
15
|
+
return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
|
|
16
|
+
}
|
|
17
|
+
function i(n, { dir: r, size: t = 32 } = {}) {
|
|
18
|
+
if (t === null)
|
|
19
|
+
return n;
|
|
20
|
+
if (n.length > t)
|
|
21
|
+
throw new d({
|
|
22
|
+
size: n.length,
|
|
23
|
+
targetSize: t,
|
|
24
|
+
type: "bytes"
|
|
25
|
+
});
|
|
26
|
+
const e = new Uint8Array(t);
|
|
27
|
+
for (let a = 0; a < t; a++) {
|
|
28
|
+
const o = r === "right";
|
|
29
|
+
e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
|
|
30
|
+
}
|
|
31
|
+
return e;
|
|
8
32
|
}
|
|
9
|
-
e(i, f);
|
|
10
|
-
i.prototype.init = function() {
|
|
11
|
-
return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;
|
|
12
|
-
};
|
|
13
|
-
i.prototype._hash = function() {
|
|
14
|
-
var t = o.allocUnsafe(28);
|
|
15
|
-
return t.writeInt32BE(this._a, 0), t.writeInt32BE(this._b, 4), t.writeInt32BE(this._c, 8), t.writeInt32BE(this._d, 12), t.writeInt32BE(this._e, 16), t.writeInt32BE(this._f, 20), t.writeInt32BE(this._g, 24), t;
|
|
16
|
-
};
|
|
17
|
-
var B = i;
|
|
18
33
|
export {
|
|
19
|
-
|
|
34
|
+
f as pad,
|
|
35
|
+
i as padBytes,
|
|
36
|
+
p as padHex
|
|
20
37
|
};
|
package/dist/index58.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index59.cjs"),l=require("./index60.cjs"),u=require("./index57.cjs"),f=require("./index30.cjs"),m=require("./index45.cjs"),h=new TextEncoder;function A(e,n={}){return typeof e=="number"||typeof e=="bigint"?B(e,n):typeof e=="boolean"?x(e,n):l.isHex(e)?c(e,n):T(e,n)}function x(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{size:n.size})):t}const i={zero:48,nine:57,A:65,F:70,a:97,f:102};function g(e){if(e>=i.zero&&e<=i.nine)return e-i.zero;if(e>=i.A&&e<=i.F)return e-(i.A-10);if(e>=i.a&&e<=i.f)return e-(i.a-10)}function c(e,n={}){let t=e;n.size&&(f.assertSize(t,{size:n.size}),t=u.pad(t,{dir:"right",size:n.size}));let r=t.slice(2);r.length%2&&(r=`0${r}`);const d=r.length/2,y=new Uint8Array(d);for(let s=0,o=0;s<d;s++){const b=g(r.charCodeAt(o++)),z=g(r.charCodeAt(o++));if(b===void 0||z===void 0)throw new a.BaseError(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);y[s]=b*16+z}return y}function B(e,n){const t=m.numberToHex(e,n);return c(t)}function T(e,n={}){const t=h.encode(e);return typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{dir:"right",size:n.size})):t}exports.boolToBytes=x;exports.hexToBytes=c;exports.numberToBytes=B;exports.stringToBytes=T;exports.toBytes=A;
|