@gardenfi/utils 3.1.1-beta.2 → 3.1.1-beta.4
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/index102.cjs +1 -1
- package/dist/index102.js +4 -4
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +3 -3
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -2
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +1 -1
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +1 -1
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +5 -5
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +13 -33
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +34 -9
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +55 -60
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +23 -17
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +6 -106
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +18 -78
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +15 -9
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +5 -90
- package/dist/index146.cjs +1 -2
- package/dist/index146.js +14 -3
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +11 -9
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +12 -13
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +11 -4
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +8 -12
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +4 -2
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +17 -32
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +5 -21
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +171 -5
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +103 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +33 -5
- package/dist/index157.cjs +1 -9
- package/dist/index157.js +8 -34
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +61 -3
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +19 -18
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +105 -19
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +70 -27
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +7 -6
- package/dist/index163.cjs +1 -4
- package/dist/index163.js +88 -192
- package/dist/index164.cjs +2 -1
- package/dist/index164.js +3 -28
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +9 -162
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +13 -127
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +4 -27
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +2 -56
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +31 -191
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +22 -4
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +5 -20
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +6 -3
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +5 -16
- package/dist/index174.cjs +9 -1
- package/dist/index174.js +35 -11
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +3 -35
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +19 -3
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +18 -25
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +35 -8
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +6 -23
- package/dist/index180.cjs +4 -1
- package/dist/index180.js +194 -28
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +27 -3
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +161 -6
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +127 -6
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +27 -32
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +192 -5
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +4 -38
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +14 -43
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +3 -33
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +15 -16
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +32 -40
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +3 -105
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +28 -3
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +25 -5
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +28 -3
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +6 -17
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +6 -5
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +32 -8
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +5 -104
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +37 -5
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +49 -6
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +30 -25
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +17 -34
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +42 -13
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +100 -74
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +3 -2
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +4 -17
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +3 -171
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +17 -17
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +8 -10
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +5 -25
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +27 -18
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +78 -15
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +2 -6
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +18 -13
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +17 -10
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +10 -16
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +24 -11
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +45 -18
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +9 -24
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +8 -8
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +100 -43
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +14 -7
- package/dist/index222.cjs +1 -2
- package/dist/index222.js +213 -40
- package/dist/index223.cjs +2 -1
- package/dist/index223.js +42 -2
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +2 -6
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +5 -10
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +9 -18
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +19 -8
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +8 -66
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +65 -64
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +60 -183
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +185 -25
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +13 -61
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +54 -18
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +34 -10
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +10 -7
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +13 -11
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +109 -13
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +205 -18
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +40 -106
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +4 -4
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +78 -6
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +2 -7
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +11 -26
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +11 -102
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +18 -15
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +6 -214
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +6 -206
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +25 -41
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +10 -77
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +20 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +1 -1
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +657 -68
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +154 -634
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +67 -176
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +6 -6
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -2
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +8 -8
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +2 -2
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -4
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +3 -3
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +6 -6
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +3 -3
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +2 -2
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +2 -2
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +4 -4
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +3 -3
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +5 -5
- package/package.json +1 -1
package/dist/index160.js
CHANGED
|
@@ -1,23 +1,109 @@
|
|
|
1
|
-
import { BaseError as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { BaseError as z } from "./index35.js";
|
|
2
|
+
import { HttpRequestError as k } from "./index161.js";
|
|
3
|
+
import { MethodNotSupportedRpcError as s, UnknownRpcError as J, UserRejectedRequestError as u, AtomicityNotSupportedError as f, AtomicReadyWalletRejectedUpgradeError as E, BundleTooLargeError as l, UnknownBundleIdError as R, DuplicateIdError as m, UnsupportedChainIdError as y, UnsupportedNonOptionalCapabilityError as I, SwitchChainError as U, ChainDisconnectedError as v, ProviderDisconnectedError as b, UnsupportedProviderMethodError as N, UnauthorizedProviderError as q, JsonRpcVersionUnsupportedError as C, LimitExceededRpcError as a, TransactionRejectedRpcError as D, ResourceUnavailableRpcError as P, ResourceNotFoundRpcError as x, InvalidInputRpcError as j, InternalRpcError as i, InvalidParamsRpcError as B, MethodNotFoundRpcError as M, InvalidRequestRpcError as S, ParseRpcError as T } from "./index96.js";
|
|
4
|
+
import { stringToHex as O } from "./index42.js";
|
|
5
|
+
import { withDedupe as V } from "./index242.js";
|
|
6
|
+
import { withRetry as W } from "./index90.js";
|
|
7
|
+
import { stringify as _ } from "./index91.js";
|
|
8
|
+
function te(r, A = {}) {
|
|
9
|
+
return async (n, F = {}) => {
|
|
10
|
+
var h;
|
|
11
|
+
const { dedupe: w = !1, methods: t, retryDelay: H = 150, retryCount: L = 3, uid: $ } = {
|
|
12
|
+
...A,
|
|
13
|
+
...F
|
|
14
|
+
}, { method: c } = n;
|
|
15
|
+
if ((h = t == null ? void 0 : t.exclude) != null && h.includes(c))
|
|
16
|
+
throw new s(new Error("method not supported"), {
|
|
17
|
+
method: c
|
|
18
|
+
});
|
|
19
|
+
if (t != null && t.include && !t.include.includes(c))
|
|
20
|
+
throw new s(new Error("method not supported"), {
|
|
21
|
+
method: c
|
|
22
|
+
});
|
|
23
|
+
const g = w ? O(`${$}.${_(n)}`) : void 0;
|
|
24
|
+
return V(() => W(async () => {
|
|
25
|
+
try {
|
|
26
|
+
return await r(n);
|
|
27
|
+
} catch (o) {
|
|
28
|
+
const e = o;
|
|
29
|
+
switch (e.code) {
|
|
30
|
+
case T.code:
|
|
31
|
+
throw new T(e);
|
|
32
|
+
case S.code:
|
|
33
|
+
throw new S(e);
|
|
34
|
+
case M.code:
|
|
35
|
+
throw new M(e, { method: n.method });
|
|
36
|
+
case B.code:
|
|
37
|
+
throw new B(e);
|
|
38
|
+
case i.code:
|
|
39
|
+
throw new i(e);
|
|
40
|
+
case j.code:
|
|
41
|
+
throw new j(e);
|
|
42
|
+
case x.code:
|
|
43
|
+
throw new x(e);
|
|
44
|
+
case P.code:
|
|
45
|
+
throw new P(e);
|
|
46
|
+
case D.code:
|
|
47
|
+
throw new D(e);
|
|
48
|
+
case s.code:
|
|
49
|
+
throw new s(e, {
|
|
50
|
+
method: n.method
|
|
51
|
+
});
|
|
52
|
+
case a.code:
|
|
53
|
+
throw new a(e);
|
|
54
|
+
case C.code:
|
|
55
|
+
throw new C(e);
|
|
56
|
+
case u.code:
|
|
57
|
+
throw new u(e);
|
|
58
|
+
case q.code:
|
|
59
|
+
throw new q(e);
|
|
60
|
+
case N.code:
|
|
61
|
+
throw new N(e);
|
|
62
|
+
case b.code:
|
|
63
|
+
throw new b(e);
|
|
64
|
+
case v.code:
|
|
65
|
+
throw new v(e);
|
|
66
|
+
case U.code:
|
|
67
|
+
throw new U(e);
|
|
68
|
+
case I.code:
|
|
69
|
+
throw new I(e);
|
|
70
|
+
case y.code:
|
|
71
|
+
throw new y(e);
|
|
72
|
+
case m.code:
|
|
73
|
+
throw new m(e);
|
|
74
|
+
case R.code:
|
|
75
|
+
throw new R(e);
|
|
76
|
+
case l.code:
|
|
77
|
+
throw new l(e);
|
|
78
|
+
case E.code:
|
|
79
|
+
throw new E(e);
|
|
80
|
+
case f.code:
|
|
81
|
+
throw new f(e);
|
|
82
|
+
case 5e3:
|
|
83
|
+
throw new u(e);
|
|
84
|
+
default:
|
|
85
|
+
throw o instanceof z ? o : new J(e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
delay: ({ count: o, error: e }) => {
|
|
90
|
+
var p;
|
|
91
|
+
if (e && e instanceof k) {
|
|
92
|
+
const d = (p = e == null ? void 0 : e.headers) == null ? void 0 : p.get("Retry-After");
|
|
93
|
+
if (d != null && d.match(/\d/))
|
|
94
|
+
return Number.parseInt(d, 10) * 1e3;
|
|
95
|
+
}
|
|
96
|
+
return ~~(1 << o) * H;
|
|
97
|
+
},
|
|
98
|
+
retryCount: L,
|
|
99
|
+
shouldRetry: ({ error: o }) => G(o)
|
|
100
|
+
}), { enabled: w, id: g });
|
|
101
|
+
};
|
|
6
102
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
10
|
-
name: "InvalidBytesBooleanError"
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class c extends o {
|
|
15
|
-
constructor({ givenSize: e, maxSize: r }) {
|
|
16
|
-
super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
|
|
17
|
-
}
|
|
103
|
+
function G(r) {
|
|
104
|
+
return "code" in r && typeof r.code == "number" ? r.code === -1 || r.code === a.code || r.code === i.code : r instanceof k && r.status ? r.status === 403 || r.status === 408 || r.status === 413 || r.status === 429 || r.status === 500 || r.status === 502 || r.status === 503 || r.status === 504 : !0;
|
|
18
105
|
}
|
|
19
106
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
c as SizeOverflowError
|
|
107
|
+
te as buildRequest,
|
|
108
|
+
G as shouldRetry
|
|
23
109
|
};
|
package/dist/index161.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("./index91.cjs"),i=require("./index35.cjs"),a=require("./index175.cjs");class b extends i.BaseError{constructor({body:t,cause:e,details:r,headers:n,status:u,url:l}){super("HTTP request failed.",{cause:e,details:r,metaMessages:[u&&`Status: ${u}`,`URL: ${a.getUrl(l)}`,t&&`Request body: ${s.stringify(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=n,this.status=u,this.url=l}}class d extends i.BaseError{constructor({body:t,error:e,url:r}){super("RPC Request failed.",{cause:e,details:e.message,metaMessages:[`URL: ${a.getUrl(r)}`,`Request body: ${s.stringify(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e.code,this.data=e.data,this.url=r}}class c extends i.BaseError{constructor({body:t,url:e}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${a.getUrl(e)}`,`Request body: ${s.stringify(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=e}}exports.HttpRequestError=b;exports.RpcRequestError=d;exports.TimeoutError=c;
|
package/dist/index161.js
CHANGED
|
@@ -1,38 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var a;
|
|
8
|
-
const E = b({
|
|
9
|
-
from: r == null ? void 0 : r.address,
|
|
10
|
-
to: u,
|
|
11
|
-
value: typeof f < "u" && `${y(f)} ${((a = t == null ? void 0 : t.nativeCurrency) == null ? void 0 : a.symbol) || "ETH"}`,
|
|
12
|
-
data: d,
|
|
13
|
-
gas: p,
|
|
14
|
-
gasPrice: typeof o < "u" && `${s(o)} gwei`,
|
|
15
|
-
maxFeePerGas: typeof i < "u" && `${s(i)} gwei`,
|
|
16
|
-
maxPriorityFeePerGas: typeof m < "u" && `${s(m)} gwei`,
|
|
17
|
-
nonce: g
|
|
18
|
-
});
|
|
19
|
-
super(e.shortMessage, {
|
|
1
|
+
import { stringify as s } from "./index91.js";
|
|
2
|
+
import { BaseError as a } from "./index35.js";
|
|
3
|
+
import { getUrl as i } from "./index175.js";
|
|
4
|
+
class m extends a {
|
|
5
|
+
constructor({ body: t, cause: e, details: r, headers: n, status: u, url: l }) {
|
|
6
|
+
super("HTTP request failed.", {
|
|
20
7
|
cause: e,
|
|
21
|
-
|
|
8
|
+
details: r,
|
|
22
9
|
metaMessages: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
u && `Status: ${u}`,
|
|
11
|
+
`URL: ${i(l)}`,
|
|
12
|
+
t && `Request body: ${s(t)}`
|
|
26
13
|
].filter(Boolean),
|
|
27
|
-
name: "
|
|
28
|
-
}), Object.defineProperty(this, "
|
|
14
|
+
name: "HttpRequestError"
|
|
15
|
+
}), Object.defineProperty(this, "body", {
|
|
29
16
|
enumerable: !0,
|
|
30
17
|
configurable: !0,
|
|
31
18
|
writable: !0,
|
|
32
19
|
value: void 0
|
|
33
|
-
}), this
|
|
20
|
+
}), Object.defineProperty(this, "headers", {
|
|
21
|
+
enumerable: !0,
|
|
22
|
+
configurable: !0,
|
|
23
|
+
writable: !0,
|
|
24
|
+
value: void 0
|
|
25
|
+
}), Object.defineProperty(this, "status", {
|
|
26
|
+
enumerable: !0,
|
|
27
|
+
configurable: !0,
|
|
28
|
+
writable: !0,
|
|
29
|
+
value: void 0
|
|
30
|
+
}), Object.defineProperty(this, "url", {
|
|
31
|
+
enumerable: !0,
|
|
32
|
+
configurable: !0,
|
|
33
|
+
writable: !0,
|
|
34
|
+
value: void 0
|
|
35
|
+
}), this.body = t, this.headers = n, this.status = u, this.url = l;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
class f extends a {
|
|
39
|
+
constructor({ body: t, error: e, url: r }) {
|
|
40
|
+
super("RPC Request failed.", {
|
|
41
|
+
cause: e,
|
|
42
|
+
details: e.message,
|
|
43
|
+
metaMessages: [`URL: ${i(r)}`, `Request body: ${s(t)}`],
|
|
44
|
+
name: "RpcRequestError"
|
|
45
|
+
}), Object.defineProperty(this, "code", {
|
|
46
|
+
enumerable: !0,
|
|
47
|
+
configurable: !0,
|
|
48
|
+
writable: !0,
|
|
49
|
+
value: void 0
|
|
50
|
+
}), Object.defineProperty(this, "data", {
|
|
51
|
+
enumerable: !0,
|
|
52
|
+
configurable: !0,
|
|
53
|
+
writable: !0,
|
|
54
|
+
value: void 0
|
|
55
|
+
}), Object.defineProperty(this, "url", {
|
|
56
|
+
enumerable: !0,
|
|
57
|
+
configurable: !0,
|
|
58
|
+
writable: !0,
|
|
59
|
+
value: void 0
|
|
60
|
+
}), this.code = e.code, this.data = e.data, this.url = r;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
class h extends a {
|
|
64
|
+
constructor({ body: t, url: e }) {
|
|
65
|
+
super("The request took too long to respond.", {
|
|
66
|
+
details: "The request timed out.",
|
|
67
|
+
metaMessages: [`URL: ${i(e)}`, `Request body: ${s(t)}`],
|
|
68
|
+
name: "TimeoutError"
|
|
69
|
+
}), Object.defineProperty(this, "url", {
|
|
70
|
+
enumerable: !0,
|
|
71
|
+
configurable: !0,
|
|
72
|
+
writable: !0,
|
|
73
|
+
value: void 0
|
|
74
|
+
}), this.url = e;
|
|
34
75
|
}
|
|
35
76
|
}
|
|
36
77
|
export {
|
|
37
|
-
|
|
78
|
+
m as HttpRequestError,
|
|
79
|
+
f as RpcRequestError,
|
|
80
|
+
h as TimeoutError
|
|
38
81
|
};
|
package/dist/index162.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 r=require("./index35.cjs");class e extends r.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}exports.UrlRequiredError=e;
|
package/dist/index162.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { BaseError as
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
super(
|
|
5
|
-
|
|
1
|
+
import { BaseError as r } from "./index35.js";
|
|
2
|
+
class t extends r {
|
|
3
|
+
constructor() {
|
|
4
|
+
super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
|
|
5
|
+
docsPath: "/docs/clients/intro",
|
|
6
|
+
name: "UrlRequiredError"
|
|
6
7
|
});
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
t as UrlRequiredError
|
|
11
12
|
};
|
package/dist/index163.cjs
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`),{cause:r,name:"NonceTooLowError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class h extends o.BaseError{constructor({cause:r,nonce:e}={}){super(`Nonce provided for the transaction ${e?`(${e}) `:""}exceeds the maximum allowed nonce.`,{cause:r,name:"NonceMaxValueError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class f extends o.BaseError{constructor({cause:r}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
3
|
-
`),{cause:r,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class p extends o.BaseError{constructor({cause:r,gas:e}={}){super(`The amount of gas ${e?`(${e}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:r,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class g extends o.BaseError{constructor({cause:r,gas:e}={}){super(`The amount of gas ${e?`(${e}) `:""}provided for the transaction is too low.`,{cause:r,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(g,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class b extends o.BaseError{constructor({cause:r}){super("The transaction type is not supported for this chain.",{cause:r,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class E extends o.BaseError{constructor({cause:r,maxPriorityFeePerGas:e,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${e?` = ${a.formatGwei(e)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${a.formatGwei(n)} gwei`:""}).`].join(`
|
|
4
|
-
`),{cause:r,name:"TipAboveFeeCapError"})}}Object.defineProperty(E,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class w extends o.BaseError{constructor({cause:r}){super(`An error occurred while executing: ${r==null?void 0:r.shortMessage}`,{cause:r,name:"UnknownNodeError"})}}exports.ExecutionRevertedError=s;exports.FeeCapTooHighError=c;exports.FeeCapTooLowError=u;exports.InsufficientFundsError=f;exports.IntrinsicGasTooHighError=p;exports.IntrinsicGasTooLowError=g;exports.NonceMaxValueError=h;exports.NonceTooHighError=l;exports.NonceTooLowError=d;exports.TipAboveFeeCapError=E;exports.TransactionTypeNotSupportedError=b;exports.UnknownNodeError=w;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index161.cjs"),E=require("./index208.cjs"),d=require("./index91.cjs"),q=require("./index243.cjs");function H(i,e={}){const{url:r,headers:a}=R(i);return{async request(p){var g;const{body:n,fetchFn:T=e.fetchFn??fetch,onRequest:c=e.onRequest,onResponse:l=e.onResponse,timeout:f=e.timeout??1e4}=p,w={...e.fetchOptions??{},...p.fetchOptions??{}},{headers:C,method:j,signal:O}=w;try{const t=await E.withTimeout(async({signal:u})=>{const h={...w,body:Array.isArray(n)?d.stringify(n.map(m=>({jsonrpc:"2.0",id:m.id??q.idCache.take(),...m}))):d.stringify({jsonrpc:"2.0",id:n.id??q.idCache.take(),...n}),headers:{...a,"Content-Type":"application/json",...C},method:j||"POST",signal:O||(f>0?u:null)},S=new Request(r,h),y=await(c==null?void 0:c(S,h))??{...h,url:r};return await T(y.url??r,y)},{errorInstance:new o.TimeoutError({body:n,url:r}),timeout:f,signal:!0});l&&await l(t);let s;if((g=t.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))s=await t.json();else{s=await t.text();try{s=JSON.parse(s||"{}")}catch(u){if(t.ok)throw u;s={error:s}}}if(!t.ok)throw new o.HttpRequestError({body:n,details:d.stringify(s.error)||t.statusText,headers:t.headers,status:t.status,url:r});return s}catch(t){throw t instanceof o.HttpRequestError||t instanceof o.TimeoutError?t:new o.HttpRequestError({body:n,cause:t,url:r})}}}}function R(i){try{const e=new URL(i),r=(()=>{if(e.username){const a=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;return e.username="",e.password="",{url:e.toString(),headers:{Authorization:`Basic ${btoa(a)}`}}}})();return{url:e.toString(),...r}}catch{return{url:i}}}exports.getHttpRpcClient=H;exports.parseUrl=R;
|
package/dist/index163.js
CHANGED
|
@@ -1,197 +1,93 @@
|
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
Object.defineProperty(d, "nodeMessage", {
|
|
74
|
-
enumerable: !0,
|
|
75
|
-
configurable: !0,
|
|
76
|
-
writable: !0,
|
|
77
|
-
value: /nonce too low|transaction already imported|already known/
|
|
78
|
-
});
|
|
79
|
-
class h extends t {
|
|
80
|
-
constructor({ cause: r, nonce: e } = {}) {
|
|
81
|
-
super(`Nonce provided for the transaction ${e ? `(${e}) ` : ""}exceeds the maximum allowed nonce.`, { cause: r, name: "NonceMaxValueError" });
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
Object.defineProperty(h, "nodeMessage", {
|
|
85
|
-
enumerable: !0,
|
|
86
|
-
configurable: !0,
|
|
87
|
-
writable: !0,
|
|
88
|
-
value: /nonce has max value/
|
|
89
|
-
});
|
|
90
|
-
class f extends t {
|
|
91
|
-
constructor({ cause: r } = {}) {
|
|
92
|
-
super([
|
|
93
|
-
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
94
|
-
].join(`
|
|
95
|
-
`), {
|
|
96
|
-
cause: r,
|
|
97
|
-
metaMessages: [
|
|
98
|
-
"This error could arise when the account does not have enough funds to:",
|
|
99
|
-
" - pay for the total gas fee,",
|
|
100
|
-
" - pay for the value to send.",
|
|
101
|
-
" ",
|
|
102
|
-
"The cost of the transaction is calculated as `gas * gas fee + value`, where:",
|
|
103
|
-
" - `gas` is the amount of gas needed for transaction to execute,",
|
|
104
|
-
" - `gas fee` is the gas fee,",
|
|
105
|
-
" - `value` is the amount of ether to send to the recipient."
|
|
106
|
-
],
|
|
107
|
-
name: "InsufficientFundsError"
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
Object.defineProperty(f, "nodeMessage", {
|
|
112
|
-
enumerable: !0,
|
|
113
|
-
configurable: !0,
|
|
114
|
-
writable: !0,
|
|
115
|
-
value: /insufficient funds|exceeds transaction sender account balance/
|
|
116
|
-
});
|
|
117
|
-
class p extends t {
|
|
118
|
-
constructor({ cause: r, gas: e } = {}) {
|
|
119
|
-
super(`The amount of gas ${e ? `(${e}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
|
|
120
|
-
cause: r,
|
|
121
|
-
name: "IntrinsicGasTooHighError"
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
Object.defineProperty(p, "nodeMessage", {
|
|
126
|
-
enumerable: !0,
|
|
127
|
-
configurable: !0,
|
|
128
|
-
writable: !0,
|
|
129
|
-
value: /intrinsic gas too high|gas limit reached/
|
|
130
|
-
});
|
|
131
|
-
class b extends t {
|
|
132
|
-
constructor({ cause: r, gas: e } = {}) {
|
|
133
|
-
super(`The amount of gas ${e ? `(${e}) ` : ""}provided for the transaction is too low.`, {
|
|
134
|
-
cause: r,
|
|
135
|
-
name: "IntrinsicGasTooLowError"
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
Object.defineProperty(b, "nodeMessage", {
|
|
140
|
-
enumerable: !0,
|
|
141
|
-
configurable: !0,
|
|
142
|
-
writable: !0,
|
|
143
|
-
value: /intrinsic gas too low/
|
|
144
|
-
});
|
|
145
|
-
class g extends t {
|
|
146
|
-
constructor({ cause: r }) {
|
|
147
|
-
super("The transaction type is not supported for this chain.", {
|
|
148
|
-
cause: r,
|
|
149
|
-
name: "TransactionTypeNotSupportedError"
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
Object.defineProperty(g, "nodeMessage", {
|
|
154
|
-
enumerable: !0,
|
|
155
|
-
configurable: !0,
|
|
156
|
-
writable: !0,
|
|
157
|
-
value: /transaction type not valid/
|
|
158
|
-
});
|
|
159
|
-
class m extends t {
|
|
160
|
-
constructor({ cause: r, maxPriorityFeePerGas: e, maxFeePerGas: n } = {}) {
|
|
161
|
-
super([
|
|
162
|
-
`The provided tip (\`maxPriorityFeePerGas\`${e ? ` = ${a(e)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${a(n)} gwei` : ""}).`
|
|
163
|
-
].join(`
|
|
164
|
-
`), {
|
|
165
|
-
cause: r,
|
|
166
|
-
name: "TipAboveFeeCapError"
|
|
167
|
-
});
|
|
168
|
-
}
|
|
1
|
+
import { TimeoutError as R, HttpRequestError as h } from "./index161.js";
|
|
2
|
+
import { withTimeout as S } from "./index208.js";
|
|
3
|
+
import { stringify as p } from "./index91.js";
|
|
4
|
+
import { idCache as C } from "./index243.js";
|
|
5
|
+
function E(o, e = {}) {
|
|
6
|
+
const { url: r, headers: a } = U(o);
|
|
7
|
+
return {
|
|
8
|
+
async request(d) {
|
|
9
|
+
var w;
|
|
10
|
+
const { body: s, fetchFn: T = e.fetchFn ?? fetch, onRequest: i = e.onRequest, onResponse: f = e.onResponse, timeout: l = e.timeout ?? 1e4 } = d, m = {
|
|
11
|
+
...e.fetchOptions ?? {},
|
|
12
|
+
...d.fetchOptions ?? {}
|
|
13
|
+
}, { headers: j, method: O, signal: k } = m;
|
|
14
|
+
try {
|
|
15
|
+
const t = await S(async ({ signal: c }) => {
|
|
16
|
+
const u = {
|
|
17
|
+
...m,
|
|
18
|
+
body: Array.isArray(s) ? p(s.map((g) => ({
|
|
19
|
+
jsonrpc: "2.0",
|
|
20
|
+
id: g.id ?? C.take(),
|
|
21
|
+
...g
|
|
22
|
+
}))) : p({
|
|
23
|
+
jsonrpc: "2.0",
|
|
24
|
+
id: s.id ?? C.take(),
|
|
25
|
+
...s
|
|
26
|
+
}),
|
|
27
|
+
headers: {
|
|
28
|
+
...a,
|
|
29
|
+
"Content-Type": "application/json",
|
|
30
|
+
...j
|
|
31
|
+
},
|
|
32
|
+
method: O || "POST",
|
|
33
|
+
signal: k || (l > 0 ? c : null)
|
|
34
|
+
}, q = new Request(r, u), y = await (i == null ? void 0 : i(q, u)) ?? { ...u, url: r };
|
|
35
|
+
return await T(y.url ?? r, y);
|
|
36
|
+
}, {
|
|
37
|
+
errorInstance: new R({ body: s, url: r }),
|
|
38
|
+
timeout: l,
|
|
39
|
+
signal: !0
|
|
40
|
+
});
|
|
41
|
+
f && await f(t);
|
|
42
|
+
let n;
|
|
43
|
+
if ((w = t.headers.get("Content-Type")) != null && w.startsWith("application/json"))
|
|
44
|
+
n = await t.json();
|
|
45
|
+
else {
|
|
46
|
+
n = await t.text();
|
|
47
|
+
try {
|
|
48
|
+
n = JSON.parse(n || "{}");
|
|
49
|
+
} catch (c) {
|
|
50
|
+
if (t.ok)
|
|
51
|
+
throw c;
|
|
52
|
+
n = { error: n };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (!t.ok)
|
|
56
|
+
throw new h({
|
|
57
|
+
body: s,
|
|
58
|
+
details: p(n.error) || t.statusText,
|
|
59
|
+
headers: t.headers,
|
|
60
|
+
status: t.status,
|
|
61
|
+
url: r
|
|
62
|
+
});
|
|
63
|
+
return n;
|
|
64
|
+
} catch (t) {
|
|
65
|
+
throw t instanceof h || t instanceof R ? t : new h({
|
|
66
|
+
body: s,
|
|
67
|
+
cause: t,
|
|
68
|
+
url: r
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
169
73
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
74
|
+
function U(o) {
|
|
75
|
+
try {
|
|
76
|
+
const e = new URL(o), r = (() => {
|
|
77
|
+
if (e.username) {
|
|
78
|
+
const a = `${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;
|
|
79
|
+
return e.username = "", e.password = "", {
|
|
80
|
+
url: e.toString(),
|
|
81
|
+
headers: { Authorization: `Basic ${btoa(a)}` }
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
})();
|
|
85
|
+
return { url: e.toString(), ...r };
|
|
86
|
+
} catch {
|
|
87
|
+
return { url: o };
|
|
182
88
|
}
|
|
183
89
|
}
|
|
184
90
|
export {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
u as FeeCapTooLowError,
|
|
188
|
-
f as InsufficientFundsError,
|
|
189
|
-
p as IntrinsicGasTooHighError,
|
|
190
|
-
b as IntrinsicGasTooLowError,
|
|
191
|
-
h as NonceMaxValueError,
|
|
192
|
-
l as NonceTooHighError,
|
|
193
|
-
d as NonceTooLowError,
|
|
194
|
-
m as TipAboveFeeCapError,
|
|
195
|
-
g as TransactionTypeNotSupportedError,
|
|
196
|
-
v as UnknownNodeError
|
|
91
|
+
E as getHttpRpcClient,
|
|
92
|
+
U as parseUrl
|
|
197
93
|
};
|
package/dist/index164.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 e=`Ethereum Signed Message:
|
|
2
|
+
`;exports.presignMessagePrefix=e;
|
package/dist/index164.js
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
class n extends t {
|
|
4
|
-
constructor({ domain: r }) {
|
|
5
|
-
super(`Invalid domain "${a(r)}".`, {
|
|
6
|
-
metaMessages: ["Must be a valid EIP-712 domain."]
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
class p extends t {
|
|
11
|
-
constructor({ primaryType: r, types: s }) {
|
|
12
|
-
super(`Invalid primary type \`${r}\` must be one of \`${JSON.stringify(Object.keys(s))}\`.`, {
|
|
13
|
-
docsPath: "/api/glossary/Errors#typeddatainvalidprimarytypeerror",
|
|
14
|
-
metaMessages: ["Check that the primary type is a key in `types`."]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
class y extends t {
|
|
19
|
-
constructor({ type: r }) {
|
|
20
|
-
super(`Struct type "${r}" is invalid.`, {
|
|
21
|
-
metaMessages: ["Struct type must not be a Solidity type."],
|
|
22
|
-
name: "InvalidStructTypeError"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
const e = `Ethereum Signed Message:
|
|
2
|
+
`;
|
|
26
3
|
export {
|
|
27
|
-
|
|
28
|
-
p as InvalidPrimaryTypeError,
|
|
29
|
-
y as InvalidStructTypeError
|
|
4
|
+
e as presignMessagePrefix
|
|
30
5
|
};
|
package/dist/index165.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={gwei:9,wei:18},t={ether:-9,wei:9};exports.etherUnits=e;exports.gweiUnits=t;
|