viem 2.53.1 → 2.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/_cjs/actions/index.js +3 -2
  3. package/_cjs/actions/index.js.map +1 -1
  4. package/_cjs/actions/token/approve.js +62 -0
  5. package/_cjs/actions/token/approve.js.map +1 -0
  6. package/_cjs/actions/token/approveSync.js +25 -0
  7. package/_cjs/actions/token/approveSync.js.map +1 -0
  8. package/_cjs/actions/token/getAllowance.js +32 -0
  9. package/_cjs/actions/token/getAllowance.js.map +1 -0
  10. package/_cjs/actions/token/getBalance.js +41 -0
  11. package/_cjs/actions/token/getBalance.js.map +1 -0
  12. package/_cjs/actions/token/getMetadata.js +40 -0
  13. package/_cjs/actions/token/getMetadata.js.map +1 -0
  14. package/_cjs/actions/token/getTotalSupply.js +32 -0
  15. package/_cjs/actions/token/getTotalSupply.js.map +1 -0
  16. package/_cjs/actions/token/index.js +20 -0
  17. package/_cjs/actions/token/index.js.map +1 -0
  18. package/_cjs/actions/token/internal.js +125 -0
  19. package/_cjs/actions/token/internal.js.map +1 -0
  20. package/_cjs/actions/token/transfer.js +70 -0
  21. package/_cjs/actions/token/transfer.js.map +1 -0
  22. package/_cjs/actions/token/transferSync.js +25 -0
  23. package/_cjs/actions/token/transferSync.js.map +1 -0
  24. package/_cjs/chains/definitions/battlechain.js +31 -0
  25. package/_cjs/chains/definitions/battlechain.js.map +1 -0
  26. package/_cjs/chains/definitions/marooTestnet.js +30 -0
  27. package/_cjs/chains/definitions/marooTestnet.js.map +1 -0
  28. package/_cjs/chains/index.js +18 -14
  29. package/_cjs/chains/index.js.map +1 -1
  30. package/_cjs/clients/createClient.js +39 -1
  31. package/_cjs/clients/createClient.js.map +1 -1
  32. package/_cjs/clients/createPublicClient.js.map +1 -1
  33. package/_cjs/clients/createWalletClient.js.map +1 -1
  34. package/_cjs/clients/decorators/public.js +11 -0
  35. package/_cjs/clients/decorators/public.js.map +1 -1
  36. package/_cjs/clients/decorators/wallet.js +8 -0
  37. package/_cjs/clients/decorators/wallet.js.map +1 -1
  38. package/_cjs/clients/transports/http.js +2 -1
  39. package/_cjs/clients/transports/http.js.map +1 -1
  40. package/_cjs/errors/encoding.js +9 -1
  41. package/_cjs/errors/encoding.js.map +1 -1
  42. package/_cjs/errors/request.js +24 -1
  43. package/_cjs/errors/request.js.map +1 -1
  44. package/_cjs/errors/transaction.js +9 -1
  45. package/_cjs/errors/transaction.js.map +1 -1
  46. package/_cjs/errors/version.js +1 -1
  47. package/_cjs/index.js +9 -6
  48. package/_cjs/index.js.map +1 -1
  49. package/_cjs/tempo/Client.js.map +1 -1
  50. package/_cjs/tempo/Decorator.js +234 -215
  51. package/_cjs/tempo/Decorator.js.map +1 -1
  52. package/_cjs/tempo/actions/token.js +210 -112
  53. package/_cjs/tempo/actions/token.js.map +1 -1
  54. package/_cjs/tempo/internal/utils.js +108 -0
  55. package/_cjs/tempo/internal/utils.js.map +1 -1
  56. package/_cjs/tokens/defineToken.js +21 -0
  57. package/_cjs/tokens/defineToken.js.map +1 -0
  58. package/_cjs/tokens/definitions/alphausd.js +14 -0
  59. package/_cjs/tokens/definitions/alphausd.js.map +1 -0
  60. package/_cjs/tokens/definitions/betausd.js +14 -0
  61. package/_cjs/tokens/definitions/betausd.js.map +1 -0
  62. package/_cjs/tokens/definitions/brla.js +14 -0
  63. package/_cjs/tokens/definitions/brla.js.map +1 -0
  64. package/_cjs/tokens/definitions/cbbtc.js +14 -0
  65. package/_cjs/tokens/definitions/cbbtc.js.map +1 -0
  66. package/_cjs/tokens/definitions/chfau.js +14 -0
  67. package/_cjs/tokens/definitions/chfau.js.map +1 -0
  68. package/_cjs/tokens/definitions/cusd.js +14 -0
  69. package/_cjs/tokens/definitions/cusd.js.map +1 -0
  70. package/_cjs/tokens/definitions/dlusd.js +14 -0
  71. package/_cjs/tokens/definitions/dlusd.js.map +1 -0
  72. package/_cjs/tokens/definitions/eurau.js +14 -0
  73. package/_cjs/tokens/definitions/eurau.js.map +1 -0
  74. package/_cjs/tokens/definitions/eurce.js +15 -0
  75. package/_cjs/tokens/definitions/eurce.js.map +1 -0
  76. package/_cjs/tokens/definitions/frxusd.js +14 -0
  77. package/_cjs/tokens/definitions/frxusd.js.map +1 -0
  78. package/_cjs/tokens/definitions/gbpa.js +14 -0
  79. package/_cjs/tokens/definitions/gbpa.js.map +1 -0
  80. package/_cjs/tokens/definitions/gusd.js +14 -0
  81. package/_cjs/tokens/definitions/gusd.js.map +1 -0
  82. package/_cjs/tokens/definitions/iusd.js +14 -0
  83. package/_cjs/tokens/definitions/iusd.js.map +1 -0
  84. package/_cjs/tokens/definitions/pathusd.js +15 -0
  85. package/_cjs/tokens/definitions/pathusd.js.map +1 -0
  86. package/_cjs/tokens/definitions/reusd.js +14 -0
  87. package/_cjs/tokens/definitions/reusd.js.map +1 -0
  88. package/_cjs/tokens/definitions/rusd.js +14 -0
  89. package/_cjs/tokens/definitions/rusd.js.map +1 -0
  90. package/_cjs/tokens/definitions/sbc.js +14 -0
  91. package/_cjs/tokens/definitions/sbc.js.map +1 -0
  92. package/_cjs/tokens/definitions/siusd.js +14 -0
  93. package/_cjs/tokens/definitions/siusd.js.map +1 -0
  94. package/_cjs/tokens/definitions/stcusd.js +14 -0
  95. package/_cjs/tokens/definitions/stcusd.js.map +1 -0
  96. package/_cjs/tokens/definitions/susde.js +14 -0
  97. package/_cjs/tokens/definitions/susde.js.map +1 -0
  98. package/_cjs/tokens/definitions/syrupusdc.js +14 -0
  99. package/_cjs/tokens/definitions/syrupusdc.js.map +1 -0
  100. package/_cjs/tokens/definitions/thetausd.js +14 -0
  101. package/_cjs/tokens/definitions/thetausd.js.map +1 -0
  102. package/_cjs/tokens/definitions/usd1.js +14 -0
  103. package/_cjs/tokens/definitions/usd1.js.map +1 -0
  104. package/_cjs/tokens/definitions/usdb.js +14 -0
  105. package/_cjs/tokens/definitions/usdb.js.map +1 -0
  106. package/_cjs/tokens/definitions/usdc.js +41 -0
  107. package/_cjs/tokens/definitions/usdc.js.map +1 -0
  108. package/_cjs/tokens/definitions/usdce.js +15 -0
  109. package/_cjs/tokens/definitions/usdce.js.map +1 -0
  110. package/_cjs/tokens/definitions/usde.js +14 -0
  111. package/_cjs/tokens/definitions/usde.js.map +1 -0
  112. package/_cjs/tokens/definitions/usdt0.js +14 -0
  113. package/_cjs/tokens/definitions/usdt0.js.map +1 -0
  114. package/_cjs/tokens/definitions/wsrusd.js +14 -0
  115. package/_cjs/tokens/definitions/wsrusd.js.map +1 -0
  116. package/_cjs/tokens/index.js +64 -0
  117. package/_cjs/tokens/index.js.map +1 -0
  118. package/_cjs/utils/encoding/fromRlp.js +7 -4
  119. package/_cjs/utils/encoding/fromRlp.js.map +1 -1
  120. package/_cjs/utils/rpc/http.js +58 -3
  121. package/_cjs/utils/rpc/http.js.map +1 -1
  122. package/_cjs/utils/transaction/parseTransaction.js +4 -1
  123. package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
  124. package/_esm/actions/index.js +1 -0
  125. package/_esm/actions/index.js.map +1 -1
  126. package/_esm/actions/token/approve.js +123 -0
  127. package/_esm/actions/token/approve.js.map +1 -0
  128. package/_esm/actions/token/approveSync.js +50 -0
  129. package/_esm/actions/token/approveSync.js.map +1 -0
  130. package/_esm/actions/token/getAllowance.js +62 -0
  131. package/_esm/actions/token/getAllowance.js.map +1 -0
  132. package/_esm/actions/token/getBalance.js +70 -0
  133. package/_esm/actions/token/getBalance.js.map +1 -0
  134. package/_esm/actions/token/getMetadata.js +60 -0
  135. package/_esm/actions/token/getMetadata.js.map +1 -0
  136. package/_esm/actions/token/getTotalSupply.js +60 -0
  137. package/_esm/actions/token/getTotalSupply.js.map +1 -0
  138. package/_esm/actions/token/index.js +10 -0
  139. package/_esm/actions/token/index.js.map +1 -0
  140. package/_esm/actions/token/internal.js +188 -0
  141. package/_esm/actions/token/internal.js.map +1 -0
  142. package/_esm/actions/token/transfer.js +147 -0
  143. package/_esm/actions/token/transfer.js.map +1 -0
  144. package/_esm/actions/token/transferSync.js +54 -0
  145. package/_esm/actions/token/transferSync.js.map +1 -0
  146. package/_esm/chains/definitions/battlechain.js +28 -0
  147. package/_esm/chains/definitions/battlechain.js.map +1 -0
  148. package/_esm/chains/definitions/marooTestnet.js +27 -0
  149. package/_esm/chains/definitions/marooTestnet.js.map +1 -0
  150. package/_esm/chains/index.js +2 -0
  151. package/_esm/chains/index.js.map +1 -1
  152. package/_esm/clients/createClient.js +53 -1
  153. package/_esm/clients/createClient.js.map +1 -1
  154. package/_esm/clients/createPublicClient.js.map +1 -1
  155. package/_esm/clients/createWalletClient.js.map +1 -1
  156. package/_esm/clients/decorators/public.js +17 -0
  157. package/_esm/clients/decorators/public.js.map +1 -1
  158. package/_esm/clients/decorators/wallet.js +8 -0
  159. package/_esm/clients/decorators/wallet.js.map +1 -1
  160. package/_esm/clients/transports/http.js +2 -1
  161. package/_esm/clients/transports/http.js.map +1 -1
  162. package/_esm/errors/encoding.js +7 -0
  163. package/_esm/errors/encoding.js.map +1 -1
  164. package/_esm/errors/request.js +22 -0
  165. package/_esm/errors/request.js.map +1 -1
  166. package/_esm/errors/transaction.js +7 -0
  167. package/_esm/errors/transaction.js.map +1 -1
  168. package/_esm/errors/version.js +1 -1
  169. package/_esm/index.js +3 -3
  170. package/_esm/index.js.map +1 -1
  171. package/_esm/tempo/Client.js.map +1 -1
  172. package/_esm/tempo/Decorator.js +234 -218
  173. package/_esm/tempo/Decorator.js.map +1 -1
  174. package/_esm/tempo/actions/token.js +335 -186
  175. package/_esm/tempo/actions/token.js.map +1 -1
  176. package/_esm/tempo/actions/wallet.js +1 -1
  177. package/_esm/tempo/internal/utils.js +154 -0
  178. package/_esm/tempo/internal/utils.js.map +1 -1
  179. package/_esm/tokens/defineToken.js +57 -0
  180. package/_esm/tokens/defineToken.js.map +1 -0
  181. package/_esm/tokens/definitions/alphausd.js +12 -0
  182. package/_esm/tokens/definitions/alphausd.js.map +1 -0
  183. package/_esm/tokens/definitions/betausd.js +12 -0
  184. package/_esm/tokens/definitions/betausd.js.map +1 -0
  185. package/_esm/tokens/definitions/brla.js +12 -0
  186. package/_esm/tokens/definitions/brla.js.map +1 -0
  187. package/_esm/tokens/definitions/cbbtc.js +12 -0
  188. package/_esm/tokens/definitions/cbbtc.js.map +1 -0
  189. package/_esm/tokens/definitions/chfau.js +12 -0
  190. package/_esm/tokens/definitions/chfau.js.map +1 -0
  191. package/_esm/tokens/definitions/cusd.js +12 -0
  192. package/_esm/tokens/definitions/cusd.js.map +1 -0
  193. package/_esm/tokens/definitions/dlusd.js +12 -0
  194. package/_esm/tokens/definitions/dlusd.js.map +1 -0
  195. package/_esm/tokens/definitions/eurau.js +12 -0
  196. package/_esm/tokens/definitions/eurau.js.map +1 -0
  197. package/_esm/tokens/definitions/eurce.js +13 -0
  198. package/_esm/tokens/definitions/eurce.js.map +1 -0
  199. package/_esm/tokens/definitions/frxusd.js +12 -0
  200. package/_esm/tokens/definitions/frxusd.js.map +1 -0
  201. package/_esm/tokens/definitions/gbpa.js +12 -0
  202. package/_esm/tokens/definitions/gbpa.js.map +1 -0
  203. package/_esm/tokens/definitions/gusd.js +12 -0
  204. package/_esm/tokens/definitions/gusd.js.map +1 -0
  205. package/_esm/tokens/definitions/iusd.js +12 -0
  206. package/_esm/tokens/definitions/iusd.js.map +1 -0
  207. package/_esm/tokens/definitions/pathusd.js +13 -0
  208. package/_esm/tokens/definitions/pathusd.js.map +1 -0
  209. package/_esm/tokens/definitions/reusd.js +12 -0
  210. package/_esm/tokens/definitions/reusd.js.map +1 -0
  211. package/_esm/tokens/definitions/rusd.js +12 -0
  212. package/_esm/tokens/definitions/rusd.js.map +1 -0
  213. package/_esm/tokens/definitions/sbc.js +12 -0
  214. package/_esm/tokens/definitions/sbc.js.map +1 -0
  215. package/_esm/tokens/definitions/siusd.js +12 -0
  216. package/_esm/tokens/definitions/siusd.js.map +1 -0
  217. package/_esm/tokens/definitions/stcusd.js +12 -0
  218. package/_esm/tokens/definitions/stcusd.js.map +1 -0
  219. package/_esm/tokens/definitions/susde.js +12 -0
  220. package/_esm/tokens/definitions/susde.js.map +1 -0
  221. package/_esm/tokens/definitions/syrupusdc.js +12 -0
  222. package/_esm/tokens/definitions/syrupusdc.js.map +1 -0
  223. package/_esm/tokens/definitions/thetausd.js +12 -0
  224. package/_esm/tokens/definitions/thetausd.js.map +1 -0
  225. package/_esm/tokens/definitions/usd1.js +12 -0
  226. package/_esm/tokens/definitions/usd1.js.map +1 -0
  227. package/_esm/tokens/definitions/usdb.js +12 -0
  228. package/_esm/tokens/definitions/usdb.js.map +1 -0
  229. package/_esm/tokens/definitions/usdc.js +67 -0
  230. package/_esm/tokens/definitions/usdc.js.map +1 -0
  231. package/_esm/tokens/definitions/usdce.js +13 -0
  232. package/_esm/tokens/definitions/usdce.js.map +1 -0
  233. package/_esm/tokens/definitions/usde.js +12 -0
  234. package/_esm/tokens/definitions/usde.js.map +1 -0
  235. package/_esm/tokens/definitions/usdt0.js +12 -0
  236. package/_esm/tokens/definitions/usdt0.js.map +1 -0
  237. package/_esm/tokens/definitions/wsrusd.js +12 -0
  238. package/_esm/tokens/definitions/wsrusd.js.map +1 -0
  239. package/_esm/tokens/index.js +32 -0
  240. package/_esm/tokens/index.js.map +1 -0
  241. package/_esm/utils/encoding/fromRlp.js +8 -5
  242. package/_esm/utils/encoding/fromRlp.js.map +1 -1
  243. package/_esm/utils/rpc/http.js +59 -4
  244. package/_esm/utils/rpc/http.js.map +1 -1
  245. package/_esm/utils/transaction/parseTransaction.js +5 -2
  246. package/_esm/utils/transaction/parseTransaction.js.map +1 -1
  247. package/_types/actions/index.d.ts +1 -0
  248. package/_types/actions/index.d.ts.map +1 -1
  249. package/_types/actions/token/approve.d.ts +253 -0
  250. package/_types/actions/token/approve.d.ts.map +1 -0
  251. package/_types/actions/token/approveSync.d.ts +57 -0
  252. package/_types/actions/token/approveSync.d.ts.map +1 -0
  253. package/_types/actions/token/getAllowance.d.ts +77 -0
  254. package/_types/actions/token/getAllowance.d.ts.map +1 -0
  255. package/_types/actions/token/getBalance.d.ts +69 -0
  256. package/_types/actions/token/getBalance.d.ts.map +1 -0
  257. package/_types/actions/token/getMetadata.d.ts +43 -0
  258. package/_types/actions/token/getMetadata.d.ts.map +1 -0
  259. package/_types/actions/token/getTotalSupply.d.ts +63 -0
  260. package/_types/actions/token/getTotalSupply.d.ts.map +1 -0
  261. package/_types/actions/token/index.d.ts +9 -0
  262. package/_types/actions/token/index.d.ts.map +1 -0
  263. package/_types/actions/token/internal.d.ts +168 -0
  264. package/_types/actions/token/internal.d.ts.map +1 -0
  265. package/_types/actions/token/transfer.d.ts +288 -0
  266. package/_types/actions/token/transfer.d.ts.map +1 -0
  267. package/_types/actions/token/transferSync.d.ts +61 -0
  268. package/_types/actions/token/transferSync.d.ts.map +1 -0
  269. package/_types/chains/definitions/battlechain.d.ts +447 -0
  270. package/_types/chains/definitions/battlechain.d.ts.map +1 -0
  271. package/_types/chains/definitions/marooTestnet.d.ts +49 -0
  272. package/_types/chains/definitions/marooTestnet.d.ts.map +1 -0
  273. package/_types/chains/index.d.ts +2 -0
  274. package/_types/chains/index.d.ts.map +1 -1
  275. package/_types/clients/createClient.d.ts +24 -6
  276. package/_types/clients/createClient.d.ts.map +1 -1
  277. package/_types/clients/createPublicClient.d.ts +4 -3
  278. package/_types/clients/createPublicClient.d.ts.map +1 -1
  279. package/_types/clients/createWalletClient.d.ts +4 -3
  280. package/_types/clients/createWalletClient.d.ts.map +1 -1
  281. package/_types/clients/decorators/public.d.ts +128 -3
  282. package/_types/clients/decorators/public.d.ts.map +1 -1
  283. package/_types/clients/decorators/wallet.d.ts +208 -3
  284. package/_types/clients/decorators/wallet.d.ts.map +1 -1
  285. package/_types/clients/transports/http.d.ts +2 -0
  286. package/_types/clients/transports/http.d.ts.map +1 -1
  287. package/_types/errors/encoding.d.ts +8 -0
  288. package/_types/errors/encoding.d.ts.map +1 -1
  289. package/_types/errors/request.d.ts +11 -0
  290. package/_types/errors/request.d.ts.map +1 -1
  291. package/_types/errors/transaction.d.ts +8 -0
  292. package/_types/errors/transaction.d.ts.map +1 -1
  293. package/_types/errors/version.d.ts +1 -1
  294. package/_types/index.d.ts +4 -3
  295. package/_types/index.d.ts.map +1 -1
  296. package/_types/tempo/Client.d.ts +1 -1
  297. package/_types/tempo/Client.d.ts.map +1 -1
  298. package/_types/tempo/Decorator.d.ts +88 -5
  299. package/_types/tempo/Decorator.d.ts.map +1 -1
  300. package/_types/tempo/actions/token.d.ts +223 -151
  301. package/_types/tempo/actions/token.d.ts.map +1 -1
  302. package/_types/tempo/actions/wallet.d.ts +3 -3
  303. package/_types/tempo/internal/types.d.ts +17 -0
  304. package/_types/tempo/internal/types.d.ts.map +1 -1
  305. package/_types/tempo/internal/utils.d.ts +73 -0
  306. package/_types/tempo/internal/utils.d.ts.map +1 -1
  307. package/_types/tokens/defineToken.d.ts +112 -0
  308. package/_types/tokens/defineToken.d.ts.map +1 -0
  309. package/_types/tokens/definitions/alphausd.d.ts +11 -0
  310. package/_types/tokens/definitions/alphausd.d.ts.map +1 -0
  311. package/_types/tokens/definitions/betausd.d.ts +11 -0
  312. package/_types/tokens/definitions/betausd.d.ts.map +1 -0
  313. package/_types/tokens/definitions/brla.d.ts +11 -0
  314. package/_types/tokens/definitions/brla.d.ts.map +1 -0
  315. package/_types/tokens/definitions/cbbtc.d.ts +11 -0
  316. package/_types/tokens/definitions/cbbtc.d.ts.map +1 -0
  317. package/_types/tokens/definitions/chfau.d.ts +11 -0
  318. package/_types/tokens/definitions/chfau.d.ts.map +1 -0
  319. package/_types/tokens/definitions/cusd.d.ts +11 -0
  320. package/_types/tokens/definitions/cusd.d.ts.map +1 -0
  321. package/_types/tokens/definitions/dlusd.d.ts +11 -0
  322. package/_types/tokens/definitions/dlusd.d.ts.map +1 -0
  323. package/_types/tokens/definitions/eurau.d.ts +11 -0
  324. package/_types/tokens/definitions/eurau.d.ts.map +1 -0
  325. package/_types/tokens/definitions/eurce.d.ts +12 -0
  326. package/_types/tokens/definitions/eurce.d.ts.map +1 -0
  327. package/_types/tokens/definitions/frxusd.d.ts +11 -0
  328. package/_types/tokens/definitions/frxusd.d.ts.map +1 -0
  329. package/_types/tokens/definitions/gbpa.d.ts +11 -0
  330. package/_types/tokens/definitions/gbpa.d.ts.map +1 -0
  331. package/_types/tokens/definitions/gusd.d.ts +11 -0
  332. package/_types/tokens/definitions/gusd.d.ts.map +1 -0
  333. package/_types/tokens/definitions/iusd.d.ts +11 -0
  334. package/_types/tokens/definitions/iusd.d.ts.map +1 -0
  335. package/_types/tokens/definitions/pathusd.d.ts +12 -0
  336. package/_types/tokens/definitions/pathusd.d.ts.map +1 -0
  337. package/_types/tokens/definitions/reusd.d.ts +11 -0
  338. package/_types/tokens/definitions/reusd.d.ts.map +1 -0
  339. package/_types/tokens/definitions/rusd.d.ts +11 -0
  340. package/_types/tokens/definitions/rusd.d.ts.map +1 -0
  341. package/_types/tokens/definitions/sbc.d.ts +11 -0
  342. package/_types/tokens/definitions/sbc.d.ts.map +1 -0
  343. package/_types/tokens/definitions/siusd.d.ts +11 -0
  344. package/_types/tokens/definitions/siusd.d.ts.map +1 -0
  345. package/_types/tokens/definitions/stcusd.d.ts +11 -0
  346. package/_types/tokens/definitions/stcusd.d.ts.map +1 -0
  347. package/_types/tokens/definitions/susde.d.ts +11 -0
  348. package/_types/tokens/definitions/susde.d.ts.map +1 -0
  349. package/_types/tokens/definitions/syrupusdc.d.ts +11 -0
  350. package/_types/tokens/definitions/syrupusdc.d.ts.map +1 -0
  351. package/_types/tokens/definitions/thetausd.d.ts +11 -0
  352. package/_types/tokens/definitions/thetausd.d.ts.map +1 -0
  353. package/_types/tokens/definitions/usd1.d.ts +11 -0
  354. package/_types/tokens/definitions/usd1.d.ts.map +1 -0
  355. package/_types/tokens/definitions/usdb.d.ts +11 -0
  356. package/_types/tokens/definitions/usdb.d.ts.map +1 -0
  357. package/_types/tokens/definitions/usdc.d.ts +67 -0
  358. package/_types/tokens/definitions/usdc.d.ts.map +1 -0
  359. package/_types/tokens/definitions/usdce.d.ts +12 -0
  360. package/_types/tokens/definitions/usdce.d.ts.map +1 -0
  361. package/_types/tokens/definitions/usde.d.ts +11 -0
  362. package/_types/tokens/definitions/usde.d.ts.map +1 -0
  363. package/_types/tokens/definitions/usdt0.d.ts +11 -0
  364. package/_types/tokens/definitions/usdt0.d.ts.map +1 -0
  365. package/_types/tokens/definitions/wsrusd.d.ts +11 -0
  366. package/_types/tokens/definitions/wsrusd.d.ts.map +1 -0
  367. package/_types/tokens/index.d.ts +31 -0
  368. package/_types/tokens/index.d.ts.map +1 -0
  369. package/_types/utils/encoding/fromRlp.d.ts +2 -2
  370. package/_types/utils/encoding/fromRlp.d.ts.map +1 -1
  371. package/_types/utils/rpc/http.d.ts +6 -2
  372. package/_types/utils/rpc/http.d.ts.map +1 -1
  373. package/_types/utils/transaction/parseTransaction.d.ts +2 -2
  374. package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
  375. package/actions/index.ts +1 -0
  376. package/actions/token/approve.ts +202 -0
  377. package/actions/token/approveSync.ts +95 -0
  378. package/actions/token/getAllowance.ts +105 -0
  379. package/actions/token/getBalance.ts +115 -0
  380. package/actions/token/getMetadata.ts +98 -0
  381. package/actions/token/getTotalSupply.ts +97 -0
  382. package/actions/token/index.ts +9 -0
  383. package/actions/token/internal.ts +367 -0
  384. package/actions/token/transfer.ts +230 -0
  385. package/actions/token/transferSync.ts +99 -0
  386. package/chains/definitions/battlechain.ts +28 -0
  387. package/chains/definitions/marooTestnet.ts +27 -0
  388. package/chains/index.ts +2 -0
  389. package/clients/createClient.ts +90 -8
  390. package/clients/createPublicClient.ts +22 -4
  391. package/clients/createWalletClient.ts +22 -4
  392. package/clients/decorators/public.ts +166 -4
  393. package/clients/decorators/wallet.ts +242 -3
  394. package/clients/transports/http.ts +4 -0
  395. package/errors/encoding.ts +11 -0
  396. package/errors/request.ts +17 -0
  397. package/errors/transaction.ts +11 -0
  398. package/errors/version.ts +1 -1
  399. package/index.ts +7 -0
  400. package/package.json +6 -1
  401. package/tempo/Client.ts +4 -2
  402. package/tempo/Decorator.ts +398 -337
  403. package/tempo/actions/token.ts +519 -296
  404. package/tempo/actions/wallet.ts +3 -3
  405. package/tempo/internal/types.ts +19 -0
  406. package/tempo/internal/utils.ts +204 -0
  407. package/tokens/defineToken.ts +142 -0
  408. package/tokens/definitions/alphausd.ts +13 -0
  409. package/tokens/definitions/betausd.ts +13 -0
  410. package/tokens/definitions/brla.ts +13 -0
  411. package/tokens/definitions/cbbtc.ts +13 -0
  412. package/tokens/definitions/chfau.ts +13 -0
  413. package/tokens/definitions/cusd.ts +13 -0
  414. package/tokens/definitions/dlusd.ts +13 -0
  415. package/tokens/definitions/eurau.ts +13 -0
  416. package/tokens/definitions/eurce.ts +14 -0
  417. package/tokens/definitions/frxusd.ts +13 -0
  418. package/tokens/definitions/gbpa.ts +13 -0
  419. package/tokens/definitions/gusd.ts +13 -0
  420. package/tokens/definitions/iusd.ts +13 -0
  421. package/tokens/definitions/pathusd.ts +14 -0
  422. package/tokens/definitions/reusd.ts +13 -0
  423. package/tokens/definitions/rusd.ts +13 -0
  424. package/tokens/definitions/sbc.ts +13 -0
  425. package/tokens/definitions/siusd.ts +13 -0
  426. package/tokens/definitions/stcusd.ts +13 -0
  427. package/tokens/definitions/susde.ts +13 -0
  428. package/tokens/definitions/syrupusdc.ts +13 -0
  429. package/tokens/definitions/thetausd.ts +13 -0
  430. package/tokens/definitions/usd1.ts +13 -0
  431. package/tokens/definitions/usdb.ts +13 -0
  432. package/tokens/definitions/usdc.ts +67 -0
  433. package/tokens/definitions/usdce.ts +14 -0
  434. package/tokens/definitions/usde.ts +13 -0
  435. package/tokens/definitions/usdt0.ts +13 -0
  436. package/tokens/definitions/wsrusd.ts +13 -0
  437. package/tokens/index.ts +31 -0
  438. package/tokens/package.json +6 -0
  439. package/utils/encoding/fromRlp.ts +22 -3
  440. package/utils/rpc/http.ts +70 -2
  441. package/utils/transaction/parseTransaction.ts +7 -2
