@gardenfi/utils 3.0.0-beta.2 → 3.0.0-beta.3

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 (304) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +35 -36
  3. package/dist/index102.cjs +1 -1
  4. package/dist/index102.js +4 -4
  5. package/dist/index104.cjs +1 -1
  6. package/dist/index104.js +3 -3
  7. package/dist/index111.cjs +1 -1
  8. package/dist/index111.js +2 -2
  9. package/dist/index112.cjs +1 -1
  10. package/dist/index112.js +1 -1
  11. package/dist/index113.cjs +1 -1
  12. package/dist/index113.js +1 -1
  13. package/dist/index114.cjs +1 -1
  14. package/dist/index114.js +1 -1
  15. package/dist/index115.cjs +1 -1
  16. package/dist/index115.js +1 -1
  17. package/dist/index132.cjs +1 -1
  18. package/dist/index132.js +5 -5
  19. package/dist/index138.cjs +1 -1
  20. package/dist/index138.js +33 -13
  21. package/dist/index139.cjs +1 -1
  22. package/dist/index139.js +9 -34
  23. package/dist/index140.cjs +1 -1
  24. package/dist/index140.js +60 -55
  25. package/dist/index141.cjs +1 -1
  26. package/dist/index141.js +17 -23
  27. package/dist/index142.cjs +1 -1
  28. package/dist/index142.js +106 -6
  29. package/dist/index143.cjs +1 -1
  30. package/dist/index143.js +78 -18
  31. package/dist/index144.cjs +1 -1
  32. package/dist/index144.js +9 -15
  33. package/dist/index145.cjs +1 -1
  34. package/dist/index145.js +71 -5
  35. package/dist/index146.cjs +2 -1
  36. package/dist/index146.js +3 -14
  37. package/dist/index147.cjs +1 -1
  38. package/dist/index147.js +9 -11
  39. package/dist/index148.cjs +1 -1
  40. package/dist/index148.js +13 -12
  41. package/dist/index149.cjs +1 -1
  42. package/dist/index149.js +4 -11
  43. package/dist/index150.cjs +1 -1
  44. package/dist/index150.js +12 -8
  45. package/dist/index151.cjs +1 -1
  46. package/dist/index151.js +2 -4
  47. package/dist/index152.cjs +1 -1
  48. package/dist/index152.js +32 -17
  49. package/dist/index153.cjs +1 -1
  50. package/dist/index153.js +21 -5
  51. package/dist/index154.cjs +1 -1
  52. package/dist/index154.js +5 -171
  53. package/dist/index155.cjs +1 -1
  54. package/dist/index155.js +5 -103
  55. package/dist/index156.cjs +1 -1
  56. package/dist/index156.js +5 -33
  57. package/dist/index157.cjs +9 -1
  58. package/dist/index157.js +34 -8
  59. package/dist/index158.cjs +1 -1
  60. package/dist/index158.js +3 -61
  61. package/dist/index159.cjs +1 -1
  62. package/dist/index159.js +18 -19
  63. package/dist/index160.cjs +1 -1
  64. package/dist/index160.js +19 -105
  65. package/dist/index161.cjs +1 -1
  66. package/dist/index161.js +27 -70
  67. package/dist/index162.cjs +1 -1
  68. package/dist/index162.js +6 -7
  69. package/dist/index163.cjs +4 -1
  70. package/dist/index163.js +194 -71
  71. package/dist/index164.cjs +1 -2
  72. package/dist/index164.js +28 -3
  73. package/dist/index165.cjs +1 -1
  74. package/dist/index165.js +162 -9
  75. package/dist/index166.cjs +1 -1
  76. package/dist/index166.js +127 -13
  77. package/dist/index167.cjs +1 -1
  78. package/dist/index167.js +27 -4
  79. package/dist/index168.cjs +1 -1
  80. package/dist/index168.js +56 -2
  81. package/dist/index169.cjs +1 -1
  82. package/dist/index169.js +191 -31
  83. package/dist/index170.cjs +1 -1
  84. package/dist/index170.js +4 -22
  85. package/dist/index171.cjs +1 -1
  86. package/dist/index171.js +20 -5
  87. package/dist/index172.cjs +1 -1
  88. package/dist/index172.js +3 -6
  89. package/dist/index173.cjs +1 -1
  90. package/dist/index173.js +16 -5
  91. package/dist/index174.cjs +1 -9
  92. package/dist/index174.js +11 -35
  93. package/dist/index175.cjs +1 -1
  94. package/dist/index175.js +35 -3
  95. package/dist/index176.cjs +1 -1
  96. package/dist/index176.js +3 -19
  97. package/dist/index177.cjs +1 -1
  98. package/dist/index177.js +25 -18
  99. package/dist/index178.cjs +1 -1
  100. package/dist/index178.js +8 -35
  101. package/dist/index179.cjs +1 -1
  102. package/dist/index179.js +23 -6
  103. package/dist/index180.cjs +1 -4
  104. package/dist/index180.js +28 -194
  105. package/dist/index181.cjs +1 -1
  106. package/dist/index181.js +3 -27
  107. package/dist/index182.cjs +1 -1
  108. package/dist/index182.js +6 -161
  109. package/dist/index183.cjs +1 -1
  110. package/dist/index183.js +6 -127
  111. package/dist/index184.cjs +1 -1
  112. package/dist/index184.js +32 -27
  113. package/dist/index185.cjs +1 -1
  114. package/dist/index185.js +5 -192
  115. package/dist/index186.cjs +1 -1
  116. package/dist/index186.js +38 -4
  117. package/dist/index187.cjs +1 -1
  118. package/dist/index187.js +43 -14
  119. package/dist/index188.cjs +1 -1
  120. package/dist/index188.js +33 -3
  121. package/dist/index189.cjs +1 -1
  122. package/dist/index189.js +16 -15
  123. package/dist/index190.cjs +1 -1
  124. package/dist/index190.js +40 -32
  125. package/dist/index191.cjs +1 -1
  126. package/dist/index191.js +105 -3
  127. package/dist/index192.cjs +1 -1
  128. package/dist/index192.js +3 -28
  129. package/dist/index193.cjs +1 -1
  130. package/dist/index193.js +5 -25
  131. package/dist/index194.cjs +1 -1
  132. package/dist/index194.js +3 -28
  133. package/dist/index195.cjs +1 -1
  134. package/dist/index195.js +17 -6
  135. package/dist/index196.cjs +1 -1
  136. package/dist/index196.js +5 -6
  137. package/dist/index197.cjs +1 -1
  138. package/dist/index197.js +8 -32
  139. package/dist/index198.cjs +1 -1
  140. package/dist/index198.js +104 -5
  141. package/dist/index199.cjs +1 -1
  142. package/dist/index199.js +5 -37
  143. package/dist/index200.cjs +1 -1
  144. package/dist/index200.js +6 -49
  145. package/dist/index201.cjs +1 -1
  146. package/dist/index201.js +25 -30
  147. package/dist/index202.cjs +1 -1
  148. package/dist/index202.js +34 -17
  149. package/dist/index203.cjs +1 -1
  150. package/dist/index203.js +13 -42
  151. package/dist/index204.cjs +1 -1
  152. package/dist/index204.js +74 -100
  153. package/dist/index205.cjs +1 -1
  154. package/dist/index205.js +2 -3
  155. package/dist/index206.cjs +1 -1
  156. package/dist/index206.js +17 -4
  157. package/dist/index207.cjs +1 -1
  158. package/dist/index207.js +171 -3
  159. package/dist/index208.cjs +1 -1
  160. package/dist/index208.js +17 -17
  161. package/dist/index209.cjs +1 -1
  162. package/dist/index209.js +10 -8
  163. package/dist/index210.cjs +1 -1
  164. package/dist/index210.js +25 -5
  165. package/dist/index211.cjs +1 -1
  166. package/dist/index211.js +18 -27
  167. package/dist/index212.cjs +1 -1
  168. package/dist/index212.js +15 -78
  169. package/dist/index213.cjs +1 -1
  170. package/dist/index213.js +6 -2
  171. package/dist/index214.cjs +1 -1
  172. package/dist/index214.js +13 -18
  173. package/dist/index215.cjs +1 -1
  174. package/dist/index215.js +10 -17
  175. package/dist/index216.cjs +1 -1
  176. package/dist/index216.js +16 -10
  177. package/dist/index217.cjs +1 -1
  178. package/dist/index217.js +1 -1
  179. package/dist/index22.cjs +1 -1
  180. package/dist/index22.js +8 -8
  181. package/dist/index220.cjs +2 -1
  182. package/dist/index220.js +40 -102
  183. package/dist/index221.cjs +1 -1
  184. package/dist/index221.js +2 -17
  185. package/dist/index222.cjs +1 -1
  186. package/dist/index222.js +5 -214
  187. package/dist/index223.cjs +1 -1
  188. package/dist/index223.js +8 -106
  189. package/dist/index224.cjs +1 -1
  190. package/dist/index224.js +17 -204
  191. package/dist/index225.cjs +1 -1
  192. package/dist/index225.js +8 -42
  193. package/dist/index226.cjs +1 -1
  194. package/dist/index226.js +62 -74
  195. package/dist/index227.cjs +1 -1
  196. package/dist/index227.js +66 -2
  197. package/dist/index228.cjs +1 -2
  198. package/dist/index228.js +187 -40
  199. package/dist/index229.cjs +1 -1
  200. package/dist/index229.js +29 -2
  201. package/dist/index230.cjs +1 -1
  202. package/dist/index230.js +76 -5
  203. package/dist/index231.cjs +1 -1
  204. package/dist/index231.js +39 -9
  205. package/dist/index232.cjs +1 -1
  206. package/dist/index232.js +14 -17
  207. package/dist/index233.cjs +1 -1
  208. package/dist/index233.js +13 -8
  209. package/dist/index234.cjs +1 -1
  210. package/dist/index234.js +11 -66
  211. package/dist/index235.cjs +1 -1
  212. package/dist/index235.js +11 -64
  213. package/dist/index236.cjs +1 -1
  214. package/dist/index236.js +18 -187
  215. package/dist/index237.cjs +1 -1
  216. package/dist/index237.js +106 -26
  217. package/dist/index238.cjs +1 -1
  218. package/dist/index238.js +98 -71
  219. package/dist/index239.cjs +1 -1
  220. package/dist/index239.js +6 -40
  221. package/dist/index240.cjs +1 -1
  222. package/dist/index240.js +7 -17
  223. package/dist/index241.cjs +1 -1
  224. package/dist/index241.js +25 -12
  225. package/dist/index242.cjs +1 -1
  226. package/dist/index242.js +16 -11
  227. package/dist/index243.cjs +1 -1
  228. package/dist/index243.js +212 -10
  229. package/dist/index244.cjs +1 -1
  230. package/dist/index244.js +206 -6
  231. package/dist/index245.cjs +1 -1
  232. package/dist/index245.js +43 -7
  233. package/dist/index246.cjs +1 -1
  234. package/dist/index246.js +74 -22
  235. package/dist/index247.cjs +1 -1
  236. package/dist/index247.js +2 -20
  237. package/dist/index25.cjs +1 -1
  238. package/dist/index25.js +2 -2
  239. package/dist/index252.cjs +1 -1
  240. package/dist/index252.js +68 -657
  241. package/dist/index253.cjs +1 -1
  242. package/dist/index253.js +634 -154
  243. package/dist/index254.cjs +1 -1
  244. package/dist/index254.js +176 -67
  245. package/dist/index26.cjs +1 -1
  246. package/dist/index26.js +4 -4
  247. package/dist/index28.cjs +1 -1
  248. package/dist/index28.js +1 -1
  249. package/dist/index3.cjs +1 -1
  250. package/dist/index3.js +24 -41
  251. package/dist/index30.cjs +1 -1
  252. package/dist/index30.js +6 -6
  253. package/dist/index35.cjs +1 -1
  254. package/dist/index35.js +1 -1
  255. package/dist/index37.cjs +1 -1
  256. package/dist/index37.js +8 -8
  257. package/dist/index38.cjs +1 -1
  258. package/dist/index38.js +1 -1
  259. package/dist/index39.cjs +1 -1
  260. package/dist/index39.js +1 -1
  261. package/dist/index40.cjs +1 -1
  262. package/dist/index40.js +2 -2
  263. package/dist/index42.cjs +1 -1
  264. package/dist/index42.js +2 -2
  265. package/dist/index43.cjs +1 -1
  266. package/dist/index43.js +1 -1
  267. package/dist/index47.cjs +1 -1
  268. package/dist/index47.js +4 -4
  269. package/dist/index48.cjs +1 -1
  270. package/dist/index48.js +3 -3
  271. package/dist/index49.cjs +1 -1
  272. package/dist/index49.js +3 -3
  273. package/dist/index51.cjs +1 -1
  274. package/dist/index51.js +6 -6
  275. package/dist/index54.cjs +1 -1
  276. package/dist/index54.js +1 -1
  277. package/dist/index58.cjs +1 -1
  278. package/dist/index58.js +1 -1
  279. package/dist/index62.cjs +1 -1
  280. package/dist/index62.js +2 -2
  281. package/dist/index63.cjs +1 -1
  282. package/dist/index63.js +2 -2
  283. package/dist/index65.cjs +1 -1
  284. package/dist/index65.js +2 -2
  285. package/dist/index67.cjs +1 -1
  286. package/dist/index67.js +1 -1
  287. package/dist/index75.cjs +1 -1
  288. package/dist/index75.js +4 -4
  289. package/dist/index78.cjs +1 -1
  290. package/dist/index78.js +3 -3
  291. package/dist/index81.cjs +1 -1
  292. package/dist/index81.js +2 -2
  293. package/dist/index90.cjs +1 -1
  294. package/dist/index90.js +1 -1
  295. package/dist/index93.cjs +1 -1
  296. package/dist/index93.js +1 -1
  297. package/dist/index95.cjs +1 -1
  298. package/dist/index95.js +2 -2
  299. package/dist/index96.cjs +1 -1
  300. package/dist/index96.js +1 -1
  301. package/dist/index97.cjs +1 -1
  302. package/dist/index97.js +5 -5
  303. package/dist/src/lib/utils.d.ts +0 -15
  304. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index2.cjs"),e=require("./index3.cjs"),t=require("./index4.cjs"),r=require("./index5.cjs"),i=require("./index6.cjs"),s=require("./index7.cjs"),n=require("./index8.cjs"),a=require("./index9.cjs"),c=require("./index10.cjs"),u=require("./index11.cjs"),y=require("./index12.cjs"),p=require("./index13.cjs"),h=require("./index14.cjs"),A=require("./index15.cjs"),k=require("./index16.cjs"),q=require("./index17.cjs");exports.ApiStatus=o.ApiStatus;exports.Authorization=e.Authorization;exports.Environment=e.Environment;exports.Network=e.Network;exports.add0x=e.add0x;exports.hasKeys=e.hasKeys;exports.hexToU128Array=e.hexToU128Array;exports.hexToU32Array=e.hexToU32Array;exports.parseJwt=e.parseJwt;exports.sleep=e.sleep;exports.trim0x=e.trim0x;exports.with0x=e.with0x;exports.checkAllowanceAndApprove=t.checkAllowanceAndApprove;exports.waitForTransactionReceipt=t.waitForTransactionReceipt;exports.Err=r.Err;exports.Ok=r.Ok;exports.Void=r.Void;exports.DigestKey=i.DigestKey;exports.executeWithTryCatch=s.executeWithTryCatch;exports.Url=n.Url;exports.AuthHeaderEnum=a.AuthHeaderEnum;exports.Siwe=c.Siwe;exports.ApiKey=u.ApiKey;exports.Passkey=y.Passkey;exports.PasskeyLogin=p.PasskeyLogin;exports.MemoryStorage=h.MemoryStorage;exports.StoreKeys=A.StoreKeys;exports.EventBroker=k.EventBroker;exports.Fetcher=q.Fetcher;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index2.cjs"),e=require("./index3.cjs"),t=require("./index4.cjs"),r=require("./index5.cjs"),i=require("./index6.cjs"),s=require("./index7.cjs"),n=require("./index8.cjs"),a=require("./index9.cjs"),c=require("./index10.cjs"),u=require("./index11.cjs"),y=require("./index12.cjs"),p=require("./index13.cjs"),h=require("./index14.cjs"),k=require("./index15.cjs"),q=require("./index16.cjs"),A=require("./index17.cjs");exports.ApiStatus=o.ApiStatus;exports.Authorization=e.Authorization;exports.Environment=e.Environment;exports.Network=e.Network;exports.add0x=e.add0x;exports.hasKeys=e.hasKeys;exports.hexToU32Array=e.hexToU32Array;exports.parseJwt=e.parseJwt;exports.sleep=e.sleep;exports.trim0x=e.trim0x;exports.with0x=e.with0x;exports.checkAllowanceAndApprove=t.checkAllowanceAndApprove;exports.waitForTransactionReceipt=t.waitForTransactionReceipt;exports.Err=r.Err;exports.Ok=r.Ok;exports.Void=r.Void;exports.DigestKey=i.DigestKey;exports.executeWithTryCatch=s.executeWithTryCatch;exports.Url=n.Url;exports.AuthHeaderEnum=a.AuthHeaderEnum;exports.Siwe=c.Siwe;exports.ApiKey=u.ApiKey;exports.Passkey=y.Passkey;exports.PasskeyLogin=p.PasskeyLogin;exports.MemoryStorage=h.MemoryStorage;exports.StoreKeys=k.StoreKeys;exports.EventBroker=q.EventBroker;exports.Fetcher=A.Fetcher;
