viem 2.57.4 → 2.57.6

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 (372) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/_cjs/actions/public/waitForTransactionReceipt.js +5 -2
  3. package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
  4. package/_cjs/actions/wallet/waitForCallsStatus.js +25 -2
  5. package/_cjs/actions/wallet/waitForCallsStatus.js.map +1 -1
  6. package/_cjs/chains/definitions/arcTestnet.js +11 -8
  7. package/_cjs/chains/definitions/arcTestnet.js.map +1 -1
  8. package/_cjs/chains/definitions/qmsTestnet.js +30 -0
  9. package/_cjs/chains/definitions/qmsTestnet.js.map +1 -0
  10. package/_cjs/chains/definitions/tempo.js +1 -1
  11. package/_cjs/chains/definitions/tempoModerato.js +2 -2
  12. package/_cjs/chains/index.js +7 -5
  13. package/_cjs/chains/index.js.map +1 -1
  14. package/_cjs/clients/transports/ipc.js +19 -10
  15. package/_cjs/clients/transports/ipc.js.map +1 -1
  16. package/_cjs/clients/transports/webSocket.js +19 -10
  17. package/_cjs/clients/transports/webSocket.js.map +1 -1
  18. package/_cjs/errors/version.js +1 -1
  19. package/_cjs/tempo/Abis.js +297 -1
  20. package/_cjs/tempo/Abis.js.map +1 -1
  21. package/_cjs/tempo/Account.js +40 -40
  22. package/_cjs/tempo/Account.js.map +1 -1
  23. package/_cjs/tempo/Addresses.js +2 -1
  24. package/_cjs/tempo/Addresses.js.map +1 -1
  25. package/_cjs/tempo/Decorator.js +9 -8
  26. package/_cjs/tempo/Decorator.js.map +1 -1
  27. package/_cjs/tempo/ExecutionError.js +95 -4
  28. package/_cjs/tempo/ExecutionError.js.map +1 -1
  29. package/_cjs/tempo/Formatters.js +8 -7
  30. package/_cjs/tempo/Formatters.js.map +1 -1
  31. package/_cjs/tempo/KeyAuthorizationManager.js +25 -16
  32. package/_cjs/tempo/KeyAuthorizationManager.js.map +1 -1
  33. package/_cjs/tempo/Relay.js +9 -4
  34. package/_cjs/tempo/Relay.js.map +1 -1
  35. package/_cjs/tempo/Transaction.js +9 -9
  36. package/_cjs/tempo/Transaction.js.map +1 -1
  37. package/_cjs/tempo/Transport.js +21 -11
  38. package/_cjs/tempo/Transport.js.map +1 -1
  39. package/_cjs/tempo/{multisig → accounts}/Config.js +8 -8
  40. package/_cjs/tempo/{multisig → accounts}/Config.js.map +1 -1
  41. package/_cjs/tempo/{multisig → accounts}/Operation.js +10 -10
  42. package/_cjs/tempo/{multisig → accounts}/Operation.js.map +1 -1
  43. package/_cjs/tempo/{multisig → accounts}/Signature.js +2 -2
  44. package/_cjs/tempo/accounts/Signature.js.map +1 -0
  45. package/_cjs/tempo/actions/accessKey.js +442 -47
  46. package/_cjs/tempo/actions/accessKey.js.map +1 -1
  47. package/_cjs/tempo/actions/{multisig.js → accounts.js} +16 -20
  48. package/_cjs/tempo/actions/accounts.js.map +1 -0
  49. package/_cjs/tempo/actions/amm.js +90 -4
  50. package/_cjs/tempo/actions/amm.js.map +1 -1
  51. package/_cjs/tempo/actions/channel.js +183 -7
  52. package/_cjs/tempo/actions/channel.js.map +1 -1
  53. package/_cjs/tempo/actions/dex.js +507 -14
  54. package/_cjs/tempo/actions/dex.js.map +1 -1
  55. package/_cjs/tempo/actions/earn/deployment.js +4 -3
  56. package/_cjs/tempo/actions/earn/deployment.js.map +1 -1
  57. package/_cjs/tempo/actions/earn.js +22 -21
  58. package/_cjs/tempo/actions/earn.js.map +1 -1
  59. package/_cjs/tempo/actions/fee.js +85 -5
  60. package/_cjs/tempo/actions/fee.js.map +1 -1
  61. package/_cjs/tempo/actions/index.js +2 -2
  62. package/_cjs/tempo/actions/index.js.map +1 -1
  63. package/_cjs/tempo/actions/nonce.js +54 -1
  64. package/_cjs/tempo/actions/nonce.js.map +1 -1
  65. package/_cjs/tempo/actions/policy.js +35 -6
  66. package/_cjs/tempo/actions/policy.js.map +1 -1
  67. package/_cjs/tempo/actions/propAmm.js +18 -8
  68. package/_cjs/tempo/actions/propAmm.js.map +1 -1
  69. package/_cjs/tempo/actions/receivePolicy.js +7 -6
  70. package/_cjs/tempo/actions/receivePolicy.js.map +1 -1
  71. package/_cjs/tempo/actions/reward.js +7 -6
  72. package/_cjs/tempo/actions/reward.js.map +1 -1
  73. package/_cjs/tempo/actions/token.js +433 -22
  74. package/_cjs/tempo/actions/token.js.map +1 -1
  75. package/_cjs/tempo/actions/validator.js +12 -11
  76. package/_cjs/tempo/actions/validator.js.map +1 -1
  77. package/_cjs/tempo/actions/virtualAddress.js +3 -2
  78. package/_cjs/tempo/actions/virtualAddress.js.map +1 -1
  79. package/_cjs/tempo/actions/zone.js +12 -11
  80. package/_cjs/tempo/actions/zone.js.map +1 -1
  81. package/_cjs/tempo/chainConfig.js +37 -37
  82. package/_cjs/tempo/chainConfig.js.map +1 -1
  83. package/_cjs/tempo/errors.js +57 -1
  84. package/_cjs/tempo/errors.js.map +1 -1
  85. package/_cjs/tempo/index.js +3 -3
  86. package/_cjs/tempo/index.js.map +1 -1
  87. package/_cjs/tempo/internal/errors.js +46 -0
  88. package/_cjs/tempo/internal/errors.js.map +1 -0
  89. package/_cjs/tempo/internal/relay/{multisig.js → accounts.js} +90 -93
  90. package/_cjs/tempo/internal/relay/accounts.js.map +1 -0
  91. package/_cjs/tempo/internal/relay/keyAuthorization.js +296 -0
  92. package/_cjs/tempo/internal/relay/keyAuthorization.js.map +1 -0
  93. package/_cjs/tempo/internal/relay/plugin.js +17 -7
  94. package/_cjs/tempo/internal/relay/plugin.js.map +1 -1
  95. package/_cjs/tempo/internal/resolveError.js +128 -0
  96. package/_cjs/tempo/internal/resolveError.js.map +1 -0
  97. package/_cjs/tempo/internal/utils.js +1 -0
  98. package/_cjs/tempo/internal/utils.js.map +1 -1
  99. package/_cjs/utils/hash/normalizeSignature.js +1 -1
  100. package/_cjs/utils/hash/normalizeSignature.js.map +1 -1
  101. package/_cjs/utils/rpc/http.js +66 -31
  102. package/_cjs/utils/rpc/http.js.map +1 -1
  103. package/_cjs/utils/rpc/socket.js +1 -1
  104. package/_cjs/utils/rpc/socket.js.map +1 -1
  105. package/_esm/actions/public/waitForTransactionReceipt.js +5 -2
  106. package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
  107. package/_esm/actions/wallet/waitForCallsStatus.js +39 -2
  108. package/_esm/actions/wallet/waitForCallsStatus.js.map +1 -1
  109. package/_esm/chains/definitions/arcTestnet.js +11 -8
  110. package/_esm/chains/definitions/arcTestnet.js.map +1 -1
  111. package/_esm/chains/definitions/qmsTestnet.js +27 -0
  112. package/_esm/chains/definitions/qmsTestnet.js.map +1 -0
  113. package/_esm/chains/definitions/tempo.js +1 -1
  114. package/_esm/chains/definitions/tempoModerato.js +2 -2
  115. package/_esm/chains/index.js +1 -0
  116. package/_esm/chains/index.js.map +1 -1
  117. package/_esm/clients/transports/ipc.js +21 -10
  118. package/_esm/clients/transports/ipc.js.map +1 -1
  119. package/_esm/clients/transports/webSocket.js +21 -10
  120. package/_esm/clients/transports/webSocket.js.map +1 -1
  121. package/_esm/errors/version.js +1 -1
  122. package/_esm/tempo/Abis.js +297 -0
  123. package/_esm/tempo/Abis.js.map +1 -1
  124. package/_esm/tempo/Account.js +42 -42
  125. package/_esm/tempo/Account.js.map +1 -1
  126. package/_esm/tempo/Addresses.js +1 -0
  127. package/_esm/tempo/Addresses.js.map +1 -1
  128. package/_esm/tempo/Client.js +3 -3
  129. package/_esm/tempo/Decorator.js +9 -8
  130. package/_esm/tempo/Decorator.js.map +1 -1
  131. package/_esm/tempo/ExecutionError.js +96 -3
  132. package/_esm/tempo/ExecutionError.js.map +1 -1
  133. package/_esm/tempo/Formatters.js +11 -10
  134. package/_esm/tempo/Formatters.js.map +1 -1
  135. package/_esm/tempo/KeyAuthorizationManager.js +58 -16
  136. package/_esm/tempo/KeyAuthorizationManager.js.map +1 -1
  137. package/_esm/tempo/Relay.js +49 -8
  138. package/_esm/tempo/Relay.js.map +1 -1
  139. package/_esm/tempo/Transaction.js +11 -11
  140. package/_esm/tempo/Transaction.js.map +1 -1
  141. package/_esm/tempo/Transport.js +22 -12
  142. package/_esm/tempo/Transport.js.map +1 -1
  143. package/_esm/tempo/{multisig → accounts}/Config.js +14 -14
  144. package/_esm/tempo/{multisig → accounts}/Config.js.map +1 -1
  145. package/_esm/tempo/{multisig → accounts}/Operation.js +17 -17
  146. package/_esm/tempo/{multisig → accounts}/Operation.js.map +1 -1
  147. package/_esm/tempo/accounts/Signature.js +9 -0
  148. package/_esm/tempo/accounts/Signature.js.map +1 -0
  149. package/_esm/tempo/actions/accessKey.js +499 -48
  150. package/_esm/tempo/actions/accessKey.js.map +1 -1
  151. package/_esm/tempo/actions/{multisig.js → accounts.js} +34 -38
  152. package/_esm/tempo/actions/accounts.js.map +1 -0
  153. package/_esm/tempo/actions/amm.js +95 -4
  154. package/_esm/tempo/actions/amm.js.map +1 -1
  155. package/_esm/tempo/actions/channel.js +191 -7
  156. package/_esm/tempo/actions/channel.js.map +1 -1
  157. package/_esm/tempo/actions/dex.js +537 -14
  158. package/_esm/tempo/actions/dex.js.map +1 -1
  159. package/_esm/tempo/actions/earn/deployment.js +4 -3
  160. package/_esm/tempo/actions/earn/deployment.js.map +1 -1
  161. package/_esm/tempo/actions/earn.js +22 -21
  162. package/_esm/tempo/actions/earn.js.map +1 -1
  163. package/_esm/tempo/actions/fee.js +90 -6
  164. package/_esm/tempo/actions/fee.js.map +1 -1
  165. package/_esm/tempo/actions/index.js +1 -1
  166. package/_esm/tempo/actions/index.js.map +1 -1
  167. package/_esm/tempo/actions/nonce.js +57 -1
  168. package/_esm/tempo/actions/nonce.js.map +1 -1
  169. package/_esm/tempo/actions/policy.js +36 -6
  170. package/_esm/tempo/actions/policy.js.map +1 -1
  171. package/_esm/tempo/actions/propAmm.js +18 -8
  172. package/_esm/tempo/actions/propAmm.js.map +1 -1
  173. package/_esm/tempo/actions/receivePolicy.js +7 -6
  174. package/_esm/tempo/actions/receivePolicy.js.map +1 -1
  175. package/_esm/tempo/actions/reward.js +7 -6
  176. package/_esm/tempo/actions/reward.js.map +1 -1
  177. package/_esm/tempo/actions/token.js +461 -22
  178. package/_esm/tempo/actions/token.js.map +1 -1
  179. package/_esm/tempo/actions/validator.js +12 -11
  180. package/_esm/tempo/actions/validator.js.map +1 -1
  181. package/_esm/tempo/actions/virtualAddress.js +3 -2
  182. package/_esm/tempo/actions/virtualAddress.js.map +1 -1
  183. package/_esm/tempo/actions/zone.js +12 -11
  184. package/_esm/tempo/actions/zone.js.map +1 -1
  185. package/_esm/tempo/chainConfig.js +38 -38
  186. package/_esm/tempo/chainConfig.js.map +1 -1
  187. package/_esm/tempo/errors.js +63 -0
  188. package/_esm/tempo/errors.js.map +1 -1
  189. package/_esm/tempo/index.js +2 -1
  190. package/_esm/tempo/index.js.map +1 -1
  191. package/_esm/tempo/internal/errors.js +51 -0
  192. package/_esm/tempo/internal/errors.js.map +1 -0
  193. package/_esm/tempo/internal/relay/{multisig.js → accounts.js} +93 -98
  194. package/_esm/tempo/internal/relay/accounts.js.map +1 -0
  195. package/_esm/tempo/internal/relay/feePayer.js +1 -1
  196. package/_esm/tempo/internal/relay/feePayer.js.map +1 -1
  197. package/_esm/tempo/internal/relay/keyAuthorization.js +334 -0
  198. package/_esm/tempo/internal/relay/keyAuthorization.js.map +1 -0
  199. package/_esm/tempo/internal/relay/plugin.js +15 -6
  200. package/_esm/tempo/internal/relay/plugin.js.map +1 -1
  201. package/_esm/tempo/internal/resolveError.js +130 -0
  202. package/_esm/tempo/internal/resolveError.js.map +1 -0
  203. package/_esm/tempo/internal/utils.js +2 -0
  204. package/_esm/tempo/internal/utils.js.map +1 -1
  205. package/_esm/utils/hash/normalizeSignature.js +3 -2
  206. package/_esm/utils/hash/normalizeSignature.js.map +1 -1
  207. package/_esm/utils/rpc/http.js +74 -31
  208. package/_esm/utils/rpc/http.js.map +1 -1
  209. package/_esm/utils/rpc/socket.js +3 -1
  210. package/_esm/utils/rpc/socket.js.map +1 -1
  211. package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
  212. package/_types/actions/wallet/waitForCallsStatus.d.ts.map +1 -1
  213. package/_types/chains/definitions/arcTestnet.d.ts +5 -5
  214. package/_types/chains/definitions/arcTestnet.d.ts.map +1 -1
  215. package/_types/chains/definitions/qmsTestnet.d.ts +50 -0
  216. package/_types/chains/definitions/qmsTestnet.d.ts.map +1 -0
  217. package/_types/chains/definitions/tempo.d.ts +2 -2
  218. package/_types/chains/definitions/tempoModerato.d.ts +4 -4
  219. package/_types/chains/index.d.ts +1 -0
  220. package/_types/chains/index.d.ts.map +1 -1
  221. package/_types/clients/transports/ipc.d.ts.map +1 -1
  222. package/_types/clients/transports/webSocket.d.ts.map +1 -1
  223. package/_types/errors/version.d.ts +1 -1
  224. package/_types/tempo/Abis.d.ts +807 -0
  225. package/_types/tempo/Abis.d.ts.map +1 -1
  226. package/_types/tempo/Account.d.ts +28 -28
  227. package/_types/tempo/Account.d.ts.map +1 -1
  228. package/_types/tempo/Addresses.d.ts +1 -0
  229. package/_types/tempo/Addresses.d.ts.map +1 -1
  230. package/_types/tempo/Client.d.ts +3 -3
  231. package/_types/tempo/Decorator.d.ts +64 -38
  232. package/_types/tempo/Decorator.d.ts.map +1 -1
  233. package/_types/tempo/ExecutionError.d.ts +3 -1
  234. package/_types/tempo/ExecutionError.d.ts.map +1 -1
  235. package/_types/tempo/Formatters.d.ts.map +1 -1
  236. package/_types/tempo/KeyAuthorizationManager.d.ts +45 -2
  237. package/_types/tempo/KeyAuthorizationManager.d.ts.map +1 -1
  238. package/_types/tempo/Relay.d.ts +62 -12
  239. package/_types/tempo/Relay.d.ts.map +1 -1
  240. package/_types/tempo/Transaction.d.ts +14 -11
  241. package/_types/tempo/Transaction.d.ts.map +1 -1
  242. package/_types/tempo/Transport.d.ts +20 -7
  243. package/_types/tempo/Transport.d.ts.map +1 -1
  244. package/_types/tempo/{multisig → accounts}/Config.d.ts +7 -7
  245. package/_types/tempo/accounts/Config.d.ts.map +1 -0
  246. package/_types/tempo/{multisig → accounts}/Operation.d.ts +7 -7
  247. package/_types/tempo/accounts/Operation.d.ts.map +1 -0
  248. package/_types/tempo/{multisig → accounts}/Signature.d.ts +1 -1
  249. package/_types/tempo/accounts/Signature.d.ts.map +1 -0
  250. package/_types/tempo/actions/accessKey.d.ts +214 -25
  251. package/_types/tempo/actions/accessKey.d.ts.map +1 -1
  252. package/_types/tempo/actions/{multisig.d.ts → accounts.d.ts} +31 -29
  253. package/_types/tempo/actions/accounts.d.ts.map +1 -0
  254. package/_types/tempo/actions/amm.d.ts +39 -0
  255. package/_types/tempo/actions/amm.d.ts.map +1 -1
  256. package/_types/tempo/actions/channel.d.ts +77 -7
  257. package/_types/tempo/actions/channel.d.ts.map +1 -1
  258. package/_types/tempo/actions/dex.d.ts +222 -16
  259. package/_types/tempo/actions/dex.d.ts.map +1 -1
  260. package/_types/tempo/actions/earn/deployment.d.ts +7 -6
  261. package/_types/tempo/actions/earn/deployment.d.ts.map +1 -1
  262. package/_types/tempo/actions/earn.d.ts +15 -14
  263. package/_types/tempo/actions/earn.d.ts.map +1 -1
  264. package/_types/tempo/actions/fee.d.ts +32 -6
  265. package/_types/tempo/actions/fee.d.ts.map +1 -1
  266. package/_types/tempo/actions/index.d.ts +1 -1
  267. package/_types/tempo/actions/index.d.ts.map +1 -1
  268. package/_types/tempo/actions/nonce.d.ts +35 -0
  269. package/_types/tempo/actions/nonce.d.ts.map +1 -1
  270. package/_types/tempo/actions/policy.d.ts +29 -8
  271. package/_types/tempo/actions/policy.d.ts.map +1 -1
  272. package/_types/tempo/actions/propAmm.d.ts +9 -1
  273. package/_types/tempo/actions/propAmm.d.ts.map +1 -1
  274. package/_types/tempo/actions/receivePolicy.d.ts +10 -6
  275. package/_types/tempo/actions/receivePolicy.d.ts.map +1 -1
  276. package/_types/tempo/actions/reward.d.ts +7 -3
  277. package/_types/tempo/actions/reward.d.ts.map +1 -1
  278. package/_types/tempo/actions/token.d.ts +200 -32
  279. package/_types/tempo/actions/token.d.ts.map +1 -1
  280. package/_types/tempo/actions/validator.d.ts +17 -5
  281. package/_types/tempo/actions/validator.d.ts.map +1 -1
  282. package/_types/tempo/actions/virtualAddress.d.ts +4 -3
  283. package/_types/tempo/actions/virtualAddress.d.ts.map +1 -1
  284. package/_types/tempo/actions/zone.d.ts +10 -9
  285. package/_types/tempo/actions/zone.d.ts.map +1 -1
  286. package/_types/tempo/errors.d.ts +63 -1
  287. package/_types/tempo/errors.d.ts.map +1 -1
  288. package/_types/tempo/index.d.ts +3 -2
  289. package/_types/tempo/index.d.ts.map +1 -1
  290. package/_types/tempo/internal/errors.d.ts +59 -0
  291. package/_types/tempo/internal/errors.d.ts.map +1 -0
  292. package/_types/tempo/internal/relay/accounts.d.ts +15 -0
  293. package/_types/tempo/internal/relay/accounts.d.ts.map +1 -0
  294. package/_types/tempo/internal/relay/keyAuthorization.d.ts +25 -0
  295. package/_types/tempo/internal/relay/keyAuthorization.d.ts.map +1 -0
  296. package/_types/tempo/internal/relay/plugin.d.ts +6 -3
  297. package/_types/tempo/internal/relay/plugin.d.ts.map +1 -1
  298. package/_types/tempo/internal/resolveError.d.ts +8 -0
  299. package/_types/tempo/internal/resolveError.d.ts.map +1 -0
  300. package/_types/tempo/internal/utils.d.ts.map +1 -1
  301. package/_types/utils/hash/normalizeSignature.d.ts.map +1 -1
  302. package/_types/utils/rpc/http.d.ts.map +1 -1
  303. package/_types/utils/rpc/socket.d.ts.map +1 -1
  304. package/actions/public/waitForTransactionReceipt.ts +8 -2
  305. package/actions/wallet/waitForCallsStatus.ts +41 -2
  306. package/chains/definitions/arcTestnet.ts +11 -8
  307. package/chains/definitions/qmsTestnet.ts +27 -0
  308. package/chains/definitions/tempo.ts +1 -1
  309. package/chains/definitions/tempoModerato.ts +2 -2
  310. package/chains/index.ts +1 -0
  311. package/clients/transports/ipc.ts +38 -29
  312. package/clients/transports/webSocket.ts +42 -33
  313. package/errors/version.ts +1 -1
  314. package/package.json +2 -2
  315. package/tempo/Abis.ts +298 -0
  316. package/tempo/Account.ts +95 -84
  317. package/tempo/Addresses.ts +1 -0
  318. package/tempo/Client.ts +3 -3
  319. package/tempo/Decorator.ts +91 -60
  320. package/tempo/ExecutionError.ts +102 -4
  321. package/tempo/Formatters.ts +14 -13
  322. package/tempo/KeyAuthorizationManager.ts +71 -19
  323. package/tempo/Relay.ts +70 -14
  324. package/tempo/Transaction.ts +31 -23
  325. package/tempo/Transport.ts +49 -21
  326. package/tempo/{multisig → accounts}/Config.ts +21 -21
  327. package/tempo/{multisig → accounts}/Operation.ts +26 -26
  328. package/tempo/{multisig → accounts}/Signature.ts +5 -3
  329. package/tempo/actions/accessKey.ts +675 -104
  330. package/tempo/actions/{multisig.ts → accounts.ts} +54 -59
  331. package/tempo/actions/amm.ts +126 -4
  332. package/tempo/actions/channel.ts +248 -14
  333. package/tempo/actions/dex.ts +599 -33
  334. package/tempo/actions/earn/deployment.ts +11 -9
  335. package/tempo/actions/earn.ts +40 -35
  336. package/tempo/actions/fee.ts +111 -9
  337. package/tempo/actions/index.ts +1 -1
  338. package/tempo/actions/nonce.ts +86 -1
  339. package/tempo/actions/policy.ts +66 -14
  340. package/tempo/actions/propAmm.ts +36 -9
  341. package/tempo/actions/receivePolicy.ts +26 -15
  342. package/tempo/actions/reward.ts +17 -9
  343. package/tempo/actions/token.ts +519 -54
  344. package/tempo/actions/validator.ts +40 -16
  345. package/tempo/actions/virtualAddress.ts +7 -5
  346. package/tempo/actions/zone.ts +25 -20
  347. package/tempo/chainConfig.ts +52 -52
  348. package/tempo/errors.ts +114 -1
  349. package/tempo/index.ts +5 -4
  350. package/tempo/internal/errors.ts +110 -0
  351. package/tempo/internal/relay/{multisig.ts → accounts.ts} +118 -118
  352. package/tempo/internal/relay/feePayer.ts +1 -1
  353. package/tempo/internal/relay/keyAuthorization.ts +415 -0
  354. package/tempo/internal/relay/plugin.ts +20 -7
  355. package/tempo/internal/resolveError.ts +169 -0
  356. package/tempo/internal/utils.ts +2 -0
  357. package/utils/hash/normalizeSignature.ts +3 -2
  358. package/utils/rpc/http.ts +76 -30
  359. package/utils/rpc/socket.ts +3 -1
  360. package/_cjs/tempo/actions/multisig.js.map +0 -1
  361. package/_cjs/tempo/internal/relay/multisig.js.map +0 -1
  362. package/_cjs/tempo/multisig/Signature.js.map +0 -1
  363. package/_esm/tempo/actions/multisig.js.map +0 -1
  364. package/_esm/tempo/internal/relay/multisig.js.map +0 -1
  365. package/_esm/tempo/multisig/Signature.js +0 -9
  366. package/_esm/tempo/multisig/Signature.js.map +0 -1
  367. package/_types/tempo/actions/multisig.d.ts.map +0 -1
  368. package/_types/tempo/internal/relay/multisig.d.ts +0 -4
  369. package/_types/tempo/internal/relay/multisig.d.ts.map +0 -1
  370. package/_types/tempo/multisig/Config.d.ts.map +0 -1
  371. package/_types/tempo/multisig/Operation.d.ts.map +0 -1
  372. package/_types/tempo/multisig/Signature.d.ts.map +0 -1
