viem 2.57.3 → 2.57.5

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 (246) 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 +216 -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 +1 -1
  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/Selectors.js +13 -1
  36. package/_cjs/tempo/Selectors.js.map +1 -1
  37. package/_cjs/tempo/Transaction.js +9 -9
  38. package/_cjs/tempo/Transaction.js.map +1 -1
  39. package/_cjs/tempo/Transport.js +21 -11
  40. package/_cjs/tempo/Transport.js.map +1 -1
  41. package/_cjs/tempo/{multisig → accounts}/Config.js +8 -8
  42. package/_cjs/tempo/{multisig → accounts}/Config.js.map +1 -1
  43. package/_cjs/tempo/{multisig → accounts}/Operation.js +10 -10
  44. package/_cjs/tempo/{multisig → accounts}/Operation.js.map +1 -1
  45. package/_cjs/tempo/{multisig → accounts}/Signature.js +2 -2
  46. package/_cjs/tempo/accounts/Signature.js.map +1 -0
  47. package/_cjs/tempo/actions/accessKey.js +60 -37
  48. package/_cjs/tempo/actions/accessKey.js.map +1 -1
  49. package/_cjs/tempo/actions/{multisig.js → accounts.js} +13 -18
  50. package/_cjs/tempo/actions/accounts.js.map +1 -0
  51. package/_cjs/tempo/actions/index.js +2 -2
  52. package/_cjs/tempo/actions/index.js.map +1 -1
  53. package/_cjs/tempo/chainConfig.js +37 -37
  54. package/_cjs/tempo/chainConfig.js.map +1 -1
  55. package/_cjs/tempo/index.js +3 -3
  56. package/_cjs/tempo/index.js.map +1 -1
  57. package/_cjs/tempo/internal/relay/{multisig.js → accounts.js} +90 -93
  58. package/_cjs/tempo/internal/relay/accounts.js.map +1 -0
  59. package/_cjs/tempo/internal/relay/keyAuthorization.js +296 -0
  60. package/_cjs/tempo/internal/relay/keyAuthorization.js.map +1 -0
  61. package/_cjs/tempo/internal/relay/plugin.js +17 -7
  62. package/_cjs/tempo/internal/relay/plugin.js.map +1 -1
  63. package/_cjs/utils/hash/normalizeSignature.js +1 -1
  64. package/_cjs/utils/hash/normalizeSignature.js.map +1 -1
  65. package/_cjs/utils/rpc/http.js +66 -31
  66. package/_cjs/utils/rpc/http.js.map +1 -1
  67. package/_cjs/utils/rpc/socket.js +1 -1
  68. package/_cjs/utils/rpc/socket.js.map +1 -1
  69. package/_esm/actions/public/waitForTransactionReceipt.js +5 -2
  70. package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
  71. package/_esm/actions/wallet/waitForCallsStatus.js +39 -2
  72. package/_esm/actions/wallet/waitForCallsStatus.js.map +1 -1
  73. package/_esm/chains/definitions/arcTestnet.js +11 -8
  74. package/_esm/chains/definitions/arcTestnet.js.map +1 -1
  75. package/_esm/chains/definitions/qmsTestnet.js +27 -0
  76. package/_esm/chains/definitions/qmsTestnet.js.map +1 -0
  77. package/_esm/chains/definitions/tempo.js +1 -1
  78. package/_esm/chains/definitions/tempoModerato.js +2 -2
  79. package/_esm/chains/index.js +1 -0
  80. package/_esm/chains/index.js.map +1 -1
  81. package/_esm/clients/transports/ipc.js +21 -10
  82. package/_esm/clients/transports/ipc.js.map +1 -1
  83. package/_esm/clients/transports/webSocket.js +21 -10
  84. package/_esm/clients/transports/webSocket.js.map +1 -1
  85. package/_esm/errors/version.js +1 -1
  86. package/_esm/tempo/Abis.js +216 -0
  87. package/_esm/tempo/Abis.js.map +1 -1
  88. package/_esm/tempo/Account.js +42 -42
  89. package/_esm/tempo/Account.js.map +1 -1
  90. package/_esm/tempo/Addresses.js +1 -0
  91. package/_esm/tempo/Addresses.js.map +1 -1
  92. package/_esm/tempo/Client.js +3 -3
  93. package/_esm/tempo/Decorator.js +9 -8
  94. package/_esm/tempo/Decorator.js.map +1 -1
  95. package/_esm/tempo/ExecutionError.js +1 -1
  96. package/_esm/tempo/ExecutionError.js.map +1 -1
  97. package/_esm/tempo/Formatters.js +11 -10
  98. package/_esm/tempo/Formatters.js.map +1 -1
  99. package/_esm/tempo/KeyAuthorizationManager.js +58 -16
  100. package/_esm/tempo/KeyAuthorizationManager.js.map +1 -1
  101. package/_esm/tempo/Relay.js +49 -8
  102. package/_esm/tempo/Relay.js.map +1 -1
  103. package/_esm/tempo/Selectors.js +12 -0
  104. package/_esm/tempo/Selectors.js.map +1 -1
  105. package/_esm/tempo/Transaction.js +11 -11
  106. package/_esm/tempo/Transaction.js.map +1 -1
  107. package/_esm/tempo/Transport.js +22 -12
  108. package/_esm/tempo/Transport.js.map +1 -1
  109. package/_esm/tempo/{multisig → accounts}/Config.js +14 -14
  110. package/_esm/tempo/{multisig → accounts}/Config.js.map +1 -1
  111. package/_esm/tempo/{multisig → accounts}/Operation.js +17 -17
  112. package/_esm/tempo/{multisig → accounts}/Operation.js.map +1 -1
  113. package/_esm/tempo/accounts/Signature.js +9 -0
  114. package/_esm/tempo/accounts/Signature.js.map +1 -0
  115. package/_esm/tempo/actions/accessKey.js +93 -38
  116. package/_esm/tempo/actions/accessKey.js.map +1 -1
  117. package/_esm/tempo/actions/{multisig.js → accounts.js} +31 -36
  118. package/_esm/tempo/actions/accounts.js.map +1 -0
  119. package/_esm/tempo/actions/index.js +1 -1
  120. package/_esm/tempo/actions/index.js.map +1 -1
  121. package/_esm/tempo/chainConfig.js +38 -38
  122. package/_esm/tempo/chainConfig.js.map +1 -1
  123. package/_esm/tempo/index.js +2 -1
  124. package/_esm/tempo/index.js.map +1 -1
  125. package/_esm/tempo/internal/relay/{multisig.js → accounts.js} +93 -98
  126. package/_esm/tempo/internal/relay/accounts.js.map +1 -0
  127. package/_esm/tempo/internal/relay/feePayer.js +1 -1
  128. package/_esm/tempo/internal/relay/feePayer.js.map +1 -1
  129. package/_esm/tempo/internal/relay/keyAuthorization.js +334 -0
  130. package/_esm/tempo/internal/relay/keyAuthorization.js.map +1 -0
  131. package/_esm/tempo/internal/relay/plugin.js +15 -6
  132. package/_esm/tempo/internal/relay/plugin.js.map +1 -1
  133. package/_esm/utils/hash/normalizeSignature.js +3 -2
  134. package/_esm/utils/hash/normalizeSignature.js.map +1 -1
  135. package/_esm/utils/rpc/http.js +74 -31
  136. package/_esm/utils/rpc/http.js.map +1 -1
  137. package/_esm/utils/rpc/socket.js +3 -1
  138. package/_esm/utils/rpc/socket.js.map +1 -1
  139. package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
  140. package/_types/actions/wallet/waitForCallsStatus.d.ts.map +1 -1
  141. package/_types/chains/definitions/arcTestnet.d.ts +5 -5
  142. package/_types/chains/definitions/arcTestnet.d.ts.map +1 -1
  143. package/_types/chains/definitions/qmsTestnet.d.ts +50 -0
  144. package/_types/chains/definitions/qmsTestnet.d.ts.map +1 -0
  145. package/_types/chains/definitions/tempo.d.ts +2 -2
  146. package/_types/chains/definitions/tempoModerato.d.ts +4 -4
  147. package/_types/chains/index.d.ts +1 -0
  148. package/_types/chains/index.d.ts.map +1 -1
  149. package/_types/clients/transports/ipc.d.ts.map +1 -1
  150. package/_types/clients/transports/webSocket.d.ts.map +1 -1
  151. package/_types/errors/version.d.ts +1 -1
  152. package/_types/tempo/Abis.d.ts +1935 -899
  153. package/_types/tempo/Abis.d.ts.map +1 -1
  154. package/_types/tempo/Account.d.ts +28 -28
  155. package/_types/tempo/Account.d.ts.map +1 -1
  156. package/_types/tempo/Addresses.d.ts +1 -0
  157. package/_types/tempo/Addresses.d.ts.map +1 -1
  158. package/_types/tempo/Client.d.ts +3 -3
  159. package/_types/tempo/Decorator.d.ts +63 -37
  160. package/_types/tempo/Decorator.d.ts.map +1 -1
  161. package/_types/tempo/Formatters.d.ts.map +1 -1
  162. package/_types/tempo/KeyAuthorizationManager.d.ts +45 -2
  163. package/_types/tempo/KeyAuthorizationManager.d.ts.map +1 -1
  164. package/_types/tempo/Relay.d.ts +62 -12
  165. package/_types/tempo/Relay.d.ts.map +1 -1
  166. package/_types/tempo/Selectors.d.ts +12 -0
  167. package/_types/tempo/Selectors.d.ts.map +1 -1
  168. package/_types/tempo/Transaction.d.ts +14 -11
  169. package/_types/tempo/Transaction.d.ts.map +1 -1
  170. package/_types/tempo/Transport.d.ts +20 -7
  171. package/_types/tempo/Transport.d.ts.map +1 -1
  172. package/_types/tempo/{multisig → accounts}/Config.d.ts +7 -7
  173. package/_types/tempo/accounts/Config.d.ts.map +1 -0
  174. package/_types/tempo/{multisig → accounts}/Operation.d.ts +7 -7
  175. package/_types/tempo/accounts/Operation.d.ts.map +1 -0
  176. package/_types/tempo/{multisig → accounts}/Signature.d.ts +1 -1
  177. package/_types/tempo/accounts/Signature.d.ts.map +1 -0
  178. package/_types/tempo/actions/accessKey.d.ts +59 -17
  179. package/_types/tempo/actions/accessKey.d.ts.map +1 -1
  180. package/_types/tempo/actions/{multisig.d.ts → accounts.d.ts} +28 -28
  181. package/_types/tempo/actions/{multisig.d.ts.map → accounts.d.ts.map} +1 -1
  182. package/_types/tempo/actions/index.d.ts +1 -1
  183. package/_types/tempo/actions/index.d.ts.map +1 -1
  184. package/_types/tempo/index.d.ts +3 -2
  185. package/_types/tempo/index.d.ts.map +1 -1
  186. package/_types/tempo/internal/relay/accounts.d.ts +15 -0
  187. package/_types/tempo/internal/relay/accounts.d.ts.map +1 -0
  188. package/_types/tempo/internal/relay/keyAuthorization.d.ts +25 -0
  189. package/_types/tempo/internal/relay/keyAuthorization.d.ts.map +1 -0
  190. package/_types/tempo/internal/relay/plugin.d.ts +6 -3
  191. package/_types/tempo/internal/relay/plugin.d.ts.map +1 -1
  192. package/_types/tempo/internal/relay/utils.d.ts +59 -0
  193. package/_types/tempo/internal/relay/utils.d.ts.map +1 -1
  194. package/_types/utils/hash/normalizeSignature.d.ts.map +1 -1
  195. package/_types/utils/rpc/http.d.ts.map +1 -1
  196. package/_types/utils/rpc/socket.d.ts.map +1 -1
  197. package/actions/public/waitForTransactionReceipt.ts +8 -2
  198. package/actions/wallet/waitForCallsStatus.ts +41 -2
  199. package/chains/definitions/arcTestnet.ts +11 -8
  200. package/chains/definitions/qmsTestnet.ts +27 -0
  201. package/chains/definitions/tempo.ts +1 -1
  202. package/chains/definitions/tempoModerato.ts +2 -2
  203. package/chains/index.ts +1 -0
  204. package/clients/transports/ipc.ts +38 -29
  205. package/clients/transports/webSocket.ts +42 -33
  206. package/errors/version.ts +1 -1
  207. package/package.json +2 -2
  208. package/tempo/Abis.ts +217 -0
  209. package/tempo/Account.ts +95 -84
  210. package/tempo/Addresses.ts +1 -0
  211. package/tempo/Client.ts +3 -3
  212. package/tempo/Decorator.ts +86 -57
  213. package/tempo/ExecutionError.ts +1 -1
  214. package/tempo/Formatters.ts +14 -13
  215. package/tempo/KeyAuthorizationManager.ts +71 -19
  216. package/tempo/Relay.ts +70 -14
  217. package/tempo/Selectors.ts +13 -0
  218. package/tempo/Transaction.ts +31 -23
  219. package/tempo/Transport.ts +49 -21
  220. package/tempo/{multisig → accounts}/Config.ts +21 -21
  221. package/tempo/{multisig → accounts}/Operation.ts +26 -26
  222. package/tempo/{multisig → accounts}/Signature.ts +5 -3
  223. package/tempo/actions/accessKey.ts +179 -79
  224. package/tempo/actions/{multisig.ts → accounts.ts} +47 -56
  225. package/tempo/actions/index.ts +1 -1
  226. package/tempo/chainConfig.ts +52 -52
  227. package/tempo/index.ts +5 -4
  228. package/tempo/internal/relay/{multisig.ts → accounts.ts} +118 -118
  229. package/tempo/internal/relay/feePayer.ts +1 -1
  230. package/tempo/internal/relay/keyAuthorization.ts +415 -0
  231. package/tempo/internal/relay/plugin.ts +20 -7
  232. package/utils/hash/normalizeSignature.ts +3 -2
  233. package/utils/rpc/http.ts +76 -30
  234. package/utils/rpc/socket.ts +3 -1
  235. package/_cjs/tempo/actions/multisig.js.map +0 -1
  236. package/_cjs/tempo/internal/relay/multisig.js.map +0 -1
  237. package/_cjs/tempo/multisig/Signature.js.map +0 -1
  238. package/_esm/tempo/actions/multisig.js.map +0 -1
  239. package/_esm/tempo/internal/relay/multisig.js.map +0 -1
  240. package/_esm/tempo/multisig/Signature.js +0 -9
  241. package/_esm/tempo/multisig/Signature.js.map +0 -1
  242. package/_types/tempo/internal/relay/multisig.d.ts +0 -4
  243. package/_types/tempo/internal/relay/multisig.d.ts.map +0 -1
  244. package/_types/tempo/multisig/Config.d.ts.map +0 -1
  245. package/_types/tempo/multisig/Operation.d.ts.map +0 -1
  246. package/_types/tempo/multisig/Signature.d.ts.map +0 -1
