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,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.create = create;
4
+ exports.validateConfig = validateConfig;
5
+ exports.selectApprovals = selectApprovals;
4
6
  const Address_ = require("ox/Address");
5
7
  const Hash = require("ox/Hash");
6
8
  const Hex = require("ox/Hex");
@@ -13,9 +15,9 @@ const decodeFunctionData_js_1 = require("../../../utils/abi/decodeFunctionData.j
13
15
  const isAddressEqual_js_1 = require("../../../utils/address/isAddressEqual.js");
14
16
  const Abis = require("../../Abis.js");
15
17
  const Addresses = require("../../Addresses.js");
16
- const multisig_js_1 = require("../../actions/multisig.js");
17
- const ConfigStore = require("../../multisig/Config.js");
18
- const OperationStore = require("../../multisig/Operation.js");
18
+ const ConfigStore = require("../../accounts/Config.js");
19
+ const OperationStore = require("../../accounts/Operation.js");
20
+ const accounts_js_1 = require("../../actions/accounts.js");
19
21
  const Transaction = require("../../Transaction.js");
20
22
  const Plugin = require("./plugin.js");
21
23
  const submissionTtl = 30_000;
@@ -23,9 +25,9 @@ const pollingInterval = 100;
23
25
  function create(options) {
24
26
  if (!options.store.compareAndSet)
25
27
  throw new RpcResponse.InvalidParamsError({
26
- message: 'Multisig coordination requires a store with atomic `compareAndSet`.',
28
+ message: 'Account coordination requires a store with atomic `compareAndSet`.',
27
29
  });
28
- return Plugin.multisig({
30
+ return Plugin.accounts({
29
31
  async handleRequest(context, forward) {
30
32
  const { request, options: requestOptions_ } = context;
31
33
  const requestOptions = await resolveRequestOptions({
@@ -44,7 +46,7 @@ function create(options) {
44
46
  request: (request, options) => next(request, { ...requestOptions, ...options }),
45
47
  }, { retryCount: 0 }),
46
48
  });
47
- if (request.method === 'multisig_getConfig') {
49
+ if (request.method === 'account_getConfig') {
48
50
  const value = request.params?.[0];
49
51
  const address = value && typeof value === 'object' && 'address' in value
50
52
  ? value.address
@@ -53,10 +55,10 @@ function create(options) {
53
55
  !Address_.validate(address) ||
54
56
  Hex.toBigInt(address) === 0n)
55
57
  throw new RpcResponse.InvalidParamsError({
56
- message: 'Expected a multisig account address.',
58
+ message: 'Expected a configurable account address.',
57
59
  });
58
60
  const blockNumber = await (0, getBlockNumber_js_1.getBlockNumber)(client, { cacheTime: 0 });
59
- const commitment = await (0, multisig_js_1.getConfigCommitment)(client, {
61
+ const commitment = await (0, accounts_js_1.getConfigCommitment)(client, {
60
62
  account: address,
61
63
  blockNumber,
62
64
  });
@@ -66,18 +68,18 @@ function create(options) {
66
68
  });
67
69
  if (!config)
68
70
  return null;
69
- return tempo_1.MultisigConfig.toRpc(config);
71
+ return tempo_1.AccountConfig.toRpc(config);
70
72
  }
71
- if (request.method === 'multisig_getOperation') {
73
+ if (request.method === 'account_getOperation') {
72
74
  const hash = request.params?.[0];
73
75
  if (typeof hash !== 'string' || !Hash.validate(hash))
74
76
  throw new RpcResponse.InvalidParamsError({
75
- message: 'Expected a multisig operation hash.',
77
+ message: 'Expected an account operation hash.',
76
78
  });
77
79
  const operation = await OperationStore.read(options.store, hash);
78
- return operation ? tempo_1.MultisigOperation.toRpc(operation) : null;
80
+ return operation ? tempo_1.AccountOperation.toRpc(operation) : null;
79
81
  }
80
- if (request.method === 'multisig_approveKeyAuthorization')
82
+ if (request.method === 'account_approveKeyAuthorization')
81
83
  return await approveKeyAuthorization({
82
84
  client,
83
85
  request,
@@ -108,7 +110,7 @@ function create(options) {
108
110
  : operation;
109
111
  return {
110
112
  ...receipt,
111
- multisig: tempo_1.MultisigOperation.toRpc(success),
113
+ operation: tempo_1.AccountOperation.toRpc(success),
112
114
  };
113
115
  }
114
116
  if (operation.status === 'pending')
@@ -127,13 +129,13 @@ function create(options) {
127
129
  : operation;
128
130
  return {
129
131
  ...transaction,
130
- multisig: tempo_1.MultisigOperation.toRpc(success),
132
+ operation: tempo_1.AccountOperation.toRpc(success),
131
133
  };
132
134
  }
133
135
  if (request.method !== 'eth_sendRawTransaction' &&
134
136
  request.method !== 'eth_sendRawTransactionSync' &&
135
- request.method !== 'multisig_approveRawTransaction' &&
136
- request.method !== 'multisig_approveRawTransactionSync')
137
+ request.method !== 'account_approveRawTransaction' &&
138
+ request.method !== 'account_approveRawTransactionSync')
137
139
  return forward();
138
140
  const standard = request.method === 'eth_sendRawTransaction' ||
139
141
  request.method === 'eth_sendRawTransactionSync';
@@ -142,7 +144,7 @@ function create(options) {
142
144
  if (standard)
143
145
  return forward();
144
146
  throw new RpcResponse.InvalidParamsError({
145
- message: 'Expected a serialized Tempo multisig transaction.',
147
+ message: 'Expected a serialized Tempo configurable account transaction.',
146
148
  });
147
149
  }
148
150
  return await submit({
@@ -170,26 +172,26 @@ async function submit(options) {
170
172
  }
171
173
  })();
172
174
  const signature = transaction?.signature;
173
- if (!transaction || signature?.type !== 'multisig') {
175
+ if (!transaction || signature?.type !== 'configurable') {
174
176
  if (options.method === 'eth_sendRawTransaction' ||
175
177
  options.method === 'eth_sendRawTransactionSync')
176
178
  return await options.next(options.request, options.requestOptions);
177
179
  throw new RpcResponse.InvalidParamsError({
178
- message: 'Expected a multisig transaction signature.',
180
+ message: 'Expected a configurable account transaction signature.',
179
181
  });
180
182
  }
181
183
  const { signature: _, ...unsigned } = transaction;
182
184
  const envelope = tempo_1.TxEnvelopeTempo.from(unsigned);
183
185
  const serializedUnsigned = serializeUnsigned(envelope, options.serialized.startsWith(tempo_1.TxEnvelopeTempo.feePayerMagic));
184
186
  const blockNumber = await (0, getBlockNumber_js_1.getBlockNumber)(options.client, { cacheTime: 0 });
185
- const config = tempo_1.MultisigConfig.from(signature.config);
187
+ const config = tempo_1.AccountConfig.from(signature.config);
186
188
  const configCommitment = await validateConfig({
187
189
  account: signature.account,
188
190
  blockNumber,
189
191
  client: options.client,
190
192
  config,
191
193
  });
192
- const operationHash = tempo_1.MultisigOperation.getHash({
194
+ const operationHash = tempo_1.AccountOperation.getHash({
193
195
  account: signature.account,
194
196
  config,
195
197
  transaction: serializedUnsigned,
@@ -198,7 +200,7 @@ async function submit(options) {
198
200
  const incoming = signature.signatures.map((signature) => tempo_1.SignatureEnvelope.serialize(signature));
199
201
  if (incoming.length === 0)
200
202
  throw new RpcResponse.InvalidParamsError({
201
- message: 'A multisig approval envelope must include a signature.',
203
+ message: 'A owner approval envelope must include a signature.',
202
204
  });
203
205
  const now = Date.now();
204
206
  const expiredSubmissionIds = new Set();
@@ -225,7 +227,7 @@ async function submit(options) {
225
227
  hash: operationHash,
226
228
  approvals: [...(existingApprovals?.approvals ?? []), ...incoming],
227
229
  });
228
- return tempo_1.MultisigOperation.from({
230
+ return tempo_1.AccountOperation.from({
229
231
  account: signature.account,
230
232
  approvals: approvals.approvals,
231
233
  config,
@@ -268,7 +270,7 @@ async function submit(options) {
268
270
  const submissionId = Hex.random(32);
269
271
  const timeout = options.request.params?.[1];
270
272
  const synchronous = options.method === 'eth_sendRawTransactionSync' ||
271
- options.method === 'multisig_approveRawTransactionSync';
273
+ options.method === 'account_approveRawTransactionSync';
272
274
  const leaseTtl = synchronous &&
273
275
  typeof timeout === 'number' &&
274
276
  Number.isSafeInteger(timeout) &&
@@ -285,7 +287,7 @@ async function submit(options) {
285
287
  if (current.weight < current.threshold)
286
288
  return current;
287
289
  const now = Date.now();
288
- return tempo_1.MultisigOperation.from({
290
+ return tempo_1.AccountOperation.from({
289
291
  ...current,
290
292
  expiresAt: Math.min(now + leaseTtl, Number.MAX_SAFE_INTEGER),
291
293
  status: 'submitting',
@@ -318,7 +320,7 @@ async function submit(options) {
318
320
  hash: claim.hash,
319
321
  approvals: claim.approvals,
320
322
  });
321
- const final = tempo_1.MultisigOperation.serializeTransaction(claim, {
323
+ const final = tempo_1.AccountOperation.serializeTransaction(claim, {
322
324
  approvals: finalApprovals.selectedApprovals,
323
325
  });
324
326
  const transactionHash = tempo_1.TxEnvelopeTempo.hash(tempo_1.TxEnvelopeTempo.deserialize(final));
@@ -344,7 +346,7 @@ async function submit(options) {
344
346
  try {
345
347
  result = await options.next({
346
348
  method: options.method === 'eth_sendRawTransaction' ||
347
- options.method === 'multisig_approveRawTransaction'
349
+ options.method === 'account_approveRawTransaction'
348
350
  ? 'eth_sendRawTransaction'
349
351
  : 'eth_sendRawTransactionSync',
350
352
  params: [final, ...(options.request.params?.slice(1) ?? [])],
@@ -392,7 +394,7 @@ async function submit(options) {
392
394
  current.submissionId !== submissionId)
393
395
  throw new OperationStore.InvalidStoreValueError();
394
396
  const { expiresAt: _, submissionId: __, ...operation } = current;
395
- return tempo_1.MultisigOperation.from({
397
+ return tempo_1.AccountOperation.from({
396
398
  ...operation,
397
399
  status: 'success',
398
400
  transactionHash,
@@ -405,14 +407,14 @@ async function submit(options) {
405
407
  if (options.method === 'eth_sendRawTransactionSync' &&
406
408
  result &&
407
409
  typeof result === 'object')
408
- return { ...result, multisig: tempo_1.MultisigOperation.toRpc(success) };
410
+ return { ...result, operation: tempo_1.AccountOperation.toRpc(success) };
409
411
  return await submittedResult(options, success);
410
412
  }
411
413
  async function approveKeyAuthorization(options) {
412
414
  const value = options.request.params?.[0];
413
415
  if (!value || typeof value !== 'object')
414
416
  throw new RpcResponse.InvalidParamsError({
415
- message: 'Expected a multisig key authorization approval.',
417
+ message: 'Expected a configurable account key authorization approval.',
416
418
  });
417
419
  const approval = await (async () => {
418
420
  if ('keyAuthorization' in value) {
@@ -422,24 +424,24 @@ async function approveKeyAuthorization(options) {
422
424
  }
423
425
  catch {
424
426
  throw new RpcResponse.InvalidParamsError({
425
- message: 'Invalid multisig key authorization.',
427
+ message: 'Invalid configurable account key authorization.',
426
428
  });
427
429
  }
428
430
  })();
429
431
  const signature = authorization.signature;
430
- if (signature?.type !== 'multisig')
432
+ if (signature?.type !== 'configurable')
431
433
  throw new RpcResponse.InvalidParamsError({
432
- message: 'Expected a multisig key authorization signature.',
434
+ message: 'Expected a configurable account key authorization signature.',
433
435
  });
434
436
  if (!authorization.account ||
435
437
  !(0, isAddressEqual_js_1.isAddressEqual)(authorization.account, signature.account))
436
438
  throw new RpcResponse.InvalidParamsError({
437
- message: 'Multisig key authorization account does not match its signature.',
439
+ message: 'Configurable account key authorization account does not match its signature.',
438
440
  });
439
441
  const { signature: _, ...unsigned } = authorization;
440
442
  const keyAuthorization = tempo_1.KeyAuthorization.serialize(tempo_1.KeyAuthorization.from(unsigned));
441
- const config = tempo_1.MultisigConfig.from(signature.config);
442
- const hash = tempo_1.MultisigOperation.getHash({
443
+ const config = tempo_1.AccountConfig.from(signature.config);
444
+ const hash = tempo_1.AccountOperation.getHash({
443
445
  account: signature.account,
444
446
  config,
445
447
  keyAuthorization,
@@ -456,12 +458,12 @@ async function approveKeyAuthorization(options) {
456
458
  if ('hash' in value && 'signature' in value) {
457
459
  if (typeof value.hash !== 'string' || !Hash.validate(value.hash))
458
460
  throw new RpcResponse.InvalidParamsError({
459
- message: 'Expected a multisig operation hash.',
461
+ message: 'Expected an account operation hash.',
460
462
  });
461
463
  const operation = await OperationStore.read(options.store, value.hash);
462
464
  if (!operation || operation.type !== 'keyAuthorization')
463
465
  throw new RpcResponse.InvalidParamsError({
464
- message: 'Multisig key authorization operation was not found.',
466
+ message: 'Configurable account key authorization operation was not found.',
465
467
  });
466
468
  if (operation.status === 'success')
467
469
  return { operation };
@@ -471,7 +473,7 @@ async function approveKeyAuthorization(options) {
471
473
  }
472
474
  catch {
473
475
  throw new RpcResponse.InvalidParamsError({
474
- message: 'Invalid multisig owner signature.',
476
+ message: 'Invalid owner signature.',
475
477
  });
476
478
  }
477
479
  })();
@@ -484,14 +486,14 @@ async function approveKeyAuthorization(options) {
484
486
  };
485
487
  }
486
488
  throw new RpcResponse.InvalidParamsError({
487
- message: 'Expected a multisig key authorization approval.',
489
+ message: 'Expected a configurable account key authorization approval.',
488
490
  });
489
491
  })();
490
492
  if ('operation' in approval)
491
- return tempo_1.MultisigOperation.toRpc(approval.operation);
493
+ return tempo_1.AccountOperation.toRpc(approval.operation);
492
494
  if (approval.approvals.length === 0)
493
495
  throw new RpcResponse.InvalidParamsError({
494
- message: 'A multisig approval envelope must include a signature.',
496
+ message: 'A owner approval envelope must include a signature.',
495
497
  });
496
498
  const blockNumber = await (0, getBlockNumber_js_1.getBlockNumber)(options.client, { cacheTime: 0 });
497
499
  const commitment = await validateConfig({
@@ -508,8 +510,8 @@ async function approveKeyAuthorization(options) {
508
510
  return existing;
509
511
  if (existing &&
510
512
  (existing.account.toLowerCase() !== approval.account.toLowerCase() ||
511
- tempo_1.MultisigConfig.getCommitment(existing.config).toLowerCase() !==
512
- tempo_1.MultisigConfig.getCommitment(approval.config).toLowerCase() ||
513
+ tempo_1.AccountConfig.getCommitment(existing.config).toLowerCase() !==
514
+ tempo_1.AccountConfig.getCommitment(approval.config).toLowerCase() ||
513
515
  existing.keyAuthorization.toLowerCase() !==
514
516
  approval.keyAuthorization.toLowerCase()))
515
517
  throw new OperationStore.InvalidStoreValueError();
@@ -548,10 +550,10 @@ async function approveKeyAuthorization(options) {
548
550
  weight: approvals.weight,
549
551
  };
550
552
  if (approvals.weight < approvals.threshold)
551
- return tempo_1.MultisigOperation.from({ ...pending, status: 'pending' });
552
- return tempo_1.MultisigOperation.from({
553
+ return tempo_1.AccountOperation.from({ ...pending, status: 'pending' });
554
+ return tempo_1.AccountOperation.from({
553
555
  ...pending,
554
- keyAuthorization: tempo_1.MultisigOperation.serializeKeyAuthorization(approval.keyAuthorization, {
556
+ keyAuthorization: tempo_1.AccountOperation.serializeKeyAuthorization(approval.keyAuthorization, {
555
557
  account: approval.account,
556
558
  approvals: approvals.selectedApprovals,
557
559
  config: approval.config,
@@ -566,7 +568,7 @@ async function approveKeyAuthorization(options) {
566
568
  });
567
569
  if (operation.type !== 'keyAuthorization')
568
570
  throw new OperationStore.InvalidStoreValueError();
569
- return tempo_1.MultisigOperation.toRpc(operation);
571
+ return tempo_1.AccountOperation.toRpc(operation);
570
572
  }
571
573
  function deserialize(serialized) {
572
574
  try {
@@ -581,23 +583,23 @@ function deserialize(serialized) {
581
583
  function assertConfig(options) {
582
584
  const { account, commitment, config } = options;
583
585
  if (config.version === 0n &&
584
- tempo_1.MultisigConfig.getAddress(config, {
586
+ tempo_1.AccountConfig.getAddress(config, {
585
587
  factory: Addresses.nativeMultisigFactory,
586
588
  }).toLowerCase() !== account.toLowerCase())
587
589
  throw new RpcResponse.InvalidParamsError({
588
- message: 'Initial multisig config does not match the multisig account.',
590
+ message: 'Initial account config does not match the configurable account.',
589
591
  });
590
592
  if (config.version === 0n && Hex.toBigInt(commitment) === 0n)
591
593
  return;
592
594
  if (commitment.toLowerCase() !==
593
- tempo_1.MultisigConfig.getCommitment(config).toLowerCase())
595
+ tempo_1.AccountConfig.getCommitment(config).toLowerCase())
594
596
  throw new RpcResponse.InvalidParamsError({
595
- message: `Multisig config does not match account ${account}.`,
597
+ message: `Account config does not match account ${account}.`,
596
598
  });
597
599
  }
598
600
  async function validateConfig(options) {
599
601
  const { account, blockNumber, client, config } = options;
600
- const commitment = await (0, multisig_js_1.getConfigCommitment)(client, {
602
+ const commitment = await (0, accounts_js_1.getConfigCommitment)(client, {
601
603
  account,
602
604
  blockNumber,
603
605
  });
@@ -624,24 +626,19 @@ async function cacheNextConfigs(options) {
624
626
  const [current, threshold, owners] = decoded.args;
625
627
  const suppliedConfig = (() => {
626
628
  try {
627
- return tempo_1.MultisigConfig.from(current);
629
+ return tempo_1.AccountConfig.from(current);
628
630
  }
629
631
  catch {
630
632
  return undefined;
631
633
  }
632
634
  })();
633
635
  if (!suppliedConfig ||
634
- tempo_1.MultisigConfig.getCommitment(suppliedConfig).toLowerCase() !==
635
- tempo_1.MultisigConfig.getCommitment(currentConfig).toLowerCase())
636
+ tempo_1.AccountConfig.getCommitment(suppliedConfig).toLowerCase() !==
637
+ tempo_1.AccountConfig.getCommitment(currentConfig).toLowerCase())
636
638
  continue;
637
639
  const config = (() => {
638
640
  try {
639
- return tempo_1.MultisigConfig.from({
640
- owners,
641
- salt: suppliedConfig.salt,
642
- threshold,
643
- version: suppliedConfig.version + 1n,
644
- });
641
+ return tempo_1.AccountConfig.update(suppliedConfig, { owners, threshold });
645
642
  }
646
643
  catch {
647
644
  return undefined;
@@ -651,7 +648,7 @@ async function cacheNextConfigs(options) {
651
648
  continue;
652
649
  await ConfigStore.write(options.store, {
653
650
  address: options.account,
654
- commitment: tempo_1.MultisigConfig.getCommitment(config),
651
+ commitment: tempo_1.AccountConfig.getCommitment(config),
655
652
  config,
656
653
  });
657
654
  currentConfig = config;
@@ -659,20 +656,20 @@ async function cacheNextConfigs(options) {
659
656
  }
660
657
  async function selectApprovals(options) {
661
658
  try {
662
- return await tempo_1.MultisigOperation.selectApprovals(options);
659
+ return await tempo_1.AccountOperation.selectApprovals(options);
663
660
  }
664
661
  catch (error) {
665
- if (error instanceof tempo_1.MultisigOperation.InvalidApprovalError)
662
+ if (error instanceof tempo_1.AccountOperation.InvalidApprovalError)
666
663
  throw new RpcResponse.InvalidParamsError({ message: error.shortMessage });
667
664
  throw error;
668
665
  }
669
666
  }
670
667
  async function submittedResult(options, operation) {
671
668
  if (options.method === 'eth_sendRawTransaction' ||
672
- options.method === 'multisig_approveRawTransaction')
669
+ options.method === 'account_approveRawTransaction')
673
670
  return operation.hash;
674
- if (options.method === 'multisig_approveRawTransactionSync')
675
- return tempo_1.MultisigOperation.toRpc(operation);
671
+ if (options.method === 'account_approveRawTransactionSync')
672
+ return tempo_1.AccountOperation.toRpc(operation);
676
673
  const timeout = options.request.params?.[1];
677
674
  const deadline = Date.now() +
678
675
  (typeof timeout === 'number' && timeout >= 0 ? timeout : submissionTtl);
@@ -682,15 +679,15 @@ async function submittedResult(options, operation) {
682
679
  params: [operation.transactionHash],
683
680
  }, options.requestOptions);
684
681
  if (receipt && typeof receipt === 'object')
685
- return { ...receipt, multisig: tempo_1.MultisigOperation.toRpc(operation) };
682
+ return { ...receipt, operation: tempo_1.AccountOperation.toRpc(operation) };
686
683
  if (Date.now() >= deadline)
687
- throw new Error('Timed out while waiting for the multisig transaction.');
684
+ throw new Error('Timed out while waiting for the configurable account transaction.');
688
685
  await new Promise((resolve) => setTimeout(resolve, pollingInterval));
689
686
  }
690
687
  }
691
688
  async function submittingResult(options, operation) {
692
689
  if (options.method === 'eth_sendRawTransaction' ||
693
- options.method === 'multisig_approveRawTransaction')
690
+ options.method === 'account_approveRawTransaction')
694
691
  return operation.hash;
695
692
  const timeout = options.request.params?.[1];
696
693
  const deadline = Date.now() +
@@ -710,10 +707,10 @@ async function submittingResult(options, operation) {
710
707
  }
711
708
  function pendingResult(method, operation) {
712
709
  if (method === 'eth_sendRawTransaction' ||
713
- method === 'multisig_approveRawTransaction')
710
+ method === 'account_approveRawTransaction')
714
711
  return operation.hash;
715
- if (method === 'multisig_approveRawTransactionSync')
716
- return tempo_1.MultisigOperation.toRpc(operation);
712
+ if (method === 'account_approveRawTransactionSync')
713
+ return tempo_1.AccountOperation.toRpc(operation);
717
714
  return {
718
715
  blockHash: null,
719
716
  blockNumber: null,
@@ -724,7 +721,7 @@ function pendingResult(method, operation) {
724
721
  gasUsed: null,
725
722
  logs: [],
726
723
  logsBloom: null,
727
- multisig: tempo_1.MultisigOperation.toRpc(operation),
724
+ operation: tempo_1.AccountOperation.toRpc(operation),
728
725
  status: 'pending',
729
726
  to: null,
730
727
  transactionHash: operation.hash,
@@ -748,7 +745,7 @@ async function completeSubmission(store, operation, transactionHash) {
748
745
  current.submissionId !== operation.submissionId)
749
746
  throw new OperationStore.InvalidStoreValueError();
750
747
  const { expiresAt: _, submissionId: __, transactionHash: ___, ...value } = current;
751
- return tempo_1.MultisigOperation.from({
748
+ return tempo_1.AccountOperation.from({
752
749
  ...value,
753
750
  status: 'success',
754
751
  transactionHash,
@@ -766,7 +763,7 @@ async function releaseSubmission(store, hash, submissionId) {
766
763
  current.submissionId !== submissionId)
767
764
  return current;
768
765
  const { expiresAt: _, submissionId: __, ...operation } = current;
769
- return tempo_1.MultisigOperation.from({
766
+ return tempo_1.AccountOperation.from({
770
767
  ...operation,
771
768
  status: 'pending',
772
769
  updatedAt: Date.now(),
@@ -796,7 +793,7 @@ function mergeTransaction(existing, incoming) {
796
793
  async function toTransaction(client, operation) {
797
794
  const approvals = await (async () => {
798
795
  if (operation.status !== 'pending')
799
- return await tempo_1.MultisigOperation.selectApprovals({
796
+ return await tempo_1.AccountOperation.selectApprovals({
800
797
  account: operation.account,
801
798
  approvals: operation.approvals,
802
799
  config: operation.config,
@@ -817,7 +814,7 @@ async function toTransaction(client, operation) {
817
814
  });
818
815
  })();
819
816
  const current = operation.status === 'pending'
820
- ? tempo_1.MultisigOperation.from({
817
+ ? tempo_1.AccountOperation.from({
821
818
  ...operation,
822
819
  approvals: approvals.approvals,
823
820
  signatureCount: approvals.signatureCount,
@@ -825,7 +822,7 @@ async function toTransaction(client, operation) {
825
822
  weight: approvals.weight,
826
823
  })
827
824
  : operation;
828
- const serialized = tempo_1.MultisigOperation.serializeTransaction(current, {
825
+ const serialized = tempo_1.AccountOperation.serializeTransaction(current, {
829
826
  approvals: approvals.selectedApprovals,
830
827
  });
831
828
  const transaction = deserialize(serialized);
@@ -838,7 +835,7 @@ async function toTransaction(client, operation) {
838
835
  hash: operation.hash,
839
836
  transactionIndex: null,
840
837
  }, { pending: true }),
841
- multisig: tempo_1.MultisigOperation.toRpc(current),
838
+ operation: tempo_1.AccountOperation.toRpc(current),
842
839
  };
843
840
  }
844
841
  async function getSubmittedTransactionHash(store, operation) {
@@ -863,7 +860,7 @@ function maintainSubmissionLease(store, hash, submissionId, leaseTtl) {
863
860
  if (current.status !== 'submitting' ||
864
861
  current.submissionId !== submissionId)
865
862
  return current;
866
- return tempo_1.MultisigOperation.from({
863
+ return tempo_1.AccountOperation.from({
867
864
  ...current,
868
865
  expiresAt: Math.min(Date.now() + leaseTtl, Number.MAX_SAFE_INTEGER),
869
866
  updatedAt: Date.now(),
@@ -903,7 +900,7 @@ function getTransactionHash(result) {
903
900
  typeof result.transactionHash === 'string' &&
904
901
  Hash.validate(result.transactionHash))
905
902
  return result.transactionHash;
906
- throw new Error('Expected transaction hash in multisig broadcast result.');
903
+ throw new Error('Expected transaction hash in account broadcast result.');
907
904
  }
908
905
  async function resolveRequestOptions(options) {
909
906
  const { request, requestOptions, store } = options;
@@ -930,11 +927,11 @@ async function resolveRequestChainId(request, store) {
930
927
  const chainId_body = value && typeof value === 'object' && 'chainId' in value
931
928
  ? parseChainId(value.chainId)
932
929
  : undefined;
933
- const chainId_multisig = await (async () => {
930
+ const chainId_operation = await (async () => {
934
931
  if (request.method === 'eth_sendRawTransaction' ||
935
932
  request.method === 'eth_sendRawTransactionSync' ||
936
- request.method === 'multisig_approveRawTransaction' ||
937
- request.method === 'multisig_approveRawTransactionSync') {
933
+ request.method === 'account_approveRawTransaction' ||
934
+ request.method === 'account_approveRawTransactionSync') {
938
935
  if (!isSerializedTempoTransaction(value))
939
936
  return undefined;
940
937
  try {
@@ -944,7 +941,7 @@ async function resolveRequestChainId(request, store) {
944
941
  return undefined;
945
942
  }
946
943
  }
947
- if (request.method === 'multisig_approveKeyAuthorization' &&
944
+ if (request.method === 'account_approveKeyAuthorization' &&
948
945
  value &&
949
946
  typeof value === 'object' &&
950
947
  'keyAuthorization' in value) {
@@ -959,7 +956,7 @@ async function resolveRequestChainId(request, store) {
959
956
  if (request.method === 'eth_getTransactionByHash' ||
960
957
  request.method === 'eth_getTransactionReceipt')
961
958
  return value;
962
- if (request.method === 'multisig_approveKeyAuthorization' &&
959
+ if (request.method === 'account_approveKeyAuthorization' &&
963
960
  value &&
964
961
  typeof value === 'object' &&
965
962
  'hash' in value)
@@ -976,12 +973,12 @@ async function resolveRequestChainId(request, store) {
976
973
  return parseChainId(tempo_1.KeyAuthorization.deserialize(operation.keyAuthorization).chainId);
977
974
  })();
978
975
  if (chainId_body !== undefined &&
979
- chainId_multisig !== undefined &&
980
- chainId_body !== chainId_multisig)
976
+ chainId_operation !== undefined &&
977
+ chainId_body !== chainId_operation)
981
978
  throw new RpcResponse.InvalidParamsError({
982
979
  message: 'Conflicting chain ids.',
983
980
  });
984
- return chainId_body ?? chainId_multisig;
981
+ return chainId_body ?? chainId_operation;
985
982
  }
986
983
  function parseChainId(value) {
987
984
  const chainId = (() => {
@@ -1007,4 +1004,4 @@ function isSerializedTempoTransaction(value) {
1007
1004
  return (typeof value === 'string' &&
1008
1005
  (value.startsWith('0x76') || value.startsWith('0x78')));
1009
1006
  }
1010
- //# sourceMappingURL=multisig.js.map
1007
+ //# sourceMappingURL=accounts.js.map