@@ -1,11 +1,7 @@
1
1
  import type { Address } from 'abitype'
2
2
  import type * as Hex from 'ox/Hex'
3
3
  import type * as RpcSchema from 'ox/RpcSchema'
4
- import {
5
- MultisigConfig,
6
- MultisigOperation,
7
- type RpcSchemaTempo,
8
- } from 'ox/tempo'
4
+ import { AccountConfig, AccountOperation, type RpcSchemaTempo } from 'ox/tempo'
9
5
  import type { Account } from '../../accounts/types.js'
10
6
  import type { ReadContractReturnType } from '../../actions/public/readContract.js'
11
7
  import { readContract } from '../../actions/public/readContract.js'
@@ -20,14 +16,16 @@ import type { Log } from '../../types/log.js'
20
16
  import type { Compute } from '../../types/utils.js'
21
17
  import { parseEventLogs } from '../../utils/abi/parseEventLogs.js'
22
18
  import * as Abis from '../Abis.js'
23
- import { fromMultisig, type MultisigAccount } from '../Account.js'
19
+ import { type ConfigurableAccount, fromConfig } from '../Account.js'
24
20
  import * as Addresses from '../Addresses.js'
21
+ import type * as Errors from '../errors.js'
22
+ import { withExecutionError } from '../internal/errors.js'
25
23
  import type { ReadParameters, WriteParameters } from '../internal/types.js'