package/dist/index.js CHANGED
@@ -1,47 +1,46 @@
1
1
  import { ApiStatus as o } from "./index2.js";
2
- import { Authorization as p, Environment as x, Network as m, add0x as a, hasKeys as f, hexToU128Array as i, hexToU32Array as s, parseJwt as n, sleep as h, trim0x as y, with0x as A } from "./index3.js";
3
- import { checkAllowanceAndApprove as k, waitForTransactionReceipt as w } from "./index4.js";
4
- import { Err as u, Ok as l, Void as E } from "./index5.js";
5
- import { DigestKey as S } from "./index6.js";
2
+ import { Authorization as p, Environment as x, Network as m, add0x as f, hasKeys as a, hexToU32Array as i, parseJwt as s, sleep as n, trim0x as h, with0x as y } from "./index3.js";
3
+ import { checkAllowanceAndApprove as A, waitForTransactionReceipt as k } from "./index4.js";
4
+ import { Err as d, Ok as u, Void as l } from "./index5.js";
5
+ import { DigestKey as K } from "./index6.js";
6
6
  import { executeWithTryCatch as g } from "./index7.js";
7
- import { Url as U } from "./index8.js";
7
+ import { Url as T } from "./index8.js";
8
8
  import { AuthHeaderEnum as P } from "./index9.js";
