viem 3.0.0-next.13 → 3.0.0-next.14

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 (194) hide show
  1. package/dist/chains/definitions/arcTestnet.d.ts +5 -5
  2. package/dist/chains/definitions/arcTestnet.d.ts.map +1 -1
  3. package/dist/chains/definitions/arcTestnet.js +11 -8
  4. package/dist/chains/definitions/arcTestnet.js.map +1 -1
  5. package/dist/chains/definitions/qmsTestnet.d.ts +27 -0
  6. package/dist/chains/definitions/qmsTestnet.d.ts.map +1 -0
  7. package/dist/chains/definitions/qmsTestnet.js +23 -0
  8. package/dist/chains/definitions/qmsTestnet.js.map +1 -0
  9. package/dist/chains/definitions/tempo.d.ts +1 -1
  10. package/dist/chains/definitions/tempo.js +1 -1
  11. package/dist/chains/definitions/tempoModerato.d.ts +2 -2
  12. package/dist/chains/definitions/tempoModerato.js +2 -2
  13. package/dist/chains/index.d.ts +1 -0
  14. package/dist/chains/index.d.ts.map +1 -1
  15. package/dist/chains/index.js +1 -0
  16. package/dist/chains/index.js.map +1 -1
  17. package/dist/core/actions/transaction/waitForReceipt.d.ts +1 -1
  18. package/dist/core/actions/transaction/waitForReceipt.d.ts.map +1 -1
  19. package/dist/core/actions/transaction/waitForReceipt.js +5 -2
  20. package/dist/core/actions/transaction/waitForReceipt.js.map +1 -1
  21. package/dist/core/actions/wallet/waitForCallsStatus.d.ts.map +1 -1
  22. package/dist/core/actions/wallet/waitForCallsStatus.js +24 -1
  23. package/dist/core/actions/wallet/waitForCallsStatus.js.map +1 -1
  24. package/dist/internal/inference.d.ts +3 -3
  25. package/dist/internal/inference.d.ts.map +1 -1
  26. package/dist/tempo/Abis.d.ts +1935 -899
  27. package/dist/tempo/Abis.d.ts.map +1 -1
  28. package/dist/tempo/Abis.js +215 -0
  29. package/dist/tempo/Abis.js.map +1 -1
  30. package/dist/tempo/Account.d.ts +30 -30
  31. package/dist/tempo/Account.d.ts.map +1 -1
  32. package/dist/tempo/Account.js +43 -43
  33. package/dist/tempo/Account.js.map +1 -1
  34. package/dist/tempo/Addresses.d.ts +2 -0
  35. package/dist/tempo/Addresses.d.ts.map +1 -1
  36. package/dist/tempo/Addresses.js +2 -0
  37. package/dist/tempo/Addresses.js.map +1 -1
  38. package/dist/tempo/Decorator.d.ts +33 -10
  39. package/dist/tempo/Decorator.d.ts.map +1 -1
  40. package/dist/tempo/Decorator.js +9 -8
  41. package/dist/tempo/Decorator.js.map +1 -1
  42. package/dist/tempo/ExecutionError.js +1 -1
  43. package/dist/tempo/ExecutionError.js.map +1 -1
  44. package/dist/tempo/KeyAuthorizationManager.d.ts +24 -13
  45. package/dist/tempo/KeyAuthorizationManager.d.ts.map +1 -1
  46. package/dist/tempo/KeyAuthorizationManager.js +44 -25
  47. package/dist/tempo/KeyAuthorizationManager.js.map +1 -1
  48. package/dist/tempo/Relay.d.ts +61 -12
  49. package/dist/tempo/Relay.d.ts.map +1 -1
  50. package/dist/tempo/Relay.js +48 -8
  51. package/dist/tempo/Relay.js.map +1 -1
  52. package/dist/tempo/Selectors.d.ts +12 -0
  53. package/dist/tempo/Selectors.d.ts.map +1 -1
  54. package/dist/tempo/Selectors.js +12 -0
  55. package/dist/tempo/Selectors.js.map +1 -1
  56. package/dist/tempo/Transport.d.ts +19 -6
  57. package/dist/tempo/Transport.d.ts.map +1 -1
  58. package/dist/tempo/Transport.js +18 -12
  59. package/dist/tempo/Transport.js.map +1 -1
  60. package/dist/tempo/{multisig → accounts}/Config.d.ts +8 -8
  61. package/dist/tempo/accounts/Config.d.ts.map +1 -0
  62. package/dist/tempo/{multisig → accounts}/Config.js +14 -14
  63. package/dist/tempo/{multisig → accounts}/Config.js.map +1 -1
  64. package/dist/tempo/{multisig → accounts}/Operation.d.ts +8 -8
  65. package/dist/tempo/{multisig → accounts}/Operation.d.ts.map +1 -1
  66. package/dist/tempo/{multisig → accounts}/Operation.js +17 -17
  67. package/dist/tempo/{multisig → accounts}/Operation.js.map +1 -1
  68. package/dist/tempo/{multisig → accounts}/Signature.d.ts +1 -1
  69. package/dist/tempo/accounts/Signature.d.ts.map +1 -0
  70. package/dist/tempo/accounts/Signature.js +9 -0
  71. package/dist/tempo/accounts/Signature.js.map +1 -0
  72. package/dist/tempo/actions/accessKey/index.d.ts +1 -0
  73. package/dist/tempo/actions/accessKey/index.d.ts.map +1 -1
  74. package/dist/tempo/actions/accessKey/index.js +1 -0
  75. package/dist/tempo/actions/accessKey/index.js.map +1 -1
  76. package/dist/tempo/actions/accessKey/prepareAuthorization.d.ts +4 -4
  77. package/dist/tempo/actions/accessKey/prepareAuthorization.d.ts.map +1 -1
  78. package/dist/tempo/actions/accessKey/prepareAuthorization.js +10 -10
  79. package/dist/tempo/actions/accessKey/prepareAuthorization.js.map +1 -1
  80. package/dist/tempo/actions/accessKey/saveAuthorization.d.ts +40 -0
  81. package/dist/tempo/actions/accessKey/saveAuthorization.d.ts.map +1 -0
  82. package/dist/tempo/actions/accessKey/saveAuthorization.js +32 -0
  83. package/dist/tempo/actions/accessKey/saveAuthorization.js.map +1 -0
  84. package/dist/tempo/actions/accessKey/signAuthorization.d.ts +17 -13
  85. package/dist/tempo/actions/accessKey/signAuthorization.d.ts.map +1 -1
  86. package/dist/tempo/actions/accessKey/signAuthorization.js +43 -30
  87. package/dist/tempo/actions/accessKey/signAuthorization.js.map +1 -1
  88. package/dist/tempo/actions/{multisig → accounts}/getConfig.d.ts +5 -5
  89. package/dist/tempo/actions/accounts/getConfig.d.ts.map +1 -0
  90. package/dist/tempo/actions/{multisig → accounts}/getConfig.js +5 -5
  91. package/dist/tempo/actions/accounts/getConfig.js.map +1 -0
  92. package/dist/tempo/actions/{multisig → accounts}/getConfigCommitment.d.ts +3 -3
  93. package/dist/tempo/actions/{multisig → accounts}/getConfigCommitment.d.ts.map +1 -1
  94. package/dist/tempo/actions/{multisig → accounts}/getConfigCommitment.js +2 -2
  95. package/dist/tempo/actions/{multisig → accounts}/getConfigCommitment.js.map +1 -1
  96. package/dist/tempo/actions/{multisig → accounts}/getOperation.d.ts +4 -4
  97. package/dist/tempo/actions/{multisig → accounts}/getOperation.d.ts.map +1 -1
  98. package/dist/tempo/actions/{multisig → accounts}/getOperation.js +4 -4
  99. package/dist/tempo/actions/accounts/getOperation.js.map +1 -0
  100. package/dist/tempo/actions/{multisig → accounts}/index.d.ts.map +1 -1
  101. package/dist/tempo/actions/{multisig → accounts}/index.js.map +1 -1
  102. package/dist/tempo/actions/{multisig → accounts}/updateConfig.d.ts +12 -12
  103. package/dist/tempo/actions/{multisig → accounts}/updateConfig.d.ts.map +1 -1
  104. package/dist/tempo/actions/{multisig → accounts}/updateConfig.js +16 -21
  105. package/dist/tempo/actions/{multisig → accounts}/updateConfig.js.map +1 -1
  106. package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.d.ts +6 -6
  107. package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.d.ts.map +1 -1
  108. package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.js +6 -6
  109. package/dist/tempo/actions/{multisig → accounts}/updateConfigSync.js.map +1 -1
  110. package/dist/tempo/actions/index.d.ts +2 -2
  111. package/dist/tempo/actions/index.d.ts.map +1 -1
  112. package/dist/tempo/actions/index.js +2 -2
  113. package/dist/tempo/actions/index.js.map +1 -1
  114. package/dist/tempo/chainConfig.d.ts +16 -16
  115. package/dist/tempo/chainConfig.d.ts.map +1 -1
  116. package/dist/tempo/chainConfig.js +52 -52
  117. package/dist/tempo/chainConfig.js.map +1 -1
  118. package/dist/tempo/index.d.ts +2 -2
  119. package/dist/tempo/index.d.ts.map +1 -1
  120. package/dist/tempo/index.js +2 -2
  121. package/dist/tempo/index.js.map +1 -1
  122. package/dist/tempo/internal/relay/accounts.d.ts +15 -0
  123. package/dist/tempo/internal/relay/accounts.d.ts.map +1 -0
  124. package/dist/tempo/internal/relay/{multisig.js → accounts.js} +96 -101
  125. package/dist/tempo/internal/relay/accounts.js.map +1 -0
  126. package/dist/tempo/internal/relay/feePayer.js +5 -5
  127. package/dist/tempo/internal/relay/feePayer.js.map +1 -1
  128. package/dist/tempo/internal/relay/keyAuthorization.d.ts +25 -0
  129. package/dist/tempo/internal/relay/keyAuthorization.d.ts.map +1 -0
  130. package/dist/tempo/internal/relay/keyAuthorization.js +339 -0
  131. package/dist/tempo/internal/relay/keyAuthorization.js.map +1 -0
  132. package/dist/tempo/internal/relay/plugin.d.ts +6 -3
  133. package/dist/tempo/internal/relay/plugin.d.ts.map +1 -1
  134. package/dist/tempo/internal/relay/plugin.js +15 -6
  135. package/dist/tempo/internal/relay/plugin.js.map +1 -1
  136. package/dist/tempo/internal/relay/utils.d.ts +8 -0
  137. package/dist/tempo/internal/relay/utils.d.ts.map +1 -1
  138. package/dist/utils/RpcClient.d.ts.map +1 -1
  139. package/dist/utils/RpcClient.js +36 -19
  140. package/dist/utils/RpcClient.js.map +1 -1
  141. package/dist/version.d.ts +1 -1
  142. package/dist/version.js +1 -1
  143. package/package.json +2 -2
  144. package/src/chains/definitions/arcTestnet.ts +11 -8
  145. package/src/chains/definitions/qmsTestnet.ts +23 -0
  146. package/src/chains/definitions/tempo.ts +1 -1
  147. package/src/chains/definitions/tempoModerato.ts +2 -2
  148. package/src/chains/index.ts +1 -0
  149. package/src/core/actions/transaction/waitForReceipt.ts +5 -3
  150. package/src/core/actions/wallet/waitForCallsStatus.ts +25 -1
  151. package/src/internal/inference.ts +3 -3
  152. package/src/tempo/Abis.ts +216 -0
  153. package/src/tempo/Account.ts +97 -87
  154. package/src/tempo/Addresses.ts +2 -0
  155. package/src/tempo/Decorator.ts +55 -28
  156. package/src/tempo/ExecutionError.ts +1 -1
  157. package/src/tempo/KeyAuthorizationManager.ts +53 -31
  158. package/src/tempo/Relay.ts +69 -14
  159. package/src/tempo/Selectors.ts +13 -0
  160. package/src/tempo/Transport.ts +46 -20
  161. package/src/tempo/{multisig → accounts}/Config.ts +21 -21
  162. package/src/tempo/{multisig → accounts}/Operation.ts +26 -26
  163. package/src/tempo/{multisig → accounts}/Signature.ts +5 -3
  164. package/src/tempo/actions/accessKey/index.ts +1 -0
  165. package/src/tempo/actions/accessKey/prepareAuthorization.ts +16 -15
  166. package/src/tempo/actions/accessKey/saveAuthorization.ts +51 -0
  167. package/src/tempo/actions/accessKey/signAuthorization.ts +73 -51
  168. package/src/tempo/actions/{multisig → accounts}/getConfig.ts +7 -7
  169. package/src/tempo/actions/{multisig → accounts}/getConfigCommitment.ts +3 -3
  170. package/src/tempo/actions/{multisig → accounts}/getOperation.ts +6 -6
  171. package/src/tempo/actions/{multisig → accounts}/updateConfig.ts +21 -26
  172. package/src/tempo/actions/{multisig → accounts}/updateConfigSync.ts +7 -7
  173. package/src/tempo/actions/index.ts +2 -3
  174. package/src/tempo/chainConfig.ts +87 -85
  175. package/src/tempo/index.ts +4 -4
  176. package/src/tempo/internal/relay/{multisig.ts → accounts.ts} +121 -121
  177. package/src/tempo/internal/relay/feePayer.ts +5 -5
  178. package/src/tempo/internal/relay/keyAuthorization.ts +419 -0
  179. package/src/tempo/internal/relay/plugin.ts +20 -7
  180. package/src/utils/RpcClient.ts +38 -21
  181. package/src/version.ts +1 -1
  182. package/dist/tempo/actions/multisig/getConfig.d.ts.map +0 -1
  183. package/dist/tempo/actions/multisig/getConfig.js.map +0 -1
  184. package/dist/tempo/actions/multisig/getOperation.js.map +0 -1
  185. package/dist/tempo/internal/relay/multisig.d.ts +0 -4
  186. package/dist/tempo/internal/relay/multisig.d.ts.map +0 -1
  187. package/dist/tempo/internal/relay/multisig.js.map +0 -1
  188. package/dist/tempo/multisig/Config.d.ts.map +0 -1
  189. package/dist/tempo/multisig/Signature.d.ts.map +0 -1
  190. package/dist/tempo/multisig/Signature.js +0 -9
  191. package/dist/tempo/multisig/Signature.js.map +0 -1
  192. /package/dist/tempo/actions/{multisig → accounts}/index.d.ts +0 -0
  193. /package/dist/tempo/actions/{multisig → accounts}/index.js +0 -0
  194. /package/src/tempo/actions/{multisig → accounts}/index.ts +0 -0