@@ -4,9 +4,9 @@ import * as Hash from 'ox/Hash'
4
4
  import * as Hex from 'ox/Hex'
5
5
  import * as RpcResponse from 'ox/RpcResponse'
6
6
  import {
7
+ AccountConfig,
8
+ AccountOperation,
7
9
  KeyAuthorization,
8
- MultisigConfig,
9
- MultisigOperation,
10
10
  Transaction as ox_Transaction,
11
11
  SignatureEnvelope,
12
12
  TxEnvelopeTempo,
@@ -18,9 +18,9 @@ import { decodeFunctionData } from '../../../utils/abi/decodeFunctionData.js'
18
18
  import { isAddressEqual } from '../../../utils/address/isAddressEqual.js'
19
19
  import * as Abis from '../../Abis.js'
20
20
  import * as Addresses from '../../Addresses.js'
21
- import { getConfigCommitment } from '../../actions/multisig.js'
22
- import * as ConfigStore from '../../multisig/Config.js'
23
- import * as OperationStore from '../../multisig/Operation.js'
21
+ import * as ConfigStore from '../../accounts/Config.js'
22
+ import * as OperationStore from '../../accounts/Operation.js'
23
+ import { getConfigCommitment } from '../../actions/accounts.js'
24
24
  import type * as Relay from '../../Relay.js'
25
25
  import type * as Store from '../../Store.js'
26
26
  import * as Transaction from '../../Transaction.js'
@@ -29,16 +29,16 @@ import * as Plugin from './plugin.js'
29
29
  const submissionTtl = 30_000
30
30
  const pollingInterval = 100
31
31
 
32
- /** Creates middleware for multisig approval coordination. @internal */
32
+ /** Creates middleware for owner approval coordination. @internal */
33
33
  export function create(
34
- options: Relay.multisig.Options,
35
- ): Relay.multisig.ReturnType {
34
+ options: Relay.accounts.Options,
35
+ ): Relay.accounts.ReturnType {
36
36
  if (!options.store.compareAndSet)
37
37
  throw new RpcResponse.InvalidParamsError({
38
38
  message:
39
- 'Multisig coordination requires a store with atomic `compareAndSet`.',
39
+ 'Account coordination requires a store with atomic `compareAndSet`.',
40
40
  })
41
- return Plugin.multisig({
41
+ return Plugin.accounts({
42
42
  async handleRequest(context, forward) {
43
43
  const { request, options: requestOptions_ } = context
44
44
  const requestOptions = await resolveRequestOptions({
@@ -62,7 +62,7 @@ export function create(
62
62
  ),
63
63
  })
64
64
 
65
- if (request.method === 'multisig_getConfig') {
65
+ if (request.method === 'account_getConfig') {
66
66
  const value = request.params?.[0]
67
67
  const address =
68
68
  value && typeof value === 'object' && 'address' in value
@@ -74,7 +74,7 @@ export function create(
74
74
  Hex.toBigInt(address) === 0n
75
75
  )
76
76
  throw new RpcResponse.InvalidParamsError({
77
- message: 'Expected a multisig account address.',
77
+ message: 'Expected a configurable account address.',
78
78
  })
79
79
  const blockNumber = await getBlockNumber(client, { cacheTime: 0 })
80
80
  const commitment = await getConfigCommitment(client, {
@@ -86,20 +86,20 @@ export function create(
86
86
  commitment,
87
87
  })
88
88
  if (!config) return null
89
- return MultisigConfig.toRpc(config)
89
+ return AccountConfig.toRpc(config)
90
90
  }
91
91
 
92
- if (request.method === 'multisig_getOperation') {
92
+ if (request.method === 'account_getOperation') {
93
93
  const hash = request.params?.[0]
94
94
  if (typeof hash !== 'string' || !Hash.validate(hash))
95
95
  throw new RpcResponse.InvalidParamsError({
96
- message: 'Expected a multisig operation hash.',
96
+ message: 'Expected an account operation hash.',
97
97
  })
98
98
  const operation = await OperationStore.read(options.store, hash)
99
- return operation ? MultisigOperation.toRpc(operation) : null
99
+ return operation ? AccountOperation.toRpc(operation) : null
100
100
  }
101
101
 
102
- if (request.method === 'multisig_approveKeyAuthorization')
102
+ if (request.method === 'account_approveKeyAuthorization')
103
103
  return await approveKeyAuthorization({
104
104
  client,
105
105
  request,
@@ -139,7 +139,7 @@ export function create(
139
139
  : operation
140
140
  return {
141
141
  ...receipt,
142
- multisig: MultisigOperation.toRpc(success),
142
+ operation: AccountOperation.toRpc(success),
143
143
  }
144
144
  }
145
145
  if (operation.status === 'pending')
@@ -168,15 +168,15 @@ export function create(
168
168
  : operation
169
169
  return {
170
170
  ...transaction,
171
- multisig: MultisigOperation.toRpc(success),
171
+ operation: AccountOperation.toRpc(success),
172
172
  }
173
173
  }
174
174
 
175
175
  if (
176
176
  request.method !== 'eth_sendRawTransaction' &&
177
177
  request.method !== 'eth_sendRawTransactionSync' &&
178
- request.method !== 'multisig_approveRawTransaction' &&
179
- request.method !== 'multisig_approveRawTransactionSync'
178
+ request.method !== 'account_approveRawTransaction' &&
179
+ request.method !== 'account_approveRawTransactionSync'
180
180
  )
181
181
  return forward()
182
182
 
@@ -187,7 +187,8 @@ export function create(
187
187
  if (!isSerializedTempoTransaction(serialized)) {
188
188
  if (standard) return forward()
189
189
  throw new RpcResponse.InvalidParamsError({
190
- message: 'Expected a serialized Tempo multisig transaction.',
190
+ message:
191
+ 'Expected a serialized Tempo configurable account transaction.',
191
192
  })
192
193
  }
193
194
 
@@ -220,14 +221,14 @@ async function submit(options: submit.Options) {
220
221
  }
221
222
  })()
222
223
  const signature = transaction?.signature
223
- if (!transaction || signature?.type !== 'multisig') {
224
+ if (!transaction || signature?.type !== 'configurable') {
224
225
  if (
225
226
  options.method === 'eth_sendRawTransaction' ||
226
227
  options.method === 'eth_sendRawTransactionSync'
227
228
  )
228
229
  return await options.next(options.request, options.requestOptions)
229
230
  throw new RpcResponse.InvalidParamsError({
230
- message: 'Expected a multisig transaction signature.',
231
+ message: 'Expected a configurable account transaction signature.',
231
232
  })
232
233
  }
233
234
 
@@ -238,14 +239,14 @@ async function submit(options: submit.Options) {
238
239
  options.serialized.startsWith(TxEnvelopeTempo.feePayerMagic),
239
240
  )
240
241
  const blockNumber = await getBlockNumber(options.client, { cacheTime: 0 })
241
- const config = MultisigConfig.from(signature.config)
242
+ const config = AccountConfig.from(signature.config)
242
243
  const configCommitment = await validateConfig({
243
244
  account: signature.account,
244
245
  blockNumber,
245
246
  client: options.client,
246
247
  config,
247
248
  })
248
- const operationHash = MultisigOperation.getHash({
249
+ const operationHash = AccountOperation.getHash({
249
250
  account: signature.account,
250
251
  config,
251
252
  transaction: serializedUnsigned,
@@ -256,7 +257,7 @@ async function submit(options: submit.Options) {
256
257
  )
257
258
  if (incoming.length === 0)
258
259
  throw new RpcResponse.InvalidParamsError({
259
- message: 'A multisig approval envelope must include a signature.',
260
+ message: 'A owner approval envelope must include a signature.',
260
261
  })
261
262
  const now = Date.now()
262
263
  const expiredSubmissionIds = new Set<Hex.Hex>()
@@ -285,7 +286,7 @@ async function submit(options: submit.Options) {
285
286
  hash: operationHash,
286
287
  approvals: [...(existingApprovals?.approvals ?? []), ...incoming],
287
288
  })
288
- return MultisigOperation.from({
289
+ return AccountOperation.from({
289
290
  account: signature.account,
290
291
  approvals: approvals.approvals,
291
292
  config,
@@ -339,7 +340,7 @@ async function submit(options: submit.Options) {
339
340
  const timeout = options.request.params?.[1]
340
341
  const synchronous =
341
342
  options.method === 'eth_sendRawTransactionSync' ||
342
- options.method === 'multisig_approveRawTransactionSync'
343
+ options.method === 'account_approveRawTransactionSync'
343
344
  const leaseTtl =
344
345
  synchronous &&
345
346
  typeof timeout === 'number' &&
@@ -358,7 +359,7 @@ async function submit(options: submit.Options) {
358
359
  return current
359
360
  if (current.weight < current.threshold) return current
360
361
  const now = Date.now()
361
- return MultisigOperation.from({
362
+ return AccountOperation.from({
362
363
  ...current,
363
364
  expiresAt: Math.min(now + leaseTtl, Number.MAX_SAFE_INTEGER),
364
365
  status: 'submitting',
@@ -392,7 +393,7 @@ async function submit(options: submit.Options) {
392
393
  hash: claim.hash,
393
394
  approvals: claim.approvals,
394
395
  })
395
- const final = MultisigOperation.serializeTransaction(claim, {
396
+ const final = AccountOperation.serializeTransaction(claim, {
396
397
  approvals: finalApprovals.selectedApprovals,
397
398
  })
398
399
  const transactionHash = TxEnvelopeTempo.hash(
@@ -431,7 +432,7 @@ async function submit(options: submit.Options) {
431
432
  {
432
433
  method:
433
434
  options.method === 'eth_sendRawTransaction' ||
434
- options.method === 'multisig_approveRawTransaction'
435
+ options.method === 'account_approveRawTransaction'
435
436
  ? 'eth_sendRawTransaction'
436
437
  : 'eth_sendRawTransactionSync',
437
438
  params: [final, ...(options.request.params?.slice(1) ?? [])],
@@ -488,7 +489,7 @@ async function submit(options: submit.Options) {
488
489
  )
489
490
  throw new OperationStore.InvalidStoreValueError()
490
491
  const { expiresAt: _, submissionId: __, ...operation } = current
491
- return MultisigOperation.from({
492
+ return AccountOperation.from({
492
493
  ...operation,
493
494
  status: 'success',
494
495
  transactionHash,
@@ -504,7 +505,7 @@ async function submit(options: submit.Options) {
504
505
  result &&
505
506
  typeof result === 'object'
506
507
  )
507
- return { ...result, multisig: MultisigOperation.toRpc(success) }
508
+ return { ...result, operation: AccountOperation.toRpc(success) }
508
509
  return await submittedResult(options, success)
509
510
  }
510
511
 
@@ -517,8 +518,8 @@ declare namespace submit {
517
518
  method:
518
519
  | 'eth_sendRawTransaction'
519
520
  | 'eth_sendRawTransactionSync'
520
- | 'multisig_approveRawTransaction'
521
- | 'multisig_approveRawTransactionSync'
521
+ | 'account_approveRawTransaction'
522
+ | 'account_approveRawTransactionSync'
522
523
  /** Downstream RPC request handler. */
523
524
  next: Relay.handleRequest.Handler
524
525
  /** Original RPC request. */
@@ -527,12 +528,12 @@ declare namespace submit {
527
528
  requestOptions?: Relay.handleRequest.RequestOptions | undefined
528
529
  /** Serialized Tempo transaction. */
529
530
  serialized: Hex.Hex
530
- /** Shared multisig store. */
531
+ /** Shared account store. */
531
532
  store: Store.Atomic
532
533
  }
533
534
  }
534
535
 
535
- /** Collects approvals for a multisig key authorization. @internal */
536
+ /** Collects approvals for a configurable account key authorization. @internal */
536
537
  // biome-ignore lint/correctness/noUnusedVariables: declaration merge
537
538
  async function approveKeyAuthorization(
538
539
  options: approveKeyAuthorization.Options,
@@ -540,7 +541,7 @@ async function approveKeyAuthorization(
540
541
  const value = options.request.params?.[0]
541
542
  if (!value || typeof value !== 'object')
542
543
  throw new RpcResponse.InvalidParamsError({
543
- message: 'Expected a multisig key authorization approval.',
544
+ message: 'Expected a configurable account key authorization approval.',
544
545
  })
545
546
 
546
547
  const approval = await (async () => {
@@ -552,14 +553,15 @@ async function approveKeyAuthorization(
552
553
  )
553
554
  } catch {
554
555
  throw new RpcResponse.InvalidParamsError({
555
- message: 'Invalid multisig key authorization.',
556
+ message: 'Invalid configurable account key authorization.',
556
557
  })
557
558
  }
558
559
  })()
559
560
  const signature = authorization.signature
560
- if (signature?.type !== 'multisig')
561
+ if (signature?.type !== 'configurable')
561
562
  throw new RpcResponse.InvalidParamsError({
562
- message: 'Expected a multisig key authorization signature.',
563
+ message:
564
+ 'Expected a configurable account key authorization signature.',
563
565
  })
564
566
  if (
565
567
  !authorization.account ||
@@ -567,14 +569,14 @@ async function approveKeyAuthorization(
567
569
  )
568
570
  throw new RpcResponse.InvalidParamsError({
569
571
  message:
570
- 'Multisig key authorization account does not match its signature.',
572
+ 'Configurable account key authorization account does not match its signature.',
571
573
  })
572
574
  const { signature: _, ...unsigned } = authorization
573
575
  const keyAuthorization = KeyAuthorization.serialize(
574
576
  KeyAuthorization.from(unsigned),
575
577
  )
576
- const config = MultisigConfig.from(signature.config)
577
- const hash = MultisigOperation.getHash({
578
+ const config = AccountConfig.from(signature.config)
579
+ const hash = AccountOperation.getHash({
578
580
  account: signature.account,
579
581
  config,
580
582
  keyAuthorization,
@@ -594,12 +596,13 @@ async function approveKeyAuthorization(
594
596
  if ('hash' in value && 'signature' in value) {
595
597
  if (typeof value.hash !== 'string' || !Hash.validate(value.hash))
596
598
  throw new RpcResponse.InvalidParamsError({
597
- message: 'Expected a multisig operation hash.',
599
+ message: 'Expected an account operation hash.',
598
600
  })
599
601
  const operation = await OperationStore.read(options.store, value.hash)
600
602
  if (!operation || operation.type !== 'keyAuthorization')
601
603
  throw new RpcResponse.InvalidParamsError({
602
- message: 'Multisig key authorization operation was not found.',
604
+ message:
605
+ 'Configurable account key authorization operation was not found.',
603
606
  })
604
607
  if (operation.status === 'success') return { operation }
605
608
  const signature = (() => {
@@ -609,7 +612,7 @@ async function approveKeyAuthorization(
609
612
  )
610
613
  } catch {
611
614
  throw new RpcResponse.InvalidParamsError({
612
- message: 'Invalid multisig owner signature.',
615
+ message: 'Invalid owner signature.',
613
616
  })
614
617
  }
615
618
  })()
@@ -623,14 +626,13 @@ async function approveKeyAuthorization(
623
626
  }
624
627
 
625
628
  throw new RpcResponse.InvalidParamsError({
626
- message: 'Expected a multisig key authorization approval.',
629
+ message: 'Expected a configurable account key authorization approval.',
627
630
  })
628
631
  })()
629
- if ('operation' in approval)
630
- return MultisigOperation.toRpc(approval.operation)
632
+ if ('operation' in approval) return AccountOperation.toRpc(approval.operation)
631
633
  if (approval.approvals.length === 0)
632
634
  throw new RpcResponse.InvalidParamsError({
633
- message: 'A multisig approval envelope must include a signature.',
635
+ message: 'A owner approval envelope must include a signature.',
634
636
  })
635
637
 
636
638
  const blockNumber = await getBlockNumber(options.client, { cacheTime: 0 })
@@ -651,8 +653,8 @@ async function approveKeyAuthorization(
651
653
  if (
652
654
  existing &&
653
655
  (existing.account.toLowerCase() !== approval.account.toLowerCase() ||
654
- MultisigConfig.getCommitment(existing.config).toLowerCase() !==
655
- MultisigConfig.getCommitment(approval.config).toLowerCase() ||
656
+ AccountConfig.getCommitment(existing.config).toLowerCase() !==
657
+ AccountConfig.getCommitment(approval.config).toLowerCase() ||
656
658
  existing.keyAuthorization.toLowerCase() !==
657
659
  approval.keyAuthorization.toLowerCase())
658
660
  )
@@ -696,10 +698,10 @@ async function approveKeyAuthorization(
696
698
  weight: approvals.weight,
697
699
  } as const
698
700
  if (approvals.weight < approvals.threshold)
699
- return MultisigOperation.from({ ...pending, status: 'pending' })
700
- return MultisigOperation.from({
701
+ return AccountOperation.from({ ...pending, status: 'pending' })
702
+ return AccountOperation.from({
701
703
  ...pending,
702
- keyAuthorization: MultisigOperation.serializeKeyAuthorization(
704
+ keyAuthorization: AccountOperation.serializeKeyAuthorization(
703
705
  approval.keyAuthorization,
704
706
  {
705
707
  account: approval.account,
@@ -718,7 +720,7 @@ async function approveKeyAuthorization(
718
720
  })
719
721
  if (operation.type !== 'keyAuthorization')
720
722
  throw new OperationStore.InvalidStoreValueError()
721
- return MultisigOperation.toRpc(operation)
723
+ return AccountOperation.toRpc(operation)
722
724
  }
723
725
 
724
726
  declare namespace approveKeyAuthorization {
@@ -728,7 +730,7 @@ declare namespace approveKeyAuthorization {
728
730
  client: ReturnType<typeof createClient>
729
731
  /** Original RPC request. */
730
732
  request: Relay.handleRequest.Request
731
- /** Shared multisig store. */
733
+ /** Shared account store. */
732
734
  store: Store.Atomic
733
735
  }
734
736
  }
@@ -750,34 +752,35 @@ function deserialize(serialized: Hex.Hex) {
750
752
  function assertConfig(options: {
751
753
  account: `0x${string}`
752
754
  commitment: Hex.Hex
753
- config: MultisigConfig.Config
755
+ config: AccountConfig.Config
754
756
  }) {
755
757
  const { account, commitment, config } = options
756
758
  if (
757
759
  config.version === 0n &&
758
- MultisigConfig.getAddress(config, {
760
+ AccountConfig.getAddress(config, {
759
761
  factory: Addresses.nativeMultisigFactory,
760
762
  }).toLowerCase() !== account.toLowerCase()
761
763
  )
762
764
  throw new RpcResponse.InvalidParamsError({
763
- message: 'Initial multisig config does not match the multisig account.',
765
+ message:
766
+ 'Initial account config does not match the configurable account.',
764
767
  })
765
768
  if (config.version === 0n && Hex.toBigInt(commitment) === 0n) return
766
769
  if (
767
770
  commitment.toLowerCase() !==
768
- MultisigConfig.getCommitment(config).toLowerCase()
771
+ AccountConfig.getCommitment(config).toLowerCase()
769
772
  )
770
773
  throw new RpcResponse.InvalidParamsError({
771
- message: `Multisig config does not match account ${account}.`,
774
+ message: `Account config does not match account ${account}.`,
772
775
  })
773
776
  }
774
777
 
775
- /** Reads and validates a config commitment at one block. */
776
- async function validateConfig(options: {
778
+ /** Reads and validates a config commitment at one block. @internal */
779
+ export async function validateConfig(options: {
777
780
  account: `0x${string}`
778
781
  blockNumber: bigint
779
782
  client: ReturnType<typeof createClient>
780
- config: MultisigConfig.Config
783
+ config: AccountConfig.Config
781
784
  }) {
782
785
  const { account, blockNumber, client, config } = options
783
786
  const commitment = await getConfigCommitment(client, {
@@ -810,25 +813,20 @@ async function cacheNextConfigs(options: cacheNextConfigs.Options) {
810
813
  const [current, threshold, owners] = decoded.args
811
814
  const suppliedConfig = (() => {
812
815
  try {
813
- return MultisigConfig.from(current)
816
+ return AccountConfig.from(current)
814
817
  } catch {
815
818
  return undefined
816
819
  }
817
820
  })()
818
821
  if (
819
822
  !suppliedConfig ||
820
- MultisigConfig.getCommitment(suppliedConfig).toLowerCase() !==
821
- MultisigConfig.getCommitment(currentConfig).toLowerCase()
823
+ AccountConfig.getCommitment(suppliedConfig).toLowerCase() !==
824
+ AccountConfig.getCommitment(currentConfig).toLowerCase()
822
825
  )
823
826
  continue
824
827
  const config = (() => {
825
828
  try {
826
- return MultisigConfig.from({
827
- owners,
828
- salt: suppliedConfig.salt,
829
- threshold,
830
- version: suppliedConfig.version + 1n,
831
- })
829
+ return AccountConfig.update(suppliedConfig, { owners, threshold })
832
830
  } catch {
833
831
  return undefined
834
832
  }
@@ -836,7 +834,7 @@ async function cacheNextConfigs(options: cacheNextConfigs.Options) {
836
834
  if (!config) continue
837
835
  await ConfigStore.write(options.store, {
838
836
  address: options.account,
839
- commitment: MultisigConfig.getCommitment(config),
837
+ commitment: AccountConfig.getCommitment(config),
840
838
  config,
841
839
  })
842
840
  currentConfig = config
@@ -846,25 +844,25 @@ async function cacheNextConfigs(options: cacheNextConfigs.Options) {
846
844
  declare namespace cacheNextConfigs {
847
845
  /** Parameters for {@link cacheNextConfigs}. */
848
846
  export type Options = {
849
- /** Root multisig account. */
847
+ /** Root configurable account. */
850
848
  account: Address
851
849
  /** Root config used to authorize the transaction. */
852
- config: MultisigConfig.Config
853
- /** Shared multisig store. */
850
+ config: AccountConfig.Config
851
+ /** Shared account store. */
854
852
  store: Store.Store
855
853
  /** Submitted transaction containing potential config updates. */
856
854
  transaction: Transaction.TransactionSerializableTempo
857
855
  }
858
856
  }
859
857
 
860
- /** Validates primitive approvals and translates invalid input into an RPC error. */
861
- async function selectApprovals(
862
- options: MultisigOperation.selectApprovals.Options,
858
+ /** Validates primitive approvals and translates invalid input into an RPC error. @internal */
859
+ export async function selectApprovals(
860
+ options: AccountOperation.selectApprovals.Options,
863
861
  ) {
864
862
  try {
865
- return await MultisigOperation.selectApprovals(options)
863
+ return await AccountOperation.selectApprovals(options)
866
864
  } catch (error) {
867
- if (error instanceof MultisigOperation.InvalidApprovalError)
865
+ if (error instanceof AccountOperation.InvalidApprovalError)
868
866
  throw new RpcResponse.InvalidParamsError({ message: error.shortMessage })
869
867
  throw error
870
868
  }
@@ -873,15 +871,15 @@ async function selectApprovals(
873
871
  /** Returns an existing successful operation through the requested send method. */
874
872
  async function submittedResult(
875
873
  options: submit.Options,
876
- operation: MultisigOperation.TransactionOperation,
874
+ operation: AccountOperation.TransactionOperation,
877
875
  ) {
878
876
  if (
879
877
  options.method === 'eth_sendRawTransaction' ||
880
- options.method === 'multisig_approveRawTransaction'
878
+ options.method === 'account_approveRawTransaction'
881
879
  )
882
880
  return operation.hash
883
- if (options.method === 'multisig_approveRawTransactionSync')
884
- return MultisigOperation.toRpc(operation)
881
+ if (options.method === 'account_approveRawTransactionSync')
882
+ return AccountOperation.toRpc(operation)
885
883
  const timeout = options.request.params?.[1]
886
884
  const deadline =
887
885
  Date.now() +
@@ -895,9 +893,11 @@ async function submittedResult(
895
893
  options.requestOptions,
896
894
  )
897
895
  if (receipt && typeof receipt === 'object')
898
- return { ...receipt, multisig: MultisigOperation.toRpc(operation) }
896
+ return { ...receipt, operation: AccountOperation.toRpc(operation) }
899
897
  if (Date.now() >= deadline)
900
- throw new Error('Timed out while waiting for the multisig transaction.')
898
+ throw new Error(
899
+ 'Timed out while waiting for the configurable account transaction.',
900
+ )
901
901
  await new Promise((resolve) => setTimeout(resolve, pollingInterval))
902
902
  }
903
903
  }
@@ -905,11 +905,11 @@ async function submittedResult(
905
905
  /** Waits for the relay that owns a live submission lease. */
906
906
  async function submittingResult(
907
907
  options: submit.Options,
908
- operation: MultisigOperation.TransactionOperation,
908
+ operation: AccountOperation.TransactionOperation,
909
909
  ): Promise<unknown> {
910
910
  if (
911
911
  options.method === 'eth_sendRawTransaction' ||
912
- options.method === 'multisig_approveRawTransaction'
912
+ options.method === 'account_approveRawTransaction'
913
913
  )
914
914
  return operation.hash
915
915
  const timeout = options.request.params?.[1]
@@ -932,15 +932,15 @@ async function submittingResult(
932
932
  /** Returns a pending result for an operation that has not reached quorum. */
933
933
  function pendingResult(
934
934
  method: submit.Options['method'],
935
- operation: MultisigOperation.TransactionOperation,
935
+ operation: AccountOperation.TransactionOperation,
936
936
  ) {
937
937
  if (
938
938
  method === 'eth_sendRawTransaction' ||
939
- method === 'multisig_approveRawTransaction'
939
+ method === 'account_approveRawTransaction'
940
940
  )
941
941
  return operation.hash
942
- if (method === 'multisig_approveRawTransactionSync')
943
- return MultisigOperation.toRpc(operation)
942
+ if (method === 'account_approveRawTransactionSync')
943
+ return AccountOperation.toRpc(operation)
944
944
  return {
945
945
  blockHash: null,
946
946
  blockNumber: null,
@@ -951,7 +951,7 @@ function pendingResult(
951
951
  gasUsed: null,
952
952
  logs: [],
953
953
  logsBloom: null,
954
- multisig: MultisigOperation.toRpc(operation),
954
+ operation: AccountOperation.toRpc(operation),
955
955
  status: 'pending',
956
956
  to: null,
957
957
  transactionHash: operation.hash,
@@ -963,7 +963,7 @@ function pendingResult(
963
963
  /** Marks a transaction as successful after a lookup proves that it was submitted. */
964
964
  async function completeSubmission(
965
965
  store: Store.Atomic,
966
- operation: MultisigOperation.TransactionOperation,
966
+ operation: AccountOperation.TransactionOperation,
967
967
  transactionHash: Hex.Hex,
968
968
  ) {
969
969
  if (operation.status !== 'submitting' || !operation.submissionId)
@@ -993,7 +993,7 @@ async function completeSubmission(
993
993
  transactionHash: ___,
994
994
  ...value
995
995
  } = current
996
- return MultisigOperation.from({
996
+ return AccountOperation.from({
997
997
  ...value,
998
998
  status: 'success',
999
999
  transactionHash,
@@ -1002,7 +1002,7 @@ async function completeSubmission(
1002
1002
  },
1003
1003
  )
1004
1004
  await removeSettledSubmission(store, operation.hash, operation.submissionId)
1005
- return success as MultisigOperation.TransactionOperation
1005
+ return success as AccountOperation.TransactionOperation
1006
1006
  }
1007
1007
 
1008
1008
  /** Releases a failed submission lease without discarding collected approvals. */
@@ -1020,7 +1020,7 @@ async function releaseSubmission(
1020
1020
  )
1021
1021
  return current
1022
1022
  const { expiresAt: _, submissionId: __, ...operation } = current
1023
- return MultisigOperation.from({
1023
+ return AccountOperation.from({
1024
1024
  ...operation,
1025
1025
  status: 'pending',
1026
1026
  updatedAt: Date.now(),
@@ -1054,11 +1054,11 @@ function mergeTransaction(existing: Hex.Hex | undefined, incoming: Hex.Hex) {
1054
1054
  /** Returns a synthetic transaction while the downstream transaction is unavailable. */
1055
1055
  async function toTransaction(
1056
1056
  client: ReturnType<typeof createClient>,
1057
- operation: MultisigOperation.TransactionOperation,
1057
+ operation: AccountOperation.TransactionOperation,
1058
1058
  ) {
1059
1059
  const approvals = await (async () => {
1060
1060
  if (operation.status !== 'pending')
1061
- return await MultisigOperation.selectApprovals({
1061
+ return await AccountOperation.selectApprovals({
1062
1062
  account: operation.account,
1063
1063
  approvals: operation.approvals,
1064
1064
  config: operation.config,
@@ -1080,7 +1080,7 @@ async function toTransaction(
1080
1080
  })()
1081
1081
  const current =
1082
1082
  operation.status === 'pending'
1083
- ? MultisigOperation.from({
1083
+ ? AccountOperation.from({
1084
1084
  ...operation,
1085
1085
  approvals: approvals.approvals,
1086
1086
  signatureCount: approvals.signatureCount,
@@ -1088,7 +1088,7 @@ async function toTransaction(
1088
1088
  weight: approvals.weight,
1089
1089
  })
1090
1090
  : operation
1091
- const serialized = MultisigOperation.serializeTransaction(current, {
1091
+ const serialized = AccountOperation.serializeTransaction(current, {
1092
1092
  approvals: approvals.selectedApprovals,
1093
1093
  })
1094
1094
  const transaction = deserialize(serialized)
@@ -1104,14 +1104,14 @@ async function toTransaction(
1104
1104
  } as never,
1105
1105
  { pending: true },
1106
1106
  ),
1107
- multisig: MultisigOperation.toRpc(current),
1107
+ operation: AccountOperation.toRpc(current),
1108
1108
  }
1109
1109
  }
1110
1110
 
1111
1111
  /** Returns the persisted transaction hash for a submitting or successful operation. */
1112
1112
  async function getSubmittedTransactionHash(
1113
1113
  store: Store.Store,
1114
- operation: MultisigOperation.TransactionOperation,
1114
+ operation: AccountOperation.TransactionOperation,
1115
1115
  ) {
1116
1116
  if (operation.status === 'success') return operation.transactionHash!
1117
1117
  if (operation.status !== 'submitting' || !operation.submissionId)
@@ -1148,7 +1148,7 @@ function maintainSubmissionLease(
1148
1148
  current.submissionId !== submissionId
1149
1149
  )
1150
1150
  return current
1151
- return MultisigOperation.from({
1151
+ return AccountOperation.from({
1152
1152
  ...current,
1153
1153
  expiresAt: Math.min(
1154
1154
  Date.now() + leaseTtl,
@@ -1204,7 +1204,7 @@ function getTransactionHash(result: unknown): Hex.Hex {
1204
1204
  Hash.validate(result.transactionHash)
1205
1205
  )
1206
1206
  return result.transactionHash
1207
- throw new Error('Expected transaction hash in multisig broadcast result.')
1207
+ throw new Error('Expected transaction hash in account broadcast result.')
1208
1208
  }
1209
1209
 
1210
1210
  /** Resolves and validates the chain used by a handled request. */
@@ -1246,12 +1246,12 @@ async function resolveRequestChainId(
1246
1246
  value && typeof value === 'object' && 'chainId' in value
1247
1247
  ? parseChainId(value.chainId)
1248
1248
  : undefined
1249
- const chainId_multisig = await (async () => {
1249
+ const chainId_operation = await (async () => {
1250
1250
  if (
1251
1251
  request.method === 'eth_sendRawTransaction' ||
1252
1252
  request.method === 'eth_sendRawTransactionSync' ||
1253
- request.method === 'multisig_approveRawTransaction' ||
1254
- request.method === 'multisig_approveRawTransactionSync'
1253
+ request.method === 'account_approveRawTransaction' ||
1254
+ request.method === 'account_approveRawTransactionSync'
1255
1255
  ) {
1256
1256
  if (!isSerializedTempoTransaction(value)) return undefined
1257
1257
  try {
@@ -1262,7 +1262,7 @@ async function resolveRequestChainId(
1262
1262
  }
1263
1263
 
1264
1264
  if (
1265
- request.method === 'multisig_approveKeyAuthorization' &&
1265
+ request.method === 'account_approveKeyAuthorization' &&
1266
1266
  value &&
1267
1267
  typeof value === 'object' &&
1268
1268
  'keyAuthorization' in value
@@ -1285,7 +1285,7 @@ async function resolveRequestChainId(
1285
1285
  )
1286
1286
  return value
1287
1287
  if (
1288
- request.method === 'multisig_approveKeyAuthorization' &&
1288
+ request.method === 'account_approveKeyAuthorization' &&
1289
1289
  value &&
1290
1290
  typeof value === 'object' &&
1291
1291
  'hash' in value
@@ -1309,13 +1309,13 @@ async function resolveRequestChainId(
1309
1309
 
1310
1310
  if (
1311
1311
  chainId_body !== undefined &&
1312
- chainId_multisig !== undefined &&
1313
- chainId_body !== chainId_multisig
1312
+ chainId_operation !== undefined &&
1313
+ chainId_body !== chainId_operation
1314
1314
  )
1315
1315
  throw new RpcResponse.InvalidParamsError({
1316
1316
  message: 'Conflicting chain ids.',
1317
1317
  })
1318
- return chainId_body ?? chainId_multisig
1318
+ return chainId_body ?? chainId_operation
1319
1319
  }
1320
1320
 
1321
1321
  /** Parses a supported chain ID representation. */