viem 2.56.8 → 2.57.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 (359) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +0 -1
  3. package/_cjs/actions/index.js +5 -3
  4. package/_cjs/actions/index.js.map +1 -1
  5. package/_cjs/actions/public/getStorageValues.js +17 -0
  6. package/_cjs/actions/public/getStorageValues.js.map +1 -0
  7. package/_cjs/actions/public/simulateBlocks.js +2 -0
  8. package/_cjs/actions/public/simulateBlocks.js.map +1 -1
  9. package/_cjs/actions/public/waitForTransactionReceipt.js +12 -1
  10. package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
  11. package/_cjs/chains/definitions/blockdag.js +23 -0
  12. package/_cjs/chains/definitions/blockdag.js.map +1 -0
  13. package/_cjs/chains/definitions/candyChain.js +29 -0
  14. package/_cjs/chains/definitions/candyChain.js.map +1 -0
  15. package/_cjs/chains/definitions/creditCoin3Devnet.js +6 -0
  16. package/_cjs/chains/definitions/creditCoin3Devnet.js.map +1 -1
  17. package/_cjs/chains/definitions/creditCoin3Mainnet.js +6 -0
  18. package/_cjs/chains/definitions/creditCoin3Mainnet.js.map +1 -1
  19. package/_cjs/chains/definitions/creditCoin3Testnet.js +6 -0
  20. package/_cjs/chains/definitions/creditCoin3Testnet.js.map +1 -1
  21. package/_cjs/chains/definitions/kortana.js +23 -0
  22. package/_cjs/chains/definitions/kortana.js.map +1 -0
  23. package/_cjs/chains/definitions/rabbitChainTestnet.js +24 -0
  24. package/_cjs/chains/definitions/rabbitChainTestnet.js.map +1 -0
  25. package/_cjs/chains/index.js +22 -14
  26. package/_cjs/chains/index.js.map +1 -1
  27. package/_cjs/clients/createClientResolver.js +45 -0
  28. package/_cjs/clients/createClientResolver.js.map +1 -0
  29. package/_cjs/clients/decorators/public.js +2 -0
  30. package/_cjs/clients/decorators/public.js.map +1 -1
  31. package/_cjs/errors/version.js +1 -1
  32. package/_cjs/index.js +13 -9
  33. package/_cjs/index.js.map +1 -1
  34. package/_cjs/op-stack/actions/getGame.js +1 -1
  35. package/_cjs/op-stack/actions/getGame.js.map +1 -1
  36. package/_cjs/op-stack/actions/getGames.js +1 -1
  37. package/_cjs/op-stack/actions/getGames.js.map +1 -1
  38. package/_cjs/op-stack/actions/getTimeToNextGame.js +1 -1
  39. package/_cjs/op-stack/actions/getTimeToNextGame.js.map +1 -1
  40. package/_cjs/op-stack/actions/getTimeToNextL2Output.js +1 -1
  41. package/_cjs/op-stack/actions/getTimeToNextL2Output.js.map +1 -1
  42. package/_cjs/tempo/Abis.js +1211 -32
  43. package/_cjs/tempo/Abis.js.map +1 -1
  44. package/_cjs/tempo/Addresses.js +2 -1
  45. package/_cjs/tempo/Addresses.js.map +1 -1
  46. package/_cjs/tempo/Client.js +2 -10
  47. package/_cjs/tempo/Client.js.map +1 -1
  48. package/_cjs/tempo/Decorator.js +12 -0
  49. package/_cjs/tempo/Decorator.js.map +1 -1
  50. package/_cjs/tempo/ExecutionError.js +290 -0
  51. package/_cjs/tempo/ExecutionError.js.map +1 -0
  52. package/_cjs/tempo/Relay.js +88 -0
  53. package/_cjs/tempo/Relay.js.map +1 -0
  54. package/_cjs/tempo/Selectors.js +7 -4
  55. package/_cjs/tempo/Selectors.js.map +1 -1
  56. package/_cjs/tempo/Transaction.js.map +1 -1
  57. package/_cjs/tempo/Transport.js +21 -12
  58. package/_cjs/tempo/Transport.js.map +1 -1
  59. package/_cjs/tempo/actions/index.js +2 -1
  60. package/_cjs/tempo/actions/index.js.map +1 -1
  61. package/_cjs/tempo/actions/propAmm.js +349 -0
  62. package/_cjs/tempo/actions/propAmm.js.map +1 -0
  63. package/_cjs/tempo/chainConfig.js +3 -0
  64. package/_cjs/tempo/chainConfig.js.map +1 -1
  65. package/_cjs/tempo/index.js +3 -3
  66. package/_cjs/tempo/index.js.map +1 -1
  67. package/_cjs/tempo/internal/relay/cache.js +74 -0
  68. package/_cjs/tempo/internal/relay/cache.js.map +1 -0
  69. package/_cjs/tempo/internal/relay/deadline.js +35 -0
  70. package/_cjs/tempo/internal/relay/deadline.js.map +1 -0
  71. package/_cjs/tempo/internal/relay/error.js +102 -0
  72. package/_cjs/tempo/internal/relay/error.js.map +1 -0
  73. package/_cjs/tempo/internal/relay/feePayer.js +426 -0
  74. package/_cjs/tempo/internal/relay/feePayer.js.map +1 -0
  75. package/_cjs/tempo/internal/relay/feeToken.js +143 -0
  76. package/_cjs/tempo/internal/relay/feeToken.js.map +1 -0
  77. package/_cjs/tempo/{Multisig.js → internal/relay/multisig.js} +132 -122
  78. package/_cjs/tempo/internal/relay/multisig.js.map +1 -0
  79. package/_cjs/tempo/internal/relay/plugin.js +13 -0
  80. package/_cjs/tempo/internal/relay/plugin.js.map +1 -0
  81. package/_cjs/tempo/internal/relay/preflight.js +58 -0
  82. package/_cjs/tempo/internal/relay/preflight.js.map +1 -0
  83. package/_cjs/tempo/internal/relay/request.js +319 -0
  84. package/_cjs/tempo/internal/relay/request.js.map +1 -0
  85. package/_cjs/tempo/internal/relay/simulate.js +267 -0
  86. package/_cjs/tempo/internal/relay/simulate.js.map +1 -0
  87. package/_cjs/tempo/internal/relay/utils.js +174 -0
  88. package/_cjs/tempo/internal/relay/utils.js.map +1 -0
  89. package/_cjs/tempo/internal/relay/virtualAddress.js +78 -0
  90. package/_cjs/tempo/internal/relay/virtualAddress.js.map +1 -0
  91. package/_cjs/tempo/internal/relay.js +139 -0
  92. package/_cjs/tempo/internal/relay.js.map +1 -0
  93. package/_cjs/tempo/multisig/Config.js +0 -2
  94. package/_cjs/tempo/multisig/Config.js.map +1 -1
  95. package/_cjs/tempo/multisig/Operation.js +1 -2
  96. package/_cjs/tempo/multisig/Operation.js.map +1 -1
  97. package/_cjs/tokens/definitions/eurc.js +1 -0
  98. package/_cjs/tokens/definitions/eurc.js.map +1 -1
  99. package/_cjs/tokens/definitions/usdc.js +1 -0
  100. package/_cjs/tokens/definitions/usdc.js.map +1 -1
  101. package/_cjs/utils/siwe/parseSiweMessage.js +3 -3
  102. package/_cjs/utils/siwe/parseSiweMessage.js.map +1 -1
  103. package/_esm/actions/index.js +1 -0
  104. package/_esm/actions/index.js.map +1 -1
  105. package/_esm/actions/public/getStorageValues.js +39 -0
  106. package/_esm/actions/public/getStorageValues.js.map +1 -0
  107. package/_esm/actions/public/simulateBlocks.js +4 -0
  108. package/_esm/actions/public/simulateBlocks.js.map +1 -1
  109. package/_esm/actions/public/waitForTransactionReceipt.js +15 -1
  110. package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
  111. package/_esm/chains/definitions/blockdag.js +20 -0
  112. package/_esm/chains/definitions/blockdag.js.map +1 -0
  113. package/_esm/chains/definitions/candyChain.js +26 -0
  114. package/_esm/chains/definitions/candyChain.js.map +1 -0
  115. package/_esm/chains/definitions/creditCoin3Devnet.js +6 -0
  116. package/_esm/chains/definitions/creditCoin3Devnet.js.map +1 -1
  117. package/_esm/chains/definitions/creditCoin3Mainnet.js +6 -0
  118. package/_esm/chains/definitions/creditCoin3Mainnet.js.map +1 -1
  119. package/_esm/chains/definitions/creditCoin3Testnet.js +6 -0
  120. package/_esm/chains/definitions/creditCoin3Testnet.js.map +1 -1
  121. package/_esm/chains/definitions/kortana.js +20 -0
  122. package/_esm/chains/definitions/kortana.js.map +1 -0
  123. package/_esm/chains/definitions/rabbitChainTestnet.js +21 -0
  124. package/_esm/chains/definitions/rabbitChainTestnet.js.map +1 -0
  125. package/_esm/chains/index.js +4 -0
  126. package/_esm/chains/index.js.map +1 -1
  127. package/_esm/clients/createClientResolver.js +64 -0
  128. package/_esm/clients/createClientResolver.js.map +1 -0
  129. package/_esm/clients/decorators/public.js +2 -0
  130. package/_esm/clients/decorators/public.js.map +1 -1
  131. package/_esm/errors/version.js +1 -1
  132. package/_esm/index.js +2 -0
  133. package/_esm/index.js.map +1 -1
  134. package/_esm/op-stack/actions/getGame.js +1 -1
  135. package/_esm/op-stack/actions/getGame.js.map +1 -1
  136. package/_esm/op-stack/actions/getGames.js +1 -1
  137. package/_esm/op-stack/actions/getGames.js.map +1 -1
  138. package/_esm/op-stack/actions/getTimeToNextGame.js +2 -2
  139. package/_esm/op-stack/actions/getTimeToNextGame.js.map +1 -1
  140. package/_esm/op-stack/actions/getTimeToNextL2Output.js +2 -2
  141. package/_esm/op-stack/actions/getTimeToNextL2Output.js.map +1 -1
  142. package/_esm/tempo/Abis.js +1214 -34
  143. package/_esm/tempo/Abis.js.map +1 -1
  144. package/_esm/tempo/Addresses.js +2 -0
  145. package/_esm/tempo/Addresses.js.map +1 -1
  146. package/_esm/tempo/Client.js +8 -14
  147. package/_esm/tempo/Client.js.map +1 -1
  148. package/_esm/tempo/Decorator.js +12 -0
  149. package/_esm/tempo/Decorator.js.map +1 -1
  150. package/_esm/tempo/ExecutionError.js +306 -0
  151. package/_esm/tempo/ExecutionError.js.map +1 -0
  152. package/_esm/tempo/Relay.js +170 -0
  153. package/_esm/tempo/Relay.js.map +1 -0
  154. package/_esm/tempo/Selectors.js +6 -3
  155. package/_esm/tempo/Selectors.js.map +1 -1
  156. package/_esm/tempo/Transaction.js.map +1 -1
  157. package/_esm/tempo/Transport.js +21 -46
  158. package/_esm/tempo/Transport.js.map +1 -1
  159. package/_esm/tempo/actions/index.js +1 -0
  160. package/_esm/tempo/actions/index.js.map +1 -1
  161. package/_esm/tempo/actions/propAmm.js +539 -0
  162. package/_esm/tempo/actions/propAmm.js.map +1 -0
  163. package/_esm/tempo/chainConfig.js +4 -0
  164. package/_esm/tempo/chainConfig.js.map +1 -1
  165. package/_esm/tempo/index.js +8 -3
  166. package/_esm/tempo/index.js.map +1 -1
  167. package/_esm/tempo/internal/relay/cache.js +72 -0
  168. package/_esm/tempo/internal/relay/cache.js.map +1 -0
  169. package/_esm/tempo/internal/relay/deadline.js +34 -0
  170. package/_esm/tempo/internal/relay/deadline.js.map +1 -0
  171. package/_esm/tempo/internal/relay/error.js +101 -0
  172. package/_esm/tempo/internal/relay/error.js.map +1 -0
  173. package/_esm/tempo/internal/relay/feePayer.js +442 -0
  174. package/_esm/tempo/internal/relay/feePayer.js.map +1 -0
  175. package/_esm/tempo/internal/relay/feeToken.js +143 -0
  176. package/_esm/tempo/internal/relay/feeToken.js.map +1 -0
  177. package/_esm/tempo/{Multisig.js → internal/relay/multisig.js} +133 -129
  178. package/_esm/tempo/internal/relay/multisig.js.map +1 -0
  179. package/_esm/tempo/internal/relay/plugin.js +10 -0
  180. package/_esm/tempo/internal/relay/plugin.js.map +1 -0
  181. package/_esm/tempo/internal/relay/preflight.js +57 -0
  182. package/_esm/tempo/internal/relay/preflight.js.map +1 -0
  183. package/_esm/tempo/internal/relay/request.js +321 -0
  184. package/_esm/tempo/internal/relay/request.js.map +1 -0
  185. package/_esm/tempo/internal/relay/simulate.js +277 -0
  186. package/_esm/tempo/internal/relay/simulate.js.map +1 -0
  187. package/_esm/tempo/internal/relay/utils.js +174 -0
  188. package/_esm/tempo/internal/relay/utils.js.map +1 -0
  189. package/_esm/tempo/internal/relay/virtualAddress.js +73 -0
  190. package/_esm/tempo/internal/relay/virtualAddress.js.map +1 -0
  191. package/_esm/tempo/internal/relay.js +138 -0
  192. package/_esm/tempo/internal/relay.js.map +1 -0
  193. package/_esm/tempo/multisig/Config.js +2 -1
  194. package/_esm/tempo/multisig/Config.js.map +1 -1
  195. package/_esm/tempo/multisig/Operation.js +1 -1
  196. package/_esm/tempo/multisig/Operation.js.map +1 -1
  197. package/_esm/tokens/definitions/eurc.js +1 -0
  198. package/_esm/tokens/definitions/eurc.js.map +1 -1
  199. package/_esm/tokens/definitions/usdc.js +1 -0
  200. package/_esm/tokens/definitions/usdc.js.map +1 -1
  201. package/_esm/utils/siwe/parseSiweMessage.js +3 -3
  202. package/_esm/utils/siwe/parseSiweMessage.js.map +1 -1
  203. package/_types/actions/index.d.ts +1 -0
  204. package/_types/actions/index.d.ts.map +1 -1
  205. package/_types/actions/public/getStorageValues.d.ts +59 -0
  206. package/_types/actions/public/getStorageValues.d.ts.map +1 -0
  207. package/_types/actions/public/simulateBlocks.d.ts +8 -0
  208. package/_types/actions/public/simulateBlocks.d.ts.map +1 -1
  209. package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
  210. package/_types/chains/definitions/blockdag.d.ts +51 -0
  211. package/_types/chains/definitions/blockdag.d.ts.map +1 -0
  212. package/_types/chains/definitions/candyChain.d.ts +48 -0
  213. package/_types/chains/definitions/candyChain.d.ts.map +1 -0
  214. package/_types/chains/definitions/creditCoin3Devnet.d.ts +6 -9
  215. package/_types/chains/definitions/creditCoin3Devnet.d.ts.map +1 -1
  216. package/_types/chains/definitions/creditCoin3Mainnet.d.ts +6 -9
  217. package/_types/chains/definitions/creditCoin3Mainnet.d.ts.map +1 -1
  218. package/_types/chains/definitions/creditCoin3Testnet.d.ts +6 -9
  219. package/_types/chains/definitions/creditCoin3Testnet.d.ts.map +1 -1
  220. package/_types/chains/definitions/kortana.d.ts +51 -0
  221. package/_types/chains/definitions/kortana.d.ts.map +1 -0
  222. package/_types/chains/definitions/rabbitChainTestnet.d.ts +51 -0
  223. package/_types/chains/definitions/rabbitChainTestnet.d.ts.map +1 -0
  224. package/_types/chains/index.d.ts +4 -0
  225. package/_types/chains/index.d.ts.map +1 -1
  226. package/_types/clients/createClientResolver.d.ts +76 -0
  227. package/_types/clients/createClientResolver.d.ts.map +1 -0
  228. package/_types/clients/decorators/public.d.ts +11 -0
  229. package/_types/clients/decorators/public.d.ts.map +1 -1
  230. package/_types/errors/version.d.ts +1 -1
  231. package/_types/index.d.ts +3 -0
  232. package/_types/index.d.ts.map +1 -1
  233. package/_types/op-stack/actions/getGame.d.ts.map +1 -1
  234. package/_types/tempo/Abis.d.ts +14686 -9568
  235. package/_types/tempo/Abis.d.ts.map +1 -1
  236. package/_types/tempo/Addresses.d.ts +2 -0
  237. package/_types/tempo/Addresses.d.ts.map +1 -1
  238. package/_types/tempo/Capabilities.d.ts +7 -28
  239. package/_types/tempo/Capabilities.d.ts.map +1 -1
  240. package/_types/tempo/Client.d.ts +6 -15
  241. package/_types/tempo/Client.d.ts.map +1 -1
  242. package/_types/tempo/Decorator.d.ts +205 -1
  243. package/_types/tempo/Decorator.d.ts.map +1 -1
  244. package/_types/tempo/ExecutionError.d.ts +79 -0
  245. package/_types/tempo/ExecutionError.d.ts.map +1 -0
  246. package/_types/tempo/Relay.d.ts +302 -0
  247. package/_types/tempo/Relay.d.ts.map +1 -0
  248. package/_types/tempo/Selectors.d.ts +6 -3
  249. package/_types/tempo/Selectors.d.ts.map +1 -1
  250. package/_types/tempo/Transaction.d.ts +2 -1
  251. package/_types/tempo/Transaction.d.ts.map +1 -1
  252. package/_types/tempo/Transport.d.ts +15 -29
  253. package/_types/tempo/Transport.d.ts.map +1 -1
  254. package/_types/tempo/actions/earn.d.ts +621 -1
  255. package/_types/tempo/actions/earn.d.ts.map +1 -1
  256. package/_types/tempo/actions/index.d.ts +1 -0
  257. package/_types/tempo/actions/index.d.ts.map +1 -1
  258. package/_types/tempo/actions/propAmm.d.ts +2228 -0
  259. package/_types/tempo/actions/propAmm.d.ts.map +1 -0
  260. package/_types/tempo/chainConfig.d.ts.map +1 -1
  261. package/_types/tempo/index.d.ts +8 -3
  262. package/_types/tempo/index.d.ts.map +1 -1
  263. package/_types/tempo/internal/relay/cache.d.ts +9 -0
  264. package/_types/tempo/internal/relay/cache.d.ts.map +1 -0
  265. package/_types/tempo/internal/relay/deadline.d.ts +4 -0
  266. package/_types/tempo/internal/relay/deadline.d.ts.map +1 -0
  267. package/_types/tempo/internal/relay/error.d.ts +47 -0
  268. package/_types/tempo/internal/relay/error.d.ts.map +1 -0
  269. package/_types/tempo/internal/relay/feePayer.d.ts +70 -0
  270. package/_types/tempo/internal/relay/feePayer.d.ts.map +1 -0
  271. package/_types/tempo/internal/relay/feeToken.d.ts +38 -0
  272. package/_types/tempo/internal/relay/feeToken.d.ts.map +1 -0
  273. package/_types/tempo/internal/relay/multisig.d.ts +4 -0
  274. package/_types/tempo/internal/relay/multisig.d.ts.map +1 -0
  275. package/_types/tempo/internal/relay/plugin.d.ts +5 -0
  276. package/_types/tempo/internal/relay/plugin.d.ts.map +1 -0
  277. package/_types/tempo/internal/relay/preflight.d.ts +17 -0
  278. package/_types/tempo/internal/relay/preflight.d.ts.map +1 -0
  279. package/_types/tempo/internal/relay/request.d.ts +16 -0
  280. package/_types/tempo/internal/relay/request.d.ts.map +1 -0
  281. package/_types/tempo/internal/relay/simulate.d.ts +59 -0
  282. package/_types/tempo/internal/relay/simulate.d.ts.map +1 -0
  283. package/_types/tempo/internal/relay/utils.d.ts +294 -0
  284. package/_types/tempo/internal/relay/utils.d.ts.map +1 -0
  285. package/_types/tempo/internal/relay/virtualAddress.d.ts +9 -0
  286. package/_types/tempo/internal/relay/virtualAddress.d.ts.map +1 -0
  287. package/_types/tempo/internal/relay.d.ts +4 -0
  288. package/_types/tempo/internal/relay.d.ts.map +1 -0
  289. package/_types/tempo/multisig/Config.d.ts +0 -13
  290. package/_types/tempo/multisig/Config.d.ts.map +1 -1
  291. package/_types/tempo/multisig/Operation.d.ts +0 -5
  292. package/_types/tempo/multisig/Operation.d.ts.map +1 -1
  293. package/_types/tokens/definitions/eurc.d.ts +1 -0
  294. package/_types/tokens/definitions/eurc.d.ts.map +1 -1
  295. package/_types/tokens/definitions/usdc.d.ts +1 -0
  296. package/_types/tokens/definitions/usdc.d.ts.map +1 -1
  297. package/_types/tokens/sets.d.ts +3 -0
  298. package/_types/tokens/sets.d.ts.map +1 -1
  299. package/_types/types/eip1193.d.ts +20 -0
  300. package/_types/types/eip1193.d.ts.map +1 -1
  301. package/_types/utils/siwe/parseSiweMessage.d.ts.map +1 -1
  302. package/actions/index.ts +6 -0
  303. package/actions/public/getStorageValues.ts +93 -0
  304. package/actions/public/simulateBlocks.ts +13 -0
  305. package/actions/public/waitForTransactionReceipt.ts +16 -2
  306. package/chains/definitions/blockdag.ts +20 -0
  307. package/chains/definitions/candyChain.ts +26 -0
  308. package/chains/definitions/creditCoin3Devnet.ts +6 -0
  309. package/chains/definitions/creditCoin3Mainnet.ts +6 -0
  310. package/chains/definitions/creditCoin3Testnet.ts +6 -0
  311. package/chains/definitions/kortana.ts +20 -0
  312. package/chains/definitions/rabbitChainTestnet.ts +21 -0
  313. package/chains/index.ts +4 -0
  314. package/clients/createClientResolver.ts +191 -0
  315. package/clients/decorators/public.ts +18 -0
  316. package/errors/version.ts +1 -1
  317. package/index.ts +11 -0
  318. package/op-stack/actions/getGame.ts +3 -1
  319. package/op-stack/actions/getGames.ts +1 -1
  320. package/op-stack/actions/getTimeToNextGame.ts +2 -2
  321. package/op-stack/actions/getTimeToNextL2Output.ts +2 -2
  322. package/package.json +1 -1
  323. package/tempo/Abis.ts +1218 -34
  324. package/tempo/Addresses.ts +2 -0
  325. package/tempo/Capabilities.ts +7 -29
  326. package/tempo/Client.ts +8 -38
  327. package/tempo/Decorator.ts +239 -3
  328. package/tempo/ExecutionError.ts +418 -0
  329. package/tempo/Relay.ts +428 -0
  330. package/tempo/Selectors.ts +10 -4
  331. package/tempo/Transaction.ts +2 -1
  332. package/tempo/Transport.ts +69 -60
  333. package/tempo/actions/index.ts +1 -0
  334. package/tempo/actions/propAmm.ts +998 -0
  335. package/tempo/chainConfig.ts +4 -0
  336. package/tempo/index.ts +7 -3
  337. package/tempo/internal/relay/cache.ts +82 -0
  338. package/tempo/internal/relay/deadline.ts +45 -0
  339. package/tempo/internal/relay/error.ts +128 -0
  340. package/tempo/internal/relay/feePayer.ts +692 -0
  341. package/tempo/internal/relay/feeToken.ts +190 -0
  342. package/tempo/{Multisig.ts → internal/relay/multisig.ts} +162 -193
  343. package/tempo/internal/relay/plugin.ts +13 -0
  344. package/tempo/internal/relay/preflight.ts +81 -0
  345. package/tempo/internal/relay/request.ts +391 -0
  346. package/tempo/internal/relay/simulate.ts +367 -0
  347. package/tempo/internal/relay/utils.ts +202 -0
  348. package/tempo/internal/relay/virtualAddress.ts +95 -0
  349. package/tempo/internal/relay.ts +158 -0
  350. package/tempo/multisig/Config.ts +3 -2
  351. package/tempo/multisig/Operation.ts +1 -1
  352. package/tokens/definitions/eurc.ts +1 -0
  353. package/tokens/definitions/usdc.ts +1 -0
  354. package/types/eip1193.ts +20 -0
  355. package/utils/siwe/parseSiweMessage.ts +21 -13
  356. package/_cjs/tempo/Multisig.js.map +0 -1
  357. package/_esm/tempo/Multisig.js.map +0 -1
  358. package/_types/tempo/Multisig.d.ts +0 -37
  359. package/_types/tempo/Multisig.d.ts.map +0 -1
