@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/index52.js CHANGED
@@ -1,177 +1,174 @@
1
- import { e as J } from "./index84.js";
2
- import { n as _ } from "./index85.js";
3
- import { __require as w } from "./index86.js";
4
- var d = J, u = _, h = d.tfJSON, S = d.TfTypeError, E = d.TfPropertyTypeError, v = d.tfSubError, N = d.getValueTypeName, g = {
5
- arrayOf: function(n, r) {
6
- n = l(n), r = r || {};
7
- function f(t, i) {
8
- return !u.Array(t) || u.Nil(t) || r.minLength !== void 0 && t.length < r.minLength || r.maxLength !== void 0 && t.length > r.maxLength || r.length !== void 0 && t.length !== r.length ? !1 : t.every(function(c, o) {
9
- try {
10
- return a(n, c, i);
11
- } catch (O) {
12
- throw v(O, o);
13
- }
14
- });
15
- }
16
- return f.toJSON = function() {
17
- var t = "[" + h(n) + "]";
18
- return r.length !== void 0 ? t += "{" + r.length + "}" : (r.minLength !== void 0 || r.maxLength !== void 0) && (t += "{" + (r.minLength === void 0 ? 0 : r.minLength) + "," + (r.maxLength === void 0 ? 1 / 0 : r.maxLength) + "}"), t;
19
- }, f;
20
- },
21
- maybe: function e(n) {
22
- n = l(n);
23
- function r(f, t) {
24
- return u.Nil(f) || n(f, t, e);
25
- }
26
- return r.toJSON = function() {
27
- return "?" + h(n);
28
- }, r;
29
- },
30
- map: function(n, r) {
31
- n = l(n), r && (r = l(r));
32
- function f(t, i) {
33
- if (!u.Object(t) || u.Nil(t)) return !1;
34
- for (var c in t) {
35
- try {
36
- r && a(r, c, i);
37
- } catch (O) {
38
- throw v(O, c, "key");
39
- }
40
- try {
41
- var o = t[c];
42
- a(n, o, i);
43
- } catch (O) {
44
- throw v(O, c);
45
- }
46
- }
47
- return !0;
48
- }
49
- return r ? f.toJSON = function() {
50
- return "{" + h(r) + ": " + h(n) + "}";
51
- } : f.toJSON = function() {
52
- return "{" + h(n) + "}";
53
- }, f;
54
- },
55
- object: function(n) {
56
- var r = {};
57
- for (var f in n)
58
- r[f] = l(n[f]);
59
- function t(i, c) {
60
- if (!u.Object(i) || u.Nil(i)) return !1;
61
- var o;
62
- try {
63
- for (o in r) {
64
- var O = r[o], L = i[o];
65
- a(O, L, c);
66
- }
67
- } catch (b) {
68
- throw v(b, o);
69
- }
70
- if (c) {
71
- for (o in i)
72
- if (!r[o])
73
- throw new E(void 0, o);
74
- }
75
- return !0;
76
- }
77
- return t.toJSON = function() {
78
- return h(r);
79
- }, t;
80
- },
81
- anyOf: function() {
82
- var n = [].slice.call(arguments).map(l);
83
- function r(f, t) {
84
- return n.some(function(i) {
85
- try {
86
- return a(i, f, t);
87
- } catch {
88
- return !1;
89
- }
90
- });
91
- }
92
- return r.toJSON = function() {
93
- return n.map(h).join("|");
94
- }, r;
95
- },
96
- allOf: function() {
97
- var n = [].slice.call(arguments).map(l);
98
- function r(f, t) {
99
- return n.every(function(i) {
100
- try {
101
- return a(i, f, t);
102
- } catch {
103
- return !1;
104
- }
105
- });
106
- }
107
- return r.toJSON = function() {
108
- return n.map(h).join(" & ");
109
- }, r;
110
- },
111
- quacksLike: function(n) {
112
- function r(f) {
113
- return n === N(f);
114
- }
115
- return r.toJSON = function() {
116
- return n;
117
- }, r;
118
- },
119
- tuple: function() {
120
- var n = [].slice.call(arguments).map(l);
121
- function r(f, t) {
122
- return u.Nil(f) || u.Nil(f.length) || t && f.length !== n.length ? !1 : n.every(function(i, c) {
123
- try {
124
- return a(i, f[c], t);
125
- } catch (o) {
126
- throw v(o, c);
127
- }
128
- });
129
- }
130
- return r.toJSON = function() {
131
- return "(" + n.map(h).join(", ") + ")";
132
- }, r;
133
- },
134
- value: function(n) {
135
- function r(f) {
136
- return f === n;
1
+ import { InvalidLegacyVError as H } from "./index70.js";
2
+ import { blobsToCommitments as g } from "./index71.js";
3
+ import { blobsToProofs as B } from "./index72.js";
4
+ import { commitmentsToVersionedHashes as V } from "./index73.js";
5
+ import { toBlobSidecars as C } from "./index74.js";
6
+ import { concatHex as h } from "./index49.js";
7
+ import { trim as T } from "./index75.js";
8
+ import { toHex as o, bytesToHex as k } from "./index50.js";
9
+ import { toRlp as y } from "./index51.js";
10
+ import { serializeAuthorizationList as w } from "./index76.js";
11
+ import { assertTransactionEIP7702 as S, assertTransactionEIP4844 as _, assertTransactionEIP1559 as R, assertTransactionEIP2930 as Y, assertTransactionLegacy as j } from "./index77.js";
12
+ import { getTransactionType as q } from "./index78.js";
13
+ import { serializeAccessList as v } from "./index79.js";
14
+ function te(e, r) {
15
+ const i = q(e);
16
+ return i === "eip1559" ? K(e, r) : i === "eip2930" ? M(e, r) : i === "eip4844" ? J(e, r) : i === "eip7702" ? D(e, r) : N(e, r);
17
+ }
18
+ function D(e, r) {
19
+ const { authorizationList: i, chainId: s, gas: n, nonce: c, to: f, value: a, maxFeePerGas: x, maxPriorityFeePerGas: t, accessList: p, data: l } = e;
20
+ S(e);
21
+ const d = v(p), m = w(i);
22
+ return h([
23
+ "0x04",
24
+ y([
25
+ o(s),
26
+ c ? o(c) : "0x",
27
+ t ? o(t) : "0x",
28
+ x ? o(x) : "0x",
29
+ n ? o(n) : "0x",
30
+ f ?? "0x",
31
+ a ? o(a) : "0x",
32
+ l ?? "0x",
33
+ d,
34
+ m,
35
+ ...I(e, r)
36
+ ])
37
+ ]);
38
+ }
39
+ function J(e, r) {
40
+ const { chainId: i, gas: s, nonce: n, to: c, value: f, maxFeePerBlobGas: a, maxFeePerGas: x, maxPriorityFeePerGas: t, accessList: p, data: l } = e;
41
+ _(e);
42
+ let d = e.blobVersionedHashes, m = e.sidecars;
43
+ if (e.blobs && (typeof d > "u" || typeof m > "u")) {
44
+ const u = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((P) => k(P)), z = e.kzg, b = g({
45
+ blobs: u,
46
+ kzg: z
47
+ });
48
+ if (typeof d > "u" && (d = V({
49
+ commitments: b
50
+ })), typeof m > "u") {
51
+ const P = B({ blobs: u, commitments: b, kzg: z });
52
+ m = C({ blobs: u, commitments: b, proofs: P });
137
53
  }
138
- return r.toJSON = function() {
139
- return n;
140
- }, r;
141
54
  }
142
- };
143
- g.oneOf = g.anyOf;
144
- function l(e) {
145
- if (u.String(e))
146
- return e[0] === "?" ? g.maybe(e.slice(1)) : u[e] || g.quacksLike(e);
147
- if (e && u.Object(e)) {
148
- if (u.Array(e)) {
149
- if (e.length !== 1) throw new TypeError("Expected compile() parameter of type Array of length 1");
150
- return g.arrayOf(e[0]);
55
+ const L = v(p), E = [
56
+ o(i),
57
+ n ? o(n) : "0x",
58
+ t ? o(t) : "0x",
59
+ x ? o(x) : "0x",
60
+ s ? o(s) : "0x",
61
+ c ?? "0x",
62
+ f ? o(f) : "0x",
63
+ l ?? "0x",
64
+ L,
65
+ a ? o(a) : "0x",
66
+ d ?? [],
67
+ ...I(e, r)
68
+ ], A = [], F = [], G = [];
69
+ if (m)
70
+ for (let u = 0; u < m.length; u++) {
71
+ const { blob: z, commitment: b, proof: P } = m[u];
72
+ A.push(z), F.push(b), G.push(P);
151
73
  }
152
- return g.object(e);
153
- } else if (u.Function(e))
154
- return e;
155
- return g.value(e);
74
+ return h([
75
+ "0x03",
76
+ m ? (
77
+ // If sidecars are enabled, envelope turns into a "wrapper":
78
+ y([E, A, F, G])
79
+ ) : (
80
+ // If sidecars are disabled, standard envelope is used:
81
+ y(E)
82
+ )
83
+ ]);
156
84
  }
157
- function a(e, n, r, f) {
158
- if (u.Function(e)) {
159
- if (e(n, r)) return !0;
160
- throw new S(f || e, n);
161
- }
162
- return a(l(e), n, r);
85
+ function K(e, r) {
86
+ const { chainId: i, gas: s, nonce: n, to: c, value: f, maxFeePerGas: a, maxPriorityFeePerGas: x, accessList: t, data: p } = e;
87
+ R(e);
88
+ const l = v(t), d = [
89
+ o(i),
90
+ n ? o(n) : "0x",
91
+ x ? o(x) : "0x",
92
+ a ? o(a) : "0x",
93
+ s ? o(s) : "0x",
94
+ c ?? "0x",
95
+ f ? o(f) : "0x",
96
+ p ?? "0x",
97
+ l,
98
+ ...I(e, r)
99
+ ];
100
+ return h([
101
+ "0x02",
102
+ y(d)
103
+ ]);
104
+ }
105
+ function M(e, r) {
106
+ const { chainId: i, gas: s, data: n, nonce: c, to: f, value: a, accessList: x, gasPrice: t } = e;
107
+ Y(e);
108
+ const p = v(x), l = [
109
+ o(i),
110
+ c ? o(c) : "0x",
111
+ t ? o(t) : "0x",
112
+ s ? o(s) : "0x",
113
+ f ?? "0x",
114
+ a ? o(a) : "0x",
115
+ n ?? "0x",
116
+ p,
117
+ ...I(e, r)
118
+ ];
119
+ return h([
120
+ "0x01",
121
+ y(l)
122
+ ]);
123
+ }
124
+ function N(e, r) {
125
+ const { chainId: i = 0, gas: s, data: n, nonce: c, to: f, value: a, gasPrice: x } = e;
126
+ j(e);
127
+ let t = [
128
+ c ? o(c) : "0x",
129
+ x ? o(x) : "0x",
130
+ s ? o(s) : "0x",
131
+ f ?? "0x",
132
+ a ? o(a) : "0x",
133
+ n ?? "0x"
134
+ ];
135
+ if (r) {
136
+ const p = (() => {
137
+ if (r.v >= 35n)
138
+ return (r.v - 35n) / 2n > 0 ? r.v : 27n + (r.v === 35n ? 0n : 1n);
139
+ if (i > 0)
140
+ return BigInt(i * 2) + BigInt(35n + r.v - 27n);
141
+ const m = 27n + (r.v === 27n ? 0n : 1n);
142
+ if (r.v !== m)
143
+ throw new H({ v: r.v });
144
+ return m;
145
+ })(), l = T(r.r), d = T(r.s);
146
+ t = [
147
+ ...t,
148
+ o(p),
149
+ l === "0x00" ? "0x" : l,
150
+ d === "0x00" ? "0x" : d
151
+ ];
152
+ } else i > 0 && (t = [
153
+ ...t,
154
+ o(i),
155
+ "0x",
156
+ "0x"
157
+ ]);
158
+ return y(t);
159
+ }
160
+ function I(e, r) {
161
+ const i = r ?? e, { v: s, yParity: n } = i;
162
+ if (typeof i.r > "u")
163
+ return [];
164
+ if (typeof i.s > "u")
165
+ return [];
166
+ if (typeof s > "u" && typeof n > "u")
167
+ return [];
168
+ const c = T(i.r), f = T(i.s);
169
+ return [typeof n == "number" ? n ? o(1) : "0x" : s === 0n ? "0x" : s === 1n ? o(1) : s === 27n ? "0x" : o(1), c === "0x00" ? "0x" : c, f === "0x00" ? "0x" : f];
163
170
  }
164
- for (var m in u)
165
- a[m] = u[m];
166
- for (m in g)
167
- a[m] = g[m];
168
- var s = w();
169
- for (m in s)
170
- a[m] = s[m];
171
- a.compile = l;
172
- a.TfTypeError = S;
173
- a.TfPropertyTypeError = E;
174
- var x = a;
175
171
  export {
176
- x as t
172
+ te as serializeTransaction,
173
+ I as toYParitySignatureArray
177
174
  };
package/dist/index53.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t}exports.commonjsGlobal=u;exports.getAugmentedNamespace=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index66.cjs");class i extends n.BaseError{constructor({max:e,min:r,signed:s,size:t,value:a}){super(`Number "${a}" is not in safe ${t?`${t*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class u extends n.BaseError{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}exports.IntegerOutOfRangeError=i;exports.SizeOverflowError=u;
package/dist/index53.js CHANGED
@@ -1,24 +1,15 @@
1
- var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function u(e) {
3
- if (e.__esModule) return e;
4
- var r = e.default;
5
- if (typeof r == "function") {
6
- var t = function o() {
7
- return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
8
- };
9
- t.prototype = r.prototype;
10
- } else t = {};
11
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
12
- var n = Object.getOwnPropertyDescriptor(e, o);
13
- Object.defineProperty(t, o, n.get ? n : {
14
- enumerable: !0,
15
- get: function() {
16
- return e[o];
17
- }
18
- });
19
- }), t;
1
+ import { BaseError as t } from "./index66.js";
2
+ class $ extends t {
3
+ constructor({ max: e, min: r, signed: s, size: n, value: a }) {
4
+ super(`Number "${a}" is not in safe ${n ? `${n * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${r} to ${e})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
5
+ }
6
+ }
7
+ class c extends t {
8
+ constructor({ givenSize: e, maxSize: r }) {
9
+ super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
10
+ }
20
11
  }
21
12
  export {
22
- f as commonjsGlobal,
23
- u as getAugmentedNamespace
13
+ $ as IntegerOutOfRangeError,
14
+ c as SizeOverflowError
24
15
  };
package/dist/index54.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index67.cjs");function i(e){return t.isHex(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}exports.size=i;
package/dist/index54.js CHANGED
@@ -1,4 +1,7 @@
1
- var r = { exports: {} };
1
+ import { isHex as r } from "./index67.js";
2
+ function i(t) {
3
+ return r(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
4
+ }
2
5
  export {
3
- r as __module
6
+ i as size
4
7
  };
package/dist/index55.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index81.cjs");require("./index82.cjs");const p=require("./index83.cjs");/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(m,a){var n=p.__exports,r=n.Buffer;function i(e,o){for(var t in e)o[t]=e[t]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?m.exports=n:(i(n,a),a.Buffer=f);function f(e,o,t){return r(e,o,t)}f.prototype=Object.create(r.prototype),i(r,f),f.from=function(e,o,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return r(e,o,t)},f.alloc=function(e,o,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var u=r(e);return o!==void 0?typeof t=="string"?u.fill(o,t):u.fill(o):u.fill(0),u},f.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return r(e)},f.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}})(l.__module,l.__module.exports);var s=l.__module.exports;exports.safeBufferExports=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(o,n){return({exclude:t,format:f})=>({exclude:t,format:e=>{const r=n(e);if(t)for(const i of t)delete r[i];return{...r,...f(e)}},type:o})}exports.defineFormatter=a;
package/dist/index55.js CHANGED
@@ -1,37 +1,19 @@
1
- import { __module as a } from "./index81.js";
2
- import "./index82.js";
3
- import { __exports as s } from "./index83.js";
4
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
5
- (function(l, m) {
6
- var n = s, e = n.Buffer;
7
- function p(r, f) {
8
- for (var o in r)
9
- f[o] = r[o];
10
- }
11
- e.from && e.alloc && e.allocUnsafe && e.allocUnsafeSlow ? l.exports = n : (p(n, m), m.Buffer = t);
12
- function t(r, f, o) {
13
- return e(r, f, o);
14
- }
15
- t.prototype = Object.create(e.prototype), p(e, t), t.from = function(r, f, o) {
16
- if (typeof r == "number")
17
- throw new TypeError("Argument must not be a number");
18
- return e(r, f, o);
19
- }, t.alloc = function(r, f, o) {
20
- if (typeof r != "number")
21
- throw new TypeError("Argument must be a number");
22
- var u = e(r);
23
- return f !== void 0 ? typeof o == "string" ? u.fill(f, o) : u.fill(f) : u.fill(0), u;
24
- }, t.allocUnsafe = function(r) {
25
- if (typeof r != "number")
26
- throw new TypeError("Argument must be a number");
27
- return e(r);
28
- }, t.allocUnsafeSlow = function(r) {
29
- if (typeof r != "number")
30
- throw new TypeError("Argument must be a number");
31
- return n.SlowBuffer(r);
32
- };
33
- })(a, a.exports);
34
- var w = a.exports;
1
+ function a(e, f) {
2
+ return ({ exclude: t, format: n }) => ({
3
+ exclude: t,
4
+ format: (r) => {
5
+ const o = f(r);
6
+ if (t)
7
+ for (const m of t)
8
+ delete o[m];
9
+ return {
10
+ ...o,
11
+ ...n(r)
12
+ };
13
+ },
14
+ type: e
15
+ });
16
+ }
35
17
  export {
36
- w as s
18
+ a as defineFormatter
37
19
  };
package/dist/index56.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index79.cjs"),t=require("./index80.cjs");var e=a.browser,c=t.base;function b(r){var s=e("sha256").update(r).digest();return e("sha256").update(s).digest()}var o=c(b);exports.bs58check=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(n,{args:a,eventName:t}={}){return{...n,blockHash:n.blockHash?n.blockHash:null,blockNumber:n.blockNumber?BigInt(n.blockNumber):null,logIndex:n.logIndex?Number(n.logIndex):null,transactionHash:n.transactionHash?n.transactionHash:null,transactionIndex:n.transactionIndex?Number(n.transactionIndex):null,...t?{args:a,eventName:t}:{}}}exports.formatLog=r;
package/dist/index56.js CHANGED
@@ -1,11 +1,14 @@
1
- import { b as e } from "./index79.js";
2
- import { b as t } from "./index80.js";
3
- var a = e, b = t;
4
- function o(r) {
5
- var s = a("sha256").update(r).digest();
6
- return a("sha256").update(s).digest();
1
+ function r(n, { args: t, eventName: a } = {}) {
2
+ return {
3
+ ...n,
4
+ blockHash: n.blockHash ? n.blockHash : null,
5
+ blockNumber: n.blockNumber ? BigInt(n.blockNumber) : null,
6
+ logIndex: n.logIndex ? Number(n.logIndex) : null,
7
+ transactionHash: n.transactionHash ? n.transactionHash : null,
8
+ transactionIndex: n.transactionIndex ? Number(n.transactionIndex) : null,
9
+ ...a ? { args: t, eventName: a } : {}
10
+ };
7
11
  }
8
- var p = b(o);
9
12
  export {
10
- p as b
13
+ r as formatLog
11
14
  };
package/dist/index57.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index87.cjs");function p(e,{dir:n,size:t=32}={}){return typeof e=="string"?o(e,{dir:n,size:t}):l(e,{dir:n,size:t})}function o(e,{dir:n,size:t=32}={}){if(t===null)return e;const r=e.replace("0x","");if(r.length>t*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(r.length/2),targetSize:t,type:"hex"});return`0x${r[n==="right"?"padEnd":"padStart"](t*2,"0")}`}function l(e,{dir:n,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new i.SizeExceedsPaddingSizeError({size:e.length,targetSize:t,type:"bytes"});const r=new Uint8Array(t);for(let a=0;a<t;a++){const d=n==="right";r[d?a:t-a-1]=e[d?a:e.length-a-1]}return r}exports.pad=p;exports.padBytes=l;exports.padHex=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index87.cjs"),n=require("./index88.cjs"),o=require("./index89.cjs"),a=require("./index90.cjs"),h=require("./index91.cjs");var u=s.inherits_browserExports,d=n.md5_js,c=o.ripemd160,p=a.sha_jsExports,i=h.cipherBase;function t(r){i.call(this,"digest"),this._hash=r}u(t,i);t.prototype._update=function(r){this._hash.update(r)};t.prototype._final=function(){return this._hash.digest()};var _=function(e){return e=e.toLowerCase(),e==="md5"?new d:e==="rmd160"||e==="ripemd160"?new c:new t(p(e))};exports.browser=_;
package/dist/index57.js CHANGED
@@ -1,37 +1,22 @@
1
- import { SizeExceedsPaddingSizeError as d } from "./index87.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];
30
- }
31
- return e;
1
+ import { i } from "./index87.js";
2
+ import { m as o } from "./index88.js";
3
+ import { r as a } from "./index89.js";
4
+ import { s as n } from "./index90.js";
5
+ import { c as h } from "./index91.js";
6
+ var p = i, m = o, f = a, u = n, e = h;
7
+ function s(t) {
8
+ e.call(this, "digest"), this._hash = t;
32
9
  }
10
+ p(s, e);
11
+ s.prototype._update = function(t) {
12
+ this._hash.update(t);
13
+ };
14
+ s.prototype._final = function() {
15
+ return this._hash.digest();
16
+ };
17
+ var b = function(r) {
18
+ return r = r.toLowerCase(), r === "md5" ? new m() : r === "rmd160" || r === "ripemd160" ? new f() : new s(u(r));
19
+ };
33
20
  export {
34
- f as pad,
35
- i as padBytes,
36
- p as padHex
21
+ b
37
22
  };
package/dist/index58.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index59.cjs"),l=require("./index60.cjs"),u=require("./index57.cjs"),f=require("./index30.cjs"),m=require("./index45.cjs"),h=new TextEncoder;function A(e,n={}){return typeof e=="number"||typeof e=="bigint"?B(e,n):typeof e=="boolean"?x(e,n):l.isHex(e)?c(e,n):T(e,n)}function x(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{size:n.size})):t}const i={zero:48,nine:57,A:65,F:70,a:97,f:102};function g(e){if(e>=i.zero&&e<=i.nine)return e-i.zero;if(e>=i.A&&e<=i.F)return e-(i.A-10);if(e>=i.a&&e<=i.f)return e-(i.a-10)}function c(e,n={}){let t=e;n.size&&(f.assertSize(t,{size:n.size}),t=u.pad(t,{dir:"right",size:n.size}));let r=t.slice(2);r.length%2&&(r=`0${r}`);const d=r.length/2,y=new Uint8Array(d);for(let s=0,o=0;s<d;s++){const b=g(r.charCodeAt(o++)),z=g(r.charCodeAt(o++));if(b===void 0||z===void 0)throw new a.BaseError(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);y[s]=b*16+z}return y}function B(e,n){const t=m.numberToHex(e,n);return c(t)}function T(e,n={}){const t=h.encode(e);return typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{dir:"right",size:n.size})):t}exports.boolToBytes=x;exports.hexToBytes=c;exports.numberToBytes=B;exports.stringToBytes=T;exports.toBytes=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index92.cjs"),s=require("./index45.cjs");var o=i.bs58,v=s.safeBufferExports.Buffer,b=function(t){function a(e){var r=t(e);return o.encode(v.concat([e,r],e.length+4))}function u(e){var r=e.slice(0,-4),n=e.slice(-4),c=t(r);if(!(n[0]^c[0]|n[1]^c[1]|n[2]^c[2]|n[3]^c[3]))return r}function d(e){var r=o.decodeUnsafe(e);if(r)return u(r)}function f(e){var r=o.decode(e),n=u(r);if(!n)throw new Error("Invalid checksum");return n}return{encode:a,decode:f,decodeUnsafe:d}};exports.base=b;