@gardenfi/core 0.2.0-beta.73 → 0.2.0-beta.75

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 (267) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +16 -15
  3. package/dist/index10.cjs +1 -1
  4. package/dist/index10.js +42 -31
  5. package/dist/index100.cjs +1 -1
  6. package/dist/index100.js +18 -32
  7. package/dist/index101.cjs +1 -1
  8. package/dist/index101.js +6 -366
  9. package/dist/index102.cjs +1 -1
  10. package/dist/index102.js +33 -21
  11. package/dist/index103.cjs +1 -1
  12. package/dist/index103.js +2 -56
  13. package/dist/index104.cjs +1 -1
  14. package/dist/index104.js +38 -3
  15. package/dist/index105.cjs +1 -1
  16. package/dist/index105.js +25 -45
  17. package/dist/index106.cjs +1 -1
  18. package/dist/index106.js +7 -26
  19. package/dist/index107.cjs +1 -1
  20. package/dist/index107.js +5 -2
  21. package/dist/index108.cjs +1 -1
  22. package/dist/index108.js +11 -2
  23. package/dist/index109.cjs +1 -1
  24. package/dist/index109.js +2 -62
  25. package/dist/index11.cjs +1 -1
  26. package/dist/index11.js +2 -2
  27. package/dist/index110.cjs +1 -1
  28. package/dist/index110.js +55 -32
  29. package/dist/index111.cjs +1 -1
  30. package/dist/index111.js +2 -5
  31. package/dist/index112.cjs +1 -1
  32. package/dist/index112.js +40 -2
  33. package/dist/index113.cjs +1 -1
  34. package/dist/index113.js +38 -53
  35. package/dist/index114.cjs +1 -1
  36. package/dist/index114.js +18 -2
  37. package/dist/index115.cjs +1 -1
  38. package/dist/index115.js +101 -32
  39. package/dist/index116.cjs +1 -1
  40. package/dist/index116.js +17 -39
  41. package/dist/index117.cjs +1 -1
  42. package/dist/index117.js +224 -16
  43. package/dist/index118.cjs +1 -1
  44. package/dist/index118.js +4 -109
  45. package/dist/index119.cjs +1 -1
  46. package/dist/index119.js +155 -18
  47. package/dist/index120.cjs +1 -1
  48. package/dist/index120.js +2 -226
  49. package/dist/index121.cjs +1 -1
  50. package/dist/index121.js +73 -4
  51. package/dist/index122.cjs +1 -1
  52. package/dist/index122.js +55 -151
  53. package/dist/index123.cjs +1 -1
  54. package/dist/index123.js +35 -2
  55. package/dist/index124.cjs +1 -1
  56. package/dist/index124.js +5 -73
  57. package/dist/index125.cjs +1 -1
  58. package/dist/index125.js +2 -2
  59. package/dist/index126.cjs +1 -1
  60. package/dist/index126.js +8 -8
  61. package/dist/index127.cjs +1 -1
  62. package/dist/index127.js +1 -1
  63. package/dist/index130.cjs +1 -1
  64. package/dist/index130.js +2 -19
  65. package/dist/index131.cjs +1 -1
  66. package/dist/index131.js +356 -2
  67. package/dist/index132.cjs +1 -1
  68. package/dist/index132.js +206 -323
  69. package/dist/index133.cjs +1 -1
  70. package/dist/index133.js +37 -208
  71. package/dist/index134.cjs +1 -1
  72. package/dist/index134.js +59 -65
  73. package/dist/index135.cjs +1 -1
  74. package/dist/index135.js +10 -60
  75. package/dist/index136.cjs +1 -1
  76. package/dist/index136.js +45 -12
  77. package/dist/index137.cjs +1 -1
  78. package/dist/index137.js +56 -38
  79. package/dist/index138.cjs +1 -1
  80. package/dist/index138.js +19 -63
  81. package/dist/index14.cjs +1 -1
  82. package/dist/index14.js +9 -4
  83. package/dist/index141.cjs +1 -1
  84. package/dist/index141.js +3 -3
  85. package/dist/index145.cjs +1 -1
  86. package/dist/index145.js +1 -1
  87. package/dist/index148.cjs +1 -1
  88. package/dist/index148.js +1 -1
  89. package/dist/index15.cjs +1 -1
  90. package/dist/index15.js +32 -2
  91. package/dist/index16.cjs +1 -1
  92. package/dist/index16.js +10 -17
  93. package/dist/index17.cjs +1 -1
  94. package/dist/index17.js +18 -12
  95. package/dist/index18.cjs +1 -1
  96. package/dist/index18.js +15 -16
  97. package/dist/index19.cjs +1 -1
  98. package/dist/index19.js +39 -16
  99. package/dist/index20.cjs +1 -1
  100. package/dist/index20.js +25 -52
  101. package/dist/index21.cjs +1 -1
  102. package/dist/index21.js +2 -9
  103. package/dist/index22.cjs +1 -1
  104. package/dist/index22.js +138 -9
  105. package/dist/index23.cjs +1 -1
  106. package/dist/index23.js +2 -138
  107. package/dist/index24.cjs +1 -1
  108. package/dist/index24.js +9 -2
  109. package/dist/index25.cjs +1 -1
  110. package/dist/index25.js +7 -11
  111. package/dist/index26.cjs +3 -1
  112. package/dist/index26.js +27 -36
  113. package/dist/index27.cjs +1 -1
  114. package/dist/index27.js +17 -44
  115. package/dist/index28.cjs +2 -1
  116. package/dist/index28.js +24 -27
  117. package/dist/index29.cjs +1 -1
  118. package/dist/index29.js +40 -14
  119. package/dist/index30.cjs +1 -1
  120. package/dist/index30.js +197 -22
  121. package/dist/index31.cjs +1 -1
  122. package/dist/index31.js +2 -26
  123. package/dist/index32.cjs +1 -1
  124. package/dist/index32.js +2 -55
  125. package/dist/index33.cjs +1 -1
  126. package/dist/index33.js +2 -28
  127. package/dist/index34.cjs +1 -3
  128. package/dist/index34.js +11 -26
  129. package/dist/index35.cjs +1 -1
  130. package/dist/index35.js +39 -17
  131. package/dist/index36.cjs +1 -2
  132. package/dist/index36.js +40 -23
  133. package/dist/index37.cjs +1 -1
  134. package/dist/index37.js +26 -39
  135. package/dist/index38.cjs +1 -1
  136. package/dist/index38.js +15 -199
  137. package/dist/index39.cjs +1 -1
  138. package/dist/index39.js +24 -2
  139. package/dist/index40.cjs +1 -1
  140. package/dist/index40.js +26 -2
  141. package/dist/index41.cjs +1 -1
  142. package/dist/index41.js +55 -2
  143. package/dist/index42.cjs +1 -1
  144. package/dist/index42.js +27 -12
  145. package/dist/index43.cjs +1 -1
  146. package/dist/index43.js +174 -11
  147. package/dist/index44.cjs +1 -1
  148. package/dist/index44.js +2 -4
  149. package/dist/index45.cjs +1 -1
  150. package/dist/index45.js +34 -45
  151. package/dist/index46.cjs +1 -1
  152. package/dist/index46.js +9 -43
  153. package/dist/index47.cjs +1 -1
  154. package/dist/index47.js +10 -169
  155. package/dist/index48.cjs +1 -1
  156. package/dist/index48.js +11 -12
  157. package/dist/index49.cjs +1 -1
  158. package/dist/index49.js +3 -4
  159. package/dist/index5.cjs +1 -1
  160. package/dist/index5.js +48 -59
  161. package/dist/index50.cjs +1 -1
  162. package/dist/index50.js +45 -16
  163. package/dist/index51.cjs +1 -1
  164. package/dist/index51.js +40 -9
  165. package/dist/index52.cjs +1 -1
  166. package/dist/index52.js +167 -170
  167. package/dist/index53.cjs +1 -1
  168. package/dist/index53.js +12 -21
  169. package/dist/index54.cjs +1 -1
  170. package/dist/index54.js +5 -2
  171. package/dist/index55.cjs +1 -1
  172. package/dist/index55.js +17 -35
  173. package/dist/index56.cjs +1 -1
  174. package/dist/index56.js +11 -8
  175. package/dist/index57.cjs +1 -1
  176. package/dist/index57.js +19 -34
  177. package/dist/index58.cjs +1 -1
  178. package/dist/index58.js +31 -55
  179. package/dist/index59.cjs +1 -2
  180. package/dist/index59.js +2 -60
  181. package/dist/index60.cjs +6 -1
  182. package/dist/index60.js +949 -6
  183. package/dist/index61.cjs +1 -1
  184. package/dist/index61.js +2 -128
  185. package/dist/index62.cjs +1 -2
  186. package/dist/index62.js +61 -42
  187. package/dist/index63.cjs +1 -1
  188. package/dist/index63.js +33 -9
  189. package/dist/index64.cjs +1 -1
  190. package/dist/index64.js +86 -10
  191. package/dist/index65.cjs +1 -1
  192. package/dist/index65.js +55 -11
  193. package/dist/index66.cjs +2 -1
  194. package/dist/index66.js +59 -13
  195. package/dist/index67.cjs +1 -1
  196. package/dist/index67.js +3 -6
  197. package/dist/index68.cjs +1 -1
  198. package/dist/index68.js +33 -16
  199. package/dist/index69.cjs +1 -1
  200. package/dist/index69.js +126 -77
  201. package/dist/index70.cjs +2 -1
  202. package/dist/index70.js +42 -14
  203. package/dist/index71.cjs +1 -1
  204. package/dist/index71.js +8 -18
  205. package/dist/index72.cjs +1 -1
  206. package/dist/index72.js +9 -5
  207. package/dist/index73.cjs +1 -1
  208. package/dist/index73.js +11 -21
  209. package/dist/index74.cjs +1 -1
  210. package/dist/index74.js +13 -13
  211. package/dist/index75.cjs +1 -1
  212. package/dist/index75.js +7 -2
  213. package/dist/index76.cjs +1 -1
  214. package/dist/index76.js +18 -2
  215. package/dist/index77.cjs +1 -2
  216. package/dist/index77.js +76 -32
  217. package/dist/index78.cjs +1 -1
  218. package/dist/index78.js +14 -5
  219. package/dist/index79.cjs +1 -1
  220. package/dist/index79.js +18 -19
  221. package/dist/index8.cjs +1 -1
  222. package/dist/index8.js +5 -6
  223. package/dist/index80.cjs +1 -1
  224. package/dist/index80.js +19 -29
  225. package/dist/index81.cjs +1 -1
  226. package/dist/index81.js +14 -2
  227. package/dist/index82.cjs +1 -6
  228. package/dist/index82.js +9 -949
  229. package/dist/index83.cjs +1 -1
  230. package/dist/index83.js +2 -2
  231. package/dist/index84.cjs +1 -1
  232. package/dist/index84.js +2 -62
  233. package/dist/index85.cjs +2 -1
  234. package/dist/index85.js +34 -32
  235. package/dist/index86.cjs +1 -1
  236. package/dist/index86.js +5 -86
  237. package/dist/index87.cjs +1 -1
  238. package/dist/index87.js +19 -12
  239. package/dist/index88.cjs +1 -1
  240. package/dist/index88.js +34 -6
  241. package/dist/index89.cjs +1 -1
  242. package/dist/index89.js +365 -111
  243. package/dist/index90.cjs +1 -1
  244. package/dist/index90.js +21 -7
  245. package/dist/index91.cjs +1 -1
  246. package/dist/index91.js +55 -32
  247. package/dist/index92.cjs +1 -1
  248. package/dist/index92.js +3 -2
  249. package/dist/index93.cjs +1 -1
  250. package/dist/index93.js +45 -34
  251. package/dist/index94.cjs +1 -1
  252. package/dist/index94.js +26 -29
  253. package/dist/index95.cjs +1 -1
  254. package/dist/index95.js +2 -21
  255. package/dist/index96.cjs +1 -1
  256. package/dist/index96.js +2 -7
  257. package/dist/index97.cjs +1 -1
  258. package/dist/index97.js +13 -5
  259. package/dist/index98.cjs +1 -1
  260. package/dist/index98.js +6 -10
  261. package/dist/index99.cjs +1 -1
  262. package/dist/index99.js +111 -18
  263. package/dist/src/index.d.ts +1 -1
  264. package/dist/src/lib/evm/relay/evmRelay.d.ts +1 -1
  265. package/dist/src/lib/evm/relay/evmRelay.types.d.ts +1 -1
  266. package/dist/src/lib/utils.d.ts +2 -0
  267. package/package.json +2 -2