26
24
  import { defineCall } from '../internal/utils.js'
27
25
  import type * as Transaction from '../Transaction.js'
28
26
 
29
27
  /**
30
- * Gets the current cached config for a multisig account.
28
+ * Gets the current cached config for a configurable account.
31
29
  *
32
30
  * The coordinator reads the account's current onchain commitment and returns
33
31
  * the matching config from its store. It returns `null` when the config is not
@@ -35,7 +33,7 @@ import type * as Transaction from '../Transaction.js'
35
33
  *
36
34
  * @example
37
35
  * ```ts
38
- * const config = await client.multisig.getConfig({
36
+ * const config = await client.accounts.getConfig({
39
37
  * address: '0x...',
40
38
  * })
41
39
  * ```
@@ -49,32 +47,32 @@ export async function getConfig(
49
47
  parameters: getConfig.Parameters,
50
48
  ): Promise<getConfig.ReturnValue> {
51
49
  const config = await client.request<{
52
- Method: 'multisig_getConfig'
50
+ Method: 'account_getConfig'
53
51
  Parameters: [{ address: Address }]
54
- ReturnType: MultisigConfig.Rpc | null
52
+ ReturnType: AccountConfig.Rpc | null
55
53
  }>({
56
- method: 'multisig_getConfig',
54
+ method: 'account_getConfig',
57
55
  params: [{ address: parameters.address }],
58
56
  })
59
- return config ? MultisigConfig.fromRpc(config) : null
57
+ return config ? AccountConfig.fromRpc(config) : null
60
58
  }
61
59
 
62
60
  export declare namespace getConfig {
63
61
  /** Parameters for {@link getConfig}. */
