@gardenfi/utils 2.5.1 → 2.5.3-beta.0

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.
Files changed (192) hide show
  1. package/README.md +9 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +37 -36
  4. package/dist/index11.cjs +1 -1
  5. package/dist/index11.js +16 -20
  6. package/dist/index112.cjs +1 -1
  7. package/dist/index112.js +15 -15
  8. package/dist/index121.cjs +1 -1
  9. package/dist/index121.js +1 -1
  10. package/dist/index130.cjs +1 -1
  11. package/dist/index130.js +1 -1
  12. package/dist/index18.cjs +1 -1
  13. package/dist/index18.js +20 -9
  14. package/dist/index197.cjs +1 -1
  15. package/dist/index197.js +17 -30
  16. package/dist/index22.cjs +1 -1
  17. package/dist/index22.js +84 -51
  18. package/dist/index226.cjs +1 -1
  19. package/dist/index226.js +2 -2
  20. package/dist/index229.cjs +1 -1
  21. package/dist/index229.js +2 -2
  22. package/dist/index230.cjs +1 -1
  23. package/dist/index230.js +1 -1
  24. package/dist/index234.cjs +1 -1
  25. package/dist/index234.js +7 -8
  26. package/dist/index235.cjs +1 -1
  27. package/dist/index235.js +1 -1
  28. package/dist/index236.cjs +1 -1
  29. package/dist/index236.js +1 -1
  30. package/dist/index237.cjs +1 -1
  31. package/dist/index237.js +2 -2
  32. package/dist/index24.cjs +1 -1
  33. package/dist/index24.js +4 -5
  34. package/dist/index249.cjs +1 -1
  35. package/dist/index249.js +3 -3
  36. package/dist/index25.cjs +1 -1
  37. package/dist/index25.js +3 -5
  38. package/dist/index250.cjs +1 -1
  39. package/dist/index250.js +3 -3
  40. package/dist/index256.cjs +1 -1
  41. package/dist/index256.js +17 -12
  42. package/dist/index269.cjs +1 -1
  43. package/dist/index269.js +4 -4
  44. package/dist/index270.cjs +1 -1
  45. package/dist/index270.js +5 -5
  46. package/dist/index271.cjs +1 -1
  47. package/dist/index271.js +27 -21
  48. package/dist/index272.cjs +1 -1
  49. package/dist/index272.js +54 -20
  50. package/dist/index273.cjs +1 -1
  51. package/dist/index273.js +18 -54
  52. package/dist/index274.cjs +1 -1
  53. package/dist/index274.js +10 -34
  54. package/dist/index275.cjs +1 -1
  55. package/dist/index275.js +7 -10
  56. package/dist/index276.cjs +1 -1
  57. package/dist/index276.js +12 -13
  58. package/dist/index277.cjs +1 -1
  59. package/dist/index277.js +11 -12
  60. package/dist/index280.cjs +1 -1
  61. package/dist/index280.js +103 -11
  62. package/dist/index281.cjs +1 -1
  63. package/dist/index281.js +6 -103
  64. package/dist/index282.cjs +1 -1
  65. package/dist/index282.js +243 -5
  66. package/dist/index283.cjs +1 -1
  67. package/dist/index283.js +6 -224
  68. package/dist/index284.cjs +1 -1
  69. package/dist/index284.js +7 -7
  70. package/dist/index285.cjs +1 -1
  71. package/dist/index285.js +27 -7
  72. package/dist/index286.cjs +1 -1
  73. package/dist/index286.js +18 -25
  74. package/dist/index287.cjs +1 -1
  75. package/dist/index287.js +145 -18
  76. package/dist/index288.cjs +1 -1
  77. package/dist/index288.js +3 -146
  78. package/dist/index289.cjs +1 -1
  79. package/dist/index289.js +155 -3
  80. package/dist/index29.cjs +1 -1
  81. package/dist/index29.js +2 -2
  82. package/dist/index290.cjs +1 -1
  83. package/dist/index290.js +7 -138
  84. package/dist/index291.cjs +1 -1
  85. package/dist/index291.js +128 -143
  86. package/dist/index292.cjs +1 -1
  87. package/dist/index292.js +111 -7
  88. package/dist/index293.cjs +2 -1
  89. package/dist/index293.js +116 -95
  90. package/dist/index294.cjs +1 -2
  91. package/dist/index294.js +35 -127
  92. package/dist/index295.cjs +1 -1
  93. package/dist/index295.js +66 -30
  94. package/dist/index296.cjs +1 -1
  95. package/dist/index296.js +2 -79
  96. package/dist/index297.cjs +1 -1
  97. package/dist/index297.js +12 -2
  98. package/dist/index298.cjs +1 -1
  99. package/dist/index298.js +19 -11
  100. package/dist/index299.cjs +1 -1
  101. package/dist/index299.js +68 -19
  102. package/dist/index3.cjs +1 -1
  103. package/dist/index3.js +10 -8
  104. package/dist/index300.cjs +1 -1
  105. package/dist/index300.js +786 -66
  106. package/dist/index301.cjs +1 -1
  107. package/dist/index301.js +134 -684
  108. package/dist/index302.cjs +1 -1
  109. package/dist/index302.js +185 -124
  110. package/dist/index303.cjs +2 -1
  111. package/dist/index303.js +63 -198
  112. package/dist/index304.cjs +1 -2
  113. package/dist/index304.js +7 -66
  114. package/dist/index305.cjs +1 -1
  115. package/dist/index305.js +62 -4
  116. package/dist/index306.cjs +1 -1
  117. package/dist/index306.js +22 -40
  118. package/dist/index307.cjs +1 -1
  119. package/dist/index307.js +5 -7
  120. package/dist/index308.cjs +1 -1
  121. package/dist/index308.js +72 -57
  122. package/dist/index309.cjs +1 -1
  123. package/dist/index309.js +4 -78
  124. package/dist/index310.cjs +1 -1
  125. package/dist/index310.js +195 -4
  126. package/dist/index311.cjs +1 -1
  127. package/dist/index311.js +4 -194
  128. package/dist/index312.cjs +1 -1
  129. package/dist/index312.js +35 -58
  130. package/dist/index313.cjs +2 -1
  131. package/dist/index313.js +40 -43
  132. package/dist/index314.cjs +1 -1
  133. package/dist/index314.js +2 -5
  134. package/dist/index315.cjs +1 -1
  135. package/dist/index315.js +11 -5
  136. package/dist/index316.cjs +1 -1
  137. package/dist/index316.js +20 -2
  138. package/dist/index317.cjs +1 -1
  139. package/dist/index317.js +8 -21
  140. package/dist/index318.cjs +1 -0
  141. package/dist/index318.js +45 -0
  142. package/dist/index319.cjs +1 -0
  143. package/dist/index319.js +69 -0
  144. package/dist/index320.cjs +1 -0
  145. package/dist/index320.js +68 -0
  146. package/dist/index321.cjs +1 -0
  147. package/dist/index321.js +191 -0
  148. package/dist/index322.cjs +1 -0
  149. package/dist/index322.js +79 -0
  150. package/dist/index323.cjs +1 -0
  151. package/dist/index323.js +43 -0
  152. package/dist/index324.cjs +1 -0
  153. package/dist/index324.js +19 -0
  154. package/dist/index325.cjs +1 -0
  155. package/dist/index325.js +16 -0
  156. package/dist/index326.cjs +1 -0
  157. package/dist/index326.js +7 -0
  158. package/dist/index327.cjs +1 -0
  159. package/dist/index327.js +66 -0
  160. package/dist/index328.cjs +1 -0
  161. package/dist/index328.js +7 -0
  162. package/dist/index329.cjs +1 -0
  163. package/dist/index329.js +47 -0
  164. package/dist/index330.cjs +1 -0
  165. package/dist/index330.js +71 -0
  166. package/dist/index331.cjs +1 -0
  167. package/dist/index331.js +4 -0
  168. package/dist/index332.cjs +1 -0
  169. package/dist/index332.js +24 -0
  170. package/dist/index4.cjs +1 -1
  171. package/dist/index4.js +38 -38
  172. package/dist/index55.cjs +1 -1
  173. package/dist/index55.js +1 -1
  174. package/dist/index58.cjs +1 -1
  175. package/dist/index58.js +35 -34
  176. package/dist/index60.cjs +1 -1
  177. package/dist/index60.js +26 -30
  178. package/dist/index61.cjs +1 -1
  179. package/dist/index61.js +13 -9
  180. package/dist/index62.cjs +1 -1
  181. package/dist/index62.js +19 -19
  182. package/dist/index89.cjs +1 -1
  183. package/dist/index89.js +31 -30
  184. package/dist/index9.cjs +1 -1
  185. package/dist/index9.js +2 -2
  186. package/dist/index95.cjs +1 -1
  187. package/dist/index95.js +73 -73
  188. package/dist/src/lib/auth/apikey/apikey.d.ts +1 -1
  189. package/dist/src/lib/auth/auth.types.d.ts +1 -1
  190. package/dist/src/lib/fetcher/fetcher.d.ts +2 -0
  191. package/dist/src/lib/utils.d.ts +1 -0
  192. package/package.json +2 -2