9
- import { Siwe as B } from "./index10.js";
10
- import { ApiKey as D } from "./index11.js";
11
- import { Passkey as J } from "./index12.js";
12
- import { PasskeyLogin as M } from "./index13.js";
13
- import { MemoryStorage as O } from "./index14.js";
14
- import { StoreKeys as V } from "./index15.js";
15
- import { EventBroker as b } from "./index16.js";
16
- import { Fetcher as q } from "./index17.js";
9
+ import { Siwe as z } from "./index10.js";
10
+ import { ApiKey as C } from "./index11.js";
11
+ import { Passkey as H } from "./index12.js";
12
+ import { PasskeyLogin as L } from "./index13.js";
13
+ import { MemoryStorage as N } from "./index14.js";
14
+ import { StoreKeys as R } from "./index15.js";
15
+ import { EventBroker as W } from "./index16.js";
16
+ import { Fetcher as j } from "./index17.js";
17
17
  export {
18
- D as ApiKey,
18
+ C as ApiKey,
19
19
  o as ApiStatus,
20
20
  P as AuthHeaderEnum,
21
21
  p as Authorization,
22
- S as DigestKey,
22
+ K as DigestKey,
23
23
  x as Environment,
24
- u as Err,
25
- b as EventBroker,
26
- q as Fetcher,
27
- O as MemoryStorage,
24
+ d as Err,
25
+ W as EventBroker,
26
+ j as Fetcher,
27
+ N as MemoryStorage,
28
28
  m as Network,
29
- l as Ok,
30
- J as Passkey,
31
- M as PasskeyLogin,
32
- B as Siwe,
33
- V as StoreKeys,
34
- U as Url,
35
- E as Void,
36
- a as add0x,
37
- k as checkAllowanceAndApprove,
29
+ u as Ok,
30
+ H as Passkey,
31
+ L as PasskeyLogin,
32
+ z as Siwe,
33
+ R as StoreKeys,
34
+ T as Url,
35
+ l as Void,
36
+ f as add0x,
37
+ A as checkAllowanceAndApprove,
38
38
  g as executeWithTryCatch,
39
- f as hasKeys,
40
- i as hexToU128Array,
41
- s as hexToU32Array,
42
- n as parseJwt,
43
- h as sleep,
44
- y as trim0x,
45
- w as waitForTransactionReceipt,
46
- A as with0x
39
+ a as hasKeys,
40
+ i as hexToU32Array,
41
+ s as parseJwt,
42
+ n as sleep,
43
+ h as trim0x,
44
+ k as waitForTransactionReceipt,
45
+ y as with0x
47
46
  };
