@gardenfi/utils 2.5.3-beta.5 → 2.5.3-beta.7
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/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +1 -1
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +46 -24
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +9 -46
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +24 -9
- package/dist/index212.cjs +2 -1
- package/dist/index212.js +41 -11
- package/dist/index213.cjs +1 -2
- package/dist/index213.js +2 -42
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +6 -2
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +10 -5
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +18 -9
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +8 -19
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +66 -8
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +64 -65
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +183 -60
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +25 -185
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +61 -13
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +18 -54
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +10 -34
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +7 -10
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +11 -13
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +1 -1
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -3
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +1 -1
- package/package.json +1 -1
package/dist/index112.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index154.cjs"),i=require("./index78.cjs"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index154.cjs"),i=require("./index78.cjs"),s=require("./index211.cjs");function u(r,{docsPath:o,...e}){const t=(()=>{const n=s.getNodeError(r,e);return n instanceof c.UnknownNodeError?r:n})();return new i.TransactionExecutionError(t,{docsPath:o,...e})}exports.getTransactionError=u;
|
package/dist/index112.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnknownNodeError as c } from "./index154.js";
|
|
2
2
|
import { TransactionExecutionError as i } from "./index78.js";
|
|
3
|
-
import { getNodeError as u } from "./
|
|
3
|
+
import { getNodeError as u } from "./index211.js";
|
|
4
4
|
function s(r, { docsPath: t, ...o }) {
|
|
5
5
|
const e = (() => {
|
|
6
6
|
const n = u(r, o);
|
package/dist/index133.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("./index35.cjs"),p=require("./index134.cjs"),e=require("./index85.cjs"),I=require("./index42.cjs"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("./index35.cjs"),p=require("./index134.cjs"),e=require("./index85.cjs"),I=require("./index42.cjs"),q=require("./index226.cjs"),m=require("./index126.cjs"),v=require("./index89.cjs");function N(t,E={}){return async(c,h={})=>{var i;const{dedupe:s=!1,methods:o,retryDelay:R=150,retryCount:l=3,uid:f}={...E,...h},{method:d}=c;if((i=o==null?void 0:o.exclude)!=null&&i.includes(d))throw new e.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(o!=null&&o.include&&!o.include.includes(d))throw new e.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});const y=s?I.stringToHex(`${f}.${v.stringify(c)}`):void 0;return q.withDedupe(()=>m.withRetry(async()=>{try{return await t(c)}catch(n){const r=n;switch(r.code){case e.ParseRpcError.code:throw new e.ParseRpcError(r);case e.InvalidRequestRpcError.code:throw new e.InvalidRequestRpcError(r);case e.MethodNotFoundRpcError.code:throw new e.MethodNotFoundRpcError(r,{method:c.method});case e.InvalidParamsRpcError.code:throw new e.InvalidParamsRpcError(r);case e.InternalRpcError.code:throw new e.InternalRpcError(r);case e.InvalidInputRpcError.code:throw new e.InvalidInputRpcError(r);case e.ResourceNotFoundRpcError.code:throw new e.ResourceNotFoundRpcError(r);case e.ResourceUnavailableRpcError.code:throw new e.ResourceUnavailableRpcError(r);case e.TransactionRejectedRpcError.code:throw new e.TransactionRejectedRpcError(r);case e.MethodNotSupportedRpcError.code:throw new e.MethodNotSupportedRpcError(r,{method:c.method});case e.LimitExceededRpcError.code:throw new e.LimitExceededRpcError(r);case e.JsonRpcVersionUnsupportedError.code:throw new e.JsonRpcVersionUnsupportedError(r);case e.UserRejectedRequestError.code:throw new e.UserRejectedRequestError(r);case e.UnauthorizedProviderError.code:throw new e.UnauthorizedProviderError(r);case e.UnsupportedProviderMethodError.code:throw new e.UnsupportedProviderMethodError(r);case e.ProviderDisconnectedError.code:throw new e.ProviderDisconnectedError(r);case e.ChainDisconnectedError.code:throw new e.ChainDisconnectedError(r);case e.SwitchChainError.code:throw new e.SwitchChainError(r);case e.UnsupportedNonOptionalCapabilityError.code:throw new e.UnsupportedNonOptionalCapabilityError(r);case e.UnsupportedChainIdError.code:throw new e.UnsupportedChainIdError(r);case e.DuplicateIdError.code:throw new e.DuplicateIdError(r);case e.UnknownBundleIdError.code:throw new e.UnknownBundleIdError(r);case e.BundleTooLargeError.code:throw new e.BundleTooLargeError(r);case e.AtomicReadyWalletRejectedUpgradeError.code:throw new e.AtomicReadyWalletRejectedUpgradeError(r);case e.AtomicityNotSupportedError.code:throw new e.AtomicityNotSupportedError(r);case 5e3:throw new e.UserRejectedRequestError(r);default:throw n instanceof U.BaseError?n:new e.UnknownRpcError(r)}}},{delay:({count:n,error:r})=>{var a;if(r&&r instanceof p.HttpRequestError){const u=(a=r==null?void 0:r.headers)==null?void 0:a.get("Retry-After");if(u!=null&&u.match(/\d/))return Number.parseInt(u,10)*1e3}return~~(1<<n)*R},retryCount:l,shouldRetry:({error:n})=>w(n)}),{enabled:s,id:y})}}function w(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===e.LimitExceededRpcError.code||t.code===e.InternalRpcError.code:t instanceof p.HttpRequestError&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}exports.buildRequest=N;exports.shouldRetry=w;
|
package/dist/index133.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BaseError as z } from "./index35.js";
|
|
|
2
2
|
import { HttpRequestError as k } from "./index134.js";
|
|
3
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 "./index85.js";
|
|
4
4
|
import { stringToHex as O } from "./index42.js";
|
|
5
|
-
import { withDedupe as V } from "./
|
|
5
|
+
import { withDedupe as V } from "./index226.js";
|
|
6
6
|
import { withRetry as W } from "./index126.js";
|
|
7
7
|
import { stringify as _ } from "./index89.js";
|
|
8
8
|
function te(r, A = {}) {
|
package/dist/index209.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 g=require("./index241.cjs"),f=require("./index242.cjs");function l(t,i={}){const{signed:n,size:e}=i,o=BigInt(t);let r;e?n?r=(1n<<BigInt(e)*8n-1n)-1n:r=2n**(BigInt(e)*8n)-1n:typeof t=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const u=typeof r=="bigint"&&n?-r-1n:0;if(r&&o>r||o<u){const s=typeof t=="bigint"?"n":"";throw new d({max:r?`${r}${s}`:void 0,min:`${u}${s}`,signed:n,size:e,value:`${t}${s}`})}const a=`0x${(n&&o<0?(1n<<BigInt(e*8))+BigInt(o):o).toString(16)}`;return e?c(a,e):a}function c(t,i){return f.pad(t,{dir:"left",size:i})}class d extends g.BaseError{constructor({max:i,min:n,signed:e,size:o,value:r}){super(`Number \`${r}\` is not in safe${o?` ${o*8}-bit`:""}${e?" signed":" unsigned"} integer range ${i?`(\`${n}\` to \`${i}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class b extends g.BaseError{constructor({size:i,targetSize:n,type:e}){super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}exports.IntegerOutOfRangeError=d;exports.SizeExceedsPaddingSizeError=b;exports.fromNumber=l;exports.padLeft=c;
|
package/dist/index209.js
CHANGED
|
@@ -1,27 +1,49 @@
|
|
|
1
|
-
import { BaseError as
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { BaseError as f } from "./index241.js";
|
|
2
|
+
import { pad as g } from "./index242.js";
|
|
3
|
+
function m(t, i = {}) {
|
|
4
|
+
const { signed: r, size: e } = i, o = BigInt(t);
|
|
5
|
+
let n;
|
|
6
|
+
e ? r ? n = (1n << BigInt(e) * 8n - 1n) - 1n : n = 2n ** (BigInt(e) * 8n) - 1n : typeof t == "number" && (n = BigInt(Number.MAX_SAFE_INTEGER));
|
|
7
|
+
const u = typeof n == "bigint" && r ? -n - 1n : 0;
|
|
8
|
+
if (n && o > n || o < u) {
|
|
9
|
+
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
+
throw new d({
|
|
11
|
+
max: n ? `${n}${s}` : void 0,
|
|
12
|
+
min: `${u}${s}`,
|
|
13
|
+
signed: r,
|
|
14
|
+
size: e,
|
|
15
|
+
value: `${t}${s}`
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
+
return e ? c(a, e) : a;
|
|
20
|
+
}
|
|
21
|
+
function c(t, i) {
|
|
22
|
+
return g(t, { dir: "left", size: i });
|
|
23
|
+
}
|
|
24
|
+
class d extends f {
|
|
25
|
+
constructor({ max: i, min: r, signed: e, size: o, value: n }) {
|
|
26
|
+
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
configurable: !0,
|
|
29
|
+
writable: !0,
|
|
30
|
+
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class p extends f {
|
|
35
|
+
constructor({ size: i, targetSize: r, type: e }) {
|
|
36
|
+
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${r}\`).`), Object.defineProperty(this, "name", {
|
|
37
|
+
enumerable: !0,
|
|
38
|
+
configurable: !0,
|
|
39
|
+
writable: !0,
|
|
40
|
+
value: "Hex.SizeExceedsPaddingSizeError"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
24
43
|
}
|
|
25
44
|
export {
|
|
26
|
-
|
|
45
|
+
d as IntegerOutOfRangeError,
|
|
46
|
+
p as SizeExceedsPaddingSizeError,
|
|
47
|
+
m as fromNumber,
|
|
48
|
+
c as padLeft
|
|
27
49
|
};
|
package/dist/index210.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("./index209.cjs");function r(e){return{address:e.address,amount:o.fromNumber(e.amount),index:o.fromNumber(e.index),validatorIndex:o.fromNumber(e.validatorIndex)}}exports.toRpc=r;
|
package/dist/index210.js
CHANGED
|
@@ -1,49 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
-
throw new d({
|
|
11
|
-
max: n ? `${n}${s}` : void 0,
|
|
12
|
-
min: `${u}${s}`,
|
|
13
|
-
signed: r,
|
|
14
|
-
size: e,
|
|
15
|
-
value: `${t}${s}`
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
-
return e ? c(a, e) : a;
|
|
20
|
-
}
|
|
21
|
-
function c(t, i) {
|
|
22
|
-
return g(t, { dir: "left", size: i });
|
|
23
|
-
}
|
|
24
|
-
class d extends f {
|
|
25
|
-
constructor({ max: i, min: r, signed: e, size: o, value: n }) {
|
|
26
|
-
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
-
enumerable: !0,
|
|
28
|
-
configurable: !0,
|
|
29
|
-
writable: !0,
|
|
30
|
-
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
class p extends f {
|
|
35
|
-
constructor({ size: i, targetSize: r, type: e }) {
|
|
36
|
-
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${r}\`).`), Object.defineProperty(this, "name", {
|
|
37
|
-
enumerable: !0,
|
|
38
|
-
configurable: !0,
|
|
39
|
-
writable: !0,
|
|
40
|
-
value: "Hex.SizeExceedsPaddingSizeError"
|
|
41
|
-
});
|
|
42
|
-
}
|
|
1
|
+
import { fromNumber as e } from "./index209.js";
|
|
2
|
+
function r(o) {
|
|
3
|
+
return {
|
|
4
|
+
address: o.address,
|
|
5
|
+
amount: e(o.amount),
|
|
6
|
+
index: e(o.index),
|
|
7
|
+
validatorIndex: e(o.validatorIndex)
|
|
8
|
+
};
|
|
43
9
|
}
|
|
44
10
|
export {
|
|
45
|
-
|
|
46
|
-
p as SizeExceedsPaddingSizeError,
|
|
47
|
-
m as fromNumber,
|
|
48
|
-
c as padLeft
|
|
11
|
+
r as toRpc
|
|
49
12
|
};
|
package/dist/index211.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index35.cjs"),o=require("./index154.cjs");function s(n,e){const t=(n.details||"").toLowerCase(),i=n instanceof c.BaseError?n.walk(r=>(r==null?void 0:r.code)===o.ExecutionRevertedError.code):n;return i instanceof c.BaseError?new o.ExecutionRevertedError({cause:n,message:i.details}):o.ExecutionRevertedError.nodeMessage.test(t)?new o.ExecutionRevertedError({cause:n,message:n.details}):o.FeeCapTooHighError.nodeMessage.test(t)?new o.FeeCapTooHighError({cause:n,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):o.FeeCapTooLowError.nodeMessage.test(t)?new o.FeeCapTooLowError({cause:n,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):o.NonceTooHighError.nodeMessage.test(t)?new o.NonceTooHighError({cause:n,nonce:e==null?void 0:e.nonce}):o.NonceTooLowError.nodeMessage.test(t)?new o.NonceTooLowError({cause:n,nonce:e==null?void 0:e.nonce}):o.NonceMaxValueError.nodeMessage.test(t)?new o.NonceMaxValueError({cause:n,nonce:e==null?void 0:e.nonce}):o.InsufficientFundsError.nodeMessage.test(t)?new o.InsufficientFundsError({cause:n}):o.IntrinsicGasTooHighError.nodeMessage.test(t)?new o.IntrinsicGasTooHighError({cause:n,gas:e==null?void 0:e.gas}):o.IntrinsicGasTooLowError.nodeMessage.test(t)?new o.IntrinsicGasTooLowError({cause:n,gas:e==null?void 0:e.gas}):o.TransactionTypeNotSupportedError.nodeMessage.test(t)?new o.TransactionTypeNotSupportedError({cause:n}):o.TipAboveFeeCapError.nodeMessage.test(t)?new o.TipAboveFeeCapError({cause:n,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new o.UnknownNodeError({cause:n})}exports.getNodeError=s;
|
package/dist/index211.js
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
import { BaseError as c } from "./index35.js";
|
|
2
|
+
import { ExecutionRevertedError as t, FeeCapTooHighError as u, FeeCapTooLowError as d, NonceTooHighError as a, NonceTooLowError as f, NonceMaxValueError as w, InsufficientFundsError as r, IntrinsicGasTooHighError as E, IntrinsicGasTooLowError as m, TransactionTypeNotSupportedError as x, TipAboveFeeCapError as F, UnknownNodeError as M } from "./index154.js";
|
|
3
|
+
function P(o, e) {
|
|
4
|
+
const n = (o.details || "").toLowerCase(), s = o instanceof c ? o.walk((i) => (i == null ? void 0 : i.code) === t.code) : o;
|
|
5
|
+
return s instanceof c ? new t({
|
|
6
|
+
cause: o,
|
|
7
|
+
message: s.details
|
|
8
|
+
}) : t.nodeMessage.test(n) ? new t({
|
|
9
|
+
cause: o,
|
|
10
|
+
message: o.details
|
|
11
|
+
}) : u.nodeMessage.test(n) ? new u({
|
|
12
|
+
cause: o,
|
|
13
|
+
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
|
|
14
|
+
}) : d.nodeMessage.test(n) ? new d({
|
|
15
|
+
cause: o,
|
|
16
|
+
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
|
|
17
|
+
}) : a.nodeMessage.test(n) ? new a({ cause: o, nonce: e == null ? void 0 : e.nonce }) : f.nodeMessage.test(n) ? new f({ cause: o, nonce: e == null ? void 0 : e.nonce }) : w.nodeMessage.test(n) ? new w({ cause: o, nonce: e == null ? void 0 : e.nonce }) : r.nodeMessage.test(n) ? new r({ cause: o }) : E.nodeMessage.test(n) ? new E({ cause: o, gas: e == null ? void 0 : e.gas }) : m.nodeMessage.test(n) ? new m({ cause: o, gas: e == null ? void 0 : e.gas }) : x.nodeMessage.test(n) ? new x({ cause: o }) : F.nodeMessage.test(n) ? new F({
|
|
18
|
+
cause: o,
|
|
19
|
+
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas,
|
|
20
|
+
maxPriorityFeePerGas: e == null ? void 0 : e.maxPriorityFeePerGas
|
|
21
|
+
}) : new M({
|
|
22
|
+
cause: o
|
|
23
|
+
});
|
|
9
24
|
}
|
|
10
25
|
export {
|
|
11
|
-
|
|
26
|
+
P as getNodeError
|
|
12
27
|
};
|
package/dist/index212.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index213.cjs");class t extends Error{constructor(a,e={}){var i;const s=e.cause instanceof t?e.cause.details:(i=e.cause)!=null&&i.message?e.cause.message:e.details,r=e.cause instanceof t&&e.cause.docsPath||e.docsPath,u=[a||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...r?[`Docs: https://abitype.dev${r}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${o.version}`].join(`
|
|
2
|
+
`);super(u),Object.defineProperty(this,"details",{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,"metaMessages",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),e.cause&&(this.cause=e.cause),this.details=s,this.docsPath=r,this.metaMessages=e.metaMessages,this.shortMessage=a}}exports.BaseError=t;
|
package/dist/index212.js
CHANGED
|
@@ -1,14 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { version as o } from "./index213.js";
|
|
2
|
+
class a extends Error {
|
|
3
|
+
constructor(i, e = {}) {
|
|
4
|
+
var r;
|
|
5
|
+
const t = e.cause instanceof a ? e.cause.details : (r = e.cause) != null && r.message ? e.cause.message : e.details, s = e.cause instanceof a && e.cause.docsPath || e.docsPath, u = [
|
|
6
|
+
i || "An error occurred.",
|
|
7
|
+
"",
|
|
8
|
+
...e.metaMessages ? [...e.metaMessages, ""] : [],
|
|
9
|
+
...s ? [`Docs: https://abitype.dev${s}`] : [],
|
|
10
|
+
...t ? [`Details: ${t}`] : [],
|
|
11
|
+
`Version: abitype@${o}`
|
|
12
|
+
].join(`
|
|
13
|
+
`);
|
|
14
|
+
super(u), Object.defineProperty(this, "details", {
|
|
15
|
+
enumerable: !0,
|
|
16
|
+
configurable: !0,
|
|
17
|
+
writable: !0,
|
|
18
|
+
value: void 0
|
|
19
|
+
}), Object.defineProperty(this, "docsPath", {
|
|
20
|
+
enumerable: !0,
|
|
21
|
+
configurable: !0,
|
|
22
|
+
writable: !0,
|
|
23
|
+
value: void 0
|
|
24
|
+
}), Object.defineProperty(this, "metaMessages", {
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
configurable: !0,
|
|
27
|
+
writable: !0,
|
|
28
|
+
value: void 0
|
|
29
|
+
}), Object.defineProperty(this, "shortMessage", {
|
|
30
|
+
enumerable: !0,
|
|
31
|
+
configurable: !0,
|
|
32
|
+
writable: !0,
|
|
33
|
+
value: void 0
|
|
34
|
+
}), Object.defineProperty(this, "name", {
|
|
35
|
+
enumerable: !0,
|
|
36
|
+
configurable: !0,
|
|
37
|
+
writable: !0,
|
|
38
|
+
value: "AbiTypeError"
|
|
39
|
+
}), e.cause && (this.cause = e.cause), this.details = t, this.docsPath = s, this.metaMessages = e.metaMessages, this.shortMessage = i;
|
|
40
|
+
}
|
|
10
41
|
}
|
|
11
42
|
export {
|
|
12
|
-
|
|
13
|
-
s as withDedupe
|
|
43
|
+
a as BaseError
|
|
14
44
|
};
|
package/dist/index213.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`);super(u),Object.defineProperty(this,"details",{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,"metaMessages",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),e.cause&&(this.cause=e.cause),this.details=s,this.docsPath=r,this.metaMessages=e.metaMessages,this.shortMessage=a}}exports.BaseError=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.1.0";exports.version=e;
|
package/dist/index213.js
CHANGED
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
class a extends Error {
|
|
3
|
-
constructor(i, e = {}) {
|
|
4
|
-
var r;
|
|
5
|
-
const t = e.cause instanceof a ? e.cause.details : (r = e.cause) != null && r.message ? e.cause.message : e.details, s = e.cause instanceof a && e.cause.docsPath || e.docsPath, u = [
|
|
6
|
-
i || "An error occurred.",
|
|
7
|
-
"",
|
|
8
|
-
...e.metaMessages ? [...e.metaMessages, ""] : [],
|
|
9
|
-
...s ? [`Docs: https://abitype.dev${s}`] : [],
|
|
10
|
-
...t ? [`Details: ${t}`] : [],
|
|
11
|
-
`Version: abitype@${o}`
|
|
12
|
-
].join(`
|
|
13
|
-
`);
|
|
14
|
-
super(u), Object.defineProperty(this, "details", {
|
|
15
|
-
enumerable: !0,
|
|
16
|
-
configurable: !0,
|
|
17
|
-
writable: !0,
|
|
18
|
-
value: void 0
|
|
19
|
-
}), Object.defineProperty(this, "docsPath", {
|
|
20
|
-
enumerable: !0,
|
|
21
|
-
configurable: !0,
|
|
22
|
-
writable: !0,
|
|
23
|
-
value: void 0
|
|
24
|
-
}), Object.defineProperty(this, "metaMessages", {
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
configurable: !0,
|
|
27
|
-
writable: !0,
|
|
28
|
-
value: void 0
|
|
29
|
-
}), Object.defineProperty(this, "shortMessage", {
|
|
30
|
-
enumerable: !0,
|
|
31
|
-
configurable: !0,
|
|
32
|
-
writable: !0,
|
|
33
|
-
value: void 0
|
|
34
|
-
}), Object.defineProperty(this, "name", {
|
|
35
|
-
enumerable: !0,
|
|
36
|
-
configurable: !0,
|
|
37
|
-
writable: !0,
|
|
38
|
-
value: "AbiTypeError"
|
|
39
|
-
}), e.cause && (this.cause = e.cause), this.details = t, this.docsPath = s, this.metaMessages = e.metaMessages, this.shortMessage = i;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
const o = "1.1.0";
|
|
42
2
|
export {
|
|
43
|
-
|
|
3
|
+
o as version
|
|
44
4
|
};
|
package/dist/index214.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 r=require("./index215.cjs");function a(t){var e;return t.type==="function"?`function ${t.name}(${r.formatAbiParameters(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${(e=t.outputs)!=null&&e.length?` returns (${r.formatAbiParameters(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${r.formatAbiParameters(t.inputs)})`:t.type==="error"?`error ${t.name}(${r.formatAbiParameters(t.inputs)})`:t.type==="constructor"?`constructor(${r.formatAbiParameters(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?`fallback() external${t.stateMutability==="payable"?" payable":""}`:"receive() external payable"}exports.formatAbiItem=a;
|
package/dist/index214.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { formatAbiParameters as r } from "./index215.js";
|
|
2
|
+
function u(t) {
|
|
3
|
+
var n;
|
|
4
|
+
return t.type === "function" ? `function ${t.name}(${r(t.inputs)})${t.stateMutability && t.stateMutability !== "nonpayable" ? ` ${t.stateMutability}` : ""}${(n = t.outputs) != null && n.length ? ` returns (${r(t.outputs)})` : ""}` : t.type === "event" ? `event ${t.name}(${r(t.inputs)})` : t.type === "error" ? `error ${t.name}(${r(t.inputs)})` : t.type === "constructor" ? `constructor(${r(t.inputs)})${t.stateMutability === "payable" ? " payable" : ""}` : t.type === "fallback" ? `fallback() external${t.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
|
|
5
|
+
}
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
u as formatAbiItem
|
|
4
8
|
};
|
package/dist/index215.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index216.cjs");function m(r){let e="";const a=r.length;for(let t=0;t<a;t++){const o=r[t];e+=i.formatAbiParameter(o),t!==a-1&&(e+=", ")}return e}exports.formatAbiParameters=m;
|
package/dist/index215.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { formatAbiParameter as m } from "./index216.js";
|
|
2
|
+
function f(e) {
|
|
3
|
+
let r = "";
|
|
4
|
+
const o = e.length;
|
|
5
|
+
for (let t = 0; t < o; t++) {
|
|
6
|
+
const a = e[t];
|
|
7
|
+
r += m(a), t !== o - 1 && (r += ", ");
|
|
8
|
+
}
|
|
9
|
+
return r;
|
|
5
10
|
}
|
|
6
11
|
export {
|
|
7
|
-
|
|
12
|
+
f as formatAbiParameters
|
|
8
13
|
};
|
package/dist/index216.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 f=require("./index217.cjs"),d=/^tuple(?<array>(\[(\d*)\])*)$/;function c(n){let e=n.type;if(d.test(n.type)&&"components"in n){e="(";const p=n.components.length;for(let t=0;t<p;t++){const s=n.components[t];e+=c(s),t<p-1&&(e+=", ")}const o=f.execTyped(d,n.type);return e+=`)${(o==null?void 0:o.array)??""}`,c({...n,type:e})}return"indexed"in n&&n.indexed&&(e=`${e} indexed`),n.name?`${e} ${n.name}`:e}exports.formatAbiParameter=c;
|
package/dist/index216.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { execTyped as s } from "./index217.js";
|
|
2
|
+
const c = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
3
|
+
function d(n) {
|
|
4
|
+
let o = n.type;
|
|
5
|
+
if (c.test(n.type) && "components" in n) {
|
|
6
|
+
o = "(";
|
|
7
|
+
const p = n.components.length;
|
|
8
|
+
for (let t = 0; t < p; t++) {
|
|
9
|
+
const f = n.components[t];
|
|
10
|
+
o += d(f), t < p - 1 && (o += ", ");
|
|
11
|
+
}
|
|
12
|
+
const e = s(c, n.type);
|
|
13
|
+
return o += `)${(e == null ? void 0 : e.array) ?? ""}`, d({
|
|
14
|
+
...n,
|
|
15
|
+
type: o
|
|
16
|
+
});
|
|
8
17
|
}
|
|
9
|
-
return
|
|
18
|
+
return "indexed" in n && n.indexed && (o = `${o} indexed`), n.name ? `${o} ${n.name}` : o;
|
|
10
19
|
}
|
|
11
20
|
export {
|
|
12
|
-
|
|
21
|
+
d as formatAbiParameter
|
|
13
22
|
};
|
package/dist/index217.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 s(t,n){const e=t.exec(n);return e==null?void 0:e.groups}const g=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,o=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,c=/^\(.+?\).*?$/;exports.bytesRegex=g;exports.execTyped=s;exports.integerRegex=o;exports.isTupleRegex=c;
|
package/dist/index217.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
let o = n.type;
|
|
5
|
-
if (c.test(n.type) && "components" in n) {
|
|
6
|
-
o = "(";
|
|
7
|
-
const p = n.components.length;
|
|
8
|
-
for (let t = 0; t < p; t++) {
|
|
9
|
-
const f = n.components[t];
|
|
10
|
-
o += d(f), t < p - 1 && (o += ", ");
|
|
11
|
-
}
|
|
12
|
-
const e = s(c, n.type);
|
|
13
|
-
return o += `)${(e == null ? void 0 : e.array) ?? ""}`, d({
|
|
14
|
-
...n,
|
|
15
|
-
type: o
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return "indexed" in n && n.indexed && (o = `${o} indexed`), n.name ? `${o} ${n.name}` : o;
|
|
1
|
+
function s(t, n) {
|
|
2
|
+
const e = t.exec(n);
|
|
3
|
+
return e == null ? void 0 : e.groups;
|
|
19
4
|
}
|
|
5
|
+
const o = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, c = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/, x = /^\(.+?\).*?$/;
|
|
20
6
|
export {
|
|
21
|
-
|
|
7
|
+
o as bytesRegex,
|
|
8
|
+
s as execTyped,
|
|
9
|
+
c as integerRegex,
|
|
10
|
+
x as isTupleRegex
|
|
22
11
|
};
|
package/dist/index218.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index217.cjs"),n=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function o(e){return n.test(e)}function s(e){return t.execTyped(n,e)}const r=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function g(e){return r.test(e)}function S(e){return t.execTyped(r,e)}const i=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function x(e){return i.test(e)}function l(e){return t.execTyped(i,e)}const a=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(e){return a.test(e)}function p(e){return t.execTyped(a,e)}const u=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function b(e){return u.test(e)}function y(e){return t.execTyped(u,e)}const c=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function d(e){return c.test(e)}function $(e){return t.execTyped(c,e)}const v=/^receive\(\) external payable$/;function m(e){return v.test(e)}const R=new Set(["indexed"]),z=new Set(["calldata","memory","storage"]);exports.eventModifiers=R;exports.execConstructorSignature=y;exports.execErrorSignature=s;exports.execEventSignature=S;exports.execFallbackSignature=$;exports.execFunctionSignature=l;exports.execStructSignature=p;exports.functionModifiers=z;exports.isConstructorSignature=b;exports.isErrorSignature=o;exports.isEventSignature=g;exports.isFallbackSignature=d;exports.isFunctionSignature=x;exports.isReceiveSignature=m;exports.isStructSignature=f;
|
package/dist/index218.js
CHANGED
|
@@ -1,11 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { execTyped as t } from "./index217.js";
|
|
2
|
+
const n = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
|
|
3
|
+
function g(e) {
|
|
4
|
+
return n.test(e);
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
+
function S(e) {
|
|
7
|
+
return t(n, e);
|
|
8
|
+
}
|
|
9
|
+
const r = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
|
|
10
|
+
function l(e) {
|
|
11
|
+
return r.test(e);
|
|
12
|
+
}
|
|
13
|
+
function f(e) {
|
|
14
|
+
return t(r, e);
|
|
15
|
+
}
|
|
16
|
+
const a = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
|
|
17
|
+
function x(e) {
|
|
18
|
+
return a.test(e);
|
|
19
|
+
}
|
|
20
|
+
function p(e) {
|
|
21
|
+
return t(a, e);
|
|
22
|
+
}
|
|
23
|
+
const u = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
|
|
24
|
+
function $(e) {
|
|
25
|
+
return u.test(e);
|
|
26
|
+
}
|
|
27
|
+
function b(e) {
|
|
28
|
+
return t(u, e);
|
|
29
|
+
}
|
|
30
|
+
const i = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
|
|
31
|
+
function m(e) {
|
|
32
|
+
return i.test(e);
|
|
33
|
+
}
|
|
34
|
+
function y(e) {
|
|
35
|
+
return t(i, e);
|
|
36
|
+
}
|
|
37
|
+
const c = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
|
|
38
|
+
function v(e) {
|
|
39
|
+
return c.test(e);
|
|
40
|
+
}
|
|
41
|
+
function z(e) {
|
|
42
|
+
return t(c, e);
|
|
43
|
+
}
|
|
44
|
+
const o = /^receive\(\) external payable$/;
|
|
45
|
+
function A(e) {
|
|
46
|
+
return o.test(e);
|
|
47
|
+
}
|
|
48
|
+
const R = /* @__PURE__ */ new Set(["indexed"]), Z = /* @__PURE__ */ new Set([
|
|
49
|
+
"calldata",
|
|
50
|
+
"memory",
|
|
51
|
+
"storage"
|
|
52
|
+
]);
|
|
6
53
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
54
|
+
R as eventModifiers,
|
|
55
|
+
y as execConstructorSignature,
|
|
56
|
+
S as execErrorSignature,
|
|
57
|
+
f as execEventSignature,
|
|
58
|
+
z as execFallbackSignature,
|
|
59
|
+
p as execFunctionSignature,
|
|
60
|
+
b as execStructSignature,
|
|
61
|
+
Z as functionModifiers,
|
|
62
|
+
m as isConstructorSignature,
|
|
63
|
+
g as isErrorSignature,
|
|
64
|
+
l as isEventSignature,
|
|
65
|
+
v as isFallbackSignature,
|
|
66
|
+
x as isFunctionSignature,
|
|
67
|
+
A as isReceiveSignature,
|
|
68
|
+
$ as isStructSignature
|
|
11
69
|
};
|
package/dist/index219.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 h=require("./index217.cjs"),b=require("./index221.cjs"),T=require("./index222.cjs"),y=require("./index223.cjs"),q=require("./index225.cjs"),f=require("./index218.cjs"),S=require("./index220.cjs");function v(i){const n={},u=i.length;for(let e=0;e<u;e++){const o=i[e];if(!f.isStructSignature(o))continue;const r=f.execStructSignature(o);if(!r)throw new y.InvalidSignatureError({signature:o,type:"struct"});const p=r.properties.split(";"),t=[],w=p.length;for(let l=0;l<w;l++){const g=p[l].trim();if(!g)continue;const d=S.parseAbiParameter(g,{type:"struct"});t.push(d)}if(!t.length)throw new y.InvalidStructSignatureError({signature:o});n[r.name]=t}const s={},a=Object.entries(n),c=a.length;for(let e=0;e<c;e++){const[o,r]=a[e];s[o]=m(r,n)}return s}const P=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function m(i,n,u=new Set){const s=[],a=i.length;for(let c=0;c<a;c++){const e=i[c];if(h.isTupleRegex.test(e.type))s.push(e);else{const r=h.execTyped(P,e.type);if(!(r!=null&&r.type))throw new T.InvalidAbiTypeParameterError({abiParameter:e});const{array:p,type:t}=r;if(t in n){if(u.has(t))throw new q.CircularReferenceError({type:t});s.push({...e,type:`tuple${p??""}`,components:m(n[t]??[],n,new Set([...u,t]))})}else if(S.isSolidityType(t))s.push(e);else throw new b.UnknownTypeError({type:t})}}return s}exports.parseStructs=v;
|