@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/index272.js
CHANGED
|
@@ -1,12 +1,177 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BaseError as o } from "./index273.js";
|
|
2
|
+
import { assertStartOffset as x, assertEndOffset as $, pad as b, assertSize as f } from "./index274.js";
|
|
3
|
+
import { stringify as p } from "./index275.js";
|
|
4
|
+
const y = /* @__PURE__ */ new TextEncoder(), h = /* @__PURE__ */ Array.from({ length: 256 }, (e, r) => r.toString(16).padStart(2, "0"));
|
|
5
|
+
function z(e, r = {}) {
|
|
6
|
+
const { strict: t = !1 } = r;
|
|
7
|
+
if (!e)
|
|
8
|
+
throw new d(e);
|
|
9
|
+
if (typeof e != "string")
|
|
10
|
+
throw new d(e);
|
|
11
|
+
if (t && !/^0x[0-9a-fA-F]*$/.test(e))
|
|
12
|
+
throw new g(e);
|
|
13
|
+
if (!e.startsWith("0x"))
|
|
14
|
+
throw new g(e);
|
|
15
|
+
}
|
|
16
|
+
function A(...e) {
|
|
17
|
+
return `0x${e.reduce((r, t) => r + t.replace("0x", ""), "")}`;
|
|
18
|
+
}
|
|
19
|
+
function N(e) {
|
|
20
|
+
return e instanceof Uint8Array ? c(e) : Array.isArray(e) ? c(new Uint8Array(e)) : e;
|
|
21
|
+
}
|
|
22
|
+
function P(e, r = {}) {
|
|
23
|
+
const t = `0x${Number(e)}`;
|
|
24
|
+
return typeof r.size == "number" ? (f(t, r.size), m(t, r.size)) : t;
|
|
25
|
+
}
|
|
26
|
+
function c(e, r = {}) {
|
|
27
|
+
let t = "";
|
|
28
|
+
for (let s = 0; s < e.length; s++)
|
|
29
|
+
t += h[e[s]];
|
|
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
|
+
}
|
|
9
155
|
}
|
|
10
156
|
export {
|
|
11
|
-
|
|
157
|
+
O as IntegerOutOfRangeError,
|
|
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
|
|
12
177
|
};
|
package/dist/index273.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index354.cjs");class r extends Error{static setStaticOptions(t){r.prototype.docsOrigin=t.docsOrigin,r.prototype.showVersion=t.showVersion,r.prototype.version=t.version}constructor(t,e={}){const i=(()=>{var a;if(e.cause instanceof r){if(e.cause.details)return e.cause.details;if(e.cause.shortMessage)return e.cause.shortMessage}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})(),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=[t||"An error occurred.",...e.metaMessages?["",...e.metaMessages]:[],...i||u||c?["",i?`Details: ${i}`:void 0,u?`See: ${l}`:void 0,c?`Version: ${o}`:void 0]:[]].filter(a=>typeof a=="string").join(`
|
|
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;
|
package/dist/index273.js
CHANGED
|
@@ -1,33 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
-
|
|
1
|
+
import { getVersion as f } from "./index354.js";
|
|
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;
|
|
30
91
|
}
|
|
31
92
|
export {
|
|
32
|
-
|
|
93
|
+
r as BaseError
|
|
33
94
|
};
|
package/dist/index274.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index272.cjs");function n(t,e){if(i.size(t)>e)throw new i.SizeOverflowError({givenSize:i.size(t),maxSize:e})}function o(t,e){if(typeof e=="number"&&e>0&&e>i.size(t)-1)throw new i.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:i.size(t)})}function z(t,e,r){if(typeof e=="number"&&typeof r=="number"&&i.size(t)!==r-e)throw new i.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:i.size(t)})}function a(t,e={}){const{dir:r,size:s=32}=e;if(s===0)return t;const f=t.replace("0x","");if(f.length>s*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(f.length/2),targetSize:s,type:"Hex"});return`0x${f[r==="right"?"padEnd":"padStart"](s*2,"0")}`}exports.assertEndOffset=z;exports.assertSize=n;exports.assertStartOffset=o;exports.pad=a;
|
package/dist/index274.js
CHANGED
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
import { size as i, SliceOffsetOutOfBoundsError as f, SizeExceedsPaddingSizeError as s, SizeOverflowError as p } from "./index272.js";
|
|
2
|
+
function c(t, e) {
|
|
3
|
+
if (i(t) > e)
|
|
4
|
+
throw new p({
|
|
5
|
+
givenSize: i(t),
|
|
6
|
+
maxSize: e
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function S(t, e) {
|
|
10
|
+
if (typeof e == "number" && e > 0 && e > i(t) - 1)
|
|
11
|
+
throw new f({
|
|
12
|
+
offset: e,
|
|
13
|
+
position: "start",
|
|
14
|
+
size: i(t)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function d(t, e, r) {
|
|
18
|
+
if (typeof e == "number" && typeof r == "number" && i(t) !== r - e)
|
|
19
|
+
throw new f({
|
|
20
|
+
offset: r,
|
|
21
|
+
position: "end",
|
|
22
|
+
size: i(t)
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function u(t, e = {}) {
|
|
26
|
+
const { dir: r, size: n = 32 } = e;
|
|
27
|
+
if (n === 0)
|
|
28
|
+
return t;
|
|
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")}`;
|
|
37
|
+
}
|
|
2
38
|
export {
|
|
3
|
-
|
|
39
|
+
d as assertEndOffset,
|
|
40
|
+
c as assertSize,
|
|
41
|
+
S as assertStartOffset,
|
|
42
|
+
u as pad
|
|
4
43
|
};
|
package/dist/index275.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 n="#__bigint";function e(i,f,r){return JSON.stringify(i,(g,t)=>typeof t=="bigint"?t.toString()+n:t,r)}exports.stringify=e;
|
package/dist/index275.js
CHANGED
|
@@ -1,50 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
}, {});
|
|
23
|
-
}
|
|
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;
|
|
32
|
-
}
|
|
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;
|
|
1
|
+
const r = "#__bigint";
|
|
2
|
+
function g(i, f, n) {
|
|
3
|
+
return JSON.stringify(i, (e, t) => typeof t == "bigint" ? t.toString() + r : t, n);
|
|
45
4
|
}
|
|
46
5
|
export {
|
|
47
|
-
|
|
48
|
-
s as serializeStateMapping,
|
|
49
|
-
A as serializeStateOverride
|
|
6
|
+
g as stringify
|
|
50
7
|
};
|
package/dist/index276.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 o=require("./index102.cjs"),s=require("./index356.cjs");async function i(e){const{authorization:r,signature:t}=e;return o.recoverAddress({hash:s.hashAuthorization(r),signature:t??r})}exports.recoverAuthorizationAddress=i;
|
package/dist/index276.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return o;
|
|
1
|
+
import { recoverAddress as i } from "./index102.js";
|
|
2
|
+
import { hashAuthorization as e } from "./index356.js";
|
|
3
|
+
async function a(o) {
|
|
4
|
+
const { authorization: r, signature: t } = o;
|
|
5
|
+
return i({
|
|
6
|
+
hash: e(r),
|
|
7
|
+
signature: t ?? r
|
|
8
|
+
});
|
|
11
9
|
}
|
|
12
10
|
export {
|
|
13
|
-
a as
|
|
11
|
+
a as recoverAuthorizationAddress
|
|
14
12
|
};
|
package/dist/index277.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 e=require("./index272.cjs"),a=require("./index359.cjs");function i(t){return{...typeof t.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(t.baseFeePerGas)},...typeof t.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(t.blobBaseFee)},...typeof t.feeRecipient=="string"&&{feeRecipient:t.feeRecipient},...typeof t.gasLimit=="bigint"&&{gasLimit:e.fromNumber(t.gasLimit)},...typeof t.number=="bigint"&&{number:e.fromNumber(t.number)},...typeof t.prevRandao=="bigint"&&{prevRandao:e.fromNumber(t.prevRandao)},...typeof t.time=="bigint"&&{time:e.fromNumber(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(a.toRpc)}}}exports.toRpc=i;
|