package/dist/index102.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index148.cjs"),f=require("./index140.cjs"),a=require("./index150.cjs"),l=require("./index116.cjs"),A=require("./index149.cjs"),o=new l.LruMap(8192);function u(s,t){if(o.has(`${s}.${t}`))return o.get(`${s}.${t}`);const c=s.substring(2).toLowerCase(),n=a.keccak256(f.stringToBytes(c),"bytes"),r=c.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&r[e]&&(r[e]=r[e].toUpperCase()),(n[e>>1]&15)>=8&&r[e+1]&&(r[e+1]=r[e+1].toUpperCase());const i=`0x${r.join("")}`;return o.set(`${s}.${t}`,i),i}function g(s,t){if(!A.isAddress(s,{strict:!1}))throw new d.InvalidAddressError({address:s});return u(s,t)}exports.checksumAddress=u;exports.getAddress=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index150.cjs"),f=require("./index168.cjs"),a=require("./index178.cjs"),l=require("./index116.cjs"),A=require("./index174.cjs"),o=new l.LruMap(8192);function u(s,t){if(o.has(`${s}.${t}`))return o.get(`${s}.${t}`);const c=s.substring(2).toLowerCase(),n=a.keccak256(f.stringToBytes(c),"bytes"),r=c.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&r[e]&&(r[e]=r[e].toUpperCase()),(n[e>>1]&15)>=8&&r[e+1]&&(r[e+1]=r[e+1].toUpperCase());const i=`0x${r.join("")}`;return o.set(`${s}.${t}`,i),i}function g(s,t){if(!A.isAddress(s,{strict:!1}))throw new d.InvalidAddressError({address:s});return u(s,t)}exports.checksumAddress=u;exports.getAddress=g;
package/dist/index102.js CHANGED
@@ -1,8 +1,8 @@
1
- import { InvalidAddressError as c } from "./index148.js";
2
- import { stringToBytes as m } from "./index140.js";
3
- import { keccak256 as p } from "./index150.js";
1
+ import { InvalidAddressError as c } from "./index150.js";
2
+ import { stringToBytes as m } from "./index168.js";
3
+ import { keccak256 as p } from "./index178.js";
4
4
  import { LruMap as u } from "./index116.js";
5
- import { isAddress as $ } from "./index149.js";
5
+ import { isAddress as $ } from "./index174.js";
6
6
  const s = /* @__PURE__ */ new u(8192);