package/dist/index22.js CHANGED
@@ -92,24 +92,53 @@ const t = [
92
92
  }
93
93
  ], e = [
94
94
  {
95
- inputs: [],
96
- name: "ResolverNotFound",
95
+ inputs: [
96
+ {
97
+ name: "dns",
98
+ type: "bytes"
99
+ }
100
+ ],
101
+ name: "DNSDecodingFailed",
102
+ type: "error"
103
+ },
104
+ {
105
+ inputs: [
106
+ {
107
+ name: "ens",
108
+ type: "string"
109
+ }
110
+ ],
111
+ name: "DNSEncodingFailed",
97
112
  type: "error"
98
113
  },
99
114
  {
100
115
  inputs: [],
101
- name: "ResolverWildcardNotSupported",
116
+ name: "EmptyAddress",
117
+ type: "error"
118
+ },
119
+ {
120
+ inputs: [
121
+ {
122
+ name: "status",
123
+ type: "uint16"
124
+ },
125
+ {
126
+ name: "message",
127
+ type: "string"
128
+ }
129
+ ],
130
+ name: "HttpError",
102
131
  type: "error"
103
132
  },
104
133
  {
105
134
  inputs: [],
106
- name: "ResolverNotContract",
135
+ name: "InvalidBatchGatewayResponse",
107
136
  type: "error"
108
137
  },
109
138
  {
110
139
  inputs: [
111
140
  {
112
- name: "returnData",
141
+ name: "errorData",
113
142
  type: "bytes"
114
143
  }
115
144
  ],
@@ -119,40 +148,56 @@ const t = [
119
148
  {
120
149
  inputs: [
121
150
  {
122
- components: [
123
- {
124
- name: "status",
125
- type: "uint16"
126
- },
127
- {
128
- name: "message",
129
- type: "string"
130
- }
131
- ],
132
- name: "errors",
133
- type: "tuple[]"
151
+ name: "name",
152
+ type: "bytes"
153
+ },
154
+ {
155
+ name: "resolver",
156
+ type: "address"
134
157
  }
135
158
  ],
136
- name: "HttpError",
159
+ name: "ResolverNotContract",
137
160
  type: "error"
138
- }
139
- ], a = [
140
- ...e,
161
+ },
141
162
  {
142
- name: "resolve",
143
- type: "function",
144
- stateMutability: "view",
145
163
  inputs: [
146
- { name: "name", type: "bytes" },
147
- { name: "data", type: "bytes" }
164
+ {
165
+ name: "name",
166
+ type: "bytes"
167
+ }
148
168
  ],
149
- outputs: [
150
- { name: "", type: "bytes" },
151
- { name: "address", type: "address" }
152
- ]
169
+ name: "ResolverNotFound",
170
+ type: "error"
171
+ },
172
+ {
173
+ inputs: [
174
+ {
175
+ name: "primary",
176
+ type: "string"
177
+ },
178
+ {
179
+ name: "primaryAddress",
180
+ type: "bytes"
181
+ }
182
+ ],
183
+ name: "ReverseAddressMismatch",
184
+ type: "error"
153
185
  },
154
186
  {
155
- name: "resolve",
187
+ inputs: [
188
+ {
189
+ internalType: "bytes4",
190
+ name: "selector",
191
+ type: "bytes4"
192
+ }
193
+ ],
194
+ name: "UnsupportedResolverProfile",
195
+ type: "error"
196
+ }
197
+ ], a = [
198
+ ...e,
199
+ {
200
+ name: "resolveWithGateways",
156
201
  type: "function",
157
202
  stateMutability: "view",
158
203
  inputs: [
@@ -168,30 +213,18 @@ const t = [
168
213
  ], s = [
169
214
  ...e,
170
215
  {
171
- name: "reverse",
172
- type: "function",
173
- stateMutability: "view",
174
- inputs: [{ type: "bytes", name: "reverseName" }],
175
- outputs: [
176
- { type: "string", name: "resolvedName" },
177
- { type: "address", name: "resolvedAddress" },
178
- { type: "address", name: "reverseResolver" },
179
- { type: "address", name: "resolver" }
180
- ]
181
- },
182
- {
183
- name: "reverse",
216
+ name: "reverseWithGateways",
184
217
  type: "function",
185
218
  stateMutability: "view",
186
219
  inputs: [
187
220
  { type: "bytes", name: "reverseName" },
221
+ { type: "uint256", name: "coinType" },
188
222
  { type: "string[]", name: "gateways" }
189
223
  ],
190
224
  outputs: [
191
225
  { type: "string", name: "resolvedName" },
192
- { type: "address", name: "resolvedAddress" },
193
- { type: "address", name: "reverseResolver" },
194
- { type: "address", name: "resolver" }
226
+ { type: "address", name: "resolver" },
227
+ { type: "address", name: "reverseResolver" }
195
228
  ]
196
229
  }
197
230
  ], p = [
@@ -223,7 +256,7 @@ const t = [
223
256
  ],
224
257
  outputs: [{ name: "", type: "bytes" }]
225
258
  }
226
- ], r = [
259
+ ], y = [
227
260
  {
228
261
  inputs: [
229
262
  {
@@ -266,7 +299,7 @@ const t = [
266
299
  type: "function",
267
300
  name: "isValidSig"
268
301
  }
269
- ], y = [
302
+ ], r = [
270
303
  {
271
304
  type: "event",
272
305
  name: "Approval",
@@ -457,10 +490,10 @@ const t = [
457
490
  export {
458
491
  i as addressResolverAbi,
459
492
  n as batchGatewayAbi,
460
- y as erc20Abi,
493
+ r as erc20Abi,
461
494
  t as multicall3Abi,
462
495
  p as textResolverAbi,
463
496
  a as universalResolverResolveAbi,
464
497
  s as universalResolverReverseAbi,
465
- r as universalSignatureValidatorAbi
498
+ y as universalSignatureValidatorAbi
466
499
  };
package/dist/index226.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index284.cjs"),r=require("./index285.cjs");function n(t){return e.hashSignature(r.toSignature(t))}exports.toSignatureHash=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index283.cjs"),r=require("./index284.cjs");function n(t){return e.hashSignature(r.toSignature(t))}exports.toSignatureHash=n;
package/dist/index226.js CHANGED
@@ -1,5 +1,5 @@
1
- import { hashSignature as t } from "./index284.js";
2
- import { toSignature as o } from "./index285.js";
1
+ import { hashSignature as t } from "./index283.js";
2
+ import { toSignature as o } from "./index284.js";
3
3
  function a(r) {
4
4
  return t(o(r));
5
5
  }
package/dist/index229.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index287.cjs"),c=require("./index288.cjs"),A=BigInt(0),u=BigInt(1),H=BigInt(2),L=BigInt(7),S=BigInt(256),T=BigInt(113),O=[],y=[],w=[];for(let n=0,t=u,s=1,i=0;n<24;n++){[s,i]=[i,(2*s+3*i)%5],O.push(2*(5*i+s)),y.push((n+1)*(n+2)/2%64);let o=A;for(let r=0;r<7;r++)t=(t<<u^(t>>L)*T)%S,t&H&&(o^=u<<(u<<BigInt(r))-u);w.push(o)}const _=f.split(w,!0),F=_[0],X=_[1],I=(n,t,s)=>s>32?f.rotlBH(n,t,s):f.rotlSH(n,t,s),x=(n,t,s)=>s>32?f.rotlBL(n,t,s):f.rotlSL(n,t,s);function b(n,t=24){const s=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let e=0;e<10;e++)s[e]=n[e]^n[e+10]^n[e+20]^n[e+30]^n[e+40];for(let e=0;e<10;e+=2){const h=(e+8)%10,l=(e+2)%10,p=s[l],a=s[l+1],g=I(p,a,1)^s[h],B=x(p,a,1)^s[h+1];for(let d=0;d<50;d+=10)n[e+d]^=g,n[e+d+1]^=B}let o=n[2],r=n[3];for(let e=0;e<24;e++){const h=y[e],l=I(o,r,h),p=x(o,r,h),a=O[e];o=n[a],r=n[a+1],n[a]=l,n[a+1]=p}for(let e=0;e<50;e+=10){for(let h=0;h<10;h++)s[h]=n[e+h];for(let h=0;h<10;h++)n[e+h]^=~s[(h+2)%10]&s[(h+4)%10]}n[0]^=F[i],n[1]^=X[i]}c.clean(s)}class k extends c.Hash{constructor(t,s,i,o=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=s,this.outputLen=i,this.enableXOF=o,this.rounds=r,c.anumber(i),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=c.u32(this.state)}clone(){return this._cloneInto()}keccak(){c.swap32IfBE(this.state32),b(this.state32,this.rounds),c.swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(t){c.aexists(this),t=c.toBytes(t),c.abytes(t);const{blockLen:s,state:i}=this,o=t.length;for(let r=0;r<o;){const e=Math.min(s-this.pos,o-r);for(let h=0;h<e;h++)i[this.pos++]^=t[r++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:s,pos:i,blockLen:o}=this;t[i]^=s,s&128&&i===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){c.aexists(this,!1),c.abytes(t),this.finish();const s=this.state,{blockLen:i}=this;for(let o=0,r=t.length;o<r;){this.posOut>=i&&this.keccak();const e=Math.min(i-this.posOut,r-o);t.set(s.subarray(this.posOut,this.posOut+e),o),this.posOut+=e,o+=e}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return c.anumber(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(c.aoutput(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,c.clean(this.state)}_cloneInto(t){const{blockLen:s,suffix:i,outputLen:o,rounds:r,enableXOF:e}=this;return t||(t=new k(s,i,o,e,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=i,t.outputLen=o,t.enableXOF=e,t.destroyed=this.destroyed,t}}const m=(n,t,s)=>c.createHasher(()=>new k(t,n,s)),E=m(1,136,256/8);exports.Keccak=k;exports.keccakP=b;exports.keccak_256=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index286.cjs"),c=require("./index287.cjs"),A=BigInt(0),u=BigInt(1),H=BigInt(2),L=BigInt(7),S=BigInt(256),T=BigInt(113),O=[],y=[],w=[];for(let n=0,t=u,s=1,i=0;n<24;n++){[s,i]=[i,(2*s+3*i)%5],O.push(2*(5*i+s)),y.push((n+1)*(n+2)/2%64);let o=A;for(let r=0;r<7;r++)t=(t<<u^(t>>L)*T)%S,t&H&&(o^=u<<(u<<BigInt(r))-u);w.push(o)}const _=f.split(w,!0),F=_[0],X=_[1],I=(n,t,s)=>s>32?f.rotlBH(n,t,s):f.rotlSH(n,t,s),x=(n,t,s)=>s>32?f.rotlBL(n,t,s):f.rotlSL(n,t,s);function b(n,t=24){const s=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let e=0;e<10;e++)s[e]=n[e]^n[e+10]^n[e+20]^n[e+30]^n[e+40];for(let e=0;e<10;e+=2){const h=(e+8)%10,l=(e+2)%10,p=s[l],a=s[l+1],g=I(p,a,1)^s[h],B=x(p,a,1)^s[h+1];for(let d=0;d<50;d+=10)n[e+d]^=g,n[e+d+1]^=B}let o=n[2],r=n[3];for(let e=0;e<24;e++){const h=y[e],l=I(o,r,h),p=x(o,r,h),a=O[e];o=n[a],r=n[a+1],n[a]=l,n[a+1]=p}for(let e=0;e<50;e+=10){for(let h=0;h<10;h++)s[h]=n[e+h];for(let h=0;h<10;h++)n[e+h]^=~s[(h+2)%10]&s[(h+4)%10]}n[0]^=F[i],n[1]^=X[i]}c.clean(s)}class k extends c.Hash{constructor(t,s,i,o=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=s,this.outputLen=i,this.enableXOF=o,this.rounds=r,c.anumber(i),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=c.u32(this.state)}clone(){return this._cloneInto()}keccak(){c.swap32IfBE(this.state32),b(this.state32,this.rounds),c.swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(t){c.aexists(this),t=c.toBytes(t),c.abytes(t);const{blockLen:s,state:i}=this,o=t.length;for(let r=0;r<o;){const e=Math.min(s-this.pos,o-r);for(let h=0;h<e;h++)i[this.pos++]^=t[r++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:s,pos:i,blockLen:o}=this;t[i]^=s,s&128&&i===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){c.aexists(this,!1),c.abytes(t),this.finish();const s=this.state,{blockLen:i}=this;for(let o=0,r=t.length;o<r;){this.posOut>=i&&this.keccak();const e=Math.min(i-this.posOut,r-o);t.set(s.subarray(this.posOut,this.posOut+e),o),this.posOut+=e,o+=e}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return c.anumber(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(c.aoutput(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,c.clean(this.state)}_cloneInto(t){const{blockLen:s,suffix:i,outputLen:o,rounds:r,enableXOF:e}=this;return t||(t=new k(s,i,o,e,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=i,t.outputLen=o,t.enableXOF=e,t.destroyed=this.destroyed,t}}const m=(n,t,s)=>c.createHasher(()=>new k(t,n,s)),E=m(1,136,256/8);exports.Keccak=k;exports.keccakP=b;exports.keccak_256=E;
package/dist/index229.js CHANGED
@@ -1,5 +1,5 @@
1
- import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index287.js";
2
- import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index288.js";
1
+ import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index286.js";
2
+ import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index287.js";
3
3
  const R = BigInt(0), f = BigInt(1), j = BigInt(2), q = BigInt(7), v = BigInt(256), z = BigInt(113), _ = [], g = [], B = [];
4
4
  for (let n = 0, t = f, s = 1, i = 0; n < 24; n++) {
5
5
  [s, i] = [i, (2 * s + 3 * i) % 5], _.push(2 * (5 * i + s)), g.push((n + 1) * (n + 2) / 2 % 64);
package/dist/index230.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index281.cjs"),s=e.sha256;exports.sha256=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index280.cjs"),s=e.sha256;exports.sha256=s;
package/dist/index230.js CHANGED
@@ -1,4 +1,4 @@
1
- import { sha256 as s } from "./index281.js";
1
+ import { sha256 as s } from "./index280.js";
2
2
  const o = s;
3
3
  export {
4
4
  o as sha256
package/dist/index234.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index133.cjs"),f=require("./index41.cjs"),i=require("./index132.cjs");function v(e,l){var t,o,n,a,s,u;if(!(e instanceof f.BaseError))return!1;const r=e.walk(c=>c instanceof i.ContractFunctionRevertedError);return r instanceof i.ContractFunctionRevertedError?!!(((t=r.data)==null?void 0:t.errorName)==="ResolverNotFound"||((o=r.data)==null?void 0:o.errorName)==="ResolverWildcardNotSupported"||((n=r.data)==null?void 0:n.errorName)==="ResolverNotContract"||((a=r.data)==null?void 0:a.errorName)==="ResolverError"||((s=r.data)==null?void 0:s.errorName)==="HttpError"||(u=r.reason)!=null&&u.includes("Wildcard on non-extended resolvers is not supported")||l==="reverse"&&r.reason===d.panicReasons[50]):!1}exports.isNullUniversalResolverError=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index41.cjs"),i=require("./index132.cjs");function f(e){var t,o,a,n,s,u;if(!(e instanceof c.BaseError))return!1;const r=e.walk(l=>l instanceof i.ContractFunctionRevertedError);return r instanceof i.ContractFunctionRevertedError?((t=r.data)==null?void 0:t.errorName)==="HttpError"||((o=r.data)==null?void 0:o.errorName)==="ResolverError"||((a=r.data)==null?void 0:a.errorName)==="ResolverNotContract"||((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ReverseAddressMismatch"||((u=r.data)==null?void 0:u.errorName)==="UnsupportedResolverProfile":!1}exports.isNullUniversalResolverError=f;
package/dist/index234.js CHANGED
@@ -1,13 +1,12 @@
1
- import { panicReasons as l } from "./index133.js";
2
- import { BaseError as c } from "./index41.js";
1
+ import { BaseError as l } from "./index41.js";
3
2
  import { ContractFunctionRevertedError as i } from "./index132.js";
4
- function N(e, f) {
5
- var t, o, n, a, s, u;
6
- if (!(e instanceof c))
3
+ function c(e) {
4
+ var t, o, a, n, s, u;
5
+ if (!(e instanceof l))
7
6
  return !1;
8
- const r = e.walk((d) => d instanceof i);
9
- return r instanceof i ? !!(((t = r.data) == null ? void 0 : t.errorName) === "ResolverNotFound" || ((o = r.data) == null ? void 0 : o.errorName) === "ResolverWildcardNotSupported" || ((n = r.data) == null ? void 0 : n.errorName) === "ResolverNotContract" || ((a = r.data) == null ? void 0 : a.errorName) === "ResolverError" || ((s = r.data) == null ? void 0 : s.errorName) === "HttpError" || (u = r.reason) != null && u.includes("Wildcard on non-extended resolvers is not supported") || f === "reverse" && r.reason === l[50]) : !1;
7
+ const r = e.walk((f) => f instanceof i);
8
+ return r instanceof i ? ((t = r.data) == null ? void 0 : t.errorName) === "HttpError" || ((o = r.data) == null ? void 0 : o.errorName) === "ResolverError" || ((a = r.data) == null ? void 0 : a.errorName) === "ResolverNotContract" || ((n = r.data) == null ? void 0 : n.errorName) === "ResolverNotFound" || ((s = r.data) == null ? void 0 : s.errorName) === "ReverseAddressMismatch" || ((u = r.data) == null ? void 0 : u.errorName) === "UnsupportedResolverProfile" : !1;
10
9
  }
11
10
  export {
12
- N as isNullUniversalResolverError
11
+ c as isNullUniversalResolverError
13
12
  };
package/dist/index235.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index154.cjs"),a=require("./index289.cjs"),c=require("./index153.cjs");function h(i){const r=i.replace(/^\.|\.$/gm,"");if(r.length===0)return new Uint8Array(1);const e=new Uint8Array(l.stringToBytes(r).byteLength+2);let t=0;const o=r.split(".");for(let s=0;s<o.length;s++){let n=l.stringToBytes(o[s]);n.byteLength>255&&(n=l.stringToBytes(a.encodeLabelhash(c.labelhash(o[s])))),e[t]=n.length,e.set(n,t+1),t+=n.length+1}return e.byteLength!==t+1?e.slice(0,t+1):e}exports.packetToBytes=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index154.cjs"),a=require("./index288.cjs"),c=require("./index153.cjs");function h(i){const r=i.replace(/^\.|\.$/gm,"");if(r.length===0)return new Uint8Array(1);const e=new Uint8Array(l.stringToBytes(r).byteLength+2);let t=0;const o=r.split(".");for(let s=0;s<o.length;s++){let n=l.stringToBytes(o[s]);n.byteLength>255&&(n=l.stringToBytes(a.encodeLabelhash(c.labelhash(o[s])))),e[t]=n.length,e.set(n,t+1),t+=n.length+1}return e.byteLength!==t+1?e.slice(0,t+1):e}exports.packetToBytes=h;
package/dist/index235.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { stringToBytes as i } from "./index154.js";
2
- import { encodeLabelhash as h } from "./index289.js";
2
+ import { encodeLabelhash as h } from "./index288.js";
3
3
  import { labelhash as f } from "./index153.js";
4
4
  function y(s) {
5
5
  const o = s.replace(/^\.|\.$/gm, "");
package/dist/index236.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index290.cjs");async function f(i,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?l(i,{gatewayUrls:t,record:r}):e.parseAvatarUri({uri:r,gatewayUrls:t})}async function l(i,{gatewayUrls:t,record:r}){const n=e.parseNftUri(r),o=await e.getNftTokenUri(i,{nft:n}),{uri:a,isOnChain:c,isEncoded:p}=e.resolveAvatarUri({uri:o,gatewayUrls:t});if(c&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const u=p?atob(a.replace("data:application/json;base64,","")):a,d=JSON.parse(u);return e.parseAvatarUri({uri:e.getJsonImage(d),gatewayUrls:t})}let s=n.tokenID;return n.namespace==="erc1155"&&(s=s.replace("0x","").padStart(64,"0")),e.getMetadataAvatarUri({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,s)})}exports.parseAvatarRecord=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index291.cjs");async function f(i,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?l(i,{gatewayUrls:t,record:r}):e.parseAvatarUri({uri:r,gatewayUrls:t})}async function l(i,{gatewayUrls:t,record:r}){const n=e.parseNftUri(r),o=await e.getNftTokenUri(i,{nft:n}),{uri:a,isOnChain:c,isEncoded:p}=e.resolveAvatarUri({uri:o,gatewayUrls:t});if(c&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const u=p?atob(a.replace("data:application/json;base64,","")):a,d=JSON.parse(u);return e.parseAvatarUri({uri:e.getJsonImage(d),gatewayUrls:t})}let s=n.tokenID;return n.namespace==="erc1155"&&(s=s.replace("0x","").padStart(64,"0")),e.getMetadataAvatarUri({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,s)})}exports.parseAvatarRecord=f;
package/dist/index236.js CHANGED
@@ -1,4 +1,4 @@
1
- import { parseAvatarUri as o, parseNftUri as f, getNftTokenUri as v, resolveAvatarUri as l, getJsonImage as A, getMetadataAvatarUri as N } from "./index290.js";
1
+ import { parseAvatarUri as o, parseNftUri as f, getNftTokenUri as v, resolveAvatarUri as l, getJsonImage as A, getMetadataAvatarUri as N } from "./index291.js";
2
2
  async function b(r, { gatewayUrls: t, record: e }) {
3
3
  return /eip155:/i.test(e) ? U(r, { gatewayUrls: t, record: e }) : o({ uri: e, gatewayUrls: t });
4
4
  }
package/dist/index237.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index291.cjs"),a=require("./index292.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index289.cjs"),a=require("./index290.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;
package/dist/index237.js CHANGED
@@ -1,5 +1,5 @@
1
- import { fromNumber as a } from "./index291.js";
2
- import { toRpc as e } from "./index292.js";
1
+ import { fromNumber as a } from "./index289.js";
2
+ import { toRpc as e } from "./index290.js";
3
3
  function n(t) {
4
4
  return {
5
5
  ...typeof t.baseFeePerGas == "bigint" && {
package/dist/index24.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index218.cjs"),a=e.defineChain({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0});exports.sepolia=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index218.cjs"),a=e.defineChain({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0});exports.sepolia=a;
package/dist/index24.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineChain as e } from "./index218.js";
2
- const s = /* @__PURE__ */ e({
2
+ const t = /* @__PURE__ */ e({
3
3
  id: 11155111,
4
4
  name: "Sepolia",
5
5
  nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
@@ -20,14 +20,13 @@ const s = /* @__PURE__ */ e({
20
20
  address: "0xca11bde05977b3631167028862be2a173976ca11",
21
21
  blockCreated: 751532
22
22
  },
23
- ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
24
23
  ensUniversalResolver: {
25
- address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
26
- blockCreated: 5317080
24
+ address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
25
+ blockCreated: 8928790
27
26
  }
28
27
  },
29
28
  testnet: !0
30
29
  });
31
30
  export {
32
- s as sepolia
31
+ t as sepolia
33
32
  };
package/dist/index249.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index293.cjs"),i=require("./index294.cjs"),u=require("./index291.cjs");function s(e,o){var n;const{bytecode:r,args:t}=o;return u.concat(r,(n=e.inputs)!=null&&n.length&&(t!=null&&t.length)?i.encode(e.inputs,t):"0x")}function d(e){return c.from(e)}exports.encode=s;exports.from=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index292.cjs"),i=require("./index293.cjs"),u=require("./index289.cjs");function s(e,o){var n;const{bytecode:r,args:t}=o;return u.concat(r,(n=e.inputs)!=null&&n.length&&(t!=null&&t.length)?i.encode(e.inputs,t):"0x")}function d(e){return c.from(e)}exports.encode=s;exports.from=d;
package/dist/index249.js CHANGED
@@ -1,6 +1,6 @@
1
- import { from as m } from "./index293.js";
2
- import { encode as c } from "./index294.js";
3
- import { concat as f } from "./index291.js";
1
+ import { from as m } from "./index292.js";
2
+ import { encode as c } from "./index293.js";
3
+ import { concat as f } from "./index289.js";
4
4
  function d(o, t) {
5
5
  var e;
6
6
  const { bytecode: r, args: n } = t;
package/dist/index25.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index218.cjs"),t=e.defineChain({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});exports.mainnet=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index218.cjs"),t=e.defineChain({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});exports.mainnet=t;
package/dist/index25.js CHANGED
@@ -3,6 +3,7 @@ const t = /* @__PURE__ */ e({
3
3
  id: 1,
4
4
  name: "Ethereum",
5
5
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
6
+ blockTime: 12e3,
6
7
  rpcUrls: {
7
8
  default: {
8
9
  http: ["https://eth.merkle.io"]
@@ -16,12 +17,9 @@ const t = /* @__PURE__ */ e({
16
17
  }
17
18
  },
18
19
  contracts: {
19
- ensRegistry: {
20
- address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
21
- },
22
20
  ensUniversalResolver: {
23
- address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
24
- blockCreated: 19258213
21
+ address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
22
+ blockCreated: 23085558
25
23
  },
26
24
  multicall3: {
27
25
  address: "0xca11bde05977b3631167028862be2a173976ca11",
package/dist/index250.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index293.cjs"),s=require("./index294.cjs"),m=require("./index291.cjs");function d(e,...t){const{overloads:r}=e,o=r?u([e,...r],e.name,{args:t[0]}):e,c=f(o),i=t.length>0?s.encode(o.inputs,t[0]):void 0;return i?m.concat(c,i):c}function l(e,t={}){return n.from(e,t)}function u(e,t,r){const o=n.fromAbi(e,t,r);if(o.type!=="function")throw new n.NotFoundError({name:t,type:"function"});return o}function f(e){return n.getSelector(e)}exports.encodeData=d;exports.from=l;exports.fromAbi=u;exports.getSelector=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index292.cjs"),s=require("./index293.cjs"),m=require("./index289.cjs");function d(e,...t){const{overloads:r}=e,o=r?u([e,...r],e.name,{args:t[0]}):e,c=f(o),i=t.length>0?s.encode(o.inputs,t[0]):void 0;return i?m.concat(c,i):c}function l(e,t={}){return n.from(e,t)}function u(e,t,r){const o=n.fromAbi(e,t,r);if(o.type!=="function")throw new n.NotFoundError({name:t,type:"function"});return o}function f(e){return n.getSelector(e)}exports.encodeData=d;exports.from=l;exports.fromAbi=u;exports.getSelector=f;
package/dist/index250.js CHANGED
@@ -1,6 +1,6 @@
1
- import { from as c, fromAbi as m, NotFoundError as i, getSelector as s } from "./index293.js";
2
- import { encode as u } from "./index294.js";
3
- import { concat as d } from "./index291.js";
1
+ import { from as c, fromAbi as m, NotFoundError as i, getSelector as s } from "./index292.js";
2
+ import { encode as u } from "./index293.js";
3
+ import { concat as d } from "./index289.js";
4
4
  function S(o, ...t) {
5
5
  const { overloads: r } = o, e = r ? p([o, ...r], o.name, {
6
6
  args: t[0]
package/dist/index256.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index197.cjs"),s=require("./index155.cjs"),a=require("./index198.cjs");let l=!1;async function g({hash:t,privateKey:i,to:e="object"}){const{r:u,s:c,recovery:r}=o.secp256k1.sign(t.slice(2),i.slice(2),{lowS:!0,extraEntropy:l}),n={r:s.numberToHex(u,{size:32}),s:s.numberToHex(c,{size:32}),v:r?28n:27n,yParity:r};return e==="bytes"||e==="hex"?a.serializeSignature({...n,to:e}):n}exports.sign=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index197.cjs"),l=require("./index190.cjs"),y=require("./index154.cjs"),i=require("./index155.cjs"),x=require("./index198.cjs");let r=!1;async function g({hash:n,privateKey:o,to:e="object"}){const{r:c,s:u,recovery:t}=a.secp256k1.sign(n.slice(2),o.slice(2),{lowS:!0,extraEntropy:l.isHex(r,{strict:!1})?y.hexToBytes(r):r}),s={r:i.numberToHex(c,{size:32}),s:i.numberToHex(u,{size:32}),v:t?28n:27n,yParity:t};return e==="bytes"||e==="hex"?x.serializeSignature({...s,to:e}):s}exports.sign=g;
package/dist/index256.js CHANGED
@@ -1,16 +1,21 @@
1
- import { secp256k1 as u } from "./index197.js";
2
- import { numberToHex as i } from "./index155.js";
3
- import { serializeSignature as a } from "./index198.js";
4
- let m = !1;
5
- async function y({ hash: n, privateKey: s, to: r = "object" }) {
6
- const { r: o, s: c, recovery: e } = u.sign(n.slice(2), s.slice(2), { lowS: !0, extraEntropy: m }), t = {
7
- r: i(o, { size: 32 }),
8
- s: i(c, { size: 32 }),
9
- v: e ? 28n : 27n,
10
- yParity: e
1
+ import { secp256k1 as a } from "./index197.js";
2
+ import { isHex as f } from "./index190.js";
3
+ import { hexToBytes as p } from "./index154.js";
4
+ import { numberToHex as s } from "./index155.js";
5
+ import { serializeSignature as u } from "./index198.js";
6
+ let e = !1;
7
+ async function z({ hash: o, privateKey: n, to: r = "object" }) {
8
+ const { r: m, s: c, recovery: t } = a.sign(o.slice(2), n.slice(2), {
9
+ lowS: !0,
10
+ extraEntropy: f(e, { strict: !1 }) ? p(e) : e
11
+ }), i = {
12
+ r: s(m, { size: 32 }),
13
+ s: s(c, { size: 32 }),
14
+ v: t ? 28n : 27n,
15
+ yParity: t
11
16
  };
12
- return r === "bytes" || r === "hex" ? a({ ...t, to: r }) : t;
17
+ return r === "bytes" || r === "hex" ? u({ ...i, to: r }) : i;
13
18
  }
14
19
  export {
15
- y as sign
20
+ z as sign
16
21
  };
package/dist/index269.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index267.cjs"),b=require("./index272.cjs"),T=require("./index273.cjs"),y=require("./index274.cjs"),q=require("./index276.cjs"),f=require("./index268.cjs"),S=require("./index270.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index267.cjs"),b=require("./index271.cjs"),T=require("./index272.cjs"),y=require("./index273.cjs"),q=require("./index275.cjs"),f=require("./index268.cjs"),S=require("./index270.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;
package/dist/index269.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { isTupleRegex as g, execTyped as w } from "./index267.js";
2
- import { UnknownTypeError as S } from "./index272.js";
3
- import { InvalidAbiTypeParameterError as d } from "./index273.js";
4
- import { InvalidSignatureError as T, InvalidStructSignatureError as v } from "./index274.js";
5
- import { CircularReferenceError as x } from "./index276.js";
2
+ import { UnknownTypeError as S } from "./index271.js";
3
+ import { InvalidAbiTypeParameterError as d } from "./index272.js";
4
+ import { InvalidSignatureError as T, InvalidStructSignatureError as v } from "./index273.js";
5
+ import { CircularReferenceError as x } from "./index275.js";
6
6
  import { isStructSignature as E, execStructSignature as b } from "./index268.js";
7
7
  import { parseAbiParameter as A, isSolidityType as $ } from "./index270.js";
8
8
  function C(s) {
package/dist/index270.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index267.cjs"),A=require("./index272.cjs"),g=require("./index273.cjs"),d=require("./index274.cjs"),q=require("./index275.cjs"),h=require("./index300.cjs"),o=require("./index268.cjs");function z(e,t={}){if(o.isFunctionSignature(e))return E(e,t);if(o.isEventSignature(e))return P(e,t);if(o.isErrorSignature(e))return M(e,t);if(o.isConstructorSignature(e))return I(e,t);if(o.isFallbackSignature(e))return R(e);if(o.isReceiveSignature(e))return{type:"receive",stateMutability:"payable"};throw new d.UnknownSignatureError({signature:e})}function E(e,t={}){const n=o.execFunctionSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"function"});const a=u(n.parameters),r=[],c=a.length;for(let s=0;s<c;s++)r.push(m(a[s],{modifiers:o.functionModifiers,structs:t,type:"function"}));const i=[];if(n.returns){const s=u(n.returns),l=s.length;for(let f=0;f<l;f++)i.push(m(s[f],{modifiers:o.functionModifiers,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:r,outputs:i}}function P(e,t={}){const n=o.execEventSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"event"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{modifiers:o.eventModifiers,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:r}}function M(e,t={}){const n=o.execErrorSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"error"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:r}}function I(e,t={}){const n=o.execConstructorSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"constructor"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:r}}function R(e){const t=o.execFallbackSignature(e);if(!t)throw new d.InvalidSignatureError({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const _=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,K=/^u?int$/;function m(e,t){var p,w;const n=h.getParameterCacheKey(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(h.parameterCache.has(n))return h.parameterCache.get(n);const a=y.isTupleRegex.test(e),r=y.execTyped(a?$:_,e);if(!r)throw new g.InvalidParameterError({param:e});if(r.name&&F(r.name))throw new g.SolidityProtectedKeywordError({param:e,name:r.name});const c=r.name?{name:r.name}:{},i=r.modifier==="indexed"?{indexed:!0}:{},s=(t==null?void 0:t.structs)??{};let l,f={};if(a){l="tuple";const v=u(r.type),x=[],k=v.length;for(let b=0;b<k;b++)x.push(m(v[b],{structs:s}));f={components:x}}else if(r.type in s)l="tuple",f={components:s[r.type]};else if(K.test(r.type))l=`${r.type}256`;else if(l=r.type,(t==null?void 0:t.type)!=="struct"&&!C(l))throw new A.UnknownSolidityTypeError({type:l});if(r.modifier){if(!((w=(p=t==null?void 0:t.modifiers)==null?void 0:p.has)!=null&&w.call(p,r.modifier)))throw new g.InvalidModifierError({param:e,type:t==null?void 0:t.type,modifier:r.modifier});if(o.functionModifiers.has(r.modifier)&&!T(l,!!r.array))throw new g.InvalidFunctionModifierError({param:e,type:t==null?void 0:t.type,modifier:r.modifier})}const S={type:`${l}${r.array??""}`,...c,...i,...f};return h.parameterCache.set(n,S),S}function u(e,t=[],n="",a=0){const r=e.trim().length;for(let c=0;c<r;c++){const i=e[c],s=e.slice(c+1);switch(i){case",":return a===0?u(s,[...t,n.trim()]):u(s,t,`${n}${i}`,a);case"(":return u(s,t,`${n}${i}`,a+1);case")":return u(s,t,`${n}${i}`,a-1);default:return u(s,t,`${n}${i}`,a)}}if(n==="")return t;if(a!==0)throw new q.InvalidParenthesisError({current:n,depth:a});return t.push(n.trim()),t}function C(e){return e==="address"||e==="bool"||e==="function"||e==="string"||y.bytesRegex.test(e)||y.integerRegex.test(e)}const Z=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function F(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||y.bytesRegex.test(e)||y.integerRegex.test(e)||Z.test(e)}function T(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}exports.isSolidityKeyword=F;exports.isSolidityType=C;exports.isValidDataLocation=T;exports.parseAbiParameter=m;exports.parseConstructorSignature=I;exports.parseErrorSignature=M;exports.parseEventSignature=P;exports.parseFallbackSignature=R;exports.parseFunctionSignature=E;exports.parseSignature=z;exports.splitParameters=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index267.cjs"),A=require("./index271.cjs"),g=require("./index272.cjs"),d=require("./index273.cjs"),q=require("./index274.cjs"),h=require("./index299.cjs"),o=require("./index268.cjs");function z(e,t={}){if(o.isFunctionSignature(e))return E(e,t);if(o.isEventSignature(e))return P(e,t);if(o.isErrorSignature(e))return M(e,t);if(o.isConstructorSignature(e))return I(e,t);if(o.isFallbackSignature(e))return R(e);if(o.isReceiveSignature(e))return{type:"receive",stateMutability:"payable"};throw new d.UnknownSignatureError({signature:e})}function E(e,t={}){const n=o.execFunctionSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"function"});const a=u(n.parameters),r=[],c=a.length;for(let s=0;s<c;s++)r.push(m(a[s],{modifiers:o.functionModifiers,structs:t,type:"function"}));const i=[];if(n.returns){const s=u(n.returns),l=s.length;for(let f=0;f<l;f++)i.push(m(s[f],{modifiers:o.functionModifiers,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:r,outputs:i}}function P(e,t={}){const n=o.execEventSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"event"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{modifiers:o.eventModifiers,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:r}}function M(e,t={}){const n=o.execErrorSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"error"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:r}}function I(e,t={}){const n=o.execConstructorSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"constructor"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:r}}function R(e){const t=o.execFallbackSignature(e);if(!t)throw new d.InvalidSignatureError({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const _=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,K=/^u?int$/;function m(e,t){var p,w;const n=h.getParameterCacheKey(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(h.parameterCache.has(n))return h.parameterCache.get(n);const a=y.isTupleRegex.test(e),r=y.execTyped(a?$:_,e);if(!r)throw new g.InvalidParameterError({param:e});if(r.name&&F(r.name))throw new g.SolidityProtectedKeywordError({param:e,name:r.name});const c=r.name?{name:r.name}:{},i=r.modifier==="indexed"?{indexed:!0}:{},s=(t==null?void 0:t.structs)??{};let l,f={};if(a){l="tuple";const v=u(r.type),x=[],k=v.length;for(let b=0;b<k;b++)x.push(m(v[b],{structs:s}));f={components:x}}else if(r.type in s)l="tuple",f={components:s[r.type]};else if(K.test(r.type))l=`${r.type}256`;else if(l=r.type,(t==null?void 0:t.type)!=="struct"&&!C(l))throw new A.UnknownSolidityTypeError({type:l});if(r.modifier){if(!((w=(p=t==null?void 0:t.modifiers)==null?void 0:p.has)!=null&&w.call(p,r.modifier)))throw new g.InvalidModifierError({param:e,type:t==null?void 0:t.type,modifier:r.modifier});if(o.functionModifiers.has(r.modifier)&&!T(l,!!r.array))throw new g.InvalidFunctionModifierError({param:e,type:t==null?void 0:t.type,modifier:r.modifier})}const S={type:`${l}${r.array??""}`,...c,...i,...f};return h.parameterCache.set(n,S),S}function u(e,t=[],n="",a=0){const r=e.trim().length;for(let c=0;c<r;c++){const i=e[c],s=e.slice(c+1);switch(i){case",":return a===0?u(s,[...t,n.trim()]):u(s,t,`${n}${i}`,a);case"(":return u(s,t,`${n}${i}`,a+1);case")":return u(s,t,`${n}${i}`,a-1);default:return u(s,t,`${n}${i}`,a)}}if(n==="")return t;if(a!==0)throw new q.InvalidParenthesisError({current:n,depth:a});return t.push(n.trim()),t}function C(e){return e==="address"||e==="bool"||e==="function"||e==="string"||y.bytesRegex.test(e)||y.integerRegex.test(e)}const Z=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function F(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||y.bytesRegex.test(e)||y.integerRegex.test(e)||Z.test(e)}function T(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}exports.isSolidityKeyword=F;exports.isSolidityType=C;exports.isValidDataLocation=T;exports.parseAbiParameter=m;exports.parseConstructorSignature=I;exports.parseErrorSignature=M;exports.parseEventSignature=P;exports.parseFallbackSignature=R;exports.parseFunctionSignature=E;exports.parseSignature=z;exports.splitParameters=u;
package/dist/index270.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { execTyped as E, bytesRegex as x, integerRegex as $, isTupleRegex as P } from "./index267.js";
2
- import { UnknownSolidityTypeError as M } from "./index272.js";
3
- import { InvalidParameterError as R, SolidityProtectedKeywordError as k, InvalidModifierError as z, InvalidFunctionModifierError as A } from "./index273.js";
4
- import { UnknownSignatureError as F, InvalidSignatureError as m } from "./index274.js";
5
- import { InvalidParenthesisError as T } from "./index275.js";
6
- import { getParameterCacheKey as _, parameterCache as p } from "./index300.js";
2
+ import { UnknownSolidityTypeError as M } from "./index271.js";
3
+ import { InvalidParameterError as R, SolidityProtectedKeywordError as k, InvalidModifierError as z, InvalidFunctionModifierError as A } from "./index272.js";
4
+ import { UnknownSignatureError as F, InvalidSignatureError as m } from "./index273.js";
5
+ import { InvalidParenthesisError as T } from "./index274.js";
6
+ import { getParameterCacheKey as _, parameterCache as p } from "./index299.js";
7
7
  import { isFunctionSignature as C, isEventSignature as I, isErrorSignature as Z, isConstructorSignature as K, isFallbackSignature as L, isReceiveSignature as U, functionModifiers as h, execFunctionSignature as W, execEventSignature as D, eventModifiers as V, execErrorSignature as j, execConstructorSignature as q, execFallbackSignature as B } from "./index268.js";
8
8
  function le(e, t = {}) {
9
9
  if (C(e))
package/dist/index271.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index272.cjs"),u=require("./index268.cjs"),a=require("./index269.cjs"),s=require("./index270.cjs");function l(t){let e;if(typeof t=="string")e=s.parseSignature(t);else{const n=a.parseStructs(t),o=t.length;for(let r=0;r<o;r++){const i=t[r];if(!u.isStructSignature(i)){e=s.parseSignature(i,n);break}}}if(!e)throw new c.InvalidAbiItemError({signature:t});return e}exports.parseAbiItem=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index262.cjs");class t extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class o extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}exports.UnknownSolidityTypeError=o;exports.UnknownTypeError=t;
package/dist/index271.js CHANGED
@@ -1,25 +1,31 @@
1
- import { InvalidAbiItemError as f } from "./index272.js";
2
- import { isStructSignature as p } from "./index268.js";
3
- import { parseStructs as c } from "./index269.js";
4
- import { parseSignature as i } from "./index270.js";
5
- function u(t) {
6
- let r;
7
- if (typeof t == "string")
8
- r = i(t);
9
- else {
10
- const m = c(t), n = t.length;
11
- for (let o = 0; o < n; o++) {
12
- const e = t[o];
13
- if (!p(e)) {
14
- r = i(e, m);
15
- break;
16
- }
17
- }
1
+ import { BaseError as r } from "./index262.js";
2
+ class o extends r {
3
+ constructor({ type: e }) {
4
+ super("Unknown type.", {
5
+ metaMessages: [
6
+ `Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`
7
+ ]
8
+ }), Object.defineProperty(this, "name", {
9
+ enumerable: !0,
10
+ configurable: !0,
11
+ writable: !0,
12
+ value: "UnknownTypeError"
13
+ });
14
+ }
15
+ }
16
+ class a extends r {
17
+ constructor({ type: e }) {
18
+ super("Unknown type.", {
19
+ metaMessages: [`Type "${e}" is not a valid ABI type.`]
20
+ }), Object.defineProperty(this, "name", {
21
+ enumerable: !0,
22
+ configurable: !0,
23
+ writable: !0,
24
+ value: "UnknownSolidityTypeError"
25
+ });
18
26
  }
19
- if (!r)
20
- throw new f({ signature: t });
21
- return r;
22
27
  }
23
28
  export {
24
- u as parseAbiItem
29
+ a as UnknownSolidityTypeError,
30
+ o as UnknownTypeError
25
31
  };
package/dist/index272.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index262.cjs");class n extends r.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class o extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class a extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}exports.InvalidAbiItemError=n;exports.UnknownSolidityTypeError=a;exports.UnknownTypeError=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index262.cjs");class o extends t.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class n extends t.BaseError{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class s extends t.BaseError{constructor({param:e,type:r,modifier:i}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${i}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class l extends t.BaseError{constructor({param:e,type:r,modifier:i}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${i}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${i}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class d extends t.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}exports.InvalidAbiTypeParameterError=d;exports.InvalidFunctionModifierError=l;exports.InvalidModifierError=s;exports.InvalidParameterError=o;exports.SolidityProtectedKeywordError=n;