64
62
  export type Parameters = {
65
- /** Multisig account address. */
63
+ /** Configurable account address. */
66
64
  address: Address
67
65
  }
68
66
 
69
67
  /** Return value for {@link getConfig}. */
70
- export type ReturnValue = MultisigConfig.Config | null
68
+ export type ReturnValue = AccountConfig.Config | null
71
69
 
72
70
  /** Error type for {@link getConfig}. */
73
71
  export type ErrorType = BaseErrorType
74
72
  }
75
73
 
76
74
  /**
77
- * Gets the current configuration commitment for a native multisig account.
75
+ * Gets the current configuration commitment for a configurable account.
78
76
  *
79
77
  * @example
80
78
  * ```ts
@@ -87,7 +85,7 @@ export declare namespace getConfig {
87
85
  * transport: http(),
88
86
  * })
89
87
  *
90
- * const commitment = await Actions.multisig.getConfigCommitment(client, {
88
+ * const commitment = await Actions.accounts.getConfigCommitment(client, {
91
89
  * account: '0x...',
92
90
  * })
93
91
  * ```
@@ -105,7 +103,7 @@ export async function getConfigCommitment<
105
103
  parameters: getConfigCommitment.Parameters,
106
104
  ): Promise<getConfigCommitment.ReturnValue> {
107
105
  const { account, ...rest } = parameters
108
- return readContract(client, {
106
+ return withExecutionError(readContract)(client, {
109
107
  ...rest,
110
108
  ...getConfigCommitment.call({ account }),
111
109
  })
@@ -115,7 +113,7 @@ export namespace getConfigCommitment {
115
113
  export type Parameters = ReadParameters & Args
116
114
 
117
115
  export type Args = {
118
- /** Initialized multisig account address. */
116
+ /** Initialized configurable account address. */
119
117
  account: Address