7
7
  function h(t, o) {
8
8
  if (s.has(`${t}.${o}`))
package/dist/index104.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index176.cjs"),O=require("./index151.cjs"),n=require("./index167.cjs");function p(i,e,s,{strict:f}={}){return O.isHex(i,{strict:!1})?l(i,e,s,{strict:f}):u(i,e,s,{strict:f})}function r(i,e){if(typeof e=="number"&&e>0&&e>n.size(i)-1)throw new t.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:n.size(i)})}function c(i,e,s){if(typeof e=="number"&&typeof s=="number"&&n.size(i)!==s-e)throw new t.SliceOffsetOutOfBoundsError({offset:s,position:"end",size:n.size(i)})}function u(i,e,s,{strict:f}={}){r(i,e);const o=i.slice(e,s);return f&&c(o,e,s),o}function l(i,e,s,{strict:f}={}){r(i,e);const o=`0x${i.replace("0x","").slice((e??0)*2,(s??i.length)*2)}`;return f&&c(o,e,s),o}exports.slice=p;exports.sliceBytes=u;exports.sliceHex=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index159.cjs"),O=require("./index181.cjs"),n=require("./index149.cjs");function p(i,e,s,{strict:f}={}){return O.isHex(i,{strict:!1})?l(i,e,s,{strict:f}):u(i,e,s,{strict:f})}function r(i,e){if(typeof e=="number"&&e>0&&e>n.size(i)-1)throw new t.SliceOffsetOutOfBoundsError({offset:e,position:"start",size:n.size(i)})}function c(i,e,s){if(typeof e=="number"&&typeof s=="number"&&n.size(i)!==s-e)throw new t.SliceOffsetOutOfBoundsError({offset:s,position:"end",size:n.size(i)})}function u(i,e,s,{strict:f}={}){r(i,e);const o=i.slice(e,s);return f&&c(o,e,s),o}function l(i,e,s,{strict:f}={}){r(i,e);const o=`0x${i.replace("0x","").slice((e??0)*2,(s??i.length)*2)}`;return f&&c(o,e,s),o}exports.slice=p;exports.sliceBytes=u;exports.sliceHex=l;
package/dist/index104.js CHANGED
@@ -1,6 +1,6 @@
1
- import { SliceOffsetOutOfBoundsError as t } from "./index176.js";
2
- import { isHex as p } from "./index151.js";
3
- import { size as r } from "./index167.js";
1
+ import { SliceOffsetOutOfBoundsError as t } from "./index159.js";
2
+ import { isHex as p } from "./index181.js";
3
+ import { size as r } from "./index149.js";
4
4
  function w(e, f, i, { strict: o } = {}) {
5
5
  return p(e, { strict: !1 }) ? u(e, f, i, {
6
6
  strict: o
package/dist/index111.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index148.cjs"),d=require("./index149.cjs");function t(s,r){if(!d.isAddress(s,{strict:!1}))throw new e.InvalidAddressError({address:s});if(!d.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return s.toLowerCase()===r.toLowerCase()}exports.isAddressEqual=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index150.cjs"),d=require("./index174.cjs");function t(s,r){if(!d.isAddress(s,{strict:!1}))throw new e.InvalidAddressError({address:s});if(!d.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return s.toLowerCase()===r.toLowerCase()}exports.isAddressEqual=t;
package/dist/index111.js CHANGED
@@ -1,5 +1,5 @@
1
- import { InvalidAddressError as e } from "./index148.js";
2
- import { isAddress as o } from "./index149.js";
1
+ import { InvalidAddressError as e } from "./index150.js";
2
+ import { isAddress as o } from "./index174.js";
3
3
  function i(r, s) {
4
4
  if (!o(r, { strict: !1 }))
5
5
  throw new e({ address: r });
package/dist/index112.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index140.cjs"),l=require("./index42.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index168.cjs"),l=require("./index42.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/index112.js CHANGED
@@ -1,4 +1,4 @@
1
- import { hexToBytes as i } from "./index140.js";
1
+ import { hexToBytes as i } from "./index168.js";
2
2
  import { bytesToHex as f } from "./index42.js";
3
3
  function y(o) {
4
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 = [];
package/dist/index113.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index140.cjs"),y=require("./index42.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index168.cjs"),y=require("./index42.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/index113.js CHANGED
@@ -1,4 +1,4 @@
1
- import { hexToBytes as b } from "./index140.js";
1
+ import { hexToBytes as b } from "./index168.js";
2
2
  import { bytesToHex as y } from "./index42.js";
3
3
  function h(t) {
4
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 = [];
package/dist/index114.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index195.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index182.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/index114.js CHANGED
@@ -1,4 +1,4 @@
1
- import { commitmentToVersionedHash as i } from "./index195.js";
1
+ import { commitmentToVersionedHash as i } from "./index182.js";
2
2
  function r(o) {
3
3
  const { commitments: t, version: n } = o, e = o.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
4
4
  for (const m of t)
package/dist/index115.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index112.cjs"),m=require("./index113.cjs"),u=require("./index197.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index112.cjs"),m=require("./index113.cjs"),u=require("./index184.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/index115.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { blobsToCommitments as f } from "./index112.js";
2
2
  import { blobsToProofs as l } from "./index113.js";
3
- import { toBlobs as p } from "./index197.js";
3
+ import { toBlobs as p } from "./index184.js";
4
4
  function k(t) {
5
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
6
  for (let o = 0; o < s.length; o++)
package/dist/index132.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index95.cjs"),E=require("./index148.cjs"),b=require("./index181.cjs"),z=require("./index149.cjs"),d=require("./index167.cjs"),T=require("./index42.cjs"),h=require("./index191.cjs"),w=require("./index91.cjs");function P(e){const{domain:i,message:y,primaryType:n,types:t}=e,a=(g,l)=>{const s={...l};for(const r of g){const{name:o,type:f}=r;f==="address"&&(s[o]=s[o].toLowerCase())}return s},u=t.EIP712Domain?i?a(t.EIP712Domain,i):{}:{},p=(()=>{if(n!=="EIP712Domain")return a(t[n],y)})();return w.stringify({domain:u,message:p,primaryType:n,types:t})}function q(e){const{domain:i,message:y,primaryType:n,types:t}=e,a=(u,p)=>{for(const g of u){const{name:l,type:s}=g,r=p[l],o=s.match(h.integerRegex);if(o&&(typeof r=="number"||typeof r=="bigint")){const[D,c,v]=o;T.numberToHex(r,{signed:c==="int",size:Number.parseInt(v,10)/8})}if(s==="address"&&typeof r=="string"&&!z.isAddress(r))throw new E.InvalidAddressError({address:r});const f=s.match(h.bytesRegex);if(f){const[D,c]=f;if(c&&d.size(r)!==Number.parseInt(c,10))throw new m.BytesSizeMismatchError({expectedSize:Number.parseInt(c,10),givenSize:d.size(r)})}const I=t[s];I&&(S(s),a(I,r))}};if(t.EIP712Domain&&i){if(typeof i!="object")throw new b.InvalidDomainError({domain:i});a(t.EIP712Domain,i)}if(n!=="EIP712Domain")if(t[n])a(t[n],y);else throw new b.InvalidPrimaryTypeError({primaryType:n,types:t})}function x({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function S(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new b.InvalidStructTypeError({type:e})}exports.getTypesForEIP712Domain=x;exports.serializeTypedData=P;exports.validateTypedData=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index95.cjs"),E=require("./index150.cjs"),b=require("./index164.cjs"),z=require("./index174.cjs"),d=require("./index149.cjs"),T=require("./index42.cjs"),h=require("./index176.cjs"),w=require("./index91.cjs");function P(e){const{domain:i,message:y,primaryType:n,types:t}=e,a=(g,l)=>{const s={...l};for(const r of g){const{name:o,type:f}=r;f==="address"&&(s[o]=s[o].toLowerCase())}return s},u=t.EIP712Domain?i?a(t.EIP712Domain,i):{}:{},p=(()=>{if(n!=="EIP712Domain")return a(t[n],y)})();return w.stringify({domain:u,message:p,primaryType:n,types:t})}function q(e){const{domain:i,message:y,primaryType:n,types:t}=e,a=(u,p)=>{for(const g of u){const{name:l,type:s}=g,r=p[l],o=s.match(h.integerRegex);if(o&&(typeof r=="number"||typeof r=="bigint")){const[D,c,v]=o;T.numberToHex(r,{signed:c==="int",size:Number.parseInt(v,10)/8})}if(s==="address"&&typeof r=="string"&&!z.isAddress(r))throw new E.InvalidAddressError({address:r});const f=s.match(h.bytesRegex);if(f){const[D,c]=f;if(c&&d.size(r)!==Number.parseInt(c,10))throw new m.BytesSizeMismatchError({expectedSize:Number.parseInt(c,10),givenSize:d.size(r)})}const I=t[s];I&&(S(s),a(I,r))}};if(t.EIP712Domain&&i){if(typeof i!="object")throw new b.InvalidDomainError({domain:i});a(t.EIP712Domain,i)}if(n!=="EIP712Domain")if(t[n])a(t[n],y);else throw new b.InvalidPrimaryTypeError({primaryType:n,types:t})}function x({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function S(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new b.InvalidStructTypeError({type:e})}exports.getTypesForEIP712Domain=x;exports.serializeTypedData=P;exports.validateTypedData=q;
package/dist/index132.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { BytesSizeMismatchError as v } from "./index95.js";
2
- import { InvalidAddressError as D } from "./index148.js";
3
- import { InvalidDomainError as E, InvalidPrimaryTypeError as w, InvalidStructTypeError as z } from "./index181.js";
4
- import { isAddress as P } from "./index149.js";
5
- import { size as h } from "./index167.js";
2
+ import { InvalidAddressError as D } from "./index150.js";
3
+ import { InvalidDomainError as E, InvalidPrimaryTypeError as w, InvalidStructTypeError as z } from "./index164.js";
4
+ import { isAddress as P } from "./index174.js";
5
+ import { size as h } from "./index149.js";
6
6
  import { numberToHex as T } from "./index42.js";
7
- import { integerRegex as d, bytesRegex as _ } from "./index191.js";
7
+ import { integerRegex as d, bytesRegex as _ } from "./index176.js";
8
8
  import { stringify as x } from "./index91.js";
9
9
  function F(e) {
10
10
  const { domain: i, message: p, primaryType: n, types: t } = e, o = (u, g) => {
package/dist/index138.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index139.cjs"),n=require("./index65.cjs"),a=require("./index140.cjs");function g({r:i,s:o,to:u="hex",v:e,yParity:r}){const s=(()=>{if(r===0||r===1)return r;if(e&&(e===27n||e===28n||e>=35n))return e%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),t=`0x${new c.secp256k1.Signature(n.hexToBigInt(i),n.hexToBigInt(o)).toCompactHex()}${s===0?"1b":"1c"}`;return u==="hex"?t:a.hexToBytes(t)}exports.serializeSignature=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index32.cjs"),j=require("./index139.cjs");function q(n){const{batch:a,chain:e,ccipRead:d,key:b="base",name:f="Base Client",type:g="base"}=n,o=n.experimental_blockTag??(typeof(e==null?void 0:e.experimental_preconfirmationTime)=="number"?"pending":void 0),m=(e==null?void 0:e.blockTime)??12e3,p=Math.min(Math.max(Math.floor(m/2),500),4e3),t=n.pollingInterval??p,x=n.cacheTime??t,i=n.account?h.parseAccount(n.account):void 0,{config:T,request:k,value:y}=n.transport({account:i,chain:e,pollingInterval:t}),v={...T,...y},c={account:i,batch:a,cacheTime:x,ccipRead:d,chain:e,key:b,name:f,pollingInterval:t,request:k,transport:v,type:g,uid:j.uid(),...o?{experimental_blockTag:o}:{}};function l(u){return _=>{const r=_(u);for(const M in c)delete r[M];const s={...u,...r};return Object.assign(s,{extend:l(s)})}}return Object.assign(c,{extend:l(c)})}exports.createClient=q;
package/dist/index138.js CHANGED
@@ -1,16 +1,36 @@
1
- import { secp256k1 as f } from "./index139.js";
2
- import { hexToBigInt as t } from "./index65.js";
3
- import { hexToBytes as m } from "./index140.js";
4
- function s({ r: o, s: i, to: u = "hex", v: r, yParity: e }) {
5
- const a = (() => {
6
- if (e === 0 || e === 1)
7
- return e;
8
- if (r && (r === 27n || r === 28n || r >= 35n))
9
- return r % 2n === 0n ? 1 : 0;
10
- throw new Error("Invalid `v` or `yParity` value");
11
- })(), n = `0x${new f.Signature(t(o), t(i)).toCompactHex()}${a === 0 ? "1b" : "1c"}`;
12
- return u === "hex" ? n : m(n);
1
+ import { parseAccount as I } from "./index32.js";
2
+ import { uid as M } from "./index139.js";
3
+ function O(e) {
4
+ const { batch: a, chain: n, ccipRead: d, key: f = "base", name: m = "Base Client", type: b = "base" } = e, c = e.experimental_blockTag ?? (typeof (n == null ? void 0 : n.experimental_preconfirmationTime) == "number" ? "pending" : void 0), p = (n == null ? void 0 : n.blockTime) ?? 12e3, g = Math.min(Math.max(Math.floor(p / 2), 500), 4e3), t = e.pollingInterval ?? g, x = e.cacheTime ?? t, i = e.account ? I(e.account) : void 0, { config: T, request: k, value: _ } = e.transport({
5
+ account: i,
6
+ chain: n,
7
+ pollingInterval: t
8
+ }), v = { ...T, ..._ }, o = {
9
+ account: i,
10
+ batch: a,
11
+ cacheTime: x,
12
+ ccipRead: d,
13
+ chain: n,
14
+ key: f,
15
+ name: m,
16
+ pollingInterval: t,
17
+ request: k,
18
+ transport: v,
19
+ type: b,
20
+ uid: M(),
21
+ ...c ? { experimental_blockTag: c } : {}
22
+ };
23
+ function l(r) {
24
+ return (y) => {
25
+ const s = y(r);
26
+ for (const h in o)
27
+ delete s[h];
28
+ const u = { ...r, ...s };
29
+ return Object.assign(u, { extend: l(u) });
30
+ };
31
+ }
32
+ return Object.assign(o, { extend: l(o) });
13
33
  }
14
34
  export {
15
- s as serializeSignature
35
+ O as createClient
16
36
  };
package/dist/index139.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index220.cjs"),C=require("./index221.cjs"),n=require("./index222.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const k=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),x=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),G=BigInt(0),M=BigInt(1),w=BigInt(2),h=(t,f)=>(t+f/w)/f;function N(t){const f=k,e=BigInt(3),r=BigInt(6),p=BigInt(11),a=BigInt(22),s=BigInt(23),i=BigInt(44),d=BigInt(88),o=t*t*t%f,c=o*o*t%f,g=n.pow2(c,e,f)*c%f,b=n.pow2(g,e,f)*c%f,l=n.pow2(b,w,f)*o%f,B=n.pow2(l,p,f)*l%f,I=n.pow2(B,a,f)*B%f,_=n.pow2(I,i,f)*I%f,m=n.pow2(_,d,f)*_%f,S=n.pow2(m,i,f)*I%f,P=n.pow2(S,e,f)*c%f,v=n.pow2(P,s,f)*B%f,E=n.pow2(v,r,f)*o%f,q=n.pow2(E,w,f);if(!u.eql(u.sqr(q),t))throw new Error("Cannot find square root");return q}const u=n.Field(k,void 0,void 0,{sqrt:N}),O=C.createCurve({a:G,b:BigInt(7),Fp:u,n:x,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const f=x,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-M*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),p=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=e,s=BigInt("0x100000000000000000000000000000000"),i=h(a*t,f),d=h(-r*t,f);let o=n.mod(t-i*e-d*p,f),c=n.mod(-i*r-d*a,f);const g=o>s,b=c>s;if(g&&(o=f-o),b&&(c=f-c),o>s||c>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:g,k1:o,k2neg:b,k2:c}}}},F.sha256);exports.secp256k1=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=256;let t=i,e;function u(r=11){if(!e||t+r>i*2){e="",t=0;for(let n=0;n<i;n++)e+=(256+Math.random()*256|0).toString(16).substring(1)}return e.substring(t,t+++r)}exports.uid=u;
package/dist/index139.js CHANGED
@@ -1,37 +1,12 @@
1
- import { sha256 as C } from "./index220.js";
2
- import { createCurve as G } from "./index221.js";
3
- import { Field as N, mod as k, pow2 as t } from "./index222.js";
4
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5
- const q = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), w = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), M = BigInt(0), O = BigInt(1), _ = BigInt(2), h = (n, f) => (n + f / _) / f;
6
- function W(n) {
7
- const f = q, e = BigInt(3), r = BigInt(6), B = BigInt(11), a = BigInt(22), s = BigInt(23), i = BigInt(44), g = BigInt(88), o = n * n * n % f, c = o * o * n % f, d = t(c, e, f) * c % f, b = t(d, e, f) * c % f, m = t(b, _, f) * o % f, I = t(m, B, f) * m % f, p = t(I, a, f) * I % f, x = t(p, i, f) * p % f, E = t(x, g, f) * x % f, F = t(E, i, f) * p % f, P = t(F, e, f) * c % f, S = t(P, s, f) * I % f, v = t(S, r, f) * o % f, u = t(v, _, f);
8
- if (!l.eql(l.sqr(u), n))
9
- throw new Error("Cannot find square root");
10
- return u;
11
- }
12
- const l = N(q, void 0, void 0, { sqrt: W }), D = G({
13
- a: M,
14
- b: BigInt(7),
15
- Fp: l,
16
- n: w,
17
- Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),
18
- Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),
19
- h: BigInt(1),
20
- lowS: !0,
21
- // Allow only low-S signatures by default in sign() and verify()
22
- endo: {
23
- // Endomorphism, see above
24
- beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
25
- splitScalar: (n) => {
26
- const f = w, e = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), r = -O * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), B = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), a = e, s = BigInt("0x100000000000000000000000000000000"), i = h(a * n, f), g = h(-r * n, f);
27
- let o = k(n - i * e - g * B, f), c = k(-i * r - g * a, f);
28
- const d = o > s, b = c > s;
29
- if (d && (o = f - o), b && (c = f - c), o > s || c > s)
30
- throw new Error("splitScalar: Endomorphism failed, k=" + n);
31
- return { k1neg: d, k1: o, k2neg: b, k2: c };
32
- }
1
+ let i = 256, t;
2
+ function s(e = 11) {
3
+ if (!t || i + e > 256 * 2) {
4
+ t = "", i = 0;
5
+ for (let r = 0; r < 256; r++)
6
+ t += (256 + Math.random() * 256 | 0).toString(16).substring(1);
33
7
  }
34
- }, C);
8
+ return t.substring(i, i++ + e);
9
+ }
35
10
  export {
36
- D as secp256k1
11
+ s as uid
37
12
  };
