@gardenfi/utils 2.1.3-beta.1 → 2.1.3-beta.11

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 (149) hide show
  1. package/dist/index104.cjs +1 -1
  2. package/dist/index104.js +1 -1
  3. package/dist/index107.cjs +1 -1
  4. package/dist/index107.js +71 -42
  5. package/dist/index108.cjs +1 -1
  6. package/dist/index108.js +2 -2
  7. package/dist/index110.cjs +1 -1
  8. package/dist/index110.js +1 -1
  9. package/dist/index111.cjs +1 -1
  10. package/dist/index111.js +1 -1
  11. package/dist/index112.cjs +1 -1
  12. package/dist/index112.js +1 -1
  13. package/dist/index113.cjs +1 -1
  14. package/dist/index113.js +1 -1
  15. package/dist/index125.cjs +1 -1
  16. package/dist/index125.js +1 -1
  17. package/dist/index15.cjs +1 -1
  18. package/dist/index15.js +4 -4
  19. package/dist/index166.cjs +1 -1
  20. package/dist/index166.js +36 -34
  21. package/dist/index192.cjs +1 -1
  22. package/dist/index192.js +15 -18
  23. package/dist/index222.cjs +1 -1
  24. package/dist/index222.js +2 -2
  25. package/dist/index225.cjs +1 -1
  26. package/dist/index225.js +43 -43
  27. package/dist/index226.cjs +1 -1
  28. package/dist/index226.js +3 -113
  29. package/dist/index23.cjs +1 -1
  30. package/dist/index23.js +13 -31
  31. package/dist/index231.cjs +1 -1
  32. package/dist/index231.js +1 -1
  33. package/dist/index232.cjs +1 -1
  34. package/dist/index232.js +1 -1
  35. package/dist/index233.cjs +1 -1
  36. package/dist/index233.js +2 -2
  37. package/dist/index24.cjs +1 -1
  38. package/dist/index24.js +58 -32
  39. package/dist/index245.cjs +1 -1
  40. package/dist/index245.js +3 -3
  41. package/dist/index246.cjs +1 -1
  42. package/dist/index246.js +3 -3
  43. package/dist/index247.cjs +1 -2
  44. package/dist/index247.js +13 -24
  45. package/dist/index248.cjs +1 -1
  46. package/dist/index248.js +15 -13
  47. package/dist/index249.cjs +2 -1
  48. package/dist/index249.js +23 -14
  49. package/dist/index25.cjs +16 -1
  50. package/dist/index25.js +113 -11
  51. package/dist/index26.cjs +1 -1
  52. package/dist/index26.js +32 -58
  53. package/dist/index266.cjs +1 -1
  54. package/dist/index266.js +1 -1
  55. package/dist/index27.cjs +1 -1
  56. package/dist/index27.js +31 -13
  57. package/dist/index277.cjs +1 -1
  58. package/dist/index277.js +103 -16
  59. package/dist/index278.cjs +1 -1
  60. package/dist/index278.js +13 -220
  61. package/dist/index279.cjs +1 -1
  62. package/dist/index279.js +214 -6
  63. package/dist/index28.cjs +1 -16
  64. package/dist/index28.js +11 -113
  65. package/dist/index280.cjs +1 -1
  66. package/dist/index280.js +7 -7
  67. package/dist/index281.cjs +1 -1
  68. package/dist/index281.js +7 -27
  69. package/dist/index282.cjs +1 -1
  70. package/dist/index282.js +26 -34
  71. package/dist/index283.cjs +1 -1
  72. package/dist/index283.js +13 -12
  73. package/dist/index284.cjs +1 -1
  74. package/dist/index284.js +89 -51
  75. package/dist/index285.cjs +1 -1
  76. package/dist/index285.js +3 -67
  77. package/dist/index286.cjs +1 -1
  78. package/dist/index286.js +140 -3
  79. package/dist/index287.cjs +1 -1
  80. package/dist/index287.js +143 -128
  81. package/dist/index288.cjs +1 -1
  82. package/dist/index288.js +9 -155
  83. package/dist/index289.cjs +1 -1
  84. package/dist/index289.js +111 -7
  85. package/dist/index290.cjs +2 -1
  86. package/dist/index290.js +116 -95
  87. package/dist/index291.cjs +1 -2
  88. package/dist/index291.js +8 -131
  89. package/dist/index292.cjs +1 -1
  90. package/dist/index292.js +19 -40
  91. package/dist/index293.cjs +1 -1
  92. package/dist/index293.js +43 -2
  93. package/dist/index294.cjs +1 -1
  94. package/dist/index294.js +74 -202
  95. package/dist/index295.cjs +1 -1
  96. package/dist/index295.js +2 -69
  97. package/dist/index296.cjs +1 -1
  98. package/dist/index296.js +68 -11
  99. package/dist/index297.cjs +1 -1
  100. package/dist/index297.js +656 -18
  101. package/dist/index298.cjs +1 -1
  102. package/dist/index298.js +197 -633
  103. package/dist/index299.cjs +1 -1
  104. package/dist/index299.js +78 -73
  105. package/dist/index300.cjs +2 -2
  106. package/dist/index300.js +7 -7
  107. package/dist/index302.cjs +1 -1
  108. package/dist/index302.js +1 -1
  109. package/dist/index303.cjs +1 -1
  110. package/dist/index303.js +2 -2
  111. package/dist/index305.cjs +1 -1
  112. package/dist/index305.js +1 -1
  113. package/dist/index307.cjs +1 -1
  114. package/dist/index307.js +2 -2
  115. package/dist/index308.cjs +1 -1
  116. package/dist/index308.js +1 -1
  117. package/dist/index310.cjs +1 -1
  118. package/dist/index310.js +1 -1
  119. package/dist/index311.cjs +1 -1
  120. package/dist/index311.js +5 -105
  121. package/dist/index312.cjs +1 -1
  122. package/dist/index312.js +2 -5
  123. package/dist/index313.cjs +1 -1
  124. package/dist/index313.js +22 -2
  125. package/dist/index36.cjs +1 -1
  126. package/dist/index36.js +1 -1
  127. package/dist/index43.cjs +1 -1
  128. package/dist/index43.js +40 -21
  129. package/dist/index44.cjs +1 -1
  130. package/dist/index44.js +24 -24
  131. package/dist/index58.cjs +1 -1
  132. package/dist/index58.js +98 -97
  133. package/dist/index79.cjs +1 -1
  134. package/dist/index79.js +1 -1
  135. package/dist/index84.cjs +1 -1
  136. package/dist/index84.js +53 -51
  137. package/dist/index9.cjs +1 -1
  138. package/dist/index9.js +4 -4
  139. package/dist/index90.cjs +1 -1
  140. package/dist/index90.js +44 -42
  141. package/dist/index92.cjs +1 -1
  142. package/dist/index92.js +15 -15
  143. package/package.json +1 -1
  144. package/dist/index314.cjs +0 -1
  145. package/dist/index314.js +0 -22
  146. package/dist/index315.cjs +0 -1
  147. package/dist/index315.js +0 -74
  148. package/dist/index316.cjs +0 -1
  149. package/dist/index316.js +0 -24