120
118
  }
121
119
 
@@ -141,10 +139,12 @@ export namespace getConfigCommitment {
141
139
  functionName: 'getConfigCommitment',
142
140
  })
143
141
  }
142
+
143
+ export type ErrorType = Errors.ExecutionErrorType | BaseErrorType
144
144
  }
145
145
 
146
146
  /**
147
- * Gets a coordinated multisig operation by its hash.
147
+ * Gets a coordinated account operation by its hash.
148
148
  *
149
149
  * @param client - Client.
150
150
  * @param parameters - Parameters.
@@ -154,33 +154,33 @@ export async function getOperation(
154
154
  client: Client,
155
155
  parameters: getOperation.Parameters,
156
156
  ): Promise<getOperation.ReturnValue> {
157
- type multisig_getOperation = Extract<
158
- RpcSchema.ToViem<RpcSchemaTempo.Multisig>[number],
159
- { Method: 'multisig_getOperation' }
157
+ type account_getOperation = Extract<
158
+ RpcSchema.ToViem<RpcSchemaTempo.Account>[number],
159
+ { Method: 'account_getOperation' }
160
160
  >
161
- const operation = await client.request<multisig_getOperation>({
162
- method: 'multisig_getOperation',
161
+ const operation = await client.request<account_getOperation>({
162
+ method: 'account_getOperation',
163
163
  params: [parameters.hash],
164
164
  })
165
- return operation ? MultisigOperation.fromRpc(operation) : null
165
+ return operation ? AccountOperation.fromRpc(operation) : null
166
166
  }
167
167
 
168
168
  export declare namespace getOperation {
169
169
  /** Parameters for {@link getOperation}. */
170
170
  export type Parameters = {
171
- /** Multisig operation hash. */
171
+ /** Account operation hash. */
172
172
  hash: Hex.Hex
173
173
  }
174
174
 
175
175
  /** Return value for {@link getOperation}. */
176
- export type ReturnValue = MultisigOperation.Operation | null
176
+ export type ReturnValue = AccountOperation.Operation | null
177
177
 
178
178
  /** Error type for {@link getOperation}. */
179
179
  export type ErrorType = BaseErrorType
180
180
  }
181
181
 
182
182
  /**
183
- * Replaces the current configuration for a native multisig account.
183
+ * Replaces the current configuration for a configurable account.
184
184
  *
185
185
  * The transaction must be authorized directly by the account's current owner
186
186
  * quorum. Local owner-signing flows can include {@link updateConfig.call} in a
@@ -196,7 +196,7 @@ export declare namespace getOperation {
196
196
  * const owner = Account.fromSecp256k1(
197
197
  * '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
198
198
  * )
199
- * const account = Account.fromMultisig({
199
+ * const account = Account.fromConfig({
200
200
  * address: 'infer',
201
201
  * owners: [owner],
202
202
  * })
@@ -210,7 +210,7 @@ export declare namespace getOperation {
210
210
  * to: account.address,
211
211
  * })
212
212
  *
213
- * const hash = await Actions.multisig.updateConfig(client, {
213
+ * const hash = await Actions.accounts.updateConfig(client, {
214
214
  * account,
215
215
  * nextConfig: {
216
216
  * owners: [{ owner: owner.address, weight: 1 }],
@@ -239,22 +239,22 @@ export namespace updateConfig {
239
239
  account extends Account | undefined = Account | undefined,
240
240
  > = WriteParameters<chain, account> & {
241
241
  /** Complete current config. Inferred from the account or coordinator when omitted. */
242
- currentConfig?: MultisigConfig.Config | undefined
242
+ currentConfig?: AccountConfig.Config | undefined
243
243
  /** Replacement owners and threshold. */
244
- nextConfig: Pick<MultisigConfig.Config, 'owners' | 'threshold'>
244
+ nextConfig: Pick<AccountConfig.Config, 'owners' | 'threshold'>
245
245
  }
246
246
 
247
247
  export type Args = {
248
248
  /** Complete current config. */
249
- currentConfig: MultisigConfig.Config
249
+ currentConfig: AccountConfig.Config
250
250
  /** Replacement owners and threshold. */
251
- nextConfig: Pick<MultisigConfig.Config, 'owners' | 'threshold'>
251
+ nextConfig: Pick<AccountConfig.Config, 'owners' | 'threshold'>
252
252
  }
253
253
 
254
254
  export type ReturnValue = WriteContractReturnType
255
255
 
256
256
  // TODO: exhaustive error type
257
- export type ErrorType = BaseErrorType
257
+ export type ErrorType = Errors.ExecutionErrorType | BaseErrorType
258
258
 
259
259
  /** @internal */
260
260
  export async function inner<
@@ -276,9 +276,9 @@ export namespace updateConfig {
276
276
  const account = (() => {
277
277
  if (
278
278
  typeof accountValue === 'object' &&
279
- accountValue.source === 'multisig'
279
+ accountValue.source === 'configurable'
280
280
  )
281
- return accountValue as MultisigAccount
281
+ return accountValue as ConfigurableAccount
282
282
  return undefined
283
283
  })()
284
284
  const config = (() => {
@@ -293,25 +293,25 @@ export namespace updateConfig {
293
293
  return undefined
294
294
  })()
295
295
  const currentConfig = await (async () => {
296
- if (config) return MultisigConfig.from(config)
296
+ if (config) return AccountConfig.from(config)
297
297
  if (!address)
298
298
  throw new Error(
299
- 'A multisig account address or current config is required.',
299
+ 'A configurable account address or current config is required.',
300
300
  )
301
301
  const cachedConfig = await getConfig(client, { address })
302
302
  if (!cachedConfig)
303
303
  throw new Error(
304
- `No current multisig config is cached for account ${address}. Provide the current config.`,
304
+ `No current account config is cached for account ${address}. Provide the current config.`,
305
305
  )
306
306
  return cachedConfig
307
307
  })()
308
308
  const resolvedAccount = (() => {
309
309
  if (account) return { ...account, config: currentConfig }
310
310
  if (typeof accountValue === 'object') return accountValue
311
- if (address) return fromMultisig({ address, ...currentConfig })
311
+ if (address) return fromConfig({ address, ...currentConfig })
312
312
  return undefined
313
313
  })()
314
- return (await action(client, {
314
+ return (await withExecutionError(action)(client, {
315
315
  ...rest,
316
316
  ...(resolvedAccount ? { account: resolvedAccount } : {}),
317
317
  ...updateConfig.call({ currentConfig, nextConfig }),
@@ -328,11 +328,11 @@ export namespace updateConfig {
328
328
  *
329
329
  * @example
330
330
  * ```ts
331
- * import { Actions, type MultisigConfig } from 'viem/tempo'
331
+ * import { Actions, type AccountConfig } from 'viem/tempo'
332
332
  *
333
- * declare const currentConfig: MultisigConfig.Config
333
+ * declare const currentConfig: AccountConfig.Config
334
334
  *
335
- * const call = Actions.multisig.updateConfig.call({
335
+ * const call = Actions.accounts.updateConfig.call({
336
336
  * currentConfig,
337
337
  * nextConfig: {
338
338
  * owners: [{ owner: '0x...', weight: 1 }],
@@ -341,17 +341,12 @@ export namespace updateConfig {
341
341
  * })
342
342
  * ```
343
343
  *
344
- * @param args - Current and replacement multisig configurations.
344
+ * @param args - Current and replacement account configurations.
345
345
  * @returns The call.
346
346
  */
347
347
  export function call(args: Args) {
348
- const currentConfig = MultisigConfig.from(args.currentConfig)
349
- const nextConfig = MultisigConfig.from({
350
- owners: args.nextConfig.owners,
351
- salt: currentConfig.salt,
352
- threshold: args.nextConfig.threshold,
353
- version: currentConfig.version + 1n,
354
- })
348
+ const currentConfig = AccountConfig.from(args.currentConfig)
349
+ const nextConfig = AccountConfig.update(currentConfig, args.nextConfig)
355
350
  return defineCall({
356
351
  address: Addresses.nativeMultisig,
357
352
  abi: Abis.nativeMultisig,
@@ -379,16 +374,16 @@ export namespace updateConfig {
379
374
  }
380
375
 
381
376
  /**
382
- * Replaces a native multisig configuration and waits for confirmation.
377
+ * Replaces a configurable account configuration and waits for confirmation.
383
378
  *
384
379
  * @example
385
380
  * ```ts
386
381
  * import { createWalletClient, custom, type EIP1193Provider } from 'viem'
387
382
  * import { tempo } from 'viem/chains'
388
- * import { Actions, type MultisigConfig } from 'viem/tempo'
383
+ * import { Actions, type AccountConfig } from 'viem/tempo'
389
384
  *
390
385
  * declare const provider: EIP1193Provider
391
- * declare const currentConfig: MultisigConfig.Config
386
+ * declare const currentConfig: AccountConfig.Config
392
387
  *
393
388
  * const client = createWalletClient({
394
389
  * account: '0x...',
@@ -396,7 +391,7 @@ export namespace updateConfig {
396
391
  * transport: custom(provider),
397
392
  * })
398
393
  *
399
- * const { receipt } = await Actions.multisig.updateConfigSync(client, {
394
+ * const { receipt } = await Actions.accounts.updateConfigSync(client, {
400
395
  * currentConfig,
401
396
  * nextConfig: {
402
397
  * owners: [{ owner: '0x...', weight: 1 }],
@@ -426,7 +421,7 @@ export async function updateConfigSync<
426
421
  const { args } = updateConfig.extractEvent(receipt.logs)
427
422
  return {
428
423
  account: args.account,
429
- config: MultisigConfig.from({
424
+ config: AccountConfig.from({
430
425
  owners: args.owners,
431
426
  salt: args.salt,
432
427
  threshold: args.threshold,
@@ -446,7 +441,7 @@ export namespace updateConfigSync {
446
441
 
447
442
  export type ReturnValue = Compute<{
448
443
  account: Address
449
- config: MultisigConfig.Config
444
+ config: AccountConfig.Config
450
445
  receipt: Transaction.TransactionReceipt
451
446
  }>
452
447
 
@@ -12,6 +12,7 @@ import { writeContract } from '../../actions/wallet/writeContract.js'
12
12
  import { writeContractSync } from '../../actions/wallet/writeContractSync.js'
13
13
  import type { Client } from '../../clients/createClient.js'
14
14
  import type { Transport } from '../../clients/transports/createTransport.js'
15
+ import type { BaseErrorType } from '../../errors/base.js'
15
16
  import type { Chain } from '../../types/chain.js'
16
17
  import type { ExtractAbiItem, GetEventArgs } from '../../types/contract.js'
17
18
  import type { Log, Log as viem_Log } from '../../types/log.js'
@@ -19,8 +20,16 @@ import type { Hex } from '../../types/misc.js'
19
20
  import type { TransactionReceipt } from '../../types/transaction.js'
20
21
  import type { Compute, OneOf, UnionOmit } from '../../types/utils.js'
21
22
  import { parseEventLogs } from '../../utils/abi/parseEventLogs.js'
23
+ import { isAddressEqual } from '../../utils/address/isAddressEqual.js'
22
24
  import * as Abis from '../Abis.js'
23
25
  import * as Addresses from '../Addresses.js'
26
+ import type * as Errors from '../errors.js'
27
+ import { TempoExecutionError } from '../errors.js'
28
+ import {
29
+ type Context,
30
+ type Resolvers,
31
+ withExecutionError,
32
+ } from '../internal/errors.js'
24
33
  import type { ReadParameters, WriteParameters } from '../internal/types.js'
25
34
  import { defineCall } from '../internal/utils.js'
26
35
  import type { TransactionReceipt as TempoTransactionReceipt } from '../Transaction.js'
@@ -149,7 +158,7 @@ export async function getLiquidityBalance<chain extends Chain | undefined>(
149
158
  parameters: getLiquidityBalance.Parameters,
150
159
  ): Promise<getLiquidityBalance.ReturnValue> {
151
160
  const { address, poolId, userToken, validatorToken, ...rest } = parameters
152
- return readContract(client, {
161
+ return withExecutionError(readContract)(client, {
153
162
  ...rest,
154
163
  ...getLiquidityBalance.call({
155
164
  address,
@@ -211,6 +220,8 @@ export namespace getLiquidityBalance {
211
220
  functionName: 'liquidityBalances',
212
221
  })
213
222
  }
223
+
224
+ export type ErrorType = Errors.ExecutionErrorType | BaseErrorType
214
225
  }
215
226
 
216
227
  /**
@@ -287,7 +298,7 @@ export namespace rebalanceSwap {
287
298
  amountOut,
288
299
  to,
289
300
  })
290
- return (await action(client, {
301
+ return (await withExecutionError(action)(client, {
291
302
  ...rest,
292
303
  ...call,
293
304
  } as never)) as never
@@ -364,6 +375,9 @@ export namespace rebalanceSwap {
364
375
  if (!log) throw new Error('`RebalanceSwap` event not found.')
365
376
  return log
366
377
  }
378
+
379
+ // TODO: exhaustive error type
380
+ export type ErrorType = Errors.ExecutionErrorType | BaseErrorType
367
381
  }
368
382
 
369
383
  /**
@@ -433,6 +447,8 @@ export namespace rebalanceSwapSync {
433
447
  receipt: TransactionReceipt
434
448
  }
435
449
  >
450
+
451
+ export type ErrorType = rebalanceSwap.ErrorType
436
452
  }
437
453
 
438
454
  /**
@@ -515,7 +531,7 @@ export namespace mint {
515
531
  validatorTokenAddress,
516
532
  validatorTokenAmount,
517
533
  })
518
- return (await action(client, {
534
+ return (await withExecutionError(action)(client, {
519
535
  ...rest,
520
536
  ...call,
521
537
  } as never)) as never
@@ -597,6 +613,9 @@ export namespace mint {
597
613
  if (!log) throw new Error('`Mint` event not found.')
598
614
  return log
599
615
  }
616
+
617
+ // TODO: exhaustive error type
618
+ export type ErrorType = Errors.ExecutionErrorType | BaseErrorType
600
619
  }
601
620
 
602
621
  /**
@@ -666,6 +685,8 @@ export namespace mintSync {
666
685
  receipt: TransactionReceipt
667
686
  }
668
687
  >
688
+
689
+ export type ErrorType = mint.ErrorType
669
690
  }
670
691
 
671
692
  /**
@@ -737,7 +758,7 @@ export namespace burn {
737
758
  ): Promise<ReturnType<action>> {
738
759
  const { liquidity, to, userToken, validatorToken, ...rest } = parameters
739
760
  const call = burn.call({ liquidity, to, userToken, validatorToken })
740
- return (await action(client, {
761
+ return (await withExecutionError(action)(client, {
741
762
  ...rest,
742
763
  ...call,
743
764
  } as never)) as never
@@ -814,6 +835,9 @@ export namespace burn {
814
835
  if (!log) throw new Error('`Burn` event not found.')
815
836
  return log
816
837
  }
838
+
839
+ // TODO: exhaustive error type
840
+ export type ErrorType = Errors.ExecutionErrorType | BaseErrorType
817
841
  }
818
842
 
819
843
  /**
@@ -883,6 +907,8 @@ export namespace burnSync {
883
907
  receipt: TransactionReceipt
884
908
  }
885
909
  >
910
+
911
+ export type ErrorType = burn.ErrorType
886
912
  }
887
913
 
888
914
  /**
@@ -1124,3 +1150,99 @@ export declare namespace watchBurn {
1124
1150
  validatorToken?: TokenId.TokenIdOrAddress | undefined
1125
1151
  }
1126
1152
  }
1153
+
1154
+ // Errors
1155
+
1156
+ /** Errors this module throws for decoded Tempo errors. Narrow with `error.name`. */
1157
+ export type ExecutionErrorType = AmmInsufficientLiquidityErrorType
1158
+
1159
+ /** `AmmInsufficientLiquidityError` with a literal `name`, for narrowing. */
1160
+ export type AmmInsufficientLiquidityErrorType =
1161
+ AmmInsufficientLiquidityError & {
1162
+ name: 'AmmInsufficientLiquidityError'
1163
+ }
1164
+
1165
+ /** Thrown when a fee AMM pool cannot cover a swap, deposit, or withdrawal. */
1166
+ export class AmmInsufficientLiquidityError extends TempoExecutionError<
1167
+ Errors.TempoExecutionError.Decoded<
1168
+ 'InsufficientLiquidity' | 'InsufficientReserves'
1169
+ >
1170
+ > {
1171
+ /** Amount of the call (`amountOut`, `amountValidatorToken`, or `liquidity`). */
1172
+ amount: bigint | undefined
1173
+ /** Pool reserve of `userToken`, when known. */
1174
+ reserveUserToken: bigint | undefined
1175
+ /** Pool reserve of `validatorToken`, when known. */
1176
+ reserveValidatorToken: bigint | undefined
1177
+ /** User token of the pool. */
1178
+ userToken: Address | undefined
1179
+ /** Validator token of the pool. */
1180
+ validatorToken: Address | undefined
1181
+
1182
+ constructor(
1183
+ parameters: Errors.TempoExecutionError.Parameters & {
1184
+ amount?: bigint | undefined
1185
+ reserveUserToken?: bigint | undefined
1186
+ reserveValidatorToken?: bigint | undefined
1187
+ userToken?: Address | undefined
1188
+ validatorToken?: Address | undefined
1189
+ },
1190
+ ) {
1191
+ const {
1192
+ amount,
1193
+ reserveUserToken,
1194
+ reserveValidatorToken,
1195
+ userToken,
1196
+ validatorToken,
1197
+ } = parameters
1198
+ super(parameters, {
1199
+ details: {
1200
+ 'user token': userToken,
1201
+ 'validator token': validatorToken,
1202
+ amount,
1203
+ 'user token reserve': reserveUserToken,
1204
+ 'validator token reserve': reserveValidatorToken,
1205
+ },
1206
+ name: 'AmmInsufficientLiquidityError',
1207
+ })
1208
+ this.amount = amount
1209
+ this.reserveUserToken = reserveUserToken
1210
+ this.reserveValidatorToken = reserveValidatorToken
1211
+ this.userToken = userToken
1212
+ this.validatorToken = validatorToken
1213
+ }
1214
+ }
1215
+
1216
+ async function resolvePool(context: Context) {
1217
+ const { call } = context
1218
+ if (!call || !isAddressEqual(call.address, Addresses.feeManager))
1219
+ return undefined
1220
+ const userToken = call.arg<Address>('userToken')
1221
+ const validatorToken = call.arg<Address>('validatorToken')
1222
+ if (!userToken || !validatorToken) return undefined
1223
+ const [pool] = await context.read([
1224
+ {
1225
+ address: Addresses.feeManager,
1226
+ abi: Abis.feeAmm,
1227
+ functionName: 'getPool',
1228
+ args: [userToken, validatorToken],
1229
+ },
1230
+ ])
1231
+ return new AmmInsufficientLiquidityError({
1232
+ ...context.base,
1233
+ amount:
1234
+ call.arg<bigint>('amountOut') ??
1235
+ call.arg<bigint>('amountValidatorToken') ??
1236
+ call.arg<bigint>('liquidity'),
1237
+ reserveUserToken: pool?.result?.reserveUserToken,
1238
+ reserveValidatorToken: pool?.result?.reserveValidatorToken,
1239
+ userToken,
1240
+ validatorToken,
1241
+ })
1242
+ }
1243
+
1244
+ /** @internal */
1245
+ export const errorResolvers: Resolvers = {
1246
+ 'InsufficientLiquidity()': resolvePool,
1247
+ 'InsufficientReserves()': resolvePool,
1248
+ }