@@ -0,0 +1,61 @@
1
+ import type { Account } from '../../accounts/types.js';
2
+ import type { Client } from '../../clients/createClient.js';
3
+ import type { Transport } from '../../clients/transports/createTransport.js';
4
+ import type { erc20Abi } from '../../constants/abis.js';
5
+ import type { BaseErrorType } from '../../errors/base.js';
6
+ import type { Tokens } from '../../tokens/defineToken.js';
7
+ import type { Chain } from '../../types/chain.js';
8
+ import type { GetEventArgs } from '../../types/contract.js';
9
+ import type { TransactionReceipt } from '../../types/transaction.js';
10
+ import type { Compute } from '../../types/utils.js';
11
+ import { transfer } from './transfer.js';
12
+ /**
13
+ * Transfers ERC-20 tokens to another address, and waits for the transaction to
14
+ * be confirmed.
15
+ *
16
+ * Pass `from` to transfer on behalf of another address using an allowance
17
+ * (calls `transferFrom`); otherwise transfers from the caller (calls
18
+ * `transfer`).
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import { createClient, http } from 'viem'
23
+ * import { mainnet } from 'viem/chains'
24
+ * import { privateKeyToAccount } from 'viem/accounts'
25
+ * import { token } from 'viem/actions'
26
+ *
27
+ * const client = createClient({
28
+ * account: privateKeyToAccount('0x...'),
29
+ * chain: mainnet,
30
+ * transport: http(),
31
+ * })
32
+ *
33
+ * const { receipt, ...event } = await token.transferSync(client, {
34
+ * amount: 100000000n,
35
+ * to: '0x...',
36
+ * token: '0x...',
37
+ * })
38
+ * ```
39
+ *
40
+ * @param client - Client.
41
+ * @param parameters - Parameters.
42
+ * @returns The transaction receipt and event data.
43
+ */
44
+ export declare function transferSync<chain extends Chain | undefined, account extends Account | undefined, tokens extends Tokens | undefined = undefined>(client: Client<Transport, chain, account, undefined, undefined, tokens>, parameters: transferSync.Parameters<chain, account, tokens>): Promise<transferSync.ReturnValue>;
45
+ export declare namespace transferSync {
46
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, tokens extends Tokens | undefined = Tokens | undefined> = transfer.Parameters<chain, account, tokens>;
47
+ type Args<chain extends Chain | undefined = Chain | undefined, tokens extends Tokens | undefined = Tokens | undefined> = transfer.Args<chain, tokens>;
48
+ type ReturnValue = Compute<GetEventArgs<typeof erc20Abi, 'Transfer', {
49
+ IndexedOnly: false;
50
+ Required: true;
51
+ }> & {
52
+ /** Token decimals used to derive `formatted`, if known. */
53
+ decimals?: number | undefined;
54
+ /** Transferred amount formatted with the token's `decimals`, if known. */
55
+ formatted?: string | undefined;
56
+ /** Transaction receipt. */
57
+ receipt: TransactionReceipt;
58
+ }>;
59
+ type ErrorType = BaseErrorType;
60
+ }
61
+ //# sourceMappingURL=transferSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferSync.d.ts","sourceRoot":"","sources":["../../../actions/token/transferSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,YAAY,CAChC,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,OAAO,GAAG,SAAS,EACnC,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EAE7C,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,EACvE,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,GAC1D,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAgBnC;AAED,yBAAiB,YAAY,CAAC;IAC5B,KAAY,UAAU,CACpB,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EACzD,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,IACpD,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IAC/C,KAAY,IAAI,CACd,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,IACpD,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAChC,KAAY,WAAW,GAAG,OAAO,CAC/B,YAAY,CACV,OAAO,QAAQ,EACf,UAAU,EACV;QAAE,WAAW,EAAE,KAAK,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE,CACvC,GAAG;QACF,2DAA2D;QAC3D,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC7B,0EAA0E;QAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC9B,2BAA2B;QAC3B,OAAO,EAAE,kBAAkB,CAAA;KAC5B,CACF,CAAA;IAED,KAAY,SAAS,GAAG,aAAa,CAAA;CACtC"}
@@ -0,0 +1,447 @@
1
+ export declare const battlechain: {
2
+ blockExplorers: {
3
+ readonly default: {
4
+ readonly name: "BattleChain Explorer";
5
+ readonly url: "https://explorer.battlechain.com";
6
+ readonly apiUrl: "https://block-explorer-api.battlechain.com/api";
7
+ };
8
+ };
9
+ blockTime: 1000;
10
+ contracts: {
11
+ readonly multicall3: {
12
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
13
+ readonly blockCreated: 40;
14
+ };
15
+ };
16
+ ensTlds?: readonly string[] | undefined;
17
+ id: 626;
18
+ name: "BattleChain Mainnet";
19
+ nativeCurrency: {
20
+ readonly name: "Ether";
21
+ readonly symbol: "ETH";
22
+ readonly decimals: 18;
23
+ };
24
+ experimental_preconfirmationTime?: number | undefined | undefined;
25
+ rpcUrls: {
26
+ readonly default: {
27
+ readonly http: readonly ["https://mainnet.battlechain.com"];
28
+ };
29
+ };
30
+ sourceId?: number | undefined | undefined;
31
+ testnet?: boolean | undefined | undefined;
32
+ custom: {
33
+ readonly getEip712Domain: import("../../zksync/index.js").EIP712DomainFn<import("../index.js").ZkSyncTransactionSerializable, import("../index.js").ZkSyncEIP712TransactionSignable>;
34
+ };
35
+ extendSchema?: Record<string, unknown> | undefined;
36
+ fees?: import("../../index.js").ChainFees<undefined> | undefined;
37
+ formatters: {
38
+ readonly block: {
39
+ exclude: [] | undefined;
40
+ format: (args: import("../index.js").ZkSyncRpcBlock, action?: string | undefined) => {
41
+ baseFeePerGas: bigint | null;
42
+ blobGasUsed: bigint;
43
+ difficulty: bigint;
44
+ excessBlobGas: bigint;
45
+ extraData: import("../../index.js").Hex;
46
+ gasLimit: bigint;
47
+ gasUsed: bigint;
48
+ hash: `0x${string}` | null;
49
+ logsBloom: `0x${string}` | null;
50
+ miner: import("abitype").Address;
51
+ mixHash: import("../../index.js").Hash;
52
+ nonce: `0x${string}` | null;
53
+ number: bigint | null;
54
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
55
+ parentHash: import("../../index.js").Hash;
56
+ receiptsRoot: import("../../index.js").Hex;
57
+ sealFields: import("../../index.js").Hex[];
58
+ sha3Uncles: import("../../index.js").Hash;
59
+ size: bigint;
60
+ stateRoot: import("../../index.js").Hash;
61
+ timestamp: bigint;
62
+ totalDifficulty: bigint | null;
63
+ transactions: `0x${string}`[] | import("../index.js").ZkSyncTransaction<boolean>[];
64
+ transactionsRoot: import("../../index.js").Hash;
65
+ uncles: import("../../index.js").Hash[];
66
+ withdrawals?: import("../../index.js").Withdrawal[] | undefined | undefined;
67
+ withdrawalsRoot?: `0x${string}` | undefined;
68
+ l1BatchNumber: bigint | null;
69
+ l1BatchTimestamp: bigint | null;
70
+ } & {};
71
+ type: "block";
72
+ };
73
+ readonly transaction: {
74
+ exclude: [] | undefined;
75
+ format: (args: import("../index.js").ZkSyncRpcTransaction, action?: string | undefined) => ({
76
+ r: import("../../index.js").Hex;
77
+ s: import("../../index.js").Hex;
78
+ v: bigint;
79
+ to: import("abitype").Address | null;
80
+ from: import("abitype").Address;
81
+ gas: bigint;
82
+ nonce: number;
83
+ value: bigint;
84
+ blockHash: `0x${string}` | null;
85
+ blockNumber: bigint | null;
86
+ blockTimestamp?: bigint | undefined;
87
+ hash: import("../../index.js").Hash;
88
+ input: import("../../index.js").Hex;
89
+ transactionIndex: number | null;
90
+ typeHex: import("../../index.js").Hex | null;
91
+ accessList?: undefined | undefined;
92
+ authorizationList?: undefined | undefined;
93
+ blobVersionedHashes?: undefined | undefined;
94
+ chainId?: number | undefined;
95
+ yParity?: undefined | undefined;
96
+ type: "legacy";
97
+ gasPrice: bigint;
98
+ maxFeePerBlobGas?: undefined | undefined;
99
+ maxFeePerGas?: undefined | undefined;
100
+ maxPriorityFeePerGas?: undefined | undefined;
101
+ l1BatchNumber: bigint | null;
102
+ l1BatchTxIndex: bigint | null;
103
+ } | {
104
+ blockHash: `0x${string}` | null;
105
+ blockNumber: bigint | null;
106
+ blockTimestamp?: bigint | undefined;
107
+ from: import("abitype").Address;
108
+ gas: bigint;
109
+ hash: import("../../index.js").Hash;
110
+ input: import("../../index.js").Hex;
111
+ nonce: number;
112
+ r: import("../../index.js").Hex;
113
+ s: import("../../index.js").Hex;
114
+ to: import("abitype").Address | null;
115
+ transactionIndex: number | null;
116
+ typeHex: import("../../index.js").Hex | null;
117
+ v: bigint;
118
+ value: bigint;
119
+ yParity: number;
120
+ accessList: import("../../index.js").AccessList;
121
+ authorizationList?: undefined | undefined;
122
+ blobVersionedHashes?: undefined | undefined;
123
+ chainId: number;
124
+ type: "eip2930";
125
+ gasPrice: bigint;
126
+ maxFeePerBlobGas?: undefined | undefined;
127
+ maxFeePerGas?: undefined | undefined;
128
+ maxPriorityFeePerGas?: undefined | undefined;
129
+ l1BatchNumber: bigint | null;
130
+ l1BatchTxIndex: bigint | null;
131
+ } | {
132
+ blockHash: `0x${string}` | null;
133
+ blockNumber: bigint | null;
134
+ blockTimestamp?: bigint | undefined;
135
+ from: import("abitype").Address;
136
+ gas: bigint;
137
+ hash: import("../../index.js").Hash;
138
+ input: import("../../index.js").Hex;
139
+ nonce: number;
140
+ r: import("../../index.js").Hex;
141
+ s: import("../../index.js").Hex;
142
+ to: import("abitype").Address | null;
143
+ transactionIndex: number | null;
144
+ typeHex: import("../../index.js").Hex | null;
145
+ v: bigint;
146
+ value: bigint;
147
+ yParity: number;
148
+ accessList: import("../../index.js").AccessList;
149
+ authorizationList?: undefined | undefined;
150
+ blobVersionedHashes?: undefined | undefined;
151
+ chainId: number;
152
+ type: "eip1559";
153
+ gasPrice?: undefined | undefined;
154
+ maxFeePerBlobGas?: undefined | undefined;
155
+ maxFeePerGas: bigint;
156
+ maxPriorityFeePerGas: bigint;
157
+ l1BatchNumber: bigint | null;
158
+ l1BatchTxIndex: bigint | null;
159
+ } | {
160
+ blockHash: `0x${string}` | null;
161
+ blockNumber: bigint | null;
162
+ blockTimestamp?: bigint | undefined;
163
+ from: import("abitype").Address;
164
+ gas: bigint;
165
+ hash: import("../../index.js").Hash;
166
+ input: import("../../index.js").Hex;
167
+ nonce: number;
168
+ r: import("../../index.js").Hex;
169
+ s: import("../../index.js").Hex;
170
+ to: import("abitype").Address | null;
171
+ transactionIndex: number | null;
172
+ typeHex: import("../../index.js").Hex | null;
173
+ v: bigint;
174
+ value: bigint;
175
+ yParity: number;
176
+ accessList: import("../../index.js").AccessList;
177
+ authorizationList?: undefined | undefined;
178
+ blobVersionedHashes: readonly import("../../index.js").Hex[];
179
+ chainId: number;
180
+ type: "eip4844";
181
+ gasPrice?: undefined | undefined;
182
+ maxFeePerBlobGas: bigint;
183
+ maxFeePerGas: bigint;
184
+ maxPriorityFeePerGas: bigint;
185
+ l1BatchNumber: bigint | null;
186
+ l1BatchTxIndex: bigint | null;
187
+ } | {
188
+ blockHash: `0x${string}` | null;
189
+ blockNumber: bigint | null;
190
+ blockTimestamp?: bigint | undefined;
191
+ from: import("abitype").Address;
192
+ gas: bigint;
193
+ hash: import("../../index.js").Hash;
194
+ input: import("../../index.js").Hex;
195
+ nonce: number;
196
+ r: import("../../index.js").Hex;
197
+ s: import("../../index.js").Hex;
198
+ to: import("abitype").Address | null;
199
+ transactionIndex: number | null;
200
+ typeHex: import("../../index.js").Hex | null;
201
+ v: bigint;
202
+ value: bigint;
203
+ yParity: number;
204
+ accessList: import("../../index.js").AccessList;
205
+ authorizationList: import("../../index.js").SignedAuthorizationList;
206
+ blobVersionedHashes?: undefined | undefined;
207
+ chainId: number;
208
+ type: "eip7702";
209
+ gasPrice?: undefined | undefined;
210
+ maxFeePerBlobGas?: undefined | undefined;
211
+ maxFeePerGas: bigint;
212
+ maxPriorityFeePerGas: bigint;
213
+ l1BatchNumber: bigint | null;
214
+ l1BatchTxIndex: bigint | null;
215
+ } | {
216
+ blockHash: `0x${string}` | null;
217
+ blockNumber: bigint | null;
218
+ blockTimestamp?: bigint | undefined;
219
+ from: import("abitype").Address;
220
+ gas: bigint;
221
+ hash: import("../../index.js").Hash;
222
+ input: import("../../index.js").Hex;
223
+ nonce: number;
224
+ r: import("../../index.js").Hex;
225
+ s: import("../../index.js").Hex;
226
+ to: import("abitype").Address | null;
227
+ transactionIndex: number | null;
228
+ typeHex: import("../../index.js").Hex | null;
229
+ v: bigint;
230
+ value: bigint;
231
+ yParity: number;
232
+ l1BatchNumber: bigint | null;
233
+ l1BatchTxIndex: bigint | null;
234
+ gasPrice?: undefined | undefined;
235
+ maxFeePerBlobGas?: undefined | undefined;
236
+ maxFeePerGas: bigint;
237
+ maxPriorityFeePerGas: bigint;
238
+ type: "priority";
239
+ } | {
240
+ blockHash: `0x${string}` | null;
241
+ blockNumber: bigint | null;
242
+ blockTimestamp?: bigint | undefined;
243
+ from: import("abitype").Address;
244
+ gas: bigint;
245
+ hash: import("../../index.js").Hash;
246
+ input: import("../../index.js").Hex;
247
+ nonce: number;
248
+ r: import("../../index.js").Hex;
249
+ s: import("../../index.js").Hex;
250
+ to: import("abitype").Address | null;
251
+ transactionIndex: number | null;
252
+ typeHex: import("../../index.js").Hex | null;
253
+ v: bigint;
254
+ value: bigint;
255
+ yParity: number;
256
+ l1BatchNumber: bigint | null;
257
+ l1BatchTxIndex: bigint | null;
258
+ gasPrice?: undefined | undefined;
259
+ maxFeePerBlobGas?: undefined | undefined;
260
+ maxFeePerGas: bigint;
261
+ maxPriorityFeePerGas: bigint;
262
+ type: "eip712" | "priority";
263
+ }) & {};
264
+ type: "transaction";
265
+ };
266
+ readonly transactionReceipt: {
267
+ exclude: [] | undefined;
268
+ format: (args: import("../index.js").ZkSyncRpcTransactionReceipt, action?: string | undefined) => {
269
+ type: import("../index.js").ZkSyncTransactionType;
270
+ contractAddress: import("abitype").Address | null | undefined;
271
+ to: import("abitype").Address | null;
272
+ from: import("abitype").Address;
273
+ blockHash: import("../../index.js").Hash;
274
+ blockNumber: bigint;
275
+ blockTimestamp?: bigint | undefined;
276
+ transactionIndex: number;
277
+ status: "success" | "reverted";
278
+ transactionHash: import("../../index.js").Hash;
279
+ logsBloom: import("../../index.js").Hex;
280
+ blobGasUsed?: bigint | undefined;
281
+ gasUsed: bigint;
282
+ blobGasPrice?: bigint | undefined;
283
+ cumulativeGasUsed: bigint;
284
+ effectiveGasPrice: bigint;
285
+ root?: `0x${string}` | undefined;
286
+ l1BatchNumber: bigint | null;
287
+ l1BatchTxIndex: bigint | null;
288
+ logs: import("../index.js").ZkSyncLog[];
289
+ l2ToL1Logs: import("../index.js").ZkSyncL2ToL1Log[];
290
+ } & {};
291
+ type: "transactionReceipt";
292
+ };
293
+ readonly transactionRequest: {
294
+ exclude: ("paymaster" | "gasPerPubdata" | "factoryDeps" | "paymasterInput" | "customSignature")[] | undefined;
295
+ format: (args: import("../index.js").ZkSyncTransactionRequest, action?: string | undefined) => ({
296
+ data?: `0x${string}` | undefined;
297
+ from?: `0x${string}` | undefined;
298
+ gas?: `0x${string}` | undefined;
299
+ nonce?: `0x${string}` | undefined;
300
+ to?: `0x${string}` | null | undefined;
301
+ type?: "0x0" | undefined;
302
+ value?: `0x${string}` | undefined;
303
+ gasPrice?: `0x${string}` | undefined;
304
+ maxFeePerBlobGas?: undefined | undefined;
305
+ maxFeePerGas?: undefined | undefined;
306
+ maxPriorityFeePerGas?: undefined | undefined;
307
+ blobs?: undefined;
308
+ blobVersionedHashes?: undefined;
309
+ kzg?: undefined;
310
+ accessList?: undefined;
311
+ sidecars?: undefined;
312
+ authorizationList?: undefined;
313
+ eip712Meta?: undefined | undefined;
314
+ } | {
315
+ data?: `0x${string}` | undefined;
316
+ from?: `0x${string}` | undefined;
317
+ gas?: `0x${string}` | undefined;
318
+ nonce?: `0x${string}` | undefined;
319
+ to?: `0x${string}` | null | undefined;
320
+ type?: "0x1" | undefined;
321
+ value?: `0x${string}` | undefined;
322
+ gasPrice?: `0x${string}` | undefined;
323
+ maxFeePerBlobGas?: undefined | undefined;
324
+ maxFeePerGas?: undefined | undefined;
325
+ maxPriorityFeePerGas?: undefined | undefined;
326
+ accessList?: import("../../index.js").AccessList | undefined;
327
+ blobs?: undefined;
328
+ blobVersionedHashes?: undefined;
329
+ kzg?: undefined;
330
+ sidecars?: undefined;
331
+ authorizationList?: undefined;
332
+ eip712Meta?: undefined | undefined;
333
+ } | {
334
+ data?: `0x${string}` | undefined;
335
+ from?: `0x${string}` | undefined;
336
+ gas?: `0x${string}` | undefined;
337
+ nonce?: `0x${string}` | undefined;
338
+ to?: `0x${string}` | null | undefined;
339
+ type?: "0x2" | undefined;
340
+ value?: `0x${string}` | undefined;
341
+ gasPrice?: undefined | undefined;
342
+ maxFeePerBlobGas?: undefined | undefined;
343
+ maxFeePerGas?: `0x${string}` | undefined;
344
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
345
+ accessList?: import("../../index.js").AccessList | undefined;
346
+ blobs?: undefined;
347
+ blobVersionedHashes?: undefined;
348
+ kzg?: undefined;
349
+ sidecars?: undefined;
350
+ authorizationList?: undefined;
351
+ eip712Meta?: undefined | undefined;
352
+ } | {
353
+ type?: "0x3" | undefined;
354
+ data?: `0x${string}` | undefined;
355
+ from?: `0x${string}` | undefined;
356
+ gas?: `0x${string}` | undefined;
357
+ nonce?: `0x${string}` | undefined;
358
+ value?: `0x${string}` | undefined;
359
+ to: `0x${string}` | null;
360
+ gasPrice?: undefined | undefined;
361
+ maxFeePerBlobGas?: `0x${string}` | undefined;
362
+ maxFeePerGas?: `0x${string}` | undefined;
363
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
364
+ accessList?: import("../../index.js").AccessList | undefined;
365
+ sidecars?: readonly import("../../index.js").BlobSidecar<`0x${string}`>[] | undefined;
366
+ blobs?: readonly `0x${string}`[] | readonly import("../../index.js").ByteArray[] | undefined;
367
+ blobVersionedHashes: readonly import("../../index.js").Hex[];
368
+ kzg?: undefined;
369
+ authorizationList?: undefined;
370
+ eip712Meta?: undefined | undefined;
371
+ } | {
372
+ type?: "0x3" | undefined;
373
+ data?: `0x${string}` | undefined;
374
+ from?: `0x${string}` | undefined;
375
+ gas?: `0x${string}` | undefined;
376
+ nonce?: `0x${string}` | undefined;
377
+ value?: `0x${string}` | undefined;
378
+ to: `0x${string}` | null;
379
+ gasPrice?: undefined | undefined;
380
+ maxFeePerBlobGas?: `0x${string}` | undefined;
381
+ maxFeePerGas?: `0x${string}` | undefined;
382
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
383
+ accessList?: import("../../index.js").AccessList | undefined;
384
+ sidecars?: readonly import("../../index.js").BlobSidecar<`0x${string}`>[] | undefined;
385
+ blobs: readonly import("../../index.js").Hex[] | readonly import("../../index.js").ByteArray[];
386
+ blobVersionedHashes?: readonly `0x${string}`[] | undefined;
387
+ kzg?: import("../../index.js").Kzg | undefined;
388
+ authorizationList?: undefined;
389
+ eip712Meta?: undefined | undefined;
390
+ } | {
391
+ type?: "0x4" | undefined;
392
+ gasPrice?: undefined | undefined;
393
+ maxFeePerBlobGas?: undefined | undefined;
394
+ maxFeePerGas?: `0x${string}` | undefined;
395
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
396
+ to?: `0x${string}` | null | undefined;
397
+ data?: `0x${string}` | undefined;
398
+ from?: `0x${string}` | undefined;
399
+ gas?: `0x${string}` | undefined;
400
+ nonce?: `0x${string}` | undefined;
401
+ value?: `0x${string}` | undefined;
402
+ accessList?: import("../../index.js").AccessList | undefined;
403
+ authorizationList?: import("../../index.js").RpcAuthorizationList | undefined;
404
+ blobs?: undefined;
405
+ blobVersionedHashes?: undefined;
406
+ kzg?: undefined;
407
+ sidecars?: undefined;
408
+ eip712Meta?: undefined | undefined;
409
+ } | {
410
+ data?: `0x${string}` | undefined;
411
+ from?: `0x${string}` | undefined;
412
+ gas?: `0x${string}` | undefined;
413
+ nonce?: `0x${string}` | undefined;
414
+ to?: `0x${string}` | null | undefined;
415
+ type: "0xff" | "0x71";
416
+ value?: `0x${string}` | undefined;
417
+ gasPrice?: undefined | undefined;
418
+ maxFeePerBlobGas?: undefined | undefined;
419
+ maxFeePerGas?: `0x${string}` | undefined;
420
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
421
+ eip712Meta: import("../index.js").ZkSyncEip712Meta;
422
+ }) & {
423
+ paymaster: never;
424
+ gasPerPubdata: never;
425
+ factoryDeps: never;
426
+ paymasterInput: never;
427
+ customSignature: never;
428
+ };
429
+ type: "transactionRequest";
430
+ };
431
+ };
432
+ prepareTransactionRequest?: ((args: import("../../index.js").PrepareTransactionRequestParameters, options: {
433
+ client: import("../../index.js").Client;
434
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
435
+ }) => Promise<import("../../index.js").PrepareTransactionRequestParameters>) | [fn: ((args: import("../../index.js").PrepareTransactionRequestParameters, options: {
436
+ client: import("../../index.js").Client;
437
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
438
+ }) => Promise<import("../../index.js").PrepareTransactionRequestParameters>) | undefined, options: {
439
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
440
+ }] | undefined;
441
+ serializers: {
442
+ readonly transaction: typeof import("../../zksync/serializers.js").serializeTransaction;
443
+ };
444
+ verifyHash?: ((client: import("../../index.js").Client, parameters: import("../../index.js").VerifyHashActionParameters) => Promise<import("../../index.js").VerifyHashActionReturnType>) | undefined;
445
+ readonly network: "battlechain";
446
+ };
447
+ //# sourceMappingURL=battlechain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"battlechain.d.ts","sourceRoot":"","sources":["../../../chains/definitions/battlechain.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBtB,CAAA"}
@@ -0,0 +1,49 @@
1
+ export declare const marooTestnet: {
2
+ blockExplorers: {
3
+ readonly default: {
4
+ readonly name: "Blockscout";
5
+ readonly url: "https://explorer-testnet.maroo.io";
6
+ readonly apiUrl: "https://explorer-testnet.maroo.io/blockscout/api";
7
+ };
8
+ };
9
+ blockTime?: number | undefined | undefined;
10
+ contracts: {
11
+ readonly multicall3: {
12
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
13
+ readonly blockCreated: 0;
14
+ };
15
+ };
16
+ ensTlds?: readonly string[] | undefined;
17
+ id: 450815;
18
+ name: "Maroo Testnet";
19
+ nativeCurrency: {
20
+ readonly name: "Testnet OKRW";
21
+ readonly symbol: "tOKRW";
22
+ readonly decimals: 18;
23
+ };
24
+ experimental_preconfirmationTime?: number | undefined | undefined;
25
+ rpcUrls: {
26
+ readonly default: {
27
+ readonly http: readonly ["https://rpc-testnet.maroo.io"];
28
+ readonly webSocket: readonly ["wss://ws-testnet.maroo.io"];
29
+ };
30
+ };
31
+ sourceId?: number | undefined | undefined;
32
+ testnet: true;
33
+ custom?: Record<string, unknown> | undefined;
34
+ extendSchema?: Record<string, unknown> | undefined;
35
+ fees?: import("../../index.js").ChainFees<undefined> | undefined;
36
+ formatters?: undefined;
37
+ prepareTransactionRequest?: ((args: import("../../index.js").PrepareTransactionRequestParameters, options: {
38
+ client: import("../../index.js").Client;
39
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
40
+ }) => Promise<import("../../index.js").PrepareTransactionRequestParameters>) | [fn: ((args: import("../../index.js").PrepareTransactionRequestParameters, options: {
41
+ client: import("../../index.js").Client;
42
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
43
+ }) => Promise<import("../../index.js").PrepareTransactionRequestParameters>) | undefined, options: {
44
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
45
+ }] | undefined;
46
+ serializers?: import("../../index.js").ChainSerializers<undefined, import("../../index.js").TransactionSerializable> | undefined;
47
+ verifyHash?: ((client: import("../../index.js").Client, parameters: import("../../index.js").VerifyHashActionParameters) => Promise<import("../../index.js").VerifyHashActionReturnType>) | undefined;
48
+ };
49
+ //# sourceMappingURL=marooTestnet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marooTestnet.d.ts","sourceRoot":"","sources":["../../../chains/definitions/marooTestnet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBvB,CAAA"}
@@ -61,6 +61,7 @@ export { base, basePreconf } from './definitions/base.js';
61
61
  export { basecampTestnet } from './definitions/basecampTestnet.js';
62
62
  export { baseGoerli } from './definitions/baseGoerli.js';
63
63
  export { baseSepolia, baseSepoliaPreconf } from './definitions/baseSepolia.js';
64
+ export { battlechain } from './definitions/battlechain.js';
64
65
  export { battlechainTestnet } from './definitions/battlechainTestnet.js';
65
66
  export { beam } from './definitions/beam.js';
66
67
  export { beamTestnet } from './definitions/beamTestnet.js';
@@ -388,6 +389,7 @@ export { mantleTestnet } from './definitions/mantleTestnet.js';
388
389
  export { mantraDuKongEVMTestnet } from './definitions/mantraDuKongEVMTestnet.js';
389
390
  export { mantraEVM } from './definitions/mantraEVM.js';
390
391
  export { mapProtocol } from './definitions/mapProtocol.js';
392
+ export { marooTestnet } from './definitions/marooTestnet.js';
391
393
  export { matchain } from './definitions/matchain.js';
392
394
  export { matchainTestnet } from './definitions/matchainTestnet.js';
393
395
  export { mchVerse } from './definitions/mchVerse.js';