package/dist/index299.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./index278.cjs"),h=require("./index294.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const y=BigInt(0),S=BigInt(1);function p(e,s){const t=s.negate();return e?t:s}function E(e,s){if(!Number.isSafeInteger(e)||e<=0||e>s)throw new Error("invalid window size, expected [1.."+s+"], got W="+e)}function m(e,s){E(e,s);const t=Math.ceil(s/e)+1,n=2**(e-1),o=2**e,i=h.bitMask(e),r=BigInt(e);return{windows:t,windowSize:n,mask:i,maxNumber:o,shiftBy:r}}function B(e,s,t){const{windowSize:n,mask:o,maxNumber:i,shiftBy:r}=t;let f=Number(e&o),a=e>>r;f>n&&(f-=i,a+=S);const l=s*n,c=l+Math.abs(f)-1,w=f===0,u=f<0,d=s%2!==0;return{nextN:a,offset:c,isZero:w,isNeg:u,isNegF:d,offsetF:l}}function x(e,s){if(!Array.isArray(e))throw new Error("array expected");e.forEach((t,n)=>{if(!(t instanceof s))throw new Error("invalid point at index "+n)})}function I(e,s){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((t,n)=>{if(!s.isValid(t))throw new Error("invalid scalar at index "+n)})}const N=new WeakMap,M=new WeakMap;function b(e){return M.get(e)||1}function O(e,s){return{constTimeNegate:p,hasPrecomputes(t){return b(t)!==1},unsafeLadder(t,n,o=e.ZERO){let i=t;for(;n>y;)n&S&&(o=o.add(i)),i=i.double(),n>>=S;return o},precomputeWindow(t,n){const{windows:o,windowSize:i}=m(n,s),r=[];let f=t,a=f;for(let l=0;l<o;l++){a=f,r.push(a);for(let c=1;c<i;c++)a=a.add(f),r.push(a);f=a.double()}return r},wNAF(t,n,o){let i=e.ZERO,r=e.BASE;const f=m(t,s);for(let a=0;a<f.windows;a++){const{nextN:l,offset:c,isZero:w,isNeg:u,isNegF:d,offsetF:g}=B(o,a,f);o=l,w?r=r.add(p(d,n[g])):i=i.add(p(u,n[c]))}return{p:i,f:r}},wNAFUnsafe(t,n,o,i=e.ZERO){const r=m(t,s);for(let f=0;f<r.windows&&o!==y;f++){const{nextN:a,offset:l,isZero:c,isNeg:w}=B(o,f,r);if(o=a,!c){const u=n[l];i=i.add(w?u.negate():u)}}return i},getPrecomputes(t,n,o){let i=N.get(n);return i||(i=this.precomputeWindow(n,t),t!==1&&N.set(n,o(i))),i},wNAFCached(t,n,o){const i=b(t);return this.wNAF(i,this.getPrecomputes(i,t,o),n)},wNAFCachedUnsafe(t,n,o,i){const r=b(t);return r===1?this.unsafeLadder(t,n,i):this.wNAFUnsafe(r,this.getPrecomputes(r,t,o),n,i)},setWindowSize(t,n){E(n,s),M.set(t,n),N.delete(t)}}}function z(e,s,t,n){if(x(t,e),I(n,s),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=h.bitLen(BigInt(t.length)),r=i>12?i-3:i>4?i-2:i?2:1,f=h.bitMask(r),a=new Array(Number(f)+1).fill(o),l=Math.floor((s.BITS-1)/r)*r;let c=o;for(let w=l;w>=0;w-=r){a.fill(o);for(let d=0;d<n.length;d++){const g=n[d],F=Number(g>>BigInt(w)&f);a[F]=a[F].add(t[d])}let u=o;for(let d=a.length-1,g=o;d>0;d--)g=g.add(a[d]),u=u.add(g);if(c=c.add(u),w!==0)for(let d=0;d<r;d++)c=c.double()}return c}function k(e){return A.validateField(e.Fp),h.validateObject(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...A.nLength(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}exports.pippenger=z;exports.validateBasic=k;exports.wNAF=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./index279.cjs"),m=require("./index298.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const E=BigInt(0),A=BigInt(1);function N(e,a){const t=a.negate();return e?t:a}function x(e,a){if(!Number.isSafeInteger(e)||e<=0||e>a)throw new Error("invalid window size, expected [1.."+a+"], got W="+e)}function b(e,a){x(e,a);const t=Math.ceil(a/e)+1,n=2**(e-1),o=2**e,i=m.bitMask(e),r=BigInt(e);return{windows:t,windowSize:n,mask:i,maxNumber:o,shiftBy:r}}function M(e,a,t){const{windowSize:n,mask:o,maxNumber:i,shiftBy:r}=t;let f=Number(e&o),s=e>>r;f>n&&(f-=i,s+=A);const c=a*n,d=c+Math.abs(f)-1,g=f===0,l=f<0,u=a%2!==0;return{nextN:s,offset:d,isZero:g,isNeg:l,isNegF:u,offsetF:c}}function O(e,a){if(!Array.isArray(e))throw new Error("array expected");e.forEach((t,n)=>{if(!(t instanceof a))throw new Error("invalid point at index "+n)})}function z(e,a){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((t,n)=>{if(!a.isValid(t))throw new Error("invalid scalar at index "+n)})}const S=new WeakMap,I=new WeakMap;function F(e){return I.get(e)||1}function k(e,a){return{constTimeNegate:N,hasPrecomputes(t){return F(t)!==1},unsafeLadder(t,n,o=e.ZERO){let i=t;for(;n>E;)n&A&&(o=o.add(i)),i=i.double(),n>>=A;return o},precomputeWindow(t,n){const{windows:o,windowSize:i}=b(n,a),r=[];let f=t,s=f;for(let c=0;c<o;c++){s=f,r.push(s);for(let d=1;d<i;d++)s=s.add(f),r.push(s);f=s.double()}return r},wNAF(t,n,o){let i=e.ZERO,r=e.BASE;const f=b(t,a);for(let s=0;s<f.windows;s++){const{nextN:c,offset:d,isZero:g,isNeg:l,isNegF:u,offsetF:h}=M(o,s,f);o=c,g?r=r.add(N(u,n[h])):i=i.add(N(l,n[d]))}return{p:i,f:r}},wNAFUnsafe(t,n,o,i=e.ZERO){const r=b(t,a);for(let f=0;f<r.windows&&o!==E;f++){const{nextN:s,offset:c,isZero:d,isNeg:g}=M(o,f,r);if(o=s,!d){const l=n[c];i=i.add(g?l.negate():l)}}return i},getPrecomputes(t,n,o){let i=S.get(n);return i||(i=this.precomputeWindow(n,t),t!==1&&S.set(n,o(i))),i},wNAFCached(t,n,o){const i=F(t);return this.wNAF(i,this.getPrecomputes(i,t,o),n)},wNAFCachedUnsafe(t,n,o,i){const r=F(t);return r===1?this.unsafeLadder(t,n,i):this.wNAFUnsafe(r,this.getPrecomputes(r,t,o),n,i)},setWindowSize(t,n){x(n,a),I.set(t,n),S.delete(t)}}}function L(e,a,t,n){O(t,e),z(n,a);const o=t.length,i=n.length;if(o!==i)throw new Error("arrays of points and scalars must have equal length");const r=e.ZERO,f=m.bitLen(BigInt(o));let s=1;f>12?s=f-3:f>4?s=f-2:f>0&&(s=2);const c=m.bitMask(s),d=new Array(Number(c)+1).fill(r),g=Math.floor((a.BITS-1)/s)*s;let l=r;for(let u=g;u>=0;u-=s){d.fill(r);for(let w=0;w<i;w++){const p=n[w],y=Number(p>>BigInt(u)&c);d[y]=d[y].add(t[w])}let h=r;for(let w=d.length-1,p=r;w>0;w--)p=p.add(d[w]),h=h.add(p);if(l=l.add(h),u!==0)for(let w=0;w<s;w++)l=l.double()}return l}function Z(e){return B.validateField(e.Fp),m.validateObject(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...B.nLength(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}exports.pippenger=L;exports.validateBasic=Z;exports.wNAF=k;
package/dist/index299.js CHANGED
@@ -1,58 +1,58 @@
1
- import { validateField as y, nLength as I } from "./index278.js";
2
- import { validateObject as M, bitLen as z, bitMask as E } from "./index294.js";
1
+ import { validateField as M, nLength as z } from "./index279.js";
2
+ import { validateObject as O, bitLen as k, bitMask as x } from "./index298.js";
3
3
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4
- const F = BigInt(0), b = BigInt(1);
5
- function h(e, s) {
6
- const t = s.negate();
7
- return e ? t : s;
4
+ const E = BigInt(0), F = BigInt(1);
5
+ function m(e, a) {
6
+ const t = a.negate();
7
+ return e ? t : a;
8
8
  }
9
- function B(e, s) {
10
- if (!Number.isSafeInteger(e) || e <= 0 || e > s)
11
- throw new Error("invalid window size, expected [1.." + s + "], got W=" + e);
9
+ function y(e, a) {
10
+ if (!Number.isSafeInteger(e) || e <= 0 || e > a)
11
+ throw new Error("invalid window size, expected [1.." + a + "], got W=" + e);
12
12
  }
13
- function m(e, s) {
14
- B(e, s);
15
- const t = Math.ceil(s / e) + 1, n = 2 ** (e - 1), i = 2 ** e, o = E(e), r = BigInt(e);
13
+ function N(e, a) {
14
+ y(e, a);
15
+ const t = Math.ceil(a / e) + 1, n = 2 ** (e - 1), i = 2 ** e, o = x(e), r = BigInt(e);
16
16
  return { windows: t, windowSize: n, mask: o, maxNumber: i, shiftBy: r };
17
17
  }
18
- function A(e, s, t) {
18
+ function B(e, a, t) {
19
19
  const { windowSize: n, mask: i, maxNumber: o, shiftBy: r } = t;
20
- let f = Number(e & i), a = e >> r;
21
- f > n && (f -= o, a += b);
22
- const w = s * n, c = w + Math.abs(f) - 1, l = f === 0, u = f < 0, d = s % 2 !== 0;
23
- return { nextN: a, offset: c, isZero: l, isNeg: u, isNegF: d, offsetF: w };
20
+ let f = Number(e & i), s = e >> r;
21
+ f > n && (f -= o, s += F);
22
+ const c = a * n, d = c + Math.abs(f) - 1, g = f === 0, l = f < 0, u = a % 2 !== 0;
23
+ return { nextN: s, offset: d, isZero: g, isNeg: l, isNegF: u, offsetF: c };
24
24
  }
25
- function O(e, s) {
25
+ function L(e, a) {
26
26
  if (!Array.isArray(e))
27
27
  throw new Error("array expected");
28
28
  e.forEach((t, n) => {
29
- if (!(t instanceof s))
29
+ if (!(t instanceof a))
30
30
  throw new Error("invalid point at index " + n);
31
31
  });
32
32
  }
33
- function k(e, s) {
33
+ function Z(e, a) {
34
34
  if (!Array.isArray(e))
35
35
  throw new Error("array of scalars expected");
36
36
  e.forEach((t, n) => {
37
- if (!s.isValid(t))
37
+ if (!a.isValid(t))
38
38
  throw new Error("invalid scalar at index " + n);
39
39
  });
40
40
  }
41
- const p = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
42
- function N(e) {
43
- return x.get(e) || 1;
41
+ const b = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap();
42
+ function S(e) {
43
+ return I.get(e) || 1;
44
44
  }
45
- function R(e, s) {
45
+ function v(e, a) {
46
46
  return {
47
- constTimeNegate: h,
47
+ constTimeNegate: m,
48
48
  hasPrecomputes(t) {
49
- return N(t) !== 1;
49
+ return S(t) !== 1;
50
50
  },
51
51
  // non-const time multiplication ladder
52
52
  unsafeLadder(t, n, i = e.ZERO) {
53
53
  let o = t;
54
- for (; n > F; )
55
- n & b && (i = i.add(o)), o = o.double(), n >>= b;
54
+ for (; n > E; )
55
+ n & F && (i = i.add(o)), o = o.double(), n >>= F;
56
56
  return i;
57
57
  },
58
58
  /**
@@ -68,13 +68,13 @@ function R(e, s) {
68
68
  * @returns precomputed point tables flattened to a single array
69
69
  */
70
70
  precomputeWindow(t, n) {
71
- const { windows: i, windowSize: o } = m(n, s), r = [];
72
- let f = t, a = f;
73
- for (let w = 0; w < i; w++) {
74
- a = f, r.push(a);
75
- for (let c = 1; c < o; c++)
76
- a = a.add(f), r.push(a);
77
- f = a.double();
71
+ const { windows: i, windowSize: o } = N(n, a), r = [];
72
+ let f = t, s = f;
73
+ for (let c = 0; c < i; c++) {
74
+ s = f, r.push(s);
75
+ for (let d = 1; d < o; d++)
76
+ s = s.add(f), r.push(s);
77
+ f = s.double();
78
78
  }
79
79
  return r;
80
80
  },
@@ -87,10 +87,10 @@ function R(e, s) {
87
87
  */
88
88
  wNAF(t, n, i) {
89
89
  let o = e.ZERO, r = e.BASE;
90
- const f = m(t, s);
91
- for (let a = 0; a < f.windows; a++) {
92
- const { nextN: w, offset: c, isZero: l, isNeg: u, isNegF: d, offsetF: g } = A(i, a, f);
93
- i = w, l ? r = r.add(h(d, n[g])) : o = o.add(h(u, n[c]));
90
+ const f = N(t, a);
91
+ for (let s = 0; s < f.windows; s++) {
92
+ const { nextN: c, offset: d, isZero: g, isNeg: l, isNegF: u, offsetF: h } = B(i, s, f);
93
+ i = c, g ? r = r.add(m(u, n[h])) : o = o.add(m(l, n[d]));
94
94
  }
95
95
  return { p: o, f: r };
96
96
  },
@@ -103,58 +103,63 @@ function R(e, s) {
103
103
  * @returns point
104
104
  */
105
105
  wNAFUnsafe(t, n, i, o = e.ZERO) {
106
- const r = m(t, s);
107
- for (let f = 0; f < r.windows && i !== F; f++) {
108
- const { nextN: a, offset: w, isZero: c, isNeg: l } = A(i, f, r);
109
- if (i = a, !c) {
110
- const u = n[w];
111
- o = o.add(l ? u.negate() : u);
106
+ const r = N(t, a);
107
+ for (let f = 0; f < r.windows && i !== E; f++) {
108
+ const { nextN: s, offset: c, isZero: d, isNeg: g } = B(i, f, r);
109
+ if (i = s, !d) {
110
+ const l = n[c];
111
+ o = o.add(g ? l.negate() : l);
112
112
  }
113
113
  }
114
114
  return o;
115
115
  },
116
116
  getPrecomputes(t, n, i) {
117
- let o = p.get(n);
118
- return o || (o = this.precomputeWindow(n, t), t !== 1 && p.set(n, i(o))), o;
117
+ let o = b.get(n);
118
+ return o || (o = this.precomputeWindow(n, t), t !== 1 && b.set(n, i(o))), o;
119
119
  },
120
120
  wNAFCached(t, n, i) {
121
- const o = N(t);
121
+ const o = S(t);
122
122
  return this.wNAF(o, this.getPrecomputes(o, t, i), n);
123
123
  },
124
124
  wNAFCachedUnsafe(t, n, i, o) {
125
- const r = N(t);
125
+ const r = S(t);
126
126
  return r === 1 ? this.unsafeLadder(t, n, o) : this.wNAFUnsafe(r, this.getPrecomputes(r, t, i), n, o);
127
127
  },
128
128
  // We calculate precomputes for elliptic curve point multiplication
129
129
  // using windowed method. This specifies window size and
130
130
  // stores precomputed values. Usually only base point would be precomputed.
131
131
  setWindowSize(t, n) {
132
- B(n, s), x.set(t, n), p.delete(t);
132
+ y(n, a), I.set(t, n), b.delete(t);
133
133
  }
134
134
  };
135
135
  }
136
- function j(e, s, t, n) {
137
- if (O(t, e), k(n, s), t.length !== n.length)
136
+ function U(e, a, t, n) {
137
+ L(t, e), Z(n, a);
138
+ const i = t.length, o = n.length;
139
+ if (i !== o)
138
140
  throw new Error("arrays of points and scalars must have equal length");
139
- const i = e.ZERO, o = z(BigInt(t.length)), r = o > 12 ? o - 3 : o > 4 ? o - 2 : o ? 2 : 1, f = E(r), a = new Array(Number(f) + 1).fill(i), w = Math.floor((s.BITS - 1) / r) * r;
140
- let c = i;
141
- for (let l = w; l >= 0; l -= r) {
142
- a.fill(i);
143
- for (let d = 0; d < n.length; d++) {
144
- const g = n[d], S = Number(g >> BigInt(l) & f);
145
- a[S] = a[S].add(t[d]);
141
+ const r = e.ZERO, f = k(BigInt(i));
142
+ let s = 1;
143
+ f > 12 ? s = f - 3 : f > 4 ? s = f - 2 : f > 0 && (s = 2);
144
+ const c = x(s), d = new Array(Number(c) + 1).fill(r), g = Math.floor((a.BITS - 1) / s) * s;
145
+ let l = r;
146
+ for (let u = g; u >= 0; u -= s) {
147
+ d.fill(r);
148
+ for (let w = 0; w < o; w++) {
149
+ const p = n[w], A = Number(p >> BigInt(u) & c);
150
+ d[A] = d[A].add(t[w]);
146
151
  }
147
- let u = i;
148
- for (let d = a.length - 1, g = i; d > 0; d--)
149
- g = g.add(a[d]), u = u.add(g);
150
- if (c = c.add(u), l !== 0)
151
- for (let d = 0; d < r; d++)
152
- c = c.double();
152
+ let h = r;
153
+ for (let w = d.length - 1, p = r; w > 0; w--)
154
+ p = p.add(d[w]), h = h.add(p);
155
+ if (l = l.add(h), u !== 0)
156
+ for (let w = 0; w < s; w++)
157
+ l = l.double();
153
158
  }
154
- return c;
159
+ return l;
155
160
  }
156
- function v(e) {
157
- return y(e.Fp), M(e, {
161
+ function C(e) {
162
+ return M(e.Fp), O(e, {
158
163
  n: "bigint",
159
164
  h: "bigint",
160
165
  Gx: "field",
@@ -163,13 +168,13 @@ function v(e) {
163
168
  nBitLength: "isSafeInteger",
164
169
  nByteLength: "isSafeInteger"
165
170
  }), Object.freeze({
166
- ...I(e.n, e.nBitLength),
171
+ ...z(e.n, e.nBitLength),
167
172
  ...e,
168
173
  p: e.Fp.ORDER
169
174
  });
170
175
  }
171
176
  export {
172
- j as pippenger,
173
- v as validateBasic,
174
- R as wNAF
177
+ U as pippenger,
178
+ C as validateBasic,
179
+ v as wNAF
175
180
  };
package/dist/index300.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index310.cjs");class c extends Error{constructor(r,e={}){const u=(()=>{var s;if(e.cause instanceof c){if(e.cause.details)return e.cause.details;if(e.cause.shortMessage)return e.cause.shortMessage}return(s=e.cause)!=null&&s.message?e.cause.message:e.details})(),a=e.cause instanceof c&&e.cause.docsPath||e.docsPath,i=`https://oxlib.sh${a??""}`,n=[r||"An error occurred.",...e.metaMessages?["",...e.metaMessages]:[],...u||a?["",u?`Details: ${u}`:void 0,a?`See: ${i}`:void 0]:[]].filter(s=>typeof s=="string").join(`
2
- `);super(n,e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${d.getVersion()}`}),this.cause=e.cause,this.details=u,this.docs=i,this.docsPath=a,this.shortMessage=r}walk(r){return l(this,r)}}function l(t,r){return r!=null&&r(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?l(t.cause,r):r?null:t}exports.BaseError=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index310.cjs");class c extends Error{constructor(r,e={}){const a=(()=>{var s;if(e.cause instanceof c){if(e.cause.details)return e.cause.details;if(e.cause.shortMessage)return e.cause.shortMessage}return e.cause&&"details"in e.cause&&typeof e.cause.details=="string"?e.cause.details:(s=e.cause)!=null&&s.message?e.cause.message:e.details})(),u=e.cause instanceof c&&e.cause.docsPath||e.docsPath,i=`https://oxlib.sh${u??""}`,d=[r||"An error occurred.",...e.metaMessages?["",...e.metaMessages]:[],...a||u?["",a?`Details: ${a}`:void 0,u?`See: ${i}`:void 0]:[]].filter(s=>typeof s=="string").join(`
2
+ `);super(d,e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${n.getVersion()}`}),this.cause=e.cause,this.details=a,this.docs=i,this.docsPath=u,this.shortMessage=r}walk(r){return l(this,r)}}function l(t,r){return r!=null&&r(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?l(t.cause,r):r?null:t}exports.BaseError=c;
package/dist/index300.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getVersion as n } from "./index310.js";
2
2
  class c extends Error {
3
3
  constructor(t, e = {}) {
4
- const u = (() => {
4
+ const a = (() => {
5
5
  var s;
6
6
  if (e.cause instanceof c) {
7
7
  if (e.cause.details)
@@ -9,14 +9,14 @@ class c extends Error {
9
9
  if (e.cause.shortMessage)
10
10
  return e.cause.shortMessage;
11
11
  }
12
- return (s = e.cause) != null && s.message ? e.cause.message : e.details;
13
- })(), a = e.cause instanceof c && e.cause.docsPath || e.docsPath, i = `https://oxlib.sh${a ?? ""}`, d = [
12
+ return e.cause && "details" in e.cause && typeof e.cause.details == "string" ? e.cause.details : (s = e.cause) != null && s.message ? e.cause.message : e.details;
13
+ })(), u = e.cause instanceof c && e.cause.docsPath || e.docsPath, i = `https://oxlib.sh${u ?? ""}`, d = [
14
14
  t || "An error occurred.",
15
15
  ...e.metaMessages ? ["", ...e.metaMessages] : [],
16
- ...u || a ? [
16
+ ...a || u ? [
17
17
  "",
18
- u ? `Details: ${u}` : void 0,
19
- a ? `See: ${i}` : void 0
18
+ a ? `Details: ${a}` : void 0,
19
+ u ? `See: ${i}` : void 0
20
20
  ] : []
21
21
  ].filter((s) => typeof s == "string").join(`
22
22
  `);
@@ -55,7 +55,7 @@ class c extends Error {
55
55
  configurable: !0,
56
56
  writable: !0,
57
57
  value: `ox@${n()}`
58
- }), this.cause = e.cause, this.details = u, this.docs = i, this.docsPath = a, this.shortMessage = t;
58
+ }), this.cause = e.cause, this.details = a, this.docs = i, this.docsPath = u, this.shortMessage = t;
59
59
  }
60
60
  walk(t) {
61
61
  return l(this, t);
package/dist/index302.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index288.cjs");function n(t,e){if(i.size(t)>e)throw new i.SizeOverflowError({givenSize:i.size(t),maxSize:e})}function o(t,e){if(typeof e=="number"&&e>0&&e>i.size(t)-1)throw new i.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:i.size(t)})}function z(t,e,r){if(typeof e=="number"&&typeof r=="number"&&i.size(t)!==r-e)throw new i.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:i.size(t)})}function a(t,e={}){const{dir:r,size:s=32}=e;if(s===0)return t;const f=t.replace("0x","");if(f.length>s*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(f.length/2),targetSize:s,type:"Hex"});return`0x${f[r==="right"?"padEnd":"padStart"](s*2,"0")}`}exports.assertEndOffset=z;exports.assertSize=n;exports.assertStartOffset=o;exports.pad=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index287.cjs");function n(t,e){if(i.size(t)>e)throw new i.SizeOverflowError({givenSize:i.size(t),maxSize:e})}function o(t,e){if(typeof e=="number"&&e>0&&e>i.size(t)-1)throw new i.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:i.size(t)})}function z(t,e,r){if(typeof e=="number"&&typeof r=="number"&&i.size(t)!==r-e)throw new i.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:i.size(t)})}function a(t,e={}){const{dir:r,size:s=32}=e;if(s===0)return t;const f=t.replace("0x","");if(f.length>s*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(f.length/2),targetSize:s,type:"Hex"});return`0x${f[r==="right"?"padEnd":"padStart"](s*2,"0")}`}exports.assertEndOffset=z;exports.assertSize=n;exports.assertStartOffset=o;exports.pad=a;
package/dist/index302.js CHANGED
@@ -1,4 +1,4 @@
1
- import { SizeExceedsPaddingSizeError as s, size as i, SliceOffsetOutOfBoundsError as f, SizeOverflowError as p } from "./index288.js";
1
+ import { SizeExceedsPaddingSizeError as s, size as i, SliceOffsetOutOfBoundsError as f, SizeOverflowError as p } from "./index287.js";
2
2
  function c(t, e) {
3
3
  if (i(t) > e)
4
4
  throw new p({
package/dist/index303.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index311.cjs"),o=require("./index308.cjs"),n=require("./index288.cjs");function i(e,r={}){const{as:s=typeof e=="string"?"Hex":"Bytes"}=r,t=c.keccak_256(o.from(e));return s==="Bytes"?t:n.fromBytes(t)}exports.keccak256=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index225.cjs"),o=require("./index308.cjs"),n=require("./index287.cjs");function i(e,r={}){const{as:s=typeof e=="string"?"Hex":"Bytes"}=r,t=c.keccak_256(o.from(e));return s==="Bytes"?t:n.fromBytes(t)}exports.keccak256=i;
package/dist/index303.js CHANGED
@@ -1,6 +1,6 @@
1
- import { keccak_256 as f } from "./index311.js";
1
+ import { keccak_256 as f } from "./index225.js";
2
2
  import { from as m } from "./index308.js";
3
- import { fromBytes as s } from "./index288.js";
3
+ import { fromBytes as s } from "./index287.js";
4
4
  function p(t, o = {}) {
5
5
  const { as: e = typeof t == "string" ? "Hex" : "Bytes" } = o, r = f(m(t));
6
6
  return e === "Bytes" ? r : s(r);
package/dist/index305.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index308.cjs"),c=require("./index312.cjs"),o=require("./index300.cjs"),m=require("./index303.cjs"),b=/^0x[a-fA-F0-9]{40}$/;function i(e,t={}){const{strict:s=!0}=t;if(!b.test(e))throw new a({address:e,cause:new l});if(s){if(e.toLowerCase()===e)return;if(d(e)!==e)throw new a({address:e,cause:new h})}}function d(e){if(c.checksum.has(e))return c.checksum.get(e);i(e,{strict:!1});const t=e.substring(2).toLowerCase(),s=m.keccak256(f.fromString(t),{as:"Bytes"}),n=t.split("");for(let r=0;r<40;r+=2)s[r>>1]>>4>=8&&n[r]&&(n[r]=n[r].toUpperCase()),(s[r>>1]&15)>=8&&n[r+1]&&(n[r+1]=n[r+1].toUpperCase());const u=`0x${n.join("")}`;return c.checksum.set(e,u),u}function p(e,t={}){const{strict:s=!0}=t??{};try{return i(e,{strict:s}),!0}catch{return!1}}class a extends o.BaseError{constructor({address:t,cause:s}){super(`Address "${t}" is invalid.`,{cause:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class l extends o.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class h extends o.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}exports.InvalidAddressError=a;exports.InvalidChecksumError=h;exports.InvalidInputError=l;exports.assert=i;exports.checksum=d;exports.validate=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index308.cjs"),c=require("./index311.cjs"),o=require("./index300.cjs"),m=require("./index303.cjs"),b=/^0x[a-fA-F0-9]{40}$/;function i(e,t={}){const{strict:s=!0}=t;if(!b.test(e))throw new a({address:e,cause:new l});if(s){if(e.toLowerCase()===e)return;if(d(e)!==e)throw new a({address:e,cause:new h})}}function d(e){if(c.checksum.has(e))return c.checksum.get(e);i(e,{strict:!1});const t=e.substring(2).toLowerCase(),s=m.keccak256(f.fromString(t),{as:"Bytes"}),n=t.split("");for(let r=0;r<40;r+=2)s[r>>1]>>4>=8&&n[r]&&(n[r]=n[r].toUpperCase()),(s[r>>1]&15)>=8&&n[r+1]&&(n[r+1]=n[r+1].toUpperCase());const u=`0x${n.join("")}`;return c.checksum.set(e,u),u}function p(e,t={}){const{strict:s=!0}=t??{};try{return i(e,{strict:s}),!0}catch{return!1}}class a extends o.BaseError{constructor({address:t,cause:s}){super(`Address "${t}" is invalid.`,{cause:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class l extends o.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class h extends o.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}exports.InvalidAddressError=a;exports.InvalidChecksumError=h;exports.InvalidInputError=l;exports.assert=i;exports.checksum=d;exports.validate=p;
package/dist/index305.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fromString as d } from "./index308.js";
2
- import { checksum as o } from "./index312.js";
2
+ import { checksum as o } from "./index311.js";
3
3
  import { BaseError as c } from "./index300.js";
4
4
  import { keccak256 as f } from "./index303.js";
5
5
  const l = /^0x[a-fA-F0-9]{40}$/;
package/dist/index307.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index291.cjs"),w=require("./index305.cjs"),N=require("./index300.cjs"),c=require("./index288.cjs"),x=require("./index306.cjs");function P({checksumAddress:e,parameters:r,values:n}){const t=[];for(let o=0;o<r.length;o++)t.push(f({checksumAddress:e,parameter:r[o],value:n[o]}));return t}function f({checksumAddress:e=!1,parameter:r,value:n}){const t=r,o=S(t.type);if(o){const[i,s]=o;return h(n,{checksumAddress:e,length:i,parameter:{...t,type:s}})}if(t.type==="tuple")return A(n,{checksumAddress:e,parameter:t});if(t.type==="address")return y(n,{checksum:e});if(t.type==="bool")return g(n);if(t.type.startsWith("uint")||t.type.startsWith("int")){const i=t.type.startsWith("int"),[,,s="256"]=x.integerRegex.exec(t.type)??[];return b(n,{signed:i,size:Number(s)})}if(t.type.startsWith("bytes"))return l(n,{type:t.type});if(t.type==="string")return z(n);throw new m.InvalidTypeError(t.type)}function u(e){let r=0;for(let i=0;i<e.length;i++){const{dynamic:s,encoded:a}=e[i];s?r+=32:r+=c.size(a)}const n=[],t=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:s,encoded:a}=e[i];s?(n.push(c.fromNumber(r+o,{size:32})),t.push(a),o+=c.size(a)):n.push(a)}return c.concat(...n,...t)}function y(e,r){const{checksum:n=!1}=r;return w.assert(e,{strict:n}),{dynamic:!1,encoded:c.padLeft(e.toLowerCase())}}function h(e,r){const{checksumAddress:n,length:t,parameter:o}=r,i=t===null;if(!Array.isArray(e))throw new m.InvalidArrayError(e);if(!i&&e.length!==t)throw new m.ArrayLengthMismatchError({expectedLength:t,givenLength:e.length,type:`${o.type}[${t}]`});let s=!1;const a=[];for(let d=0;d<e.length;d++){const p=f({checksumAddress:n,parameter:o,value:e[d]});p.dynamic&&(s=!0),a.push(p)}if(i||s){const d=u(a);if(i){const p=c.fromNumber(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?c.concat(p,d):p}}if(s)return{dynamic:!0,encoded:d}}return{dynamic:!1,encoded:c.concat(...a.map(({encoded:d})=>d))}}function l(e,{type:r}){const[,n]=r.split("bytes"),t=c.size(e);if(!n){let o=e;return t%32!==0&&(o=c.padRight(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:c.concat(c.padLeft(c.fromNumber(t,{size:32})),o)}}if(t!==Number.parseInt(n))throw new m.BytesSizeMismatchError({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:c.padRight(e)}}function g(e){if(typeof e!="boolean")throw new N.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:c.padLeft(c.fromBoolean(e))}}function b(e,{signed:r,size:n}){if(typeof n=="number"){const t=2n**(BigInt(n)-(r?1n:0n))-1n,o=r?-t-1n:0n;if(e>t||e<o)throw new c.IntegerOutOfRangeError({max:t.toString(),min:o.toString(),signed:r,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:c.fromNumber(e,{size:32,signed:r})}}function z(e){const r=c.fromString(e),n=Math.ceil(c.size(r)/32),t=[];for(let o=0;o<n;o++)t.push(c.padRight(c.slice(r,o*32,(o+1)*32)));return{dynamic:!0,encoded:c.concat(c.padRight(c.fromNumber(c.size(r),{size:32})),...t)}}function A(e,r){const{checksumAddress:n,parameter:t}=r;let o=!1;const i=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],d=Array.isArray(e)?s:a.name,p=f({checksumAddress:n,parameter:a,value:e[d]});i.push(p),p.dynamic&&(o=!0)}return{dynamic:o,encoded:o?u(i):c.concat(...i.map(({encoded:s})=>s))}}function S(e){const r=e.match(/^(.*)\[(\d+)?\]$/);return r?[r[2]?Number(r[2]):null,r[1]]:void 0}exports.encode=u;exports.encodeAddress=y;exports.encodeArray=h;exports.encodeBoolean=g;exports.encodeBytes=l;exports.encodeNumber=b;exports.encodeString=z;exports.encodeTuple=A;exports.getArrayComponents=S;exports.prepareParameter=f;exports.prepareParameters=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index290.cjs"),w=require("./index305.cjs"),N=require("./index300.cjs"),c=require("./index287.cjs"),x=require("./index306.cjs");function P({checksumAddress:e,parameters:r,values:n}){const t=[];for(let o=0;o<r.length;o++)t.push(f({checksumAddress:e,parameter:r[o],value:n[o]}));return t}function f({checksumAddress:e=!1,parameter:r,value:n}){const t=r,o=S(t.type);if(o){const[i,s]=o;return h(n,{checksumAddress:e,length:i,parameter:{...t,type:s}})}if(t.type==="tuple")return A(n,{checksumAddress:e,parameter:t});if(t.type==="address")return y(n,{checksum:e});if(t.type==="bool")return g(n);if(t.type.startsWith("uint")||t.type.startsWith("int")){const i=t.type.startsWith("int"),[,,s="256"]=x.integerRegex.exec(t.type)??[];return b(n,{signed:i,size:Number(s)})}if(t.type.startsWith("bytes"))return l(n,{type:t.type});if(t.type==="string")return z(n);throw new m.InvalidTypeError(t.type)}function u(e){let r=0;for(let i=0;i<e.length;i++){const{dynamic:s,encoded:a}=e[i];s?r+=32:r+=c.size(a)}const n=[],t=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:s,encoded:a}=e[i];s?(n.push(c.fromNumber(r+o,{size:32})),t.push(a),o+=c.size(a)):n.push(a)}return c.concat(...n,...t)}function y(e,r){const{checksum:n=!1}=r;return w.assert(e,{strict:n}),{dynamic:!1,encoded:c.padLeft(e.toLowerCase())}}function h(e,r){const{checksumAddress:n,length:t,parameter:o}=r,i=t===null;if(!Array.isArray(e))throw new m.InvalidArrayError(e);if(!i&&e.length!==t)throw new m.ArrayLengthMismatchError({expectedLength:t,givenLength:e.length,type:`${o.type}[${t}]`});let s=!1;const a=[];for(let d=0;d<e.length;d++){const p=f({checksumAddress:n,parameter:o,value:e[d]});p.dynamic&&(s=!0),a.push(p)}if(i||s){const d=u(a);if(i){const p=c.fromNumber(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?c.concat(p,d):p}}if(s)return{dynamic:!0,encoded:d}}return{dynamic:!1,encoded:c.concat(...a.map(({encoded:d})=>d))}}function l(e,{type:r}){const[,n]=r.split("bytes"),t=c.size(e);if(!n){let o=e;return t%32!==0&&(o=c.padRight(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:c.concat(c.padLeft(c.fromNumber(t,{size:32})),o)}}if(t!==Number.parseInt(n))throw new m.BytesSizeMismatchError({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:c.padRight(e)}}function g(e){if(typeof e!="boolean")throw new N.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:c.padLeft(c.fromBoolean(e))}}function b(e,{signed:r,size:n}){if(typeof n=="number"){const t=2n**(BigInt(n)-(r?1n:0n))-1n,o=r?-t-1n:0n;if(e>t||e<o)throw new c.IntegerOutOfRangeError({max:t.toString(),min:o.toString(),signed:r,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:c.fromNumber(e,{size:32,signed:r})}}function z(e){const r=c.fromString(e),n=Math.ceil(c.size(r)/32),t=[];for(let o=0;o<n;o++)t.push(c.padRight(c.slice(r,o*32,(o+1)*32)));return{dynamic:!0,encoded:c.concat(c.padRight(c.fromNumber(c.size(r),{size:32})),...t)}}function A(e,r){const{checksumAddress:n,parameter:t}=r;let o=!1;const i=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],d=Array.isArray(e)?s:a.name,p=f({checksumAddress:n,parameter:a,value:e[d]});i.push(p),p.dynamic&&(o=!0)}return{dynamic:o,encoded:o?u(i):c.concat(...i.map(({encoded:s})=>s))}}function S(e){const r=e.match(/^(.*)\[(\d+)?\]$/);return r?[r[2]?Number(r[2]):null,r[1]]:void 0}exports.encode=u;exports.encodeAddress=y;exports.encodeArray=h;exports.encodeBoolean=g;exports.encodeBytes=l;exports.encodeNumber=b;exports.encodeString=z;exports.encodeTuple=A;exports.getArrayComponents=S;exports.prepareParameter=f;exports.prepareParameters=P;
package/dist/index307.js CHANGED
@@ -1,7 +1,7 @@
1
- import { InvalidTypeError as g, InvalidArrayError as b, ArrayLengthMismatchError as w, BytesSizeMismatchError as z } from "./index291.js";
1
+ import { InvalidTypeError as g, InvalidArrayError as b, ArrayLengthMismatchError as w, BytesSizeMismatchError as z } from "./index290.js";
2
2
  import { assert as x } from "./index305.js";
3
3
  import { BaseError as S } from "./index300.js";
4
- import { size as d, fromNumber as f, concat as p, padLeft as h, fromBoolean as A, IntegerOutOfRangeError as E, padRight as y, fromString as I, slice as B } from "./index288.js";
4
+ import { size as d, fromNumber as f, concat as p, padLeft as h, fromBoolean as A, IntegerOutOfRangeError as E, padRight as y, fromString as I, slice as B } from "./index287.js";
5
5
  import { integerRegex as L } from "./index306.js";
6
6
  function q({ checksumAddress: e, parameters: n, values: r }) {
7
7
  const t = [];
package/dist/index308.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index300.cjs"),y=require("./index288.cjs"),s=require("./index309.cjs"),z=require("./index302.cjs"),S=new TextEncoder;function x(e){return e instanceof Uint8Array?e:typeof e=="string"?h(e):g(e)}function g(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function h(e,t={}){const{size:r}=t;let n=e;r&&(z.assertSize(e,r),n=y.padRight(e,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);const d=i.length/2,f=new Uint8Array(d);for(let c=0,o=0;c<d;c++){const u=s.charCodeToBase16(i.charCodeAt(o++)),b=s.charCodeToBase16(i.charCodeAt(o++));if(u===void 0||b===void 0)throw new a.BaseError(`Invalid byte sequence ("${i[o-2]}${i[o-1]}" in "${i}").`);f[c]=u*16+b}return f}function m(e,t={}){const{size:r}=t,n=S.encode(e);return typeof r=="number"?(s.assertSize(n,r),l(n,r)):n}function l(e,t){return s.pad(e,{dir:"right",size:t})}function E(e){return e.length}class p extends a.BaseError{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class $ extends a.BaseError{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}exports.SizeExceedsPaddingSizeError=$;exports.SizeOverflowError=p;exports.from=x;exports.fromArray=g;exports.fromHex=h;exports.fromString=m;exports.padRight=l;exports.size=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index300.cjs"),y=require("./index287.cjs"),s=require("./index309.cjs"),z=require("./index302.cjs"),S=new TextEncoder;function x(e){return e instanceof Uint8Array?e:typeof e=="string"?h(e):g(e)}function g(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function h(e,t={}){const{size:r}=t;let n=e;r&&(z.assertSize(e,r),n=y.padRight(e,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);const d=i.length/2,f=new Uint8Array(d);for(let c=0,o=0;c<d;c++){const u=s.charCodeToBase16(i.charCodeAt(o++)),b=s.charCodeToBase16(i.charCodeAt(o++));if(u===void 0||b===void 0)throw new a.BaseError(`Invalid byte sequence ("${i[o-2]}${i[o-1]}" in "${i}").`);f[c]=u*16+b}return f}function m(e,t={}){const{size:r}=t,n=S.encode(e);return typeof r=="number"?(s.assertSize(n,r),l(n,r)):n}function l(e,t){return s.pad(e,{dir:"right",size:t})}function E(e){return e.length}class p extends a.BaseError{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class $ extends a.BaseError{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}exports.SizeExceedsPaddingSizeError=$;exports.SizeOverflowError=p;exports.from=x;exports.fromArray=g;exports.fromHex=h;exports.fromString=m;exports.padRight=l;exports.size=E;
package/dist/index308.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BaseError as c } from "./index300.js";
2
- import { padRight as h } from "./index288.js";
2
+ import { padRight as h } from "./index287.js";
3
3
  import { charCodeToBase16 as b, assertSize as g, pad as m } from "./index309.js";
4
4
  import { assertSize as p } from "./index302.js";
5
5
  const l = /* @__PURE__ */ new TextEncoder();
package/dist/index310.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index313.cjs");function r(){return e.version}exports.getVersion=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index312.cjs");function r(){return e.version}exports.getVersion=r;
package/dist/index310.js CHANGED
@@ -1,4 +1,4 @@
1
- import { version as r } from "./index313.js";
1
+ import { version as r } from "./index312.js";
2
2
  function e() {
3
3
  return r;
4
4
  }
package/dist/index311.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index314.cjs"),c=require("./index315.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 c=require("./index313.cjs"),e={checksum:new c.LruMap(8192)},s=e.checksum;exports.checksum=s;
package/dist/index311.js CHANGED
@@ -1,107 +1,7 @@
1
- import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index314.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 "./index315.js";
3
- const R = BigInt(0), f = BigInt(1), j = BigInt(2), q = BigInt(7), v = BigInt(256), z = BigInt(113), _ = [], g = [], B = [];
4
- for (let n = 0, t = f, s = 1, i = 0; n < 24; n++) {
5
- [s, i] = [i, (2 * s + 3 * i) % 5], _.push(2 * (5 * i + s)), g.push((n + 1) * (n + 2) / 2 % 64);
6
- let o = R;
7
- for (let r = 0; r < 7; r++)
8
- t = (t << f ^ (t >> q) * z) % v, t & j && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
9
- B.push(o);
10
- }
11
- const A = L(B, !0), C = A[0], D = A[1], O = (n, t, s) => s > 32 ? m(n, t, s) : T(n, t, s), w = (n, t, s) => s > 32 ? F(n, t, s) : S(n, t, s);
12
- function G(n, t = 24) {
13
- const s = new Uint32Array(10);
14
- for (let i = 24 - t; i < 24; i++) {
15
- for (let e = 0; e < 10; e++)
16
- s[e] = n[e] ^ n[e + 10] ^ n[e + 20] ^ n[e + 30] ^ n[e + 40];
17
- for (let e = 0; e < 10; e += 2) {
18
- const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1], b = O(u, c, 1) ^ s[h], H = w(u, c, 1) ^ s[h + 1];
19
- for (let a = 0; a < 50; a += 10)
20
- n[e + a] ^= b, n[e + a + 1] ^= H;
21
- }
22
- let o = n[2], r = n[3];
23
- for (let e = 0; e < 24; e++) {
24
- const h = g[e], l = O(o, r, h), u = w(o, r, h), c = _[e];
25
- o = n[c], r = n[c + 1], n[c] = l, n[c + 1] = u;
26
- }
27
- for (let e = 0; e < 50; e += 10) {
28
- for (let h = 0; h < 10; h++)
29
- s[h] = n[e + h];
30
- for (let h = 0; h < 10; h++)
31
- n[e + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
32
- }
33
- n[0] ^= C[i], n[1] ^= D[i];
34
- }
35
- y(s);
36
- }
37
- class p extends E {
38
- // NOTE: we accept arguments in bytes instead of bits here.
39
- constructor(t, s, i, o = !1, r = 24) {
40
- 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, d(i), !(0 < t && t < 200))
41
- throw new Error("only keccak-f1600 function is supported");
42
- this.state = new Uint8Array(200), this.state32 = U(this.state);
43
- }
44
- clone() {
45
- return this._cloneInto();
46
- }
47
- keccak() {
48
- I(this.state32), G(this.state32, this.rounds), I(this.state32), this.posOut = 0, this.pos = 0;
49
- }
50
- update(t) {
51
- x(this), t = P(t), k(t);
52
- const { blockLen: s, state: i } = this, o = t.length;
53
- for (let r = 0; r < o; ) {
54
- const e = Math.min(s - this.pos, o - r);
55
- for (let h = 0; h < e; h++)
56
- i[this.pos++] ^= t[r++];
57
- this.pos === s && this.keccak();
58
- }
59
- return this;
60
- }
61
- finish() {
62
- if (this.finished)
63
- return;
64
- this.finished = !0;
65
- const { state: t, suffix: s, pos: i, blockLen: o } = this;
66
- t[i] ^= s, s & 128 && i === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
67
- }
68
- writeInto(t) {
69
- x(this, !1), k(t), this.finish();
70
- const s = this.state, { blockLen: i } = this;
71
- for (let o = 0, r = t.length; o < r; ) {
72
- this.posOut >= i && this.keccak();
73
- const e = Math.min(i - this.posOut, r - o);
74
- t.set(s.subarray(this.posOut, this.posOut + e), o), this.posOut += e, o += e;
75
- }
76
- return t;
77
- }
78
- xofInto(t) {
79
- if (!this.enableXOF)
80
- throw new Error("XOF is not possible for this instance");
81
- return this.writeInto(t);
82
- }
83
- xof(t) {
84
- return d(t), this.xofInto(new Uint8Array(t));
85
- }
86
- digestInto(t) {
87
- if (M(t, this), this.finished)
88
- throw new Error("digest() was already called");
89
- return this.writeInto(t), this.destroy(), t;
90
- }
91
- digest() {
92
- return this.digestInto(new Uint8Array(this.outputLen));
93
- }
94
- destroy() {
95
- this.destroyed = !0, y(this.state);
96
- }
97
- _cloneInto(t) {
98
- const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: e } = this;
99
- return t || (t = new p(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;
100
- }
101
- }
102
- const J = (n, t, s) => X(() => new p(t, n, s)), Q = J(1, 136, 256 / 8);
1
+ import { LruMap as c } from "./index313.js";
2
+ const e = {
3
+ checksum: /* @__PURE__ */ new c(8192)
4
+ }, m = e.checksum;
103
5
  export {
104
- p as Keccak,
105
- G as keccakP,
106
- Q as keccak_256
6
+ m as checksum
107
7
  };
package/dist/index312.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index316.cjs"),e={checksum:new c.LruMap(8192)},s=e.checksum;exports.checksum=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.1.1";exports.version=e;
package/dist/index312.js CHANGED
@@ -1,7 +1,4 @@
1
- import { LruMap as c } from "./index316.js";
2
- const e = {
3
- checksum: /* @__PURE__ */ new c(8192)
4
- }, m = e.checksum;
1
+ const o = "0.1.1";
5
2
  export {
6
- m as checksum
3
+ o as version
7
4
  };
package/dist/index313.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.1.1";exports.version=e;
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;
package/dist/index313.js CHANGED
@@ -1,4 +1,24 @@
1
- const o = "0.1.1";
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
+ }
21
+ }
2
22
  export {
3
- o as version
23
+ r as LruMap
4
24
  };
package/dist/index36.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index45.cjs"),g=require("./index247.cjs"),q=require("./index177.cjs"),C=require("./index221.cjs"),h=require("./index29.cjs"),l=require("./index108.cjs");async function p(n,i){const{abi:c,account:r=n.account,address:o,args:e,dataSuffix:a,functionName:s,...u}=i;if(typeof r>"u")throw new g.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const t=r?w.parseAccount(r):null,d=q.encodeFunctionData({abi:c,args:e,functionName:s});try{return await h.getAction(n,l.sendTransaction,"sendTransaction")({data:`${d}${a?a.replace("0x",""):""}`,to:o,account:t,...u})}catch(f){throw C.getContractError(f,{abi:c,address:o,args:e,docsPath:"/docs/contract/writeContract",functionName:s,sender:t==null?void 0:t.address})}}exports.writeContract=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index45.cjs"),g=require("./index249.cjs"),q=require("./index177.cjs"),C=require("./index221.cjs"),h=require("./index29.cjs"),l=require("./index108.cjs");async function p(n,i){const{abi:c,account:r=n.account,address:o,args:e,dataSuffix:a,functionName:s,...u}=i;if(typeof r>"u")throw new g.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const t=r?w.parseAccount(r):null,d=q.encodeFunctionData({abi:c,args:e,functionName:s});try{return await h.getAction(n,l.sendTransaction,"sendTransaction")({data:`${d}${a?a.replace("0x",""):""}`,to:o,account:t,...u})}catch(f){throw C.getContractError(f,{abi:c,address:o,args:e,docsPath:"/docs/contract/writeContract",functionName:s,sender:t==null?void 0:t.address})}}exports.writeContract=p;
package/dist/index36.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as u } from "./index45.js";
2
- import { AccountNotFoundError as p } from "./index247.js";
2
+ import { AccountNotFoundError as p } from "./index249.js";
3
3
  import { encodeFunctionData as w } from "./index177.js";
4
4
  import { getContractError as h } from "./index221.js";
5
5
  import { getAction as C } from "./index29.js";