@gardenfi/core 0.2.0-beta.74 → 0.2.0-beta.75
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 +16 -15
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +42 -31
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +18 -32
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +6 -366
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +33 -21
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +2 -56
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +38 -3
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +25 -45
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +7 -26
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +5 -2
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +11 -2
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +2 -62
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +55 -32
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -5
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +40 -2
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +38 -53
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +18 -2
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +101 -32
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +17 -39
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +224 -16
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +4 -109
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +155 -18
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +2 -226
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +73 -4
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +55 -151
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +35 -2
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +5 -73
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +2 -2
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +8 -8
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +1 -1
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +2 -19
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +356 -2
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +206 -323
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +37 -208
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +59 -65
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +10 -60
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +45 -12
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +56 -38
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +19 -63
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +9 -4
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +3 -3
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +1 -1
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +32 -2
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +10 -17
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +18 -12
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +15 -16
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +39 -16
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +25 -52
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -9
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +138 -9
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -138
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +9 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +7 -11
- package/dist/index26.cjs +3 -1
- package/dist/index26.js +27 -36
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +17 -44
- package/dist/index28.cjs +2 -1
- package/dist/index28.js +24 -27
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +40 -14
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +197 -22
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -26
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +2 -55
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -28
- package/dist/index34.cjs +1 -3
- package/dist/index34.js +11 -26
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +39 -17
- package/dist/index36.cjs +1 -2
- package/dist/index36.js +40 -23
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +26 -39
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +15 -199
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +24 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +26 -2
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +55 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +27 -12
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +174 -11
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -4
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +34 -45
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +9 -43
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +10 -169
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +11 -12
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -4
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +48 -59
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +45 -16
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +40 -9
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +167 -170
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +12 -21
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +5 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +17 -35
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +11 -8
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +19 -34
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +31 -55
- package/dist/index59.cjs +1 -2
- package/dist/index59.js +2 -60
- package/dist/index60.cjs +6 -1
- package/dist/index60.js +949 -6
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +2 -128
- package/dist/index62.cjs +1 -2
- package/dist/index62.js +61 -42
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +33 -9
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +86 -10
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +55 -11
- package/dist/index66.cjs +2 -1
- package/dist/index66.js +59 -13
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +3 -6
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +33 -16
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +126 -77
- package/dist/index70.cjs +2 -1
- package/dist/index70.js +42 -14
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +8 -18
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +9 -5
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +11 -21
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +13 -13
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +7 -2
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +18 -2
- package/dist/index77.cjs +1 -2
- package/dist/index77.js +76 -32
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +14 -5
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -19
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +5 -6
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +19 -29
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +14 -2
- package/dist/index82.cjs +1 -6
- package/dist/index82.js +9 -949
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +2 -2
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +2 -62
- package/dist/index85.cjs +2 -1
- package/dist/index85.js +34 -32
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +5 -86
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +19 -12
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +34 -6
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +365 -111
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +21 -7
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +55 -32
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +3 -2
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +45 -34
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +26 -29
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -21
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -7
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +13 -5
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +6 -10
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +111 -18
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/evm/relay/evmRelay.d.ts +1 -1
- package/dist/src/lib/evm/relay/evmRelay.types.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +2 -0
- package/package.json +1 -1
package/dist/index43.js
CHANGED
|
@@ -1,14 +1,177 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { e as J } from "./index62.js";
|
|
2
|
+
import { n as _ } from "./index63.js";
|
|
3
|
+
import { __require as w } from "./index64.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);
|
|
10
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;
|
|
11
175
|
export {
|
|
12
|
-
|
|
13
|
-
r as isAddressCache
|
|
176
|
+
x as t
|
|
14
177
|
};
|
package/dist/index44.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 e={exports:{}};exports.__module=e;
|
package/dist/index44.js
CHANGED
package/dist/index45.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("./index59.cjs");require("./index60.cjs");const p=require("./index61.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/index45.js
CHANGED
|
@@ -1,48 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return typeof e.size == "number" ? (c(t, { size: e.size }), s(t, { size: e.size })) : t;
|
|
11
|
-
}
|
|
12
|
-
function m(n, e = {}) {
|
|
13
|
-
let t = "";
|
|
14
|
-
for (let i = 0; i < n.length; i++)
|
|
15
|
-
t += b[n[i]];
|
|
16
|
-
const r = `0x${t}`;
|
|
17
|
-
return typeof e.size == "number" ? (c(r, { size: e.size }), s(r, { dir: "right", size: e.size })) : r;
|
|
18
|
-
}
|
|
19
|
-
function y(n, e = {}) {
|
|
20
|
-
const { signed: t, size: r } = e, i = BigInt(n);
|
|
21
|
-
let o;
|
|
22
|
-
r ? t ? o = (1n << BigInt(r) * 8n - 1n) - 1n : o = 2n ** (BigInt(r) * 8n) - 1n : typeof n == "number" && (o = BigInt(Number.MAX_SAFE_INTEGER));
|
|
23
|
-
const g = typeof o == "bigint" && t ? -o - 1n : 0;
|
|
24
|
-
if (o && i > o || i < g) {
|
|
25
|
-
const f = typeof n == "bigint" ? "n" : "";
|
|
26
|
-
throw new x({
|
|
27
|
-
max: o ? `${o}${f}` : void 0,
|
|
28
|
-
min: `${g}${f}`,
|
|
29
|
-
signed: t,
|
|
30
|
-
size: r,
|
|
31
|
-
value: `${n}${f}`
|
|
32
|
-
});
|
|
1
|
+
import { __module as a } from "./index59.js";
|
|
2
|
+
import "./index60.js";
|
|
3
|
+
import { __exports as s } from "./index61.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];
|
|
33
10
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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;
|
|
42
35
|
export {
|
|
43
|
-
|
|
44
|
-
m as bytesToHex,
|
|
45
|
-
y as numberToHex,
|
|
46
|
-
$ as stringToHex,
|
|
47
|
-
B as toHex
|
|
36
|
+
w as s
|
|
48
37
|
};
|
package/dist/index46.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("./index57.cjs"),t=require("./index58.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/index46.js
CHANGED
|
@@ -1,45 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function s(n) {
|
|
10
|
-
return Array.isArray(n) ? p(n.map((e) => s(e))) : y(n);
|
|
11
|
-
}
|
|
12
|
-
function p(n) {
|
|
13
|
-
const e = n.reduce((t, f) => t + f.length, 0), i = o(e);
|
|
14
|
-
return {
|
|
15
|
-
length: e <= 55 ? 1 + e : 1 + i + e,
|
|
16
|
-
encode(t) {
|
|
17
|
-
e <= 55 ? t.pushByte(192 + e) : (t.pushByte(247 + i), i === 1 ? t.pushUint8(e) : i === 2 ? t.pushUint16(e) : i === 3 ? t.pushUint24(e) : t.pushUint32(e));
|
|
18
|
-
for (const { encode: f } of n)
|
|
19
|
-
f(t);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function y(n) {
|
|
24
|
-
const e = typeof n == "string" ? g(n) : n, i = o(e.length);
|
|
25
|
-
return {
|
|
26
|
-
length: e.length === 1 && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + i + e.length,
|
|
27
|
-
encode(t) {
|
|
28
|
-
e.length === 1 && e[0] < 128 ? t.pushBytes(e) : e.length <= 55 ? (t.pushByte(128 + e.length), t.pushBytes(e)) : (t.pushByte(183 + i), i === 1 ? t.pushUint8(e.length) : i === 2 ? t.pushUint16(e.length) : i === 3 ? t.pushUint24(e.length) : t.pushUint32(e.length), t.pushBytes(e));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function o(n) {
|
|
33
|
-
if (n < 2 ** 8)
|
|
34
|
-
return 1;
|
|
35
|
-
if (n < 2 ** 16)
|
|
36
|
-
return 2;
|
|
37
|
-
if (n < 2 ** 24)
|
|
38
|
-
return 3;
|
|
39
|
-
if (n < 2 ** 32)
|
|
40
|
-
return 4;
|
|
41
|
-
throw new l("Length is too large.");
|
|
42
|
-
}
|
|
1
|
+
import { b as e } from "./index57.js";
|
|
2
|
+
import { b as t } from "./index58.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/index47.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 s=require("./index66.cjs");class r extends s.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}exports.InvalidAddressError=r;
|
package/dist/index47.js
CHANGED
|
@@ -1,174 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { serializeAuthorizationList as w } from "./index68.js";
|
|
11
|
-
import { assertTransactionEIP7702 as S, assertTransactionEIP4844 as _, assertTransactionEIP1559 as R, assertTransactionEIP2930 as Y, assertTransactionLegacy as j } from "./index69.js";
|
|
12
|
-
import { getTransactionType as q } from "./index70.js";
|
|
13
|
-
import { serializeAccessList as v } from "./index71.js";
|
|
14
|
-
function te(e, r) {
|
|
15
|
-
const i = q(e);
|
|
16
|
-
return i === "eip1559" ? K(e, r) : i === "eip2930" ? M(e, r) : i === "eip4844" ? J(e, r) : i === "eip7702" ? D(e, r) : N(e, r);
|
|
17
|
-
}
|
|
18
|
-
function D(e, r) {
|
|
19
|
-
const { authorizationList: i, chainId: s, gas: n, nonce: c, to: f, value: a, maxFeePerGas: x, maxPriorityFeePerGas: t, accessList: p, data: l } = e;
|
|
20
|
-
S(e);
|
|
21
|
-
const d = v(p), m = w(i);
|
|
22
|
-
return h([
|
|
23
|
-
"0x04",
|
|
24
|
-
y([
|
|
25
|
-
o(s),
|
|
26
|
-
c ? o(c) : "0x",
|
|
27
|
-
t ? o(t) : "0x",
|
|
28
|
-
x ? o(x) : "0x",
|
|
29
|
-
n ? o(n) : "0x",
|
|
30
|
-
f ?? "0x",
|
|
31
|
-
a ? o(a) : "0x",
|
|
32
|
-
l ?? "0x",
|
|
33
|
-
d,
|
|
34
|
-
m,
|
|
35
|
-
...I(e, r)
|
|
36
|
-
])
|
|
37
|
-
]);
|
|
38
|
-
}
|
|
39
|
-
function J(e, r) {
|
|
40
|
-
const { chainId: i, gas: s, nonce: n, to: c, value: f, maxFeePerBlobGas: a, maxFeePerGas: x, maxPriorityFeePerGas: t, accessList: p, data: l } = e;
|
|
41
|
-
_(e);
|
|
42
|
-
let d = e.blobVersionedHashes, m = e.sidecars;
|
|
43
|
-
if (e.blobs && (typeof d > "u" || typeof m > "u")) {
|
|
44
|
-
const u = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((P) => k(P)), z = e.kzg, b = g({
|
|
45
|
-
blobs: u,
|
|
46
|
-
kzg: z
|
|
1
|
+
import { BaseError as r } from "./index66.js";
|
|
2
|
+
class d extends r {
|
|
3
|
+
constructor({ address: s }) {
|
|
4
|
+
super(`Address "${s}" is invalid.`, {
|
|
5
|
+
metaMessages: [
|
|
6
|
+
"- Address must be a hex value of 20 bytes (40 hex characters).",
|
|
7
|
+
"- Address must match its checksum counterpart."
|
|
8
|
+
],
|
|
9
|
+
name: "InvalidAddressError"
|
|
47
10
|
});
|
|
48
|
-
if (typeof d > "u" && (d = V({
|
|
49
|
-
commitments: b
|
|
50
|
-
})), typeof m > "u") {
|
|
51
|
-
const P = B({ blobs: u, commitments: b, kzg: z });
|
|
52
|
-
m = C({ blobs: u, commitments: b, proofs: P });
|
|
53
|
-
}
|
|
54
11
|
}
|
|
55
|
-
const L = v(p), E = [
|
|
56
|
-
o(i),
|
|
57
|
-
n ? o(n) : "0x",
|
|
58
|
-
t ? o(t) : "0x",
|
|
59
|
-
x ? o(x) : "0x",
|
|
60
|
-
s ? o(s) : "0x",
|
|
61
|
-
c ?? "0x",
|
|
62
|
-
f ? o(f) : "0x",
|
|
63
|
-
l ?? "0x",
|
|
64
|
-
L,
|
|
65
|
-
a ? o(a) : "0x",
|
|
66
|
-
d ?? [],
|
|
67
|
-
...I(e, r)
|
|
68
|
-
], A = [], F = [], G = [];
|
|
69
|
-
if (m)
|
|
70
|
-
for (let u = 0; u < m.length; u++) {
|
|
71
|
-
const { blob: z, commitment: b, proof: P } = m[u];
|
|
72
|
-
A.push(z), F.push(b), G.push(P);
|
|
73
|
-
}
|
|
74
|
-
return h([
|
|
75
|
-
"0x03",
|
|
76
|
-
m ? (
|
|
77
|
-
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
78
|
-
y([E, A, F, G])
|
|
79
|
-
) : (
|
|
80
|
-
// If sidecars are disabled, standard envelope is used:
|
|
81
|
-
y(E)
|
|
82
|
-
)
|
|
83
|
-
]);
|
|
84
|
-
}
|
|
85
|
-
function K(e, r) {
|
|
86
|
-
const { chainId: i, gas: s, nonce: n, to: c, value: f, maxFeePerGas: a, maxPriorityFeePerGas: x, accessList: t, data: p } = e;
|
|
87
|
-
R(e);
|
|
88
|
-
const l = v(t), d = [
|
|
89
|
-
o(i),
|
|
90
|
-
n ? o(n) : "0x",
|
|
91
|
-
x ? o(x) : "0x",
|
|
92
|
-
a ? o(a) : "0x",
|
|
93
|
-
s ? o(s) : "0x",
|
|
94
|
-
c ?? "0x",
|
|
95
|
-
f ? o(f) : "0x",
|
|
96
|
-
p ?? "0x",
|
|
97
|
-
l,
|
|
98
|
-
...I(e, r)
|
|
99
|
-
];
|
|
100
|
-
return h([
|
|
101
|
-
"0x02",
|
|
102
|
-
y(d)
|
|
103
|
-
]);
|
|
104
|
-
}
|
|
105
|
-
function M(e, r) {
|
|
106
|
-
const { chainId: i, gas: s, data: n, nonce: c, to: f, value: a, accessList: x, gasPrice: t } = e;
|
|
107
|
-
Y(e);
|
|
108
|
-
const p = v(x), l = [
|
|
109
|
-
o(i),
|
|
110
|
-
c ? o(c) : "0x",
|
|
111
|
-
t ? o(t) : "0x",
|
|
112
|
-
s ? o(s) : "0x",
|
|
113
|
-
f ?? "0x",
|
|
114
|
-
a ? o(a) : "0x",
|
|
115
|
-
n ?? "0x",
|
|
116
|
-
p,
|
|
117
|
-
...I(e, r)
|
|
118
|
-
];
|
|
119
|
-
return h([
|
|
120
|
-
"0x01",
|
|
121
|
-
y(l)
|
|
122
|
-
]);
|
|
123
|
-
}
|
|
124
|
-
function N(e, r) {
|
|
125
|
-
const { chainId: i = 0, gas: s, data: n, nonce: c, to: f, value: a, gasPrice: x } = e;
|
|
126
|
-
j(e);
|
|
127
|
-
let t = [
|
|
128
|
-
c ? o(c) : "0x",
|
|
129
|
-
x ? o(x) : "0x",
|
|
130
|
-
s ? o(s) : "0x",
|
|
131
|
-
f ?? "0x",
|
|
132
|
-
a ? o(a) : "0x",
|
|
133
|
-
n ?? "0x"
|
|
134
|
-
];
|
|
135
|
-
if (r) {
|
|
136
|
-
const p = (() => {
|
|
137
|
-
if (r.v >= 35n)
|
|
138
|
-
return (r.v - 35n) / 2n > 0 ? r.v : 27n + (r.v === 35n ? 0n : 1n);
|
|
139
|
-
if (i > 0)
|
|
140
|
-
return BigInt(i * 2) + BigInt(35n + r.v - 27n);
|
|
141
|
-
const m = 27n + (r.v === 27n ? 0n : 1n);
|
|
142
|
-
if (r.v !== m)
|
|
143
|
-
throw new H({ v: r.v });
|
|
144
|
-
return m;
|
|
145
|
-
})(), l = T(r.r), d = T(r.s);
|
|
146
|
-
t = [
|
|
147
|
-
...t,
|
|
148
|
-
o(p),
|
|
149
|
-
l === "0x00" ? "0x" : l,
|
|
150
|
-
d === "0x00" ? "0x" : d
|
|
151
|
-
];
|
|
152
|
-
} else i > 0 && (t = [
|
|
153
|
-
...t,
|
|
154
|
-
o(i),
|
|
155
|
-
"0x",
|
|
156
|
-
"0x"
|
|
157
|
-
]);
|
|
158
|
-
return y(t);
|
|
159
|
-
}
|
|
160
|
-
function I(e, r) {
|
|
161
|
-
const i = r ?? e, { v: s, yParity: n } = i;
|
|
162
|
-
if (typeof i.r > "u")
|
|
163
|
-
return [];
|
|
164
|
-
if (typeof i.s > "u")
|
|
165
|
-
return [];
|
|
166
|
-
if (typeof s > "u" && typeof n > "u")
|
|
167
|
-
return [];
|
|
168
|
-
const c = T(i.r), f = T(i.s);
|
|
169
|
-
return [typeof n == "number" ? n ? o(1) : "0x" : s === 0n ? "0x" : s === 1n ? o(1) : s === 27n ? "0x" : o(1), c === "0x00" ? "0x" : c, f === "0x00" ? "0x" : f];
|
|
170
12
|
}
|
|
171
13
|
export {
|
|
172
|
-
|
|
173
|
-
I as toYParitySignatureArray
|
|
14
|
+
d as InvalidAddressError
|
|
174
15
|
};
|
package/dist/index48.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 c=require("./index80.cjs"),i=require("./index81.cjs"),o=/^0x[a-fA-F0-9]{40}$/,t=new c.LruMap(8192);function f(e,n){const{strict:s=!0}=n??{},r=`${e}.${s}`;if(t.has(r))return t.get(r);const u=o.test(e)?e.toLowerCase()===e?!0:s?i.checksumAddress(e)===e:!0:!1;return t.set(r,u),u}exports.isAddress=f;exports.isAddressCache=t;
|
package/dist/index48.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { LruMap as u } from "./index80.js";
|
|
2
|
+
import { checksumAddress as c } from "./index81.js";
|
|
3
|
+
const i = /^0x[a-fA-F0-9]{40}$/, r = /* @__PURE__ */ new u(8192);
|
|
4
|
+
function h(t, s) {
|
|
5
|
+
const { strict: n = !0 } = s ?? {}, e = `${t}.${n}`;
|
|
6
|
+
if (r.has(e))
|
|
7
|
+
return r.get(e);
|
|
8
|
+
const o = i.test(t) ? t.toLowerCase() === t ? !0 : n ? c(t) === t : !0 : !1;
|
|
9
|
+
return r.set(e, o), o;
|
|
11
10
|
}
|
|
12
11
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
h as isAddress,
|
|
13
|
+
r as isAddressCache
|
|
15
14
|
};
|
package/dist/index49.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){return`0x${e.reduce((t,c)=>t+c.replace("0x",""),"")}`}exports.concatHex=r;
|
package/dist/index49.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return r(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
|
|
1
|
+
function n(e) {
|
|
2
|
+
return `0x${e.reduce((c, r) => c + r.replace("0x", ""), "")}`;
|
|
4
3
|
}
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
n as concatHex
|
|
7
6
|
};
|
package/dist/index5.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("@gardenfi/utils"),f=require("viem"),r=require("@catalogfi/utils"),w=require("./index13.cjs");class g{constructor(t,o,e){this.url=new i.Url("/relayer",o),this.auth=e,this.order=t}async init(t){if(!t.account)return r.Err("No account found");if(t.account.address.toLowerCase()!==this.order.source_swap.initiator.toLowerCase())return r.Err("Account address and order initiator mismatch");const{create_order:o,source_swap:e}=this.order;if(!e.amount||!e.redeemer||!o.timelock||!o.secret_hash)return r.Err("Invalid order");const n=i.with0x(o.secret_hash),h=BigInt(o.timelock),p=i.with0x(e.redeemer),u=BigInt(e.amount);try{const a=await this.auth.getToken();if(a.error)return r.Err(a.error);const d=f.getContract({address:i.with0x(this.order.source_swap.asset),abi:w.AtomicSwapABI,client:t}),y=await d.read.token(),m=await i.checkAllowanceAndApprove(Number(u),y,this.order.source_swap.asset,t);if(m.error)return r.Err(m.error);const s=await d.read.eip712Domain(),l=await t.signTypedData({account:t.account,domain:{name:s[1],version:s[2],chainId:Number(s[3]),verifyingContract:s[4]},types:{Initiate:[{name:"redeemer",type:"address"},{name:"timelock",type:"uint256"},{name:"amount",type:"uint256"},{name:"secretHash",type:"bytes32"}]},primaryType:"Initiate",message:{redeemer:p,timelock:h,amount:u,secretHash:n}}),c=await r.Fetcher.post(this.url.endpoint("initiate"),{body:JSON.stringify({order_id:o.create_id,signature:l,perform_on:"Source"}),headers:{Authorization:i.Authorization(a.val),"Content-Type":"application/json"}});return c.error?r.Err(c.error):c.result?r.Ok(c.result):r.Err("Init: No result found")}catch(a){return console.log("init error :",a),r.Err(String(a))}}async redeem(t,o){try{const e=await this.auth.getToken();if(e.error)return r.Err(e.error);const n=await r.Fetcher.post(this.url.endpoint("redeem"),{body:JSON.stringify({order_id:t,secret:r.trim0x(o),perform_on:"Destination"}),headers:{Authorization:i.Authorization(e.val),"Content-Type":"application/json"}});return n.error?r.Err(n.error):n.result?r.Ok(n.result):r.Err("Redeem: No result found")}catch(e){return r.Err(String(e))}}}exports.EvmRelay=g;
|