@gardenfi/swap 0.0.2-beta.1 → 0.0.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +4 -4
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +3 -3
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +3 -3
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +2 -2
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +7 -7
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +1 -1
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +1 -1
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +1 -1
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +1 -1
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +2 -2
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +2 -2
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +2 -2
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +2 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +2 -2
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +2 -2
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +2 -2
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +2 -2
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +1 -1
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +174 -9
- package/dist/index273.cjs +2 -1
- package/dist/index273.js +91 -30
- package/dist/index274.cjs +1 -1
- package/dist/index274.js +41 -2
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +4 -47
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +9 -11
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +30 -174
- package/dist/index278.cjs +1 -2
- package/dist/index278.js +2 -92
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +45 -38
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +11 -4
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +3 -3
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +7 -37
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +36 -14
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +15 -8
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +43 -8
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +317 -39
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +586 -301
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +107 -603
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +168 -110
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +299 -165
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +92 -300
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +56 -93
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +52 -55
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +42 -51
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +14 -43
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +317 -15
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +53 -311
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +19 -59
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +29 -19
- package/dist/index317.cjs +1 -1
- package/dist/index317.js +3 -29
- package/dist/index318.cjs +7 -1
- package/dist/index318.js +237 -3
- package/dist/index319.cjs +1 -7
- package/dist/index319.js +48 -238
- package/dist/index320.cjs +1 -1
- package/dist/index320.js +213 -48
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +75 -206
- package/dist/index322.cjs +1 -1
- package/dist/index322.js +26 -78
- package/dist/index323.cjs +1 -1
- package/dist/index323.js +73 -26
- package/dist/index324.cjs +1 -1
- package/dist/index324.js +7 -75
- package/dist/index326.cjs +1 -1
- package/dist/index326.js +1 -1
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +1 -1
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +2 -2
- package/dist/index334.cjs +1 -1
- package/dist/index334.js +2 -2
- package/dist/index346.cjs +1 -1
- package/dist/index346.js +1 -1
- package/dist/index347.cjs +1 -1
- package/dist/index347.js +1 -1
- package/dist/index348.cjs +1 -1
- package/dist/index348.js +3 -3
- package/dist/index349.cjs +2 -1
- package/dist/index349.js +193 -4
- package/dist/index350.cjs +1 -2
- package/dist/index350.js +52 -168
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +331 -65
- package/dist/index352.cjs +1 -1
- package/dist/index352.js +149 -332
- package/dist/index353.cjs +1 -1
- package/dist/index353.js +5 -161
- package/dist/index354.cjs +1 -1
- package/dist/index354.js +5 -5
- package/dist/index357.cjs +1 -1
- package/dist/index357.js +205 -8
- package/dist/index359.cjs +1 -1
- package/dist/index359.js +8 -205
- package/dist/index363.cjs +1 -1
- package/dist/index363.js +1 -1
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +1 -1
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +73 -3
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +29 -138
- package/dist/index367.cjs +1 -1
- package/dist/index367.js +5 -73
- package/dist/index368.cjs +1 -1
- package/dist/index368.js +2 -30
- package/dist/index369.cjs +1 -1
- package/dist/index369.js +140 -5
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +1 -1
- package/dist/index373.cjs +1 -1
- package/dist/index373.js +1 -1
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +1 -1
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +2 -2
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +1 -1
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +1 -1
- package/dist/index381.cjs +1 -1
- package/dist/index381.js +22 -2
- package/dist/index382.cjs +1 -1
- package/dist/index382.js +2 -22
- package/dist/index385.cjs +1 -1
- package/dist/index385.js +2 -2
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +13 -13
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +1 -1
- package/package.json +5 -5
package/dist/index277.js
CHANGED
|
@@ -1,177 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const n = `0x${t}`;
|
|
31
|
-
return typeof r.size == "number" ? (f(n, r.size), w(n, r.size)) : n;
|
|
32
|
-
}
|
|
33
|
-
function V(e, r = {}) {
|
|
34
|
-
const { signed: t, size: n } = r, s = BigInt(e);
|
|
35
|
-
let i;
|
|
36
|
-
n ? t ? i = (1n << BigInt(n) * 8n - 1n) - 1n : i = 2n ** (BigInt(n) * 8n) - 1n : typeof e == "number" && (i = BigInt(Number.MAX_SAFE_INTEGER));
|
|
37
|
-
const u = typeof i == "bigint" && t ? -i - 1n : 0;
|
|
38
|
-
if (i && s > i || s < u) {
|
|
39
|
-
const a = typeof e == "bigint" ? "n" : "";
|
|
40
|
-
throw new O({
|
|
41
|
-
max: i ? `${i}${a}` : void 0,
|
|
42
|
-
min: `${u}${a}`,
|
|
43
|
-
signed: t,
|
|
44
|
-
size: n,
|
|
45
|
-
value: `${e}${a}`
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
const l = `0x${(t && s < 0 ? BigInt.asUintN(n * 8, BigInt(s)) : s).toString(16)}`;
|
|
49
|
-
return n ? m(l, n) : l;
|
|
50
|
-
}
|
|
51
|
-
function j(e, r = {}) {
|
|
52
|
-
return c(y.encode(e), r);
|
|
53
|
-
}
|
|
54
|
-
function m(e, r) {
|
|
55
|
-
return b(e, { dir: "left", size: r });
|
|
56
|
-
}
|
|
57
|
-
function w(e, r) {
|
|
58
|
-
return b(e, { dir: "right", size: r });
|
|
59
|
-
}
|
|
60
|
-
function _(e, r, t, n = {}) {
|
|
61
|
-
const { strict: s } = n;
|
|
62
|
-
x(e, r);
|
|
63
|
-
const i = `0x${e.replace("0x", "").slice((r ?? 0) * 2, (t ?? e.length) * 2)}`;
|
|
64
|
-
return s && $(i, r, t), i;
|
|
65
|
-
}
|
|
66
|
-
function v(e) {
|
|
67
|
-
return Math.ceil((e.length - 2) / 2);
|
|
68
|
-
}
|
|
69
|
-
function E(e, r = {}) {
|
|
70
|
-
const { signed: t } = r;
|
|
71
|
-
r.size && f(e, r.size);
|
|
72
|
-
const n = BigInt(e);
|
|
73
|
-
if (!t)
|
|
74
|
-
return n;
|
|
75
|
-
const s = (e.length - 2) / 2, i = (1n << BigInt(s) * 8n) - 1n, u = i >> 1n;
|
|
76
|
-
return n <= u ? n : n - i - 1n;
|
|
77
|
-
}
|
|
78
|
-
function M(e, r = {}) {
|
|
79
|
-
const { signed: t, size: n } = r;
|
|
80
|
-
return Number(!t && !n ? e : E(e, r));
|
|
81
|
-
}
|
|
82
|
-
function R(e, r = {}) {
|
|
83
|
-
const { strict: t = !1 } = r;
|
|
84
|
-
try {
|
|
85
|
-
return z(e, { strict: t }), !0;
|
|
86
|
-
} catch {
|
|
87
|
-
return !1;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
class O extends o {
|
|
91
|
-
constructor({ max: r, min: t, signed: n, size: s, value: i }) {
|
|
92
|
-
super(`Number \`${i}\` is not in safe${s ? ` ${s * 8}-bit` : ""}${n ? " signed" : " unsigned"} integer range ${r ? `(\`${t}\` to \`${r}\`)` : `(above \`${t}\`)`}`), Object.defineProperty(this, "name", {
|
|
93
|
-
enumerable: !0,
|
|
94
|
-
configurable: !0,
|
|
95
|
-
writable: !0,
|
|
96
|
-
value: "Hex.IntegerOutOfRangeError"
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
class d extends o {
|
|
101
|
-
constructor(r) {
|
|
102
|
-
super(`Value \`${typeof r == "object" ? p(r) : r}\` of type \`${typeof r}\` is an invalid hex type.`, {
|
|
103
|
-
metaMessages: ['Hex types must be represented as `"0x${string}"`.']
|
|
104
|
-
}), Object.defineProperty(this, "name", {
|
|
105
|
-
enumerable: !0,
|
|
106
|
-
configurable: !0,
|
|
107
|
-
writable: !0,
|
|
108
|
-
value: "Hex.InvalidHexTypeError"
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
class g extends o {
|
|
113
|
-
constructor(r) {
|
|
114
|
-
super(`Value \`${r}\` is an invalid hex value.`, {
|
|
115
|
-
metaMessages: [
|
|
116
|
-
'Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).'
|
|
117
|
-
]
|
|
118
|
-
}), Object.defineProperty(this, "name", {
|
|
119
|
-
enumerable: !0,
|
|
120
|
-
configurable: !0,
|
|
121
|
-
writable: !0,
|
|
122
|
-
value: "Hex.InvalidHexValueError"
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
class T extends o {
|
|
127
|
-
constructor({ givenSize: r, maxSize: t }) {
|
|
128
|
-
super(`Size cannot exceed \`${t}\` bytes. Given size: \`${r}\` bytes.`), Object.defineProperty(this, "name", {
|
|
129
|
-
enumerable: !0,
|
|
130
|
-
configurable: !0,
|
|
131
|
-
writable: !0,
|
|
132
|
-
value: "Hex.SizeOverflowError"
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
class U extends o {
|
|
137
|
-
constructor({ offset: r, position: t, size: n }) {
|
|
138
|
-
super(`Slice ${t === "start" ? "starting" : "ending"} at offset \`${r}\` is out-of-bounds (size: \`${n}\`).`), Object.defineProperty(this, "name", {
|
|
139
|
-
enumerable: !0,
|
|
140
|
-
configurable: !0,
|
|
141
|
-
writable: !0,
|
|
142
|
-
value: "Hex.SliceOffsetOutOfBoundsError"
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
class F extends o {
|
|
147
|
-
constructor({ size: r, targetSize: t, type: n }) {
|
|
148
|
-
super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${r}\`) exceeds padding size (\`${t}\`).`), Object.defineProperty(this, "name", {
|
|
149
|
-
enumerable: !0,
|
|
150
|
-
configurable: !0,
|
|
151
|
-
writable: !0,
|
|
152
|
-
value: "Hex.SizeExceedsPaddingSizeError"
|
|
153
|
-
});
|
|
154
|
-
}
|
|
1
|
+
import { fromNumber as a } from "./index272.js";
|
|
2
|
+
import { toRpc as e } from "./index359.js";
|
|
3
|
+
function n(t) {
|
|
4
|
+
return {
|
|
5
|
+
...typeof t.baseFeePerGas == "bigint" && {
|
|
6
|
+
baseFeePerGas: a(t.baseFeePerGas)
|
|
7
|
+
},
|
|
8
|
+
...typeof t.blobBaseFee == "bigint" && {
|
|
9
|
+
blobBaseFee: a(t.blobBaseFee)
|
|
10
|
+
},
|
|
11
|
+
...typeof t.feeRecipient == "string" && {
|
|
12
|
+
feeRecipient: t.feeRecipient
|
|
13
|
+
},
|
|
14
|
+
...typeof t.gasLimit == "bigint" && {
|
|
15
|
+
gasLimit: a(t.gasLimit)
|
|
16
|
+
},
|
|
17
|
+
...typeof t.number == "bigint" && {
|
|
18
|
+
number: a(t.number)
|
|
19
|
+
},
|
|
20
|
+
...typeof t.prevRandao == "bigint" && {
|
|
21
|
+
prevRandao: a(t.prevRandao)
|
|
22
|
+
},
|
|
23
|
+
...typeof t.time == "bigint" && {
|
|
24
|
+
time: a(t.time)
|
|
25
|
+
},
|
|
26
|
+
...t.withdrawals && {
|
|
27
|
+
withdrawals: t.withdrawals.map(e)
|
|
28
|
+
}
|
|
29
|
+
};
|
|
155
30
|
}
|
|
156
31
|
export {
|
|
157
|
-
|
|
158
|
-
d as InvalidHexTypeError,
|
|
159
|
-
g as InvalidHexValueError,
|
|
160
|
-
F as SizeExceedsPaddingSizeError,
|
|
161
|
-
T as SizeOverflowError,
|
|
162
|
-
U as SliceOffsetOutOfBoundsError,
|
|
163
|
-
z as assert,
|
|
164
|
-
A as concat,
|
|
165
|
-
N as from,
|
|
166
|
-
P as fromBoolean,
|
|
167
|
-
c as fromBytes,
|
|
168
|
-
V as fromNumber,
|
|
169
|
-
j as fromString,
|
|
170
|
-
m as padLeft,
|
|
171
|
-
w as padRight,
|
|
172
|
-
v as size,
|
|
173
|
-
_ as slice,
|
|
174
|
-
E as toBigInt,
|
|
175
|
-
M as toNumber,
|
|
176
|
-
R as validate
|
|
32
|
+
n as toRpc
|
|
177
33
|
};
|
package/dist/index278.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`);super(b,e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=e.cause,this.details=i,this.docs=l,this.docsOrigin=n,this.docsPath=u,this.shortMessage=t,this.showVersion=c,this.version=o}walk(t){return d(this,t)}}Object.defineProperty(r,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${f.getVersion()}`}});r.setStaticOptions(r.defaultStaticOptions);function d(s,t){return t!=null&&t(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause?d(s.cause,t):t?null:s}exports.BaseError=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0x82ad56cb";exports.aggregate3Signature=e;
|
package/dist/index278.js
CHANGED
|
@@ -1,94 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
class r extends Error {
|
|
3
|
-
static setStaticOptions(t) {
|
|
4
|
-
r.prototype.docsOrigin = t.docsOrigin, r.prototype.showVersion = t.showVersion, r.prototype.version = t.version;
|
|
5
|
-
}
|
|
6
|
-
constructor(t, e = {}) {
|
|
7
|
-
const i = (() => {
|
|
8
|
-
var a;
|
|
9
|
-
if (e.cause instanceof r) {
|
|
10
|
-
if (e.cause.details)
|
|
11
|
-
return e.cause.details;
|
|
12
|
-
if (e.cause.shortMessage)
|
|
13
|
-
return e.cause.shortMessage;
|
|
14
|
-
}
|
|
15
|
-
return e.cause && "details" in e.cause && typeof e.cause.details == "string" ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
|
|
16
|
-
})(), u = e.cause instanceof r && e.cause.docsPath || e.docsPath, n = e.docsOrigin ?? r.prototype.docsOrigin, l = `${n}${u ?? ""}`, c = !!(e.version ?? r.prototype.showVersion), o = e.version ?? r.prototype.version, b = [
|
|
17
|
-
t || "An error occurred.",
|
|
18
|
-
...e.metaMessages ? ["", ...e.metaMessages] : [],
|
|
19
|
-
...i || u || c ? [
|
|
20
|
-
"",
|
|
21
|
-
i ? `Details: ${i}` : void 0,
|
|
22
|
-
u ? `See: ${l}` : void 0,
|
|
23
|
-
c ? `Version: ${o}` : void 0
|
|
24
|
-
] : []
|
|
25
|
-
].filter((a) => typeof a == "string").join(`
|
|
26
|
-
`);
|
|
27
|
-
super(b, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
|
|
28
|
-
enumerable: !0,
|
|
29
|
-
configurable: !0,
|
|
30
|
-
writable: !0,
|
|
31
|
-
value: void 0
|
|
32
|
-
}), Object.defineProperty(this, "docs", {
|
|
33
|
-
enumerable: !0,
|
|
34
|
-
configurable: !0,
|
|
35
|
-
writable: !0,
|
|
36
|
-
value: void 0
|
|
37
|
-
}), Object.defineProperty(this, "docsOrigin", {
|
|
38
|
-
enumerable: !0,
|
|
39
|
-
configurable: !0,
|
|
40
|
-
writable: !0,
|
|
41
|
-
value: void 0
|
|
42
|
-
}), Object.defineProperty(this, "docsPath", {
|
|
43
|
-
enumerable: !0,
|
|
44
|
-
configurable: !0,
|
|
45
|
-
writable: !0,
|
|
46
|
-
value: void 0
|
|
47
|
-
}), Object.defineProperty(this, "shortMessage", {
|
|
48
|
-
enumerable: !0,
|
|
49
|
-
configurable: !0,
|
|
50
|
-
writable: !0,
|
|
51
|
-
value: void 0
|
|
52
|
-
}), Object.defineProperty(this, "showVersion", {
|
|
53
|
-
enumerable: !0,
|
|
54
|
-
configurable: !0,
|
|
55
|
-
writable: !0,
|
|
56
|
-
value: void 0
|
|
57
|
-
}), Object.defineProperty(this, "version", {
|
|
58
|
-
enumerable: !0,
|
|
59
|
-
configurable: !0,
|
|
60
|
-
writable: !0,
|
|
61
|
-
value: void 0
|
|
62
|
-
}), Object.defineProperty(this, "cause", {
|
|
63
|
-
enumerable: !0,
|
|
64
|
-
configurable: !0,
|
|
65
|
-
writable: !0,
|
|
66
|
-
value: void 0
|
|
67
|
-
}), Object.defineProperty(this, "name", {
|
|
68
|
-
enumerable: !0,
|
|
69
|
-
configurable: !0,
|
|
70
|
-
writable: !0,
|
|
71
|
-
value: "BaseError"
|
|
72
|
-
}), this.cause = e.cause, this.details = i, this.docs = l, this.docsOrigin = n, this.docsPath = u, this.shortMessage = t, this.showVersion = c, this.version = o;
|
|
73
|
-
}
|
|
74
|
-
walk(t) {
|
|
75
|
-
return d(this, t);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
Object.defineProperty(r, "defaultStaticOptions", {
|
|
79
|
-
enumerable: !0,
|
|
80
|
-
configurable: !0,
|
|
81
|
-
writable: !0,
|
|
82
|
-
value: {
|
|
83
|
-
docsOrigin: "https://oxlib.sh",
|
|
84
|
-
showVersion: !1,
|
|
85
|
-
version: `ox@${f()}`
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
r.setStaticOptions(r.defaultStaticOptions);
|
|
89
|
-
function d(s, t) {
|
|
90
|
-
return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause ? d(s.cause, t) : t ? null : s;
|
|
91
|
-
}
|
|
1
|
+
const a = "0x82ad56cb";
|
|
92
2
|
export {
|
|
93
|
-
|
|
3
|
+
a as aggregate3Signature
|
|
94
4
|
};
|
package/dist/index279.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("./index78.cjs"),a=require("./index201.cjs"),f=require("./index198.cjs"),S=require("./index79.cjs"),c=require("./index81.cjs");function d(r){if(!(!r||r.length===0))return r.reduce((t,{slot:e,value:n})=>{if(e.length!==66)throw new a.InvalidBytesLengthError({size:e.length,targetSize:66,type:"hex"});if(n.length!==66)throw new a.InvalidBytesLengthError({size:n.length,targetSize:66,type:"hex"});return t[e]=n,t},{})}function u(r){const{balance:t,nonce:e,state:n,stateDiff:s,code:o}=r,i={};if(o!==void 0&&(i.code=o),t!==void 0&&(i.balance=c.numberToHex(t)),e!==void 0&&(i.nonce=c.numberToHex(e)),n!==void 0&&(i.state=d(n)),s!==void 0){if(i.state)throw new f.StateAssignmentConflictError;i.stateDiff=d(s)}return i}function h(r){if(!r)return;const t={};for(const{address:e,...n}of r){if(!S.isAddress(e,{strict:!1}))throw new l.InvalidAddressError({address:e});if(t[e])throw new f.AccountStateConflictError({address:e});t[e]=u(n)}return t}exports.serializeAccountStateOverride=u;exports.serializeStateMapping=d;exports.serializeStateOverride=h;
|
package/dist/index279.js
CHANGED
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { InvalidAddressError as a } from "./index78.js";
|
|
2
|
+
import { InvalidBytesLengthError as d } from "./index201.js";
|
|
3
|
+
import { AccountStateConflictError as u, StateAssignmentConflictError as h } from "./index198.js";
|
|
4
|
+
import { isAddress as l } from "./index79.js";
|
|
5
|
+
import { numberToHex as c } from "./index81.js";
|
|
6
|
+
function s(r) {
|
|
7
|
+
if (!(!r || r.length === 0))
|
|
8
|
+
return r.reduce((t, { slot: e, value: n }) => {
|
|
9
|
+
if (e.length !== 66)
|
|
10
|
+
throw new d({
|
|
11
|
+
size: e.length,
|
|
12
|
+
targetSize: 66,
|
|
13
|
+
type: "hex"
|
|
14
|
+
});
|
|
15
|
+
if (n.length !== 66)
|
|
16
|
+
throw new d({
|
|
17
|
+
size: n.length,
|
|
18
|
+
targetSize: 66,
|
|
19
|
+
type: "hex"
|
|
20
|
+
});
|
|
21
|
+
return t[e] = n, t;
|
|
22
|
+
}, {});
|
|
8
23
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
function m(r) {
|
|
25
|
+
const { balance: t, nonce: e, state: n, stateDiff: o, code: f } = r, i = {};
|
|
26
|
+
if (f !== void 0 && (i.code = f), t !== void 0 && (i.balance = c(t)), e !== void 0 && (i.nonce = c(e)), n !== void 0 && (i.state = s(n)), o !== void 0) {
|
|
27
|
+
if (i.state)
|
|
28
|
+
throw new h();
|
|
29
|
+
i.stateDiff = s(o);
|
|
30
|
+
}
|
|
31
|
+
return i;
|
|
16
32
|
}
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const o = t.replace("0x", "");
|
|
30
|
-
if (o.length > n * 2)
|
|
31
|
-
throw new s({
|
|
32
|
-
size: Math.ceil(o.length / 2),
|
|
33
|
-
targetSize: n,
|
|
34
|
-
type: "Hex"
|
|
35
|
-
});
|
|
36
|
-
return `0x${o[r === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
|
|
33
|
+
function A(r) {
|
|
34
|
+
if (!r)
|
|
35
|
+
return;
|
|
36
|
+
const t = {};
|
|
37
|
+
for (const { address: e, ...n } of r) {
|
|
38
|
+
if (!l(e, { strict: !1 }))
|
|
39
|
+
throw new a({ address: e });
|
|
40
|
+
if (t[e])
|
|
41
|
+
throw new u({ address: e });
|
|
42
|
+
t[e] = m(n);
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
37
45
|
}
|
|
38
46
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
u as pad
|
|
47
|
+
m as serializeAccountStateOverride,
|
|
48
|
+
s as serializeStateMapping,
|
|
49
|
+
A as serializeStateOverride
|
|
43
50
|
};
|
package/dist/index280.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 u=require("./index289.cjs"),c=require("./index290.cjs"),o=require("./index291.cjs");function a(t){const n=c.parseStructs(t),r=[],i=t.length;for(let e=0;e<i;e++){const s=t[e];u.isStructSignature(s)||r.push(o.parseSignature(s,n))}return r}exports.parseAbi=a;
|
package/dist/index280.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { isStructSignature as c } from "./index289.js";
|
|
2
|
+
import { parseStructs as s } from "./index290.js";
|
|
3
|
+
import { parseSignature as p } from "./index291.js";
|
|
4
|
+
function a(t) {
|
|
5
|
+
const i = s(t), o = [], e = t.length;
|
|
6
|
+
for (let r = 0; r < e; r++) {
|
|
7
|
+
const n = t[r];
|
|
8
|
+
c(n) || o.push(p(n, i));
|
|
9
|
+
}
|
|
10
|
+
return o;
|
|
4
11
|
}
|
|
5
12
|
export {
|
|
6
|
-
|
|
13
|
+
a as parseAbi
|
|
7
14
|
};
|
package/dist/index281.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index273.cjs"),o=require("./index272.cjs"),h=require("./index275.cjs"),y=require("./index282.cjs");function c(r,e={}){const{recovered:t}=e;if(typeof r.r>"u")throw new a({signature:r});if(typeof r.s>"u")throw new a({signature:r});if(t&&typeof r.yParity>"u")throw new a({signature:r});if(r.r<0n||r.r>y.maxUint256)throw new P({value:r.r});if(r.s<0n||r.s>y.maxUint256)throw new w({value:r.s});if(typeof r.yParity=="number"&&r.yParity!==0&&r.yParity!==1)throw new s({value:r.yParity})}function d(r){return l(o.fromBytes(r))}function l(r){if(r.length!==130&&r.length!==132)throw new p({signature:r});const e=BigInt(o.slice(r,0,32)),t=BigInt(o.slice(r,32,64)),n=(()=>{const f=+`0x${r.slice(130)}`;if(!Number.isNaN(f))try{return u(f)}catch{throw new s({value:f})}})();return typeof n>"u"?{r:e,s:t}:{r:e,s:t,yParity:n}}function I(r){if(!(typeof r.r>"u")&&!(typeof r.s>"u"))return v(r)}function v(r){const e=typeof r=="string"?l(r):r instanceof Uint8Array?d(r):typeof r.r=="string"?m(r):r.v?b(r):{r:r.r,s:r.s,...typeof r.yParity<"u"?{yParity:r.yParity}:{}};return c(e),e}function b(r){return{r:r.r,s:r.s,yParity:u(r.v)}}function m(r){const e=(()=>{const t=r.v?Number(r.v):void 0;let n=r.yParity?Number(r.yParity):void 0;if(typeof t=="number"&&typeof n!="number"&&(n=u(t)),typeof n!="number")throw new s({value:r.yParity});return n})();return{r:BigInt(r.r),s:BigInt(r.s),yParity:e}}function u(r){if(r===0||r===27)return 0;if(r===1||r===28)return 1;if(r>=35)return r%2===0?1:0;throw new E({value:r})}class p extends i.BaseError{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${o.size(o.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class a extends i.BaseError{constructor({signature:e}){super(`Signature \`${h.stringify(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class P extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class w extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class s extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class E extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}exports.InvalidRError=P;exports.InvalidSError=w;exports.InvalidSerializedSizeError=p;exports.InvalidVError=E;exports.InvalidYParityError=s;exports.MissingPropertiesError=a;exports.assert=c;exports.extract=I;exports.from=v;exports.fromBytes=d;exports.fromHex=l;exports.fromLegacy=b;exports.fromRpc=m;exports.vToYParity=u;
|
package/dist/index281.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseError as i } from "./
|
|
2
|
-
import { slice as y, fromBytes as c, size as d, from as m } from "./
|
|
3
|
-
import { stringify as p } from "./
|
|
1
|
+
import { BaseError as i } from "./index273.js";
|
|
2
|
+
import { slice as y, fromBytes as c, size as d, from as m } from "./index272.js";
|
|
3
|
+
import { stringify as p } from "./index275.js";
|
|
4
4
|
import { maxUint256 as s } from "./index282.js";
|
|
5
5
|
function b(e, r = {}) {
|
|
6
6
|
const { recovered: t } = r;
|
package/dist/index299.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 p(e,{method:u}){var s,o;const r={};return e.transport.type==="fallback"&&((o=(s=e.transport).onResponse)==null||o.call(s,({method:t,response:a,status:c,transport:n})=>{c==="success"&&u===t&&(r[a]=n.request)})),t=>r[t]||e.request}exports.createFilterRequestScope=p;
|
package/dist/index299.js
CHANGED
|
@@ -1,40 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}, r = () => {
|
|
8
|
-
const n = c();
|
|
9
|
-
if (!n.some((t) => t.id === i))
|
|
10
|
-
return;
|
|
11
|
-
const e = g.get(s);
|
|
12
|
-
if (n.length === 1 && e) {
|
|
13
|
-
const t = e();
|
|
14
|
-
t instanceof Promise && t.catch(() => {
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
w();
|
|
18
|
-
}, o = c();
|
|
19
|
-
if (f.set(s, [
|
|
20
|
-
...o,
|
|
21
|
-
{ id: i, fns: l }
|
|
22
|
-
]), o && o.length > 0)
|
|
23
|
-
return r;
|
|
24
|
-
const u = {};
|
|
25
|
-
for (const n in l)
|
|
26
|
-
u[n] = (...e) => {
|
|
27
|
-
var p, h;
|
|
28
|
-
const t = c();
|
|
29
|
-
if (t.length !== 0)
|
|
30
|
-
for (const C of t)
|
|
31
|
-
(h = (p = C.fns)[n]) == null || h.call(p, ...e);
|
|
32
|
-
};
|
|
33
|
-
const a = m(u);
|
|
34
|
-
return typeof a == "function" && g.set(s, a), r;
|
|
1
|
+
function c(e, { method: p }) {
|
|
2
|
+
var r, o;
|
|
3
|
+
const t = {};
|
|
4
|
+
return e.transport.type === "fallback" && ((o = (r = e.transport).onResponse) == null || o.call(r, ({ method: s, response: n, status: u, transport: a }) => {
|
|
5
|
+
u === "success" && p === s && (t[n] = a.request);
|
|
6
|
+
})), (s) => t[s] || e.request;
|
|
35
7
|
}
|
|
36
8
|
export {
|
|
37
|
-
|
|
38
|
-
f as listenersCache,
|
|
39
|
-
y as observe
|
|
9
|
+
c as createFilterRequestScope
|
|
40
10
|
};
|
package/dist/index300.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=new Map,r=new Map;let b=0;function w(s,a,C){const o=++b,c=()=>i.get(s)||[],m=()=>{const t=c();i.set(s,t.filter(n=>n.id!==o))},f=()=>{const t=c();if(!t.some(e=>e.id===o))return;const n=r.get(s);if(t.length===1&&n){const e=n();e instanceof Promise&&e.catch(()=>{})}m()},l=c();if(i.set(s,[...l,{id:o,fns:a}]),l&&l.length>0)return f;const u={};for(const t in a)u[t]=(...n)=>{var p,g;const e=c();if(e.length!==0)for(const y of e)(g=(p=y.fns)[t])==null||g.call(p,...n)};const h=C(u);return typeof h=="function"&&r.set(s,h),f}exports.cleanupCache=r;exports.listenersCache=i;exports.observe=w;
|
package/dist/index300.js
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
const f = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
2
|
+
let k = 0;
|
|
3
|
+
function y(s, l, m) {
|
|
4
|
+
const i = ++k, c = () => f.get(s) || [], w = () => {
|
|
5
|
+
const n = c();
|
|
6
|
+
f.set(s, n.filter((e) => e.id !== i));
|
|
7
|
+
}, r = () => {
|
|
8
|
+
const n = c();
|
|
9
|
+
if (!n.some((t) => t.id === i))
|
|
10
|
+
return;
|
|
11
|
+
const e = g.get(s);
|
|
12
|
+
if (n.length === 1 && e) {
|
|
13
|
+
const t = e();
|
|
14
|
+
t instanceof Promise && t.catch(() => {
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
w();
|
|
18
|
+
}, o = c();
|
|
19
|
+
if (f.set(s, [
|
|
20
|
+
...o,
|
|
21
|
+
{ id: i, fns: l }
|
|
22
|
+
]), o && o.length > 0)
|
|
23
|
+
return r;
|
|
24
|
+
const u = {};
|
|
25
|
+
for (const n in l)
|
|
26
|
+
u[n] = (...e) => {
|
|
27
|
+
var p, h;
|
|
28
|
+
const t = c();
|
|
29
|
+
if (t.length !== 0)
|
|
30
|
+
for (const C of t)
|
|
31
|
+
(h = (p = C.fns)[n]) == null || h.call(p, ...e);
|
|
12
32
|
};
|
|
13
|
-
|
|
14
|
-
|
|
33
|
+
const a = m(u);
|
|
34
|
+
return typeof a == "function" && g.set(s, a), r;
|
|
15
35
|
}
|
|
16
36
|
export {
|
|
17
|
-
|
|
37
|
+
g as cleanupCache,
|
|
38
|
+
f as listenersCache,
|
|
39
|
+
y as observe
|
|
18
40
|
};
|
package/dist/index301.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index252.cjs");function s(o,{emitOnBegin:w,initialWaitTime:t,interval:c}){let l=!0;const a=()=>l=!1;return(async()=>{let e;w&&(e=await o({unpoll:a}));const r=await(t==null?void 0:t(e))??c;await u.wait(r);const n=async()=>{l&&(await o({unpoll:a}),await u.wait(c),n())};n()})(),a}exports.poll=s;
|
package/dist/index301.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { wait as r } from "./index252.js";
|
|
2
|
+
function e(o, { emitOnBegin: s, initialWaitTime: t, interval: c }) {
|
|
3
|
+
let w = !0;
|
|
4
|
+
const a = () => w = !1;
|
|
5
|
+
return (async () => {
|
|
6
|
+
let n;
|
|
7
|
+
s && (n = await o({ unpoll: a }));
|
|
8
|
+
const u = await (t == null ? void 0 : t(n)) ?? c;
|
|
9
|
+
await r(u);
|
|
10
|
+
const l = async () => {
|
|
11
|
+
w && (await o({ unpoll: a }), await r(c), l());
|
|
12
|
+
};
|
|
13
|
+
l();
|
|
14
|
+
})(), a;
|
|
8
15
|
}
|
|
9
16
|
export {
|
|
10
|
-
|
|
17
|
+
e as poll
|
|
11
18
|
};
|
package/dist/index302.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 d=i=>{throw TypeError(i)},p=(i,t,e)=>t.has(i)||d("Cannot "+e),r=(i,t,e)=>(p(i,t,"read from private field"),t.get(i)),o=(i,t,e)=>t.has(i)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),l=(i,t,e,a)=>(p(i,t,"write to private field"),t.set(i,e),e),h,s;const u=class f{constructor({prefix:t,cache:e}={}){o(this,h),o(this,s),l(this,h,t??[]),l(this,s,e??new Map)}read(t,e){const a=[r(this,h),...t].join(":");if(r(this,s).has(a))return r(this,s).get(a);const n=e();return r(this,s).set(a,n),typeof n=="object"&&n!==null&&"then"in n?Promise.resolve(n).then(c=>(r(this,s).set(a,c),c)).catch(c=>{throw r(this,s).delete(a),c}):n}readSync(t,e){const a=[r(this,h),...t].join(":");if(r(this,s).has(a))return r(this,s).get(a);const n=e();return r(this,s).set(a,n),n}clear(t){const e=[...r(this,h),...t??[]].join(":");if(!e){r(this,s).clear();return}for(const a of r(this,s).keys())a.startsWith(e)&&r(this,s).delete(a)}scope(t){return new f({prefix:[...r(this,h),...Array.isArray(t)?t:[t]],cache:r(this,s)})}};h=new WeakMap;s=new WeakMap;let y=u;exports.ClientCache=y;
|