package/dist/index68.js CHANGED
@@ -1,20 +1,37 @@
1
- import { toHex as n } from "./index45.js";
2
- import { toYParitySignatureArray as c } from "./index47.js";
3
- function d(r) {
4
- if (!r || r.length === 0)
5
- return [];
6
- const t = [];
7
- for (const i of r) {
8
- const { contractAddress: e, chainId: s, nonce: o, ...a } = i;
9
- t.push([
10
- n(s),
11
- e,
12
- o ? n(o) : "0x",
13
- ...c({}, a)
14
- ]);
1
+ import { SizeExceedsPaddingSizeError as d } from "./index97.js";
2
+ function f(n, { dir: r, size: t = 32 } = {}) {
3
+ return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
4
+ }
5
+ function p(n, { dir: r, size: t = 32 } = {}) {
6
+ if (t === null)
7
+ return n;
8
+ const e = n.replace("0x", "");
9
+ if (e.length > t * 2)
10
+ throw new d({
11
+ size: Math.ceil(e.length / 2),
12
+ targetSize: t,
13
+ type: "hex"
14
+ });
15
+ return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
16
+ }
17
+ function i(n, { dir: r, size: t = 32 } = {}) {
18
+ if (t === null)
19
+ return n;
20
+ if (n.length > t)
21
+ throw new d({
22
+ size: n.length,
23
+ targetSize: t,
24
+ type: "bytes"
25
+ });
26
+ const e = new Uint8Array(t);
27
+ for (let a = 0; a < t; a++) {
28
+ const o = r === "right";
29
+ e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
15
30
  }
16
- return t;
31
+ return e;
17
32
  }
18
33
  export {
19
- d as serializeAuthorizationList
34
+ f as pad,
35
+ i as padBytes,
36
+ p as padHex
20
37
  };
package/dist/index69.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./index92.cjs"),w=require("./index75.cjs"),t=require("./index42.cjs"),P=require("./index59.cjs"),h=require("./index93.cjs"),d=require("./index72.cjs"),n=require("./index77.cjs"),c=require("./index43.cjs"),I=require("./index49.cjs"),u=require("./index94.cjs"),l=require("./index30.cjs");function m(o){const{authorizationList:e}=o;if(e)for(const s of e){const{contractAddress:r,chainId:i}=s;if(!c.isAddress(r))throw new t.InvalidAddressError({address:r});if(i<=0)throw new d.InvalidChainIdError({chainId:i})}f(o)}function T(o){const{blobVersionedHashes:e}=o;if(e){if(e.length===0)throw new h.EmptyBlobError;for(const s of e){const r=I.size(s),i=l.hexToNumber(u.slice(s,0,1));if(r!==32)throw new h.InvalidVersionedHashSizeError({hash:s,size:r});if(i!==E.versionedHashVersionKzg)throw new h.InvalidVersionedHashVersionError({hash:s,version:i})}}f(o)}function f(o){const{chainId:e,maxPriorityFeePerGas:s,maxFeePerGas:r,to:i}=o;if(e<=0)throw new d.InvalidChainIdError({chainId:e});if(i&&!c.isAddress(i))throw new t.InvalidAddressError({address:i});if(r&&r>w.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:r});if(s&&r&&s>r)throw new n.TipAboveFeeCapError({maxFeePerGas:r,maxPriorityFeePerGas:s})}function x(o){const{chainId:e,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:i,to:a}=o;if(e<=0)throw new d.InvalidChainIdError({chainId:e});if(a&&!c.isAddress(a))throw new t.InvalidAddressError({address:a});if(s||i)throw new P.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>w.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:r})}function v(o){const{chainId:e,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:i,to:a}=o;if(a&&!c.isAddress(a))throw new t.InvalidAddressError({address:a});if(typeof e<"u"&&e<=0)throw new d.InvalidChainIdError({chainId:e});if(s||i)throw new P.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>w.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:r})}exports.assertTransactionEIP1559=f;exports.assertTransactionEIP2930=x;exports.assertTransactionEIP4844=T;exports.assertTransactionEIP7702=m;exports.assertTransactionLegacy=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index100.cjs"),e={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new o.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new o.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new o.NegativeOffsetError({offset:t});const i=this.position-t;this.assertPosition(i),this.position=i},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new o.NegativeOffsetError({offset:t});const i=this.position+t;this.assertPosition(i),this.position=i},inspectByte(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(t,i){const s=i??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(t){const i=t??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(t){const i=t??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(t){const i=t??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,i){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=i??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const i=this.position;return this.assertPosition(t),this.position=t,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:i=8192}={}){const s=Object.create(e);return s.bytes=t,s.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=i,s}exports.createCursor=n;
package/dist/index69.js CHANGED
@@ -1,81 +1,130 @@
1
- import { versionedHashVersionKzg as d } from "./index92.js";
2
- import { maxUint256 as m } from "./index75.js";
3
- import { InvalidAddressError as s } from "./index42.js";
4
- import { BaseError as h } from "./index59.js";
5
- import { EmptyBlobError as P, InvalidVersionedHashSizeError as p, InvalidVersionedHashVersionError as x } from "./index93.js";
6
- import { InvalidChainIdError as n } from "./index72.js";
7
- import { FeeCapTooHighError as w, TipAboveFeeCapError as E } from "./index77.js";
8
- import { isAddress as f } from "./index43.js";
9
- import { size as F } from "./index49.js";
10
- import { slice as I } from "./index94.js";
11
- import { hexToNumber as G } from "./index30.js";
12
- function C(t) {
13
- const { authorizationList: e } = t;
14
- if (e)
15
- for (const o of e) {
16
- const { contractAddress: r, chainId: i } = o;
17
- if (!f(r))
18
- throw new s({ address: r });
19
- if (i <= 0)
20
- throw new n({ chainId: i });
21
- }
22
- c(t);
23
- }
24
- function L(t) {
25
- const { blobVersionedHashes: e } = t;
26
- if (e) {
27
- if (e.length === 0)
28
- throw new P();
29
- for (const o of e) {
30
- const r = F(o), i = G(I(o, 0, 1));
31
- if (r !== 32)
32
- throw new p({ hash: o, size: r });
33
- if (i !== d)
34
- throw new x({
35
- hash: o,
36
- version: i
37
- });
38
- }
1
+ import { RecursiveReadLimitExceededError as e, PositionOutOfBoundsError as n, NegativeOffsetError as o } from "./index100.js";
2
+ const h = {
3
+ bytes: new Uint8Array(),
4
+ dataView: new DataView(new ArrayBuffer(0)),
5
+ position: 0,
6
+ positionReadCount: /* @__PURE__ */ new Map(),
7
+ recursiveReadCount: 0,
8
+ recursiveReadLimit: Number.POSITIVE_INFINITY,
9
+ assertReadLimit() {
10
+ if (this.recursiveReadCount >= this.recursiveReadLimit)
11
+ throw new e({
12
+ count: this.recursiveReadCount + 1,
13
+ limit: this.recursiveReadLimit
14
+ });
15
+ },
16
+ assertPosition(t) {
17
+ if (t < 0 || t > this.bytes.length - 1)
18
+ throw new n({
19
+ length: this.bytes.length,
20
+ position: t
21
+ });
22
+ },
23
+ decrementPosition(t) {
24
+ if (t < 0)
25
+ throw new o({ offset: t });
26
+ const i = this.position - t;
27
+ this.assertPosition(i), this.position = i;
28
+ },
29
+ getReadCount(t) {
30
+ return this.positionReadCount.get(t || this.position) || 0;
31
+ },
32
+ incrementPosition(t) {
33
+ if (t < 0)
34
+ throw new o({ offset: t });
35
+ const i = this.position + t;
36
+ this.assertPosition(i), this.position = i;
37
+ },
38
+ inspectByte(t) {
39
+ const i = t ?? this.position;
40
+ return this.assertPosition(i), this.bytes[i];
41
+ },
42
+ inspectBytes(t, i) {
43
+ const s = i ?? this.position;
44
+ return this.assertPosition(s + t - 1), this.bytes.subarray(s, s + t);
45
+ },
46
+ inspectUint8(t) {
47
+ const i = t ?? this.position;
48
+ return this.assertPosition(i), this.bytes[i];
49
+ },
50
+ inspectUint16(t) {
51
+ const i = t ?? this.position;
52
+ return this.assertPosition(i + 1), this.dataView.getUint16(i);
53
+ },
54
+ inspectUint24(t) {
55
+ const i = t ?? this.position;
56
+ return this.assertPosition(i + 2), (this.dataView.getUint16(i) << 8) + this.dataView.getUint8(i + 2);
57
+ },
58
+ inspectUint32(t) {
59
+ const i = t ?? this.position;
60
+ return this.assertPosition(i + 3), this.dataView.getUint32(i);
61
+ },
62
+ pushByte(t) {
63
+ this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
64
+ },
65
+ pushBytes(t) {
66
+ this.assertPosition(this.position + t.length - 1), this.bytes.set(t, this.position), this.position += t.length;
67
+ },
68
+ pushUint8(t) {
69
+ this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
70
+ },
71
+ pushUint16(t) {
72
+ this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, t), this.position += 2;
73
+ },
74
+ pushUint24(t) {
75
+ this.assertPosition(this.position + 2), this.dataView.setUint16(this.position, t >> 8), this.dataView.setUint8(this.position + 2, t & 255), this.position += 3;
76
+ },
77
+ pushUint32(t) {
78
+ this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, t), this.position += 4;
79
+ },
80
+ readByte() {
81
+ this.assertReadLimit(), this._touch();
82
+ const t = this.inspectByte();
83
+ return this.position++, t;
84
+ },
85
+ readBytes(t, i) {
86
+ this.assertReadLimit(), this._touch();
87
+ const s = this.inspectBytes(t);
88
+ return this.position += i ?? t, s;
89
+ },
90
+ readUint8() {
91
+ this.assertReadLimit(), this._touch();
92
+ const t = this.inspectUint8();
93
+ return this.position += 1, t;
94
+ },
95
+ readUint16() {
96
+ this.assertReadLimit(), this._touch();
97
+ const t = this.inspectUint16();
98
+ return this.position += 2, t;
99
+ },
100
+ readUint24() {
101
+ this.assertReadLimit(), this._touch();
102
+ const t = this.inspectUint24();
103
+ return this.position += 3, t;
104
+ },
105
+ readUint32() {
106
+ this.assertReadLimit(), this._touch();
107
+ const t = this.inspectUint32();
108
+ return this.position += 4, t;
109
+ },
110
+ get remaining() {
111
+ return this.bytes.length - this.position;
112
+ },
113
+ setPosition(t) {
114
+ const i = this.position;
115
+ return this.assertPosition(t), this.position = t, () => this.position = i;
116
+ },
117
+ _touch() {
118
+ if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
119
+ return;
120
+ const t = this.getReadCount();
121
+ this.positionReadCount.set(this.position, t + 1), t > 0 && this.recursiveReadCount++;
39
122
  }
40
- c(t);
41
- }
42
- function c(t) {
43
- const { chainId: e, maxPriorityFeePerGas: o, maxFeePerGas: r, to: i } = t;
44
- if (e <= 0)
45
- throw new n({ chainId: e });
46
- if (i && !f(i))
47
- throw new s({ address: i });
48
- if (r && r > m)
49
- throw new w({ maxFeePerGas: r });
50
- if (o && r && o > r)
51
- throw new E({ maxFeePerGas: r, maxPriorityFeePerGas: o });
52
- }
53
- function B(t) {
54
- const { chainId: e, maxPriorityFeePerGas: o, gasPrice: r, maxFeePerGas: i, to: a } = t;
55
- if (e <= 0)
56
- throw new n({ chainId: e });
57
- if (a && !f(a))
58
- throw new s({ address: a });
59
- if (o || i)
60
- throw new h("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
61
- if (r && r > m)
62
- throw new w({ maxFeePerGas: r });
63
- }
64
- function K(t) {
65
- const { chainId: e, maxPriorityFeePerGas: o, gasPrice: r, maxFeePerGas: i, to: a } = t;
66
- if (a && !f(a))
67
- throw new s({ address: a });
68
- if (typeof e < "u" && e <= 0)
69
- throw new n({ chainId: e });
70
- if (o || i)
71
- throw new h("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
72
- if (r && r > m)
73
- throw new w({ maxFeePerGas: r });
123
+ };
124
+ function a(t, { recursiveReadLimit: i = 8192 } = {}) {
125
+ const s = Object.create(h);
126
+ return s.bytes = t, s.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength), s.positionReadCount = /* @__PURE__ */ new Map(), s.recursiveReadLimit = i, s;
74
127
  }
75
128
  export {
76
- c as assertTransactionEIP1559,
77
- B as assertTransactionEIP2930,
78
- L as assertTransactionEIP4844,
79
- C as assertTransactionEIP7702,
80
- K as assertTransactionLegacy
129
+ a as createCursor
81
130
  };
package/dist/index70.cjs CHANGED
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index62.cjs");function f(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new i.InvalidSerializableTransactionError({transaction:e})}exports.getTransactionType=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index66.cjs");function i(n){const r=Object.entries(n).map(([a,e])=>e===void 0||e===!1?null:[a,e]).filter(Boolean),o=r.reduce((a,[e])=>Math.max(a,e.length),0);return r.map(([a,e])=>` ${`${a}:`.padEnd(o+1)} ${e}`).join(`
2
+ `)}class s extends t.BaseError{constructor({v:r}){super(`Invalid \`v\` value "${r}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends t.BaseError{constructor({transaction:r}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(r),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class l extends t.BaseError{constructor({storageKey:r}){super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}exports.InvalidLegacyVError=s;exports.InvalidSerializableTransactionError=c;exports.InvalidStorageKeySizeError=l;exports.prettyPrint=i;
package/dist/index70.js CHANGED
@@ -1,17 +1,45 @@
1
- import { InvalidSerializableTransactionError as f } from "./index62.js";
2
- function d(e) {
3
- if (e.type)
4
- return e.type;
5
- if (typeof e.authorizationList < "u")
6
- return "eip7702";
7
- if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
8
- return "eip4844";
9
- if (typeof e.maxFeePerGas < "u" || typeof e.maxPriorityFeePerGas < "u")
10
- return "eip1559";
11
- if (typeof e.gasPrice < "u")
12
- return typeof e.accessList < "u" ? "eip2930" : "legacy";
13
- throw new f({ transaction: e });
1
+ import { BaseError as t } from "./index66.js";
2
+ function i(n) {
3
+ const r = Object.entries(n).map(([a, e]) => e === void 0 || e === !1 ? null : [a, e]).filter(Boolean), o = r.reduce((a, [e]) => Math.max(a, e.length), 0);
4
+ return r.map(([a, e]) => ` ${`${a}:`.padEnd(o + 1)} ${e}`).join(`
5
+ `);
6
+ }
7
+ class c extends t {
8
+ constructor({ v: r }) {
9
+ super(`Invalid \`v\` value "${r}". Expected 27 or 28.`, {
10
+ name: "InvalidLegacyVError"
11
+ });
12
+ }
13
+ }
14
+ class d extends t {
15
+ constructor({ transaction: r }) {
16
+ super("Cannot infer a transaction type from provided transaction.", {
17
+ metaMessages: [
18
+ "Provided Transaction:",
19
+ "{",
20
+ i(r),
21
+ "}",
22
+ "",
23
+ "To infer the type, either provide:",
24
+ "- a `type` to the Transaction, or",
25
+ "- an EIP-1559 Transaction with `maxFeePerGas`, or",
26
+ "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
27
+ "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
28
+ "- an EIP-7702 Transaction with `authorizationList`, or",
29
+ "- a Legacy Transaction with `gasPrice`"
30
+ ],
31
+ name: "InvalidSerializableTransactionError"
32
+ });
33
+ }
34
+ }
35
+ class l extends t {
36
+ constructor({ storageKey: r }) {
37
+ super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
38
+ }
14
39
  }
15
40
  export {
16
- d as getTransactionType
41
+ c as InvalidLegacyVError,
42
+ d as InvalidSerializableTransactionError,
43
+ l as InvalidStorageKeySizeError,
44
+ i as prettyPrint
17
45
  };
package/dist/index71.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index42.cjs"),d=require("./index62.cjs"),l=require("./index43.cjs");function a(e){if(!e||e.length===0)return[];const n=[];for(let t=0;t<e.length;t++){const{address:i,storageKeys:r}=e[t];for(let s=0;s<r.length;s++)if(r[s].length-2!==64)throw new d.InvalidStorageKeySizeError({storageKey:r[s]});if(!l.isAddress(i,{strict:!1}))throw new o.InvalidAddressError({address:i});n.push([i,r])}return n}exports.serializeAccessList=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index65.cjs"),l=require("./index50.cjs");function c(o){const{kzg:s}=o,n=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),e=typeof o.blobs[0]=="string"?o.blobs.map(t=>i.hexToBytes(t)):o.blobs,b=[];for(const t of e)b.push(Uint8Array.from(s.blobToKzgCommitment(t)));return n==="bytes"?b:b.map(t=>l.bytesToHex(t))}exports.blobsToCommitments=c;
package/dist/index71.js CHANGED
@@ -1,21 +1,11 @@
1
- import { InvalidAddressError as s } from "./index42.js";
2
- import { InvalidStorageKeySizeError as l } from "./index62.js";
3
- import { isAddress as f } from "./index43.js";
4
- function a(r) {
5
- if (!r || r.length === 0)
6
- return [];
7
- const n = [];
8
- for (let o = 0; o < r.length; o++) {
9
- const { address: i, storageKeys: e } = r[o];
10
- for (let t = 0; t < e.length; t++)
11
- if (e[t].length - 2 !== 64)
12
- throw new l({ storageKey: e[t] });
13
- if (!f(i, { strict: !1 }))
14
- throw new s({ address: i });
15
- n.push([i, e]);
16
- }
17
- return n;
1
+ import { hexToBytes as i } from "./index65.js";
2
+ import { bytesToHex as f } from "./index50.js";
3
+ function y(o) {
4
+ const { kzg: s } = o, n = o.to ?? (typeof o.blobs[0] == "string" ? "hex" : "bytes"), m = typeof o.blobs[0] == "string" ? o.blobs.map((t) => i(t)) : o.blobs, b = [];
5
+ for (const t of m)
6
+ b.push(Uint8Array.from(s.blobToKzgCommitment(t)));
7
+ return n === "bytes" ? b : b.map((t) => f(t));
18
8
  }
19
9
  export {
20
- a as serializeAccessList
10
+ y as blobsToCommitments
21
11
  };
package/dist/index72.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index59.cjs");class i extends e.BaseError{constructor({chainId:r}){super(typeof r=="number"?`Chain ID "${r}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}exports.InvalidChainIdError=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index65.cjs"),y=require("./index50.cjs");function f(t){const{kzg:c}=t,e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(o=>b.hexToBytes(o)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(o=>b.hexToBytes(o)):t.commitments,s=[];for(let o=0;o<n.length;o++){const l=n[o],m=i[o];s.push(Uint8Array.from(c.computeBlobKzgProof(l,m)))}return e==="bytes"?s:s.map(o=>y.bytesToHex(o))}exports.blobsToProofs=f;
package/dist/index72.js CHANGED
@@ -1,9 +1,13 @@
1
- import { BaseError as i } from "./index59.js";
2
- class o extends i {
3
- constructor({ chainId: r }) {
4
- super(typeof r == "number" ? `Chain ID "${r}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
1
+ import { hexToBytes as b } from "./index65.js";
2
+ import { bytesToHex as y } from "./index50.js";
3
+ function h(t) {
4
+ const { kzg: m } = t, c = t.to ?? (typeof t.blobs[0] == "string" ? "hex" : "bytes"), s = typeof t.blobs[0] == "string" ? t.blobs.map((o) => b(o)) : t.blobs, i = typeof t.commitments[0] == "string" ? t.commitments.map((o) => b(o)) : t.commitments, n = [];
5
+ for (let o = 0; o < s.length; o++) {
6
+ const f = s[o], l = i[o];
7
+ n.push(Uint8Array.from(m.computeBlobKzgProof(f, l)));
5
8
  }
9
+ return c === "bytes" ? n : n.map((o) => y(o));
6
10
  }
7
11
  export {
8
- o as InvalidChainIdError
12
+ h as blobsToProofs
9
13
  };
package/dist/index73.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class i extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&t!==void 0&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const s=this.keys().next().value;s&&this.delete(s)}return this}}exports.LruMap=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index101.cjs");function c(o){const{commitments:e,version:s}=o,n=o.to??(typeof e[0]=="string"?"hex":"bytes"),t=[];for(const m of e)t.push(i.commitmentToVersionedHash({commitment:m,to:n,version:s}));return t}exports.commitmentsToVersionedHashes=c;
package/dist/index73.js CHANGED
@@ -1,24 +1,14 @@
1
- class r extends Map {
2
- constructor(e) {
3
- super(), Object.defineProperty(this, "maxSize", {
4
- enumerable: !0,
5
- configurable: !0,
6
- writable: !0,
7
- value: void 0
8
- }), this.maxSize = e;
9
- }
10
- get(e) {
11
- const t = super.get(e);
12
- return super.has(e) && t !== void 0 && (this.delete(e), super.set(e, t)), t;
13
- }
14
- set(e, t) {
15
- if (super.set(e, t), this.maxSize && this.size > this.maxSize) {
16
- const s = this.keys().next().value;
17
- s && this.delete(s);
18
- }
19
- return this;
20
- }
1
+ import { commitmentToVersionedHash as i } from "./index101.js";
2
+ function r(o) {
3
+ const { commitments: t, version: n } = o, e = o.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
4
+ for (const m of t)
5
+ s.push(i({
6
+ commitment: m,
7
+ to: e,
8
+ version: n
9
+ }));
10
+ return s;
21
11
  }
22
12
  export {
23
- r as LruMap
13
+ r as commitmentsToVersionedHashes
24
14
  };
package/dist/index74.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index58.cjs"),a=require("./index96.cjs"),f=require("./index73.cjs"),o=new f.LruMap(8192);function k(t,r){if(o.has(`${t}.${r}`))return o.get(`${t}.${r}`);const c=t.substring(2).toLowerCase(),n=a.keccak256(i.stringToBytes(c)),s=c.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(n[e>>1]&15)>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());const u=`0x${s.join("")}`;return o.set(`${t}.${r}`,u),u}exports.checksumAddress=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index71.cjs"),m=require("./index72.cjs"),u=require("./index102.cjs");function f(t){const{data:i,kzg:n,to:b}=t,s=t.blobs??u.toBlobs({data:i,to:b}),e=t.commitments??r.blobsToCommitments({blobs:s,kzg:n,to:b}),l=t.proofs??m.blobsToProofs({blobs:s,commitments:e,kzg:n,to:b}),c=[];for(let o=0;o<s.length;o++)c.push({blob:s[o],commitment:e[o],proof:l[o]});return c}exports.toBlobSidecars=f;
package/dist/index74.js CHANGED
@@ -1,16 +1,16 @@
1
- import { stringToBytes as p } from "./index58.js";
2
- import { keccak256 as f } from "./index96.js";
3
- import { LruMap as m } from "./index73.js";
4
- const r = /* @__PURE__ */ new m(8192);
5
- function a(s, o) {
6
- if (r.has(`${s}.${o}`))
7
- return r.get(`${s}.${o}`);
8
- const c = s.substring(2).toLowerCase(), n = f(p(c)), e = c.split("");
9
- for (let t = 0; t < 40; t += 2)
10
- n[t >> 1] >> 4 >= 8 && e[t] && (e[t] = e[t].toUpperCase()), (n[t >> 1] & 15) >= 8 && e[t + 1] && (e[t + 1] = e[t + 1].toUpperCase());
11
- const i = `0x${e.join("")}`;
12
- return r.set(`${s}.${o}`, i), i;
1
+ import { blobsToCommitments as f } from "./index71.js";
2
+ import { blobsToProofs as l } from "./index72.js";
3
+ import { toBlobs as p } from "./index102.js";
4
+ function k(t) {
5
+ const { data: i, kzg: n, to: m } = t, s = t.blobs ?? p({ data: i, to: m }), b = t.commitments ?? f({ blobs: s, kzg: n, to: m }), r = t.proofs ?? l({ blobs: s, commitments: b, kzg: n, to: m }), c = [];
6
+ for (let o = 0; o < s.length; o++)
7
+ c.push({
8
+ blob: s[o],
9
+ commitment: b[o],
10
+ proof: r[o]
11
+ });
12
+ return c;
13
13
  }
14
14
  export {
15
- a as checksumAddress
15
+ k as toBlobSidecars
16
16
  };
package/dist/index75.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=2n**256n-1n;exports.maxUint256=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(e,{dir:i="left"}={}){let t=typeof e=="string"?e.replace("0x",""):e,n=0;for(let l=0;l<t.length-1&&t[i==="left"?l:t.length-l-1].toString()==="0";l++)n++;return t=i==="left"?t.slice(n):t.slice(0,t.length-n),typeof e=="string"?(t.length===1&&i==="right"&&(t=`${t}0`),`0x${t.length%2===1?`0${t}`:t}`):t}exports.trim=g;
package/dist/index75.js CHANGED
@@ -1,4 +1,9 @@
1
- const n = 2n ** 256n - 1n;
1
+ function f(e, { dir: n = "left" } = {}) {
2
+ let t = typeof e == "string" ? e.replace("0x", "") : e, i = 0;
3
+ for (let l = 0; l < t.length - 1 && t[n === "left" ? l : t.length - l - 1].toString() === "0"; l++)
4
+ i++;
5
+ return t = n === "left" ? t.slice(i) : t.slice(0, t.length - i), typeof e == "string" ? (t.length === 1 && n === "right" && (t = `${t}0`), `0x${t.length % 2 === 1 ? `0${t}` : t}`) : t;
6
+ }
2
7
  export {
3
- n as maxUint256
8
+ f as trim
4
9
  };
package/dist/index76.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="2.21.30";exports.version=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index50.cjs"),c=require("./index52.cjs");function u(t){if(!t||t.length===0)return[];const e=[];for(const o of t){const{contractAddress:n,chainId:s,nonce:r,...a}=o;e.push([i.toHex(s),n,r?i.toHex(r):"0x",...c.toYParitySignatureArray({},a)])}return e}exports.serializeAuthorizationList=u;
package/dist/index76.js CHANGED
@@ -1,4 +1,20 @@
1
- const o = "2.21.30";
1
+ import { toHex as n } from "./index50.js";
2
+ import { toYParitySignatureArray as c } from "./index52.js";
3
+ function d(r) {
4
+ if (!r || r.length === 0)
5
+ return [];
6
+ const t = [];
7
+ for (const i of r) {
8
+ const { contractAddress: e, chainId: s, nonce: o, ...a } = i;
9
+ t.push([
10
+ n(s),
11
+ e,
12
+ o ? n(o) : "0x",
13
+ ...c({}, a)
14
+ ]);
15
+ }
16
+ return t;
17
+ }
2
18
  export {
3
- o as version
19
+ d as serializeAuthorizationList
4
20
  };
package/dist/index77.cjs CHANGED
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index78.cjs"),t=require("./index59.cjs");class i extends t.BaseError{constructor({cause:r,maxFeePerGas:e}={}){super(`The fee cap (\`maxFeePerGas\`${e?` = ${a.formatGwei(e)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:r,name:"FeeCapTooHighError"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class n extends t.BaseError{constructor({cause:r,maxPriorityFeePerGas:e,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${e?` = ${a.formatGwei(e)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${a.formatGwei(o)} gwei`:""}).`].join(`
2
- `),{cause:r,name:"TipAboveFeeCapError"})}}Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});exports.FeeCapTooHighError=i;exports.TipAboveFeeCapError=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./index103.cjs"),w=require("./index83.cjs"),t=require("./index47.cjs"),P=require("./index66.cjs"),h=require("./index104.cjs"),d=require("./index82.cjs"),n=require("./index85.cjs"),c=require("./index48.cjs"),I=require("./index54.cjs"),u=require("./index105.cjs"),l=require("./index39.cjs");function m(o){const{authorizationList:e}=o;if(e)for(const s of e){const{contractAddress:r,chainId:i}=s;if(!c.isAddress(r))throw new t.InvalidAddressError({address:r});if(i<=0)throw new d.InvalidChainIdError({chainId:i})}f(o)}function T(o){const{blobVersionedHashes:e}=o;if(e){if(e.length===0)throw new h.EmptyBlobError;for(const s of e){const r=I.size(s),i=l.hexToNumber(u.slice(s,0,1));if(r!==32)throw new h.InvalidVersionedHashSizeError({hash:s,size:r});if(i!==E.versionedHashVersionKzg)throw new h.InvalidVersionedHashVersionError({hash:s,version:i})}}f(o)}function f(o){const{chainId:e,maxPriorityFeePerGas:s,maxFeePerGas:r,to:i}=o;if(e<=0)throw new d.InvalidChainIdError({chainId:e});if(i&&!c.isAddress(i))throw new t.InvalidAddressError({address:i});if(r&&r>w.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:r});if(s&&r&&s>r)throw new n.TipAboveFeeCapError({maxFeePerGas:r,maxPriorityFeePerGas:s})}function x(o){const{chainId:e,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:i,to:a}=o;if(e<=0)throw new d.InvalidChainIdError({chainId:e});if(a&&!c.isAddress(a))throw new t.InvalidAddressError({address:a});if(s||i)throw new P.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>w.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:r})}function v(o){const{chainId:e,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:i,to:a}=o;if(a&&!c.isAddress(a))throw new t.InvalidAddressError({address:a});if(typeof e<"u"&&e<=0)throw new d.InvalidChainIdError({chainId:e});if(s||i)throw new P.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>w.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:r})}exports.assertTransactionEIP1559=f;exports.assertTransactionEIP2930=x;exports.assertTransactionEIP4844=T;exports.assertTransactionEIP7702=m;exports.assertTransactionLegacy=v;