@@ -6,9 +6,9 @@ import {
6
6
  TransactionRequest as ox_TransactionRequest,
7
7
  } from 'ox'
8
8
  import {
9
- MultisigConfig,
10
- MultisigOperation,
11
- type MultisigSimulation,
9
+ AccountConfig,
10
+ AccountOperation,
11
+ type AccountSimulation,
12
12
  SignatureEnvelope,
13
13
  TransactionReceipt as TransactionReceiptTempo,
14
14
  TransactionRequest as TransactionRequestTempo,
@@ -24,13 +24,13 @@ import { get as getTransaction } from '../core/actions/transaction/get.js'
24
24
  import { verifyDefault, type verifyHash } from '../core/actions/verifyHash.js'
25
25
  import * as Contracts from '../core/internal/contracts.js'
26
26
  import * as Abis from './Abis.js'
27
- import type { MultisigAccount, RootAccount } from './Account.js'
27
+ import type { ConfigurableAccount, RootAccount } from './Account.js'
28
28
  import * as Addresses from './Addresses.js'
29
29
  import type * as Capabilities from './Capabilities.js'
30
30
  import type { Hardfork } from './Hardfork.js'
31
31
  import type * as KeyAuthorizationManager from './KeyAuthorizationManager.js'
32
- import { getConfig } from './actions/multisig/getConfig.js'
33
- import { parseApproval } from './multisig/Signature.js'
32
+ import { getConfig } from './actions/accounts/getConfig.js'
33
+ import { parseApproval } from './accounts/Signature.js'
34
34
  import * as Concurrent from './internal/concurrent.js'
35
35
 
36
36
  const maxExpirySecs = 25
@@ -62,19 +62,19 @@ export type TransactionRequest = Omit<
62
62
  * an Account to co-sign locally, or an external sponsor URL allowed by the relay.
63
63
  */
64
64
  feePayer?: viem_Account.Account | boolean | string | undefined
65
- /** Stored multisig operation to approve. */
65
+ /** Stored account operation to approve. */
66
66
  hash?: Hex.Hex | undefined
67
- /** Owner signing a multisig approval. */
67
+ /** Owner signing an approval for a configurable account. */
68
68
  owner?: RootAccount | undefined
69
- /** Multisig account, config, and modeled approvals for gas estimation. */
70
- multisigSimulation?: MultisigSimulation.Spec | undefined
69
+ /** Configurable account, config, and modeled approvals for gas estimation. */
70
+ accountSimulation?: AccountSimulation.Spec | undefined
71
71
  /**
72
72
  * Nonce key for the 2D nonce system (TIP-1009). `'expiring'` selects an
73
73
  * expiring nonce (resolved while the request is prepared); `'random'`
74
74
  * selects a random key.
75
75
  */
76
76
  nonceKey?: 'expiring' | 'random' | bigint | undefined
77
- /** Owner approvals to combine into a multisig signature (TIP-1061). */
77
+ /** Owner approvals to combine into a configurable account signature (TIP-1107). */
78
78
  signatures?: readonly SignatureEnvelope.Serialized[] | undefined
79
79
  }
80
80
 
@@ -83,18 +83,18 @@ export type TransactionRequestRpc = TransactionRequestTempo.Rpc
83
83
 
84
84
  /**
85
85
  * A Tempo transaction envelope. Client-side request metadata (`feePayer`,
86
- * `multisig`, `signatures`) rides the envelope structurally: the chain's
86
+ * `accountSimulation`, `signatures`) rides the envelope structurally: the chain's
87
87
  * `toEnvelope` hook threads it from the request, and the `serialize` hook
88
88
  * (or the signing account) consumes it.
89
89
  */
90
90
  export type Envelope = TxEnvelopeTempo.TxEnvelopeTempo & {
91
91
  /** Fee payer of the transaction (TIP-1 gas sponsorship). */
92
92
  feePayer?: viem_Account.Account | boolean | string | undefined
93
- /** Owner signing a multisig approval. */
93
+ /** Owner signing an approval for a configurable account. */
94
94
  owner?: RootAccount | undefined
95
- /** Multisig account, config, and modeled approvals for gas estimation. */
96
- multisigSimulation?: MultisigSimulation.Spec | undefined
97
- /** Owner approvals to combine into a multisig signature (TIP-1061). */
95
+ /** Configurable account, config, and modeled approvals for gas estimation. */
96
+ accountSimulation?: AccountSimulation.Spec | undefined
97
+ /** Owner approvals to combine into a configurable account signature (TIP-1107). */
98
98
  signatures?: readonly SignatureEnvelope.Serialized[] | undefined
99
99
  }
100
100
 
@@ -150,12 +150,12 @@ export type ChainConfig = {
150
150
  type PrepareAccount = {
151
151
  address: Address.Address
152
152
  accessKeyAddress?: Address.Address | undefined
153
- config?: MultisigConfig.Config | undefined
154
- owners?: MultisigAccount['owners'] | undefined
153
+ config?: AccountConfig.Config | undefined
154
+ owners?: ConfigurableAccount['owners'] | undefined
155
155
  keyAuthorizationManager?:
156
156
  | KeyAuthorizationManager.KeyAuthorizationManager
157
157
  | undefined
158
- keyType?: 'multisig' | 'p256' | 'secp256k1' | 'webAuthn' | undefined
158
+ keyType?: 'configurable' | 'p256' | 'secp256k1' | 'webAuthn' | undefined
159
159
  source?: string | undefined
160
160
  }
161
161
 
@@ -172,12 +172,12 @@ type PrepareRequest = TransactionRequest & {
172
172
  type ToEnvelopeRequest = TransactionRequestTempo.TransactionRequest &
173
173
  Pick<
174
174
  TransactionRequest,
175
- 'feePayer' | 'multisigSimulation' | 'owner' | 'signatures'
175
+ 'feePayer' | 'accountSimulation' | 'owner' | 'signatures'
176
176
  >
177
177
 
178
178
  /**
179
179
  * Shared Tempo chain configuration: RPC converters, transaction hooks
180
- * (expiring nonces, multisig senders, fee tokens), and signature-envelope
180
+ * (expiring nonces, configurable account senders, fee tokens), and signature-envelope
181
181
  * verification.
182
182
  */
183
183
  export const chainConfig = {
@@ -192,11 +192,11 @@ export const chainConfig = {
192
192
  const transaction = TransactionTempo.fromRpc(rpc)
193
193
  return {
194
194
  ...transaction,
195
- ...(rpc.multisig
195
+ ...(rpc.operation
196
196
  ? {
197
- multisig: MultisigOperation.fromRpc(
198
- rpc.multisig,
199
- ) as MultisigOperation.TransactionOperation,
197
+ operation: AccountOperation.fromRpc(
198
+ rpc.operation,
199
+ ) as AccountOperation.TransactionOperation,
200
200
  }
201
201
  : {}),
202
202
  }
@@ -212,11 +212,11 @@ export const chainConfig = {
212
212
  ...(rpc.status === 'pending'
213
213
  ? { status: 'pending' as const, type: 'tempo' as const }
214
214
  : {}),
215
- ...(rpc.multisig
215
+ ...(rpc.operation
216
216
  ? {
217
- multisig: MultisigOperation.fromRpc(
218
- rpc.multisig,
219
- ) as MultisigOperation.TransactionOperation,
217
+ operation: AccountOperation.fromRpc(
218
+ rpc.operation,
219
+ ) as AccountOperation.TransactionOperation,
220
220
  }
221
221
  : {}),
222
222
  }
@@ -249,38 +249,38 @@ export const chainConfig = {
249
249
  if (
250
250
  !request.account ||
251
251
  typeof request.account === 'string' ||
252
- request.account.source !== 'multisig'
252
+ request.account.source !== 'configurable'
253
253
  )
254
254
  throw new Error(
255
- 'A local multisig account is required to approve a stored multisig transaction.',
255
+ 'A local configurable account is required to approve a stored configurable account transaction.',
256
256
  )
257
257
  if (!request.owner || typeof request.owner === 'string')
258
258
  throw new Error(
259
- 'A local owner account is required to approve a stored multisig transaction.',
259
+ 'A local owner account is required to approve a stored configurable account transaction.',
260
260
  )
261
261
  if (request.owner.source !== 'root')
262
262
  throw new Error(
263
- 'A Tempo owner account is required to approve a stored multisig transaction.',
263
+ 'A Tempo owner account is required to approve a stored configurable account transaction.',
264
264
  )
265
265
  const transaction = await getTransaction(client, {
266
266
  hash: request.hash,
267
267
  })
268
268
  const operation =
269
- 'multisig' in transaction
270
- ? (transaction.multisig as
271
- | MultisigOperation.TransactionOperation
269
+ 'operation' in transaction
270
+ ? (transaction.operation as
271
+ | AccountOperation.TransactionOperation
272
272
  | undefined)
273
273
  : undefined
274
274
  if (!operation)
275
- throw new Error('Expected a multisig operation transaction.')
275
+ throw new Error('Expected an account operation transaction.')
276
276
  if (!Address.isEqual(operation.account, request.account.address))
277
277
  throw new Error(
278
- 'Multisig operation account does not match the requested account.',
278
+ 'Account operation account does not match the requested account.',
279
279
  )
280
280
  const storedTransaction = TxEnvelopeTempo.deserialize(
281
281
  operation.transaction as TxEnvelopeTempo.Serialized,
282
282
  )
283
- const hash = MultisigOperation.getHash({
283
+ const hash = AccountOperation.getHash({
284
284
  account: operation.account,
285
285
  config: operation.config,
286
286
  transaction: operation.transaction as TxEnvelopeTempo.Serialized,
@@ -288,7 +288,7 @@ export const chainConfig = {
288
288
  })
289
289
  if (hash.toLowerCase() !== request.hash.toLowerCase())
290
290
  throw new Error(
291
- 'Multisig operation hash does not match transaction.',
291
+ 'Account operation hash does not match transaction.',
292
292
  )
293
293
  Object.assign(request, {
294
294
  ...storedTransaction,
@@ -298,9 +298,9 @@ export const chainConfig = {
298
298
  nonce: Number(storedTransaction.nonce ?? 0n),
299
299
  account: request.account,
300
300
  from: operation.account,
301
- multisigSimulation: getMultisigSimulation({
301
+ accountSimulation: getAccountSimulation({
302
302
  config: operation.config,
303
- local: request.account as MultisigAccount,
303
+ local: request.account as ConfigurableAccount,
304
304
  }),
305
305
  owner: request.owner,
306
306
  })
@@ -336,7 +336,7 @@ export const chainConfig = {
336
336
  typeof request.type === 'undefined' &&
337
337
  (isTempoRequest(request) ||
338
338
  account?.source === 'accessKey' ||
339
- account?.source === 'multisig' ||
339
+ account?.source === 'configurable' ||
340
340
  (account?.keyType && account.keyType !== 'secp256k1'))
341
341
  )
342
342
  request.type = 'tempo'
@@ -360,53 +360,53 @@ export const chainConfig = {
360
360
  request.keyId = signer.accessKeyAddress
361
361
  }
362
362
 
363
- const multisigIdentity = (() => {
364
- if (account?.source === 'multisig')
363
+ const configurableIdentity = (() => {
364
+ if (account?.source === 'configurable')
365
365
  return {
366
366
  account: account.address,
367
- config: (account as MultisigAccount).config,
368
- local: account as MultisigAccount,
367
+ config: (account as ConfigurableAccount).config,
368
+ local: account as ConfigurableAccount,
369
369
  }
370
370
  return undefined
371
371
  })()
372
- if (request.owner && !multisigIdentity)
372
+ if (request.owner && !configurableIdentity)
373
373
  throw new Error(
374
- 'A multisig account is required when an owner is provided.',
374
+ 'A configurable account is required when an owner is provided.',
375
375
  )
376
376
  if (request.owner && typeof request.owner === 'string')
377
377
  throw new Error(
378
- 'A local owner account is required to approve a multisig transaction.',
378
+ 'A local owner account is required to approve a configurable account transaction.',
379
379
  )
380
380
  if (request.owner && request.owner.source !== 'root')
381
381
  throw new Error(
382
- 'A Tempo owner account is required to approve a multisig transaction.',
382
+ 'A Tempo owner account is required to approve a configurable account transaction.',
383
383
  )
384
- const coordinatedMultisig =
385
- !!multisigIdentity &&
384
+ const coordinated =
385
+ !!configurableIdentity &&
386
386
  !!request.owner &&
387
- (client.transport as { multisig?: boolean }).multisig === true
388
- if (multisigIdentity) {
389
- const { account, local } = multisigIdentity
387
+ (client.transport as { accounts?: boolean }).accounts === true
388
+ if (configurableIdentity) {
389
+ const { account, local } = configurableIdentity
390
390
  if (!account)
391
391
  throw new Error(
392
- 'A multisig account address is required with a current config.',
392
+ 'A configurable account address is required with a current config.',
393
393
  )
394
394
  const config = await (async () => {
395
- if (multisigIdentity.config) return multisigIdentity.config
396
- if (!coordinatedMultisig) return undefined
395
+ if (configurableIdentity.config) return configurableIdentity.config
396
+ if (!coordinated) return undefined
397
397
  const cachedConfig = await getConfig(client, { address: account })
398
398
  if (!cachedConfig)
399
399
  throw new Error(
400
- `No current multisig config is cached for account ${account}. Provide the current config.`,
400
+ `No current account config is cached for account ${account}. Provide the current config.`,
401
401
  )
402
402
  return cachedConfig
403
403
  })()
404
404
  if (!config)
405
405
  throw new Error(
406
- 'A multisig config is required to prepare a transaction.',
406
+ 'An account config is required to prepare a transaction.',
407
407
  )
408
408
  request.from = account
409
- request.multisigSimulation = getMultisigSimulation({
409
+ request.accountSimulation = getAccountSimulation({
410
410
  config,
411
411
  local,
412
412
  })
@@ -421,7 +421,7 @@ export const chainConfig = {
421
421
  request.nonceKey === maxUint256
422
422
  )
423
423
  return true
424
- if (multisigIdentity) return false
424
+ if (configurableIdentity) return false
425
425
  if (request.feePayer && typeof request.nonceKey === 'undefined')
426
426
  return true
427
427
  const address =
@@ -433,7 +433,7 @@ export const chainConfig = {
433
433
  return false
434
434
  })()
435
435
 
436
- if (coordinatedMultisig && typeof request.nonceKey === 'undefined') {
436
+ if (coordinated && typeof request.nonceKey === 'undefined') {
437
437
  request.nonceKey = Hex.toBigInt(Hex.random(31)) + 1n
438
438
  request.nonce = 0
439
439
  } else if (useExpiringNonce) {
@@ -511,7 +511,7 @@ export const chainConfig = {
511
511
  // Non-tempo envelopes delegate to the generic default.
512
512
  if (!isTempoEnvelope(envelope)) return undefined
513
513
 
514
- // Track caller signatures separately from synthesized multisig
514
+ // Track caller signatures separately from synthesized configurable account
515
515
  // approvals.
516
516
  const signature_provided = (() => {
517
517
  if (envelope.signature) return envelope.signature
@@ -523,26 +523,28 @@ export const chainConfig = {
523
523
  // Combine owner approvals before fee-payer handling.
524
524
  const signature = (() => {
525
525
  if (signature_provided) return signature_provided
526
- if (!envelope.multisigSimulation || !envelope.signatures)
526
+ if (!envelope.accountSimulation || !envelope.signatures)
527
527
  return undefined
528
528
 
529
529
  if (!envelope.from)
530
- throw new Error('A multisig sender is required for signing.')
530
+ throw new Error(
531
+ 'A configurable account sender is required for signing.',
532
+ )
531
533
  const payload = TxEnvelopeTempo.getSignPayload(
532
534
  TxEnvelopeTempo.from(envelope),
533
535
  )
534
536
  const signatures = envelope.signatures.map((approval) =>
535
537
  parseApproval(approval),
536
538
  )
537
- const sorted = SignatureEnvelope.sortMultisigApprovals({
539
+ const sorted = SignatureEnvelope.sortApprovals({
538
540
  payload,
539
541
  signatures,
540
542
  account: envelope.from!,
541
- config: MultisigConfig.from(envelope.multisigSimulation.config),
543
+ config: AccountConfig.from(envelope.accountSimulation.config),
542
544
  })
543
545
  return SignatureEnvelope.from({
544
546
  account: envelope.from!,
545
- config: MultisigConfig.from(envelope.multisigSimulation.config),
547
+ config: AccountConfig.from(envelope.accountSimulation.config),
546
548
  signatures: sorted,
547
549
  })
548
550
  })()
@@ -581,7 +583,7 @@ export const chainConfig = {
581
583
  // Non-tempo requests delegate to the generic default.
582
584
  if (!isTempoRequest(request)) return undefined
583
585
 
584
- const { feePayer, multisigSimulation, owner, signatures, ...rest } =
586
+ const { feePayer, accountSimulation, owner, signatures, ...rest } =
585
587
  request as ToEnvelopeRequest
586
588
 
587
589
  const envelope = TransactionRequestTempo.toEnvelope({
@@ -594,7 +596,7 @@ export const chainConfig = {
594
596
  return {
595
597
  ...envelope,
596
598
  ...(typeof feePayer !== 'undefined' ? { feePayer } : {}),
597
- ...(multisigSimulation ? { multisigSimulation } : {}),
599
+ ...(accountSimulation ? { accountSimulation } : {}),
598
600
  ...(owner ? { owner } : {}),
599
601
  ...(signatures ? { signatures } : {}),
600
602
  } as Envelope
@@ -718,7 +720,7 @@ function isTempoRequest(request: Record<string, unknown>): boolean {
718
720
  typeof request.keyData !== 'undefined' ||
719
721
  typeof request.keyId !== 'undefined' ||
720
722
  typeof request.keyType !== 'undefined' ||
721
- typeof request.multisigSimulation !== 'undefined' ||
723
+ typeof request.accountSimulation !== 'undefined' ||
722
724
  typeof request.owner !== 'undefined' ||
723
725
  typeof request.nonceKey !== 'undefined' ||
724
726
  typeof request.signature !== 'undefined' ||
@@ -740,7 +742,7 @@ function encodeRequest(
740
742
  // Non-tempo requests take the generic encoding.
741
743
  if (!isTempoRequest(r)) return ox_TransactionRequest.toRpc(r)
742
744
 
743
- // `multisig`/`signatures` are client-side only. They drive
745
+ // `accountSimulation`/`signatures` are client-side only. They drive
744
746
  // sender derivation, owner signing, and final envelope assembly, but are
745
747
  // never sent as raw RPC fields — the wire payload is the serialized tx.
746
748
  // An `'expiring'` nonce key is resolved by the prepare hook and never
@@ -772,11 +774,11 @@ function encodeRequest(
772
774
  return rpc
773
775
  }
774
776
 
775
- /** Builds a bounded multisig spec for gas simulation. */
776
- function getMultisigSimulation(options: {
777
- config: MultisigConfig.Config
778
- local?: MultisigAccount | undefined
779
- }): MultisigSimulation.Spec {
777
+ /** Builds a bounded account spec for gas simulation. */
778
+ function getAccountSimulation(options: {
779
+ config: AccountConfig.Config
780
+ local?: ConfigurableAccount | undefined
781
+ }): AccountSimulation.Spec {
780
782
  const { config, local } = options
781
783
  return {
782
784
  approvals: selectOwners(config).map((owner) => {
@@ -815,7 +817,7 @@ function getSimulationKey(
815
817
  }
816
818
 
817
819
  /** Selects a deterministic minimum-cardinality owner quorum. */
818
- function selectOwners(config: MultisigConfig.Config) {
820
+ function selectOwners(config: AccountConfig.Config) {
819
821
  const owners = [...config.owners].sort(
820
822
  (a, b) =>
821
823
  Number(b.weight) - Number(a.weight) ||
@@ -823,7 +825,7 @@ function selectOwners(config: MultisigConfig.Config) {
823
825
  )
824
826
  const selected: typeof owners = []
825
827
  let weight = 0
826
- for (const owner of owners.slice(0, MultisigConfig.maxSignatures)) {
828
+ for (const owner of owners.slice(0, AccountConfig.maxSignatures)) {
827
829
  if (weight >= Number(config.threshold)) break
828
830
  selected.push(owner)
829
831
  weight += Number(owner.weight)
@@ -835,24 +837,24 @@ function selectOwners(config: MultisigConfig.Config) {
835
837
 
836
838
  // Exported so consumer declaration emit can name them. See `internal/inference.ts`.
837
839
  export type Transaction = TransactionTempo.Transaction & {
838
- multisig?: MultisigOperation.TransactionOperation | undefined
840
+ operation?: AccountOperation.TransactionOperation | undefined
839
841
  }
840
842
  export type TransactionRpc = TransactionTempo.Rpc & {
841
- multisig?: MultisigOperation.TransactionRpc | undefined
843
+ operation?: AccountOperation.TransactionRpc | undefined
842
844
  }
843
845
  export type TransactionReceipt = Omit<
844
846
  TransactionReceiptTempo.TransactionReceipt,
845
847
  'status'
846
848
  > & {
847
849
  status: 'success' | 'reverted' | 'pending'
848
- multisig?: MultisigOperation.TransactionOperation | undefined
850
+ operation?: AccountOperation.TransactionOperation | undefined
849
851
  }
850
852
  export type TransactionReceiptRpc = Omit<
851
853
  TransactionReceiptTempo.Rpc,
852
854
  'status'
853
855
  > & {
854
856
  status: '0x0' | '0x1' | 'pending'
855
- multisig?: MultisigOperation.TransactionRpc | undefined
857
+ operation?: AccountOperation.TransactionRpc | undefined
856
858
  }
857
859
  export type TxEnvelope = ox_TxEnvelope.TxEnvelope
858
860
  export type SerializeOptions = TxEnvelopeTempo.serialize.Options
@@ -5,9 +5,9 @@ export {
5
5
  Channel,
6
6
  EarnShares,
7
7
  KeyAuthorization,
8
- MultisigConfig,
9
- MultisigOperation,
10
- MultisigSimulation,
8
+ AccountConfig,
9
+ AccountOperation,
10
+ AccountSimulation,
11
11
  Period,
12
12
  ReceivePolicyReceipt,
13
13
  SignatureEnvelope,
@@ -67,7 +67,7 @@ export * as Expiry from './Expiry.js'
67
67
  /** Tempo hardforks & activation helpers. */
68
68
  export * as Hardfork from './Hardfork.js'
69
69
 
70
- /** Store for signed key authorizations. */
70
+ /** Client-side storage for pending key authorizations, backed by a `Store`. */
71
71
  export * as KeyAuthorizationManager from './KeyAuthorizationManager.js'
72
72
 
73
73
  /** P256 (secp256r1) key utilities. Re-exports `ox/P256`. */