@@ -12,6 +12,8 @@ export const accountImplementation =
12
12
  export const accountKeychain = '0xaAAAaaAA00000000000000000000000000000000'
13
13
  export const accountRegistrar = '0x7702ac0000000000000000000000000000000000'
14
14
  export const addressRegistry = '0xfdc0000000000000000000000000000000000000'
15
+ /** Current consensus committee precompile address, used with `Abis.currentCommittee` to read committee members. */
16
+ export const currentCommittee = '0xC077e00000000000000000000000000000000000'
15
17
  export const feeManager = '0xfeec000000000000000000000000000000000000'
16
18
  export const nativeMultisig = '0xAACC000000000000000000000000000000000000'
17
19
  /** Temporary recovery factory until the production address is finalized. */
@@ -1,8 +1,8 @@
1
1
  import type { Address } from 'abitype'
2
2
  import type { DefaultCapabilitiesSchema } from '../types/capabilities.js'
3
3
  import type { Hex } from '../types/misc.js'
4
- import type { ExactPartial, OneOf } from '../types/utils.js'
5
- import type { DecodeErrorResultReturnType } from '../utils/index.js'
4
+ import type { ExactPartial } from '../types/utils.js'
5
+ import type * as ExecutionError from './ExecutionError.js'
6
6
  import type { TransactionRequestTempo } from './Transaction.js'