package/dist/index140.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index35.cjs"),l=require("./index151.cjs"),u=require("./index190.cjs"),f=require("./index65.cjs"),m=require("./index42.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 r=require("./index66.cjs"),a=require("./index69.cjs"),t=require("./index98.cjs"),n=require("./index99.cjs"),i=require("./index101.cjs"),o=require("./index103.cjs"),u=require("./index107.cjs"),c=require("./index108.cjs"),d=require("./index109.cjs"),q=require("./index64.cjs"),C=require("./index118.cjs"),g=require("./index119.cjs"),w=require("./index106.cjs"),T=require("./index121.cjs"),h=require("./index123.cjs"),S=require("./index124.cjs"),l=require("./index100.cjs"),p=require("./index126.cjs"),y=require("./index127.cjs"),A=require("./index128.cjs"),R=require("./index129.cjs"),m=require("./index130.cjs"),P=require("./index131.cjs"),z=require("./index133.cjs"),b=require("./index122.cjs"),f=require("./index135.cjs"),M=require("./index136.cjs"),D=require("./index137.cjs");function F(e){return{addChain:s=>t.addChain(e,s),deployContract:s=>n.deployContract(e,s),fillTransaction:s=>r.fillTransaction(e,s),getAddresses:()=>i.getAddresses(e),getCallsStatus:s=>o.getCallsStatus(e,s),getCapabilities:s=>u.getCapabilities(e,s),getChainId:()=>a.getChainId(e),getPermissions:()=>c.getPermissions(e),prepareAuthorization:s=>d.prepareAuthorization(e,s),prepareTransactionRequest:s=>q.prepareTransactionRequest(e,s),requestAddresses:()=>C.requestAddresses(e),requestPermissions:s=>g.requestPermissions(e,s),sendCalls:s=>w.sendCalls(e,s),sendCallsSync:s=>T.sendCallsSync(e,s),sendRawTransaction:s=>h.sendRawTransaction(e,s),sendRawTransactionSync:s=>S.sendRawTransactionSync(e,s),sendTransaction:s=>l.sendTransaction(e,s),sendTransactionSync:s=>p.sendTransactionSync(e,s),showCallsStatus:s=>y.showCallsStatus(e,s),signAuthorization:s=>A.signAuthorization(e,s),signMessage:s=>R.signMessage(e,s),signTransaction:s=>m.signTransaction(e,s),signTypedData:s=>P.signTypedData(e,s),switchChain:s=>z.switchChain(e,s),waitForCallsStatus:s=>b.waitForCallsStatus(e,s),watchAsset:s=>f.watchAsset(e,s),writeContract:s=>M.writeContract(e,s),writeContractSync:s=>D.writeContractSync(e,s)}}exports.walletActions=F;
package/dist/index140.js CHANGED
@@ -1,58 +1,63 @@
1
- import { BaseError as g } from "./index35.js";
2
- import { isHex as x } from "./index151.js";
3
- import { pad as s } from "./index190.js";
4
- import { assertSize as u } from "./index65.js";
5
- import { numberToHex as h } from "./index42.js";
6
- const A = /* @__PURE__ */ new TextEncoder();
7
- function F(e, n = {}) {
8
- return typeof e == "number" || typeof e == "bigint" ? T(e, n) : typeof e == "boolean" ? B(e, n) : x(e) ? y(e, n) : l(e, n);
9
- }
10
- function B(e, n = {}) {
11
- const r = new Uint8Array(1);
12
- return r[0] = Number(e), typeof n.size == "number" ? (u(r, { size: n.size }), s(r, { size: n.size })) : r;
13
- }
14
- const t = {
15
- zero: 48,
16
- nine: 57,
17
- A: 65,
18
- F: 70,
19
- a: 97,
20
- f: 102
21
- };
22
- function m(e) {
23
- if (e >= t.zero && e <= t.nine)
24
- return e - t.zero;
25
- if (e >= t.A && e <= t.F)
26
- return e - (t.A - 10);
27
- if (e >= t.a && e <= t.f)
28
- return e - (t.a - 10);
29
- }
30
- function y(e, n = {}) {
31
- let r = e;
32
- n.size && (u(r, { size: n.size }), r = s(r, { dir: "right", size: n.size }));
33
- let i = r.slice(2);
34
- i.length % 2 && (i = `0${i}`);
35
- const z = i.length / 2, d = new Uint8Array(z);
36
- for (let f = 0, o = 0; f < z; f++) {
37
- const b = m(i.charCodeAt(o++)), c = m(i.charCodeAt(o++));
38
- if (b === void 0 || c === void 0)
39
- throw new g(`Invalid byte sequence ("${i[o - 2]}${i[o - 1]}" in "${i}").`);
40
- d[f] = b * 16 + c;
41
- }
42
- return d;
43
- }
44
- function T(e, n) {
45
- const r = h(e, n);
46
- return y(r);
47
- }
48
- function l(e, n = {}) {
49
- const r = A.encode(e);
50
- return typeof n.size == "number" ? (u(r, { size: n.size }), s(r, { dir: "right", size: n.size })) : r;
1
+ import { fillTransaction as s } from "./index66.js";
2
+ import { getChainId as a } from "./index69.js";
3
+ import { addChain as t } from "./index98.js";
4
+ import { deployContract as i } from "./index99.js";
5
+ import { getAddresses as m } from "./index101.js";
6
+ import { getCallsStatus as n } from "./index103.js";
7
+ import { getCapabilities as e } from "./index107.js";
8
+ import { getPermissions as p } from "./index108.js";
9
+ import { prepareAuthorization as f } from "./index109.js";
10
+ import { prepareTransactionRequest as d } from "./index64.js";
11
+ import { requestAddresses as C } from "./index118.js";
12
+ import { requestPermissions as g } from "./index119.js";
13
+ import { sendCalls as u } from "./index106.js";
14
+ import { sendCallsSync as w } from "./index121.js";
15
+ import { sendRawTransaction as h } from "./index123.js";
16
+ import { sendRawTransactionSync as T } from "./index124.js";
17
+ import { sendTransaction as S } from "./index100.js";
18
+ import { sendTransactionSync as y } from "./index126.js";
19
+ import { showCallsStatus as A } from "./index127.js";
20
+ import { signAuthorization as c } from "./index128.js";
21
+ import { signMessage as q } from "./index129.js";
22
+ import { signTransaction as R } from "./index130.js";
23
+ import { signTypedData as z } from "./index131.js";
24
+ import { switchChain as P } from "./index133.js";
25
+ import { waitForCallsStatus as l } from "./index122.js";
26
+ import { watchAsset as b } from "./index135.js";
27
+ import { writeContract as D } from "./index136.js";
28
+ import { writeContractSync as F } from "./index137.js";
29
+ function tr(o) {
30
+ return {
31
+ addChain: (r) => t(o, r),
32
+ deployContract: (r) => i(o, r),
33
+ fillTransaction: (r) => s(o, r),
34
+ getAddresses: () => m(o),
35
+ getCallsStatus: (r) => n(o, r),
36
+ getCapabilities: (r) => e(o, r),
37
+ getChainId: () => a(o),
38
+ getPermissions: () => p(o),
39
+ prepareAuthorization: (r) => f(o, r),
40
+ prepareTransactionRequest: (r) => d(o, r),
41
+ requestAddresses: () => C(o),
42
+ requestPermissions: (r) => g(o, r),
43
+ sendCalls: (r) => u(o, r),
44
+ sendCallsSync: (r) => w(o, r),
45
+ sendRawTransaction: (r) => h(o, r),
46
+ sendRawTransactionSync: (r) => T(o, r),
47
+ sendTransaction: (r) => S(o, r),
48
+ sendTransactionSync: (r) => y(o, r),
49
+ showCallsStatus: (r) => A(o, r),
50
+ signAuthorization: (r) => c(o, r),
51
+ signMessage: (r) => q(o, r),
52
+ signTransaction: (r) => R(o, r),
53
+ signTypedData: (r) => z(o, r),
54
+ switchChain: (r) => P(o, r),
55
+ waitForCallsStatus: (r) => l(o, r),
56
+ watchAsset: (r) => b(o, r),
57
+ writeContract: (r) => D(o, r),
58
+ writeContractSync: (r) => F(o, r)
59
+ };
51
60
  }
52
61
  export {
53
- B as boolToBytes,
54
- y as hexToBytes,
55
- T as numberToBytes,
56
- l as stringToBytes,
57
- F as toBytes
62
+ tr as walletActions
58
63
  };
package/dist/index141.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index148.cjs"),t=require("./index149.cjs");function i(s){if(typeof s=="string"){if(!t.isAddress(s,{strict:!1}))throw new n.InvalidAddressError({address:s});return{address:s,type:"json-rpc"}}if(!t.isAddress(s.address,{strict:!1}))throw new n.InvalidAddressError({address:s.address});return{address:s.address,nonceManager:s.nonceManager,sign:s.sign,signAuthorization:s.signAuthorization,signMessage:s.signMessage,signTransaction:s.signTransaction,signTypedData:s.signTypedData,source:"custom",type:"local"}}exports.toAccount=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index142.cjs"),b=require("./index139.cjs");function l({key:r,methods:e,name:n,request:u,retryCount:i=3,retryDelay:t=150,timeout:c,type:o},s){const d=b.uid();return{config:{key:r,methods:e,name:n,request:u,retryCount:i,retryDelay:t,timeout:c,type:o},request:a.buildRequest(u,{methods:e,retryCount:i,retryDelay:t,uid:d}),value:s}}exports.createTransport=l;
package/dist/index141.js CHANGED
@@ -1,28 +1,22 @@
1
- import { InvalidAddressError as s } from "./index148.js";
2
- import { isAddress as a } from "./index149.js";
3
- function r(n) {
4
- if (typeof n == "string") {
5
- if (!a(n, { strict: !1 }))
6
- throw new s({ address: n });
7
- return {
8
- address: n,
9
- type: "json-rpc"
10
- };
11
- }
12
- if (!a(n.address, { strict: !1 }))
13
- throw new s({ address: n.address });
1
+ import { buildRequest as m } from "./index142.js";
2
+ import { uid as e } from "./index139.js";
3
+ function b({ key: n, methods: i, name: t, request: o, retryCount: r = 3, retryDelay: u = 150, timeout: c, type: f }, p) {
4
+ const d = e();
14
5
  return {
15
- address: n.address,
16
- nonceManager: n.nonceManager,
17
- sign: n.sign,
18
- signAuthorization: n.signAuthorization,
19
- signMessage: n.signMessage,
20
- signTransaction: n.signTransaction,
21
- signTypedData: n.signTypedData,
22
- source: "custom",
23
- type: "local"
6
+ config: {
7
+ key: n,
8
+ methods: i,
9
+ name: t,
10
+ request: o,
11
+ retryCount: r,
12
+ retryDelay: u,
13
+ timeout: c,
14
+ type: f
15
+ },
16
+ request: m(o, { methods: i, retryCount: r, retryDelay: u, uid: d }),
17
+ value: p
24
18
  };
25
19
  }
26
20
  export {
27
- r as toAccount
21
+ b as createTransport
28
22
  };
package/dist/index142.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index102.cjs"),c=require("./index150.cjs");function t(e){const s=c.keccak256(`0x${e.substring(4)}`).substring(26);return r.checksumAddress(`0x${s}`)}exports.publicKeyToAddress=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("./index35.cjs"),p=require("./index143.cjs"),e=require("./index96.cjs"),I=require("./index42.cjs"),q=require("./index234.cjs"),m=require("./index90.cjs"),v=require("./index91.cjs");function N(t,E={}){return async(c,h={})=>{var i;const{dedupe:s=!1,methods:o,retryDelay:R=150,retryCount:l=3,uid:f}={...E,...h},{method:d}=c;if((i=o==null?void 0:o.exclude)!=null&&i.includes(d))throw new e.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(o!=null&&o.include&&!o.include.includes(d))throw new e.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});const y=s?I.stringToHex(`${f}.${v.stringify(c)}`):void 0;return q.withDedupe(()=>m.withRetry(async()=>{try{return await t(c)}catch(n){const r=n;switch(r.code){case e.ParseRpcError.code:throw new e.ParseRpcError(r);case e.InvalidRequestRpcError.code:throw new e.InvalidRequestRpcError(r);case e.MethodNotFoundRpcError.code:throw new e.MethodNotFoundRpcError(r,{method:c.method});case e.InvalidParamsRpcError.code:throw new e.InvalidParamsRpcError(r);case e.InternalRpcError.code:throw new e.InternalRpcError(r);case e.InvalidInputRpcError.code:throw new e.InvalidInputRpcError(r);case e.ResourceNotFoundRpcError.code:throw new e.ResourceNotFoundRpcError(r);case e.ResourceUnavailableRpcError.code:throw new e.ResourceUnavailableRpcError(r);case e.TransactionRejectedRpcError.code:throw new e.TransactionRejectedRpcError(r);case e.MethodNotSupportedRpcError.code:throw new e.MethodNotSupportedRpcError(r,{method:c.method});case e.LimitExceededRpcError.code:throw new e.LimitExceededRpcError(r);case e.JsonRpcVersionUnsupportedError.code:throw new e.JsonRpcVersionUnsupportedError(r);case e.UserRejectedRequestError.code:throw new e.UserRejectedRequestError(r);case e.UnauthorizedProviderError.code:throw new e.UnauthorizedProviderError(r);case e.UnsupportedProviderMethodError.code:throw new e.UnsupportedProviderMethodError(r);case e.ProviderDisconnectedError.code:throw new e.ProviderDisconnectedError(r);case e.ChainDisconnectedError.code:throw new e.ChainDisconnectedError(r);case e.SwitchChainError.code:throw new e.SwitchChainError(r);case e.UnsupportedNonOptionalCapabilityError.code:throw new e.UnsupportedNonOptionalCapabilityError(r);case e.UnsupportedChainIdError.code:throw new e.UnsupportedChainIdError(r);case e.DuplicateIdError.code:throw new e.DuplicateIdError(r);case e.UnknownBundleIdError.code:throw new e.UnknownBundleIdError(r);case e.BundleTooLargeError.code:throw new e.BundleTooLargeError(r);case e.AtomicReadyWalletRejectedUpgradeError.code:throw new e.AtomicReadyWalletRejectedUpgradeError(r);case e.AtomicityNotSupportedError.code:throw new e.AtomicityNotSupportedError(r);case 5e3:throw new e.UserRejectedRequestError(r);default:throw n instanceof U.BaseError?n:new e.UnknownRpcError(r)}}},{delay:({count:n,error:r})=>{var a;if(r&&r instanceof p.HttpRequestError){const u=(a=r==null?void 0:r.headers)==null?void 0:a.get("Retry-After");if(u!=null&&u.match(/\d/))return Number.parseInt(u,10)*1e3}return~~(1<<n)*R},retryCount:l,shouldRetry:({error:n})=>w(n)}),{enabled:s,id:y})}}function w(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===e.LimitExceededRpcError.code||t.code===e.InternalRpcError.code:t instanceof p.HttpRequestError&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}exports.buildRequest=N;exports.shouldRetry=w;