7
7
 
8
8
  export type Schema = Omit<DefaultCapabilitiesSchema, 'sendCalls'> & {
@@ -18,27 +18,13 @@ export type Schema = Omit<DefaultCapabilitiesSchema, 'sendCalls'> & {
18
18
  export type FillTransactionRequestCapabilities = {
19
19
  /** Whether to include `balanceDiffs` in the response. */
20
20
  balanceDiffs?: boolean | undefined
21
+ /** Whether execution reverts return error capabilities instead of throwing. */
22
+ errors?: boolean | undefined
21
23
  }
22
24
 
23
25
  export type FillTransactionCapabilities = {
24
- autoSwap?:
25
- | {
26
- calls: readonly { to: Address; data: Hex; value: Hex }[]
27
- maxIn: SwapAmount
28
- minOut: SwapAmount
29
- slippage: number
30
- }
31
- | undefined
32
26
  balanceDiffs?: Readonly<Record<Address, readonly BalanceDiff[]>> | undefined
33
- error?:
34
- | OneOf<
35
- | (DecodeErrorResultReturnType & {
36
- data: Hex
37
- message: string
38
- })
39
- | { errorName: 'unknown'; message: string }
40
- >
41
- | undefined
27
+ error?: ExecutionError.Rpc | undefined
42
28
  fee?:
43
29
  | {
44
30
  amount: Hex
@@ -47,7 +33,7 @@ export type FillTransactionCapabilities = {
47
33
  symbol: string
48
34
  }
49
35
  | undefined
50
- requireFunds?:
36
+ insufficientFunds?:
51
37
  | {
52
38
  amount: Hex
53
39
  decimals: number
@@ -68,6 +54,7 @@ export type FillTransactionCapabilities = {
68
54
  virtualAddresses?: Readonly<Record<Address, Address | null>> | undefined
69
55
  }
70
56
 
57
+ /** A token balance preview. Incoming funds and outgoing approval exposure can produce separate entries for the same token. */
71
58
  export type BalanceDiff = {
72
59
  address: Address
73
60
  decimals: number
@@ -78,12 +65,3 @@ export type BalanceDiff = {
78
65
  symbol: string
79
66
  value: Hex
80
67
  }
81
-
82
- export type SwapAmount = {
83
- decimals: number
84
- formatted: string
85
- name: string
86
- symbol: string
87
- token: Address
88
- value: Hex
89
- }
package/tempo/Client.ts CHANGED
@@ -25,8 +25,6 @@ import type { RpcSchema } from '../types/eip1193.js'
25
25
  import type { Prettify } from '../types/utils.js'
26
26
  import { tempo, tempoTestnet } from './Chain.js'
27
27
  import { type Decorator, decorator as tempoActions } from './Decorator.js'
28
- import * as Store from './Store.js'
29
- import { withMultisig } from './Transport.js'
30
28
 
31
29
  /**
32
30
  * Configuration for a Tempo {@link Client}.
@@ -54,19 +52,6 @@ export type ClientConfig<
54
52
  * @default tempo (or `tempoTestnet` when `testnet` is truthy)
55
53
  */
56
54
  chain?: chain | Chain | undefined
57
- /**
58
- * Enables native multisig approval coordination. Pass `true` to use an
59
- * in-memory store or provide a shared store.
60
- *
61
- * @default undefined
62
- */
63
- experimental_multisig?:
64
- | true
65
- | {
66
- /** Store shared by multisig coordinators. */
67
- store: Store.Atomic
68
- }
69
- | undefined
70
55
  /**
71
56
  * Default fee token for the Client. Extended onto the chain so it applies
72
57
  * to every transaction sent with the Client.
@@ -121,8 +106,8 @@ export type CreateClientErrorType = ErrorType
121
106
  * Defaults to the `tempo` mainnet chain and `http` transport, so a minimal
122
107
  * client can be created with `createClient()`. Pass `testnet` to use the
123
108
  * Tempo testnet, or `chain` to override the chain entirely. Pass `feeToken`
124
- * to set a default fee token for every transaction. Pass
125
- * `experimental_multisig` to coordinate multisig owner approvals.
109
+ * to set a default fee token for every transaction. Use `withRelay` with a
110
+ * `Relay.multisig` plugin to coordinate multisig owner approvals.
126
111
  *
127
112
  * @example
128
113
  * ```ts
@@ -156,11 +141,13 @@ export type CreateClientErrorType = ErrorType
156
141
  *
157
142
  * @example
158
143
  * ```ts
159
- * import { createClient } from 'viem/tempo'
144
+ * import { createClient, http, Relay, Store, withRelay } from 'viem/tempo'
160
145
  *
161
146
  * // Multisig coordination with a client-local in-memory store.
162
147
  * const client = createClient({
163
- * experimental_multisig: true,
148
+ * transport: withRelay(http(), {
149
+ * plugins: [Relay.multisig({ store: Store.memory() })],
150
+ * }),
164
151
  * })
165
152
  * ```
166
153
  *
@@ -182,15 +169,7 @@ export function createClient<
182
169
  : accountOrAddress,
183
170
  rpcSchema
184
171
  > {
185
- const {
186
- chain,
187
- experimental_multisig,
188
- feeToken,
189
- testnet,
190
- tokens,
191
- transport,
192
- ...rest
193
- } = parameters
172
+ const { chain, feeToken, testnet, tokens, transport, ...rest } = parameters
194
173
  const baseChain = chain ?? (testnet ? tempoTestnet : tempo)
195
174
  const resolvedChain =
196
175
  feeToken && typeof (baseChain as { extend?: unknown }).extend === 'function'
@@ -198,20 +177,11 @@ export function createClient<
198
177
  feeToken,
199
178
  })
200
179
  : baseChain
201
- const transport_ = transport ?? http()
202
- const resolvedTransport = experimental_multisig
203
- ? withMultisig(
204
- transport_,
205
- experimental_multisig === true
206
- ? { store: Store.memory() }
207
- : experimental_multisig,
208
- )
209
- : transport_
210
180
  return createClient_({
211
181
  ...rest,
212
182
  chain: resolvedChain,
213
183
  tokens: tokens ?? tokenSets.tempo,
214
- transport: resolvedTransport,
184
+ transport: transport ?? http(),
215
185
  } as ClientConfig_)
216
186
  .extend(publicActions)
217
187
  .extend(walletActions)
@@ -13,6 +13,7 @@ import * as feeActions from './actions/fee.js'
13
13
  import * as multisigActions from './actions/multisig.js'
14
14
  import * as nonceActions from './actions/nonce.js'
15
15
  import * as policyActions from './actions/policy.js'
16
+ import * as propAmmActions from './actions/propAmm.js'
16
17
  import * as receivePolicyActions from './actions/receivePolicy.js'
17
18
  import * as rewardActions from './actions/reward.js'
18
19
  import * as simulateActions from './actions/simulate.js'
@@ -3015,6 +3016,228 @@ type DecoratorBase<
3015
3016
  parameters: policyActions.watchBlacklistUpdated.Parameters,
3016
3017
  ) => () => void
3017
3018
  }
3019
+ propAmm: {
3020
+ /**
3021
+ * Reads the base token of a propAMM pool.
3022
+ *
3023
+ * @example
3024
+ * ```ts
3025
+ * import { createClient, http } from 'viem'
3026
+ * import { tempo } from 'viem/chains'
3027
+ * import { tempoActions } from 'viem/tempo'
3028
+ *
3029
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3030
+ *
3031
+ * const base = await client.propAmm.baseToken({ pool: '0x...' })
3032
+ * ```
3033
+ *
3034
+ * @param parameters - Pool and read options.
3035
+ * @returns The base token address.
3036
+ */
3037
+ baseToken: (
3038
+ parameters: propAmmActions.baseToken.Parameters,
3039
+ ) => Promise<propAmmActions.baseToken.ReturnValue>
3040
+ /**
3041
+ * Quotes an exact input or output for a caller, recipient, and customer route.
3042
+ *
3043
+ * @example
3044
+ * ```ts
3045
+ * import { createClient, http } from 'viem'
3046
+ * import { tempo } from 'viem/chains'
3047
+ * import { tempoActions } from 'viem/tempo'
3048
+ *
3049
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3050
+ *
3051
+ * const { amountOut, price, updatedAt } = await client.propAmm.getSwapQuote({
3052
+ * amountIn: 1_000_000n,
3053
+ * mode: 'exactInput',
3054
+ * pool: '0x...',
3055
+ * recipient: '0x...',
3056
+ * taker: '0x...',
3057
+ * })
3058
+ * ```
3059
+ *
3060
+ * @param parameters - Route, swap mode, amount, and read options.
3061
+ * @returns Quoted amount, oracle observation, rounding credit, and swap request.
3062
+ */
3063
+ getSwapQuote: <
3064
+ const parameters extends propAmmActions.getSwapQuote.Parameters,
3065
+ >(
3066
+ parameters: parameters,
3067
+ ) => Promise<propAmmActions.getSwapQuote.ReturnValue<parameters>>
3068
+ /**
3069
+ * Reads whether a propAMM pool is paused.
3070
+ *
3071
+ * @example
3072
+ * ```ts
3073
+ * import { createClient, http } from 'viem'
3074
+ * import { tempo } from 'viem/chains'
3075
+ * import { tempoActions } from 'viem/tempo'
3076
+ *
3077
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3078
+ *
3079
+ * const paused = await client.propAmm.paused({ pool: '0x...' })
3080
+ * ```
3081
+ *
3082
+ * @param parameters - Pool and read options.
3083
+ * @returns Whether swaps are paused.
3084
+ */
3085
+ paused: (
3086
+ parameters: propAmmActions.paused.Parameters,
3087
+ ) => Promise<propAmmActions.paused.ReturnValue>
3088
+ /**
3089
+ * Reads whether a resolved address may receive swap output.
3090
+ *
3091
+ * @example
3092
+ * ```ts
3093
+ * import { createClient, http } from 'viem'
3094
+ * import { tempo } from 'viem/chains'
3095
+ * import { tempoActions } from 'viem/tempo'
3096
+ *
3097
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3098
+ *
3099
+ * const allowed = await client.propAmm.recipientAllowed({
3100
+ * pool: '0x...',
3101
+ * recipient: '0x...',
3102
+ * })
3103
+ * ```
3104
+ *
3105
+ * @param parameters - Pool, resolved recipient, and read options.
3106
+ * @returns Whether the recipient is allowed.
3107
+ */
3108
+ recipientAllowed: (
3109
+ parameters: propAmmActions.recipientAllowed.Parameters,
3110
+ ) => Promise<propAmmActions.recipientAllowed.ReturnValue>
3111
+ /**
3112
+ * Resolves a Tempo recipient to the address checked by the pool's allowlist.
3113
+ *
3114
+ * @example
3115
+ * ```ts
3116
+ * import { createClient, http } from 'viem'
3117
+ * import { tempo } from 'viem/chains'
3118
+ * import { tempoActions } from 'viem/tempo'
3119
+ *
3120
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3121
+ *
3122
+ * const resolved = await client.propAmm.resolveRecipient({
3123
+ * pool: '0x...',
3124
+ * recipient: '0x...',
3125
+ * })
3126
+ * ```
3127
+ *
3128
+ * @param parameters - Pool, recipient, and read options.
3129
+ * @returns The resolved recipient address.
3130
+ */
3131
+ resolveRecipient: (
3132
+ parameters: propAmmActions.resolveRecipient.Parameters,
3133
+ ) => Promise<propAmmActions.resolveRecipient.ReturnValue>
3134
+ /**
3135
+ * Reads the quote token of a propAMM pool.
3136
+ *
3137
+ * @example
3138
+ * ```ts
3139
+ * import { createClient, http } from 'viem'
3140
+ * import { tempo } from 'viem/chains'
3141
+ * import { tempoActions } from 'viem/tempo'
3142
+ *
3143
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3144
+ *
3145
+ * const quote = await client.propAmm.quoteToken({ pool: '0x...' })
3146
+ * ```
3147
+ *
3148
+ * @param parameters - Pool and read options.
3149
+ * @returns The quote token address.
3150
+ */
3151
+ quoteToken: (
3152
+ parameters: propAmmActions.quoteToken.Parameters,
3153
+ ) => Promise<propAmmActions.quoteToken.ReturnValue>
3154
+ /**
3155
+ * Approves the input token and swaps an exact input or output in one transaction.
3156
+ *
3157
+ * @example
3158
+ * ```ts
3159
+ * import { createClient, http } from 'viem'
3160
+ * import { privateKeyToAccount } from 'viem/accounts'
3161
+ * import { tempo } from 'viem/chains'
3162
+ * import { tempoActions } from 'viem/tempo'
3163
+ *
3164
+ * const client = createClient({
3165
+ * account: privateKeyToAccount('0x...'),
3166
+ * chain: tempo,
3167
+ * transport: http(),
3168
+ * }).extend(tempoActions())
3169
+ * const hash = await client.propAmm.swap({
3170
+ * amountIn: 1_000_000n,
3171
+ * expectedOraclePrice: 1_000_000_000_000_000_000n,
3172
+ * minAmountOut: 1_000_000n,
3173
+ * minimumOracleUpdatedAt: 1_799_999_000n,
3174
+ * mode: 'exactInput',
3175
+ * pool: '0x...',
3176
+ * })
3177
+ * ```
3178
+ *
3179
+ * @param parameters - Swap and transaction options.
3180
+ * @returns The transaction hash.
3181
+ */
3182
+ swap: (
3183
+ parameters: propAmmActions.swap.Parameters<chain, account>,
3184
+ ) => Promise<propAmmActions.swap.ReturnValue>
3185
+ /**
3186
+ * Approves the input token, swaps, and returns the confirmed trade and receipt.
3187
+ *
3188
+ * @example
3189
+ * ```ts
3190
+ * import { createClient, http } from 'viem'
3191
+ * import { privateKeyToAccount } from 'viem/accounts'
3192
+ * import { tempo } from 'viem/chains'
3193
+ * import { tempoActions } from 'viem/tempo'
3194
+ *
3195
+ * const client = createClient({
3196
+ * account: privateKeyToAccount('0x...'),
3197
+ * chain: tempo,
3198
+ * transport: http(),
3199
+ * }).extend(tempoActions())
3200
+ * const trade = await client.propAmm.swapSync({
3201
+ * amountOut: 1_000_000n,
3202
+ * baseToQuote: false,
3203
+ * expectedOraclePrice: 1_000_000_000_000_000_000n,
3204
+ * maxAmountIn: 1_010_000n,
3205
+ * minimumOracleUpdatedAt: 1_799_999_000n,
3206
+ * mode: 'exactOutput',
3207
+ * pool: '0x...',
3208
+ * })
3209
+ * ```
3210
+ *
3211
+ * @param parameters - Swap and transaction options.
3212
+ * @returns Confirmed trade data and receipt.
3213
+ */
3214
+ swapSync: (
3215
+ parameters: propAmmActions.swapSync.Parameters<chain, account>,
3216
+ ) => Promise<propAmmActions.swapSync.ReturnValue>
3217
+ /**
3218
+ * Reads whether an address may call swaps on a propAMM pool.
3219
+ *
3220
+ * @example
3221
+ * ```ts
3222
+ * import { createClient, http } from 'viem'
3223
+ * import { tempo } from 'viem/chains'
3224
+ * import { tempoActions } from 'viem/tempo'
3225
+ *
3226
+ * const client = createClient({ chain: tempo, transport: http() }).extend(tempoActions())
3227
+ *
3228
+ * const allowed = await client.propAmm.takerAllowed({
3229
+ * pool: '0x...',
3230
+ * taker: '0x...',
3231
+ * })
3232
+ * ```
3233
+ *
3234
+ * @param parameters - Pool, taker, and read options.
3235
+ * @returns Whether the taker is allowed.
3236
+ */
3237
+ takerAllowed: (
3238
+ parameters: propAmmActions.takerAllowed.Parameters,
3239
+ ) => Promise<propAmmActions.takerAllowed.ReturnValue>
3240
+ }
3018
3241
  receivePolicy: {
3019
3242
  /**
3020
3243
  * Burns the funds backing a blocked receipt.
@@ -5774,9 +5997,7 @@ type BoundHelper<helper> = helper extends (
5774
5997
  ? (args: args) => returnType
5775
5998
  : parameters extends [Client<any, any, any>]
5776
5999
  ? () => returnType
5777
- : parameters extends [infer args, ...unknown[]]
5778
- ? (args: args) => returnType
5779
- : () => returnType
6000
+ : helper
5780
6001
  : never
5781
6002
 
5782
6003
  type BoundActionHelpers<action> = (action extends { call: infer helper }
@@ -5879,6 +6100,10 @@ export type Decorator<
5879
6100
  DecoratorBase<chain, account>['policy'],
5880
6101
  typeof policyActions
5881
6102
  >
6103
+ propAmm: DecorateNamespace<
6104
+ DecoratorBase<chain, account>['propAmm'],
6105
+ typeof propAmmActions
6106
+ >
5882
6107
  receivePolicy: DecorateNamespace<
5883
6108
  DecoratorBase<chain, account>['receivePolicy'],
5884
6109
  typeof receivePolicyActions
@@ -6075,6 +6300,17 @@ export function decorator() {
6075
6300
  'watchWhitelistUpdated',
6076
6301
  'watchBlacklistUpdated',
6077
6302
  ]),
6303
+ propAmm: bindActions(client, propAmmActions, [
6304
+ 'baseToken',
6305
+ 'paused',
6306
+ 'getSwapQuote',
6307
+ 'quoteToken',
6308
+ 'recipientAllowed',
6309
+ 'resolveRecipient',
6310
+ 'swap',
6311
+ 'swapSync',
6312
+ 'takerAllowed',
6313
+ ]),
6078
6314
  receivePolicy: bindActions(client, receivePolicyActions, [
6079
6315
  'burn',
6080
6316
  'burnSync',