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
@@ -1,9 +1,9 @@
1
1
  import type { Address, Errors } from 'ox'
2
- import { MultisigConfig } from 'ox/tempo'
2
+ import { AccountConfig } from 'ox/tempo'
3
3
  import type * as Client from '../../../core/Client.js'
4
4
 
5
5
  /**
6
- * Gets the current cached config for a multisig account.
6
+ * Gets the current cached config for a configurable account.
7
7
  *
8
8
  * The coordinator reads the account's current onchain commitment and returns
9
9
  * the matching config from its store. It returns `null` when the config is not
@@ -11,7 +11,7 @@ import type * as Client from '../../../core/Client.js'
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
- * const config = await client.multisig.getConfig({
14
+ * const config = await client.accounts.getConfig({
15
15
  * address: '0x...',
16
16
  * })
17
17
  * ```
@@ -25,21 +25,21 @@ export async function getConfig(
25
25
  parameters: getConfig.Options,
26
26
  ): Promise<getConfig.ReturnType> {
27
27
  const config = await client.request({
28
- method: 'multisig_getConfig',
28
+ method: 'account_getConfig',
29
29
  params: [{ address: parameters.address }],
30
30
  })
31
- return config ? MultisigConfig.fromRpc(config as MultisigConfig.Rpc) : null
31
+ return config ? AccountConfig.fromRpc(config as AccountConfig.Rpc) : null
32
32
  }
33
33
 
34
34
  export declare namespace getConfig {
35
35
  /** Parameters for {@link getConfig}. */
36
36
  export type Options = {
37
- /** Multisig account address. */
37
+ /** Configurable account address. */
38
38
  address: Address.Address
39
39
  }
40
40
 
41
41
  /** Return value for {@link getConfig}. */
42
- export type ReturnType = MultisigConfig.Config | null
42
+ export type ReturnType = AccountConfig.Config | null
43
43
 
44
44
  /** Error type for {@link getConfig}. */
45
45
  export type ErrorType = Errors.GlobalErrorType
@@ -9,7 +9,7 @@ import type { ReadParameters } from '../../internal/types.js'
9
9
  import { defineCall } from '../../internal/utils.js'
10
10
 
11
11
  /**
12
- * Gets the current configuration commitment for a native multisig account.
12
+ * Gets the current configuration commitment for a configurable account.
13
13
  *
14
14
  * @example
15
15
  * ```ts
@@ -22,7 +22,7 @@ import { defineCall } from '../../internal/utils.js'
22
22
  * transport: http(),
23
23
  * })
24
24
  *
25
- * const commitment = await Actions.multisig.getConfigCommitment(client, {
25
+ * const commitment = await Actions.accounts.getConfigCommitment(client, {
26
26
  * account: '0x...',
27
27
  * })
28
28
  * ```
@@ -50,7 +50,7 @@ export namespace getConfigCommitment {
50
50
  export type Options = ReadParameters & Args
51
51
 
52
52
  export type Args = {
53
- /** Initialized multisig account address. */
53
+ /** Initialized configurable account address. */
54
54
  account: Address.Address
55
55
  }
56
56
 
@@ -1,9 +1,9 @@
1
1
  import type { Errors, Hex } from 'ox'
2
- import { MultisigOperation } from 'ox/tempo'
2
+ import { AccountOperation } from 'ox/tempo'
3
3
  import type * as Client from '../../../core/Client.js'
4
4
 
5
5
  /**
6
- * Gets a coordinated multisig operation by its hash.
6
+ * Gets a coordinated account operation by its hash.
7
7
  *
8
8
  * @param client - Client.
9
9
  * @param parameters - Parameters.
@@ -14,23 +14,23 @@ export async function getOperation(
14
14
  parameters: getOperation.Options,
15
15
  ): Promise<getOperation.ReturnType> {
16
16
  const operation = await client.request({
17
- method: 'multisig_getOperation',
17
+ method: 'account_getOperation',
18
18
  params: [parameters.hash],
19
19
  })
20
20
  return operation
21
- ? MultisigOperation.fromRpc(operation as MultisigOperation.Rpc)
21
+ ? AccountOperation.fromRpc(operation as AccountOperation.Rpc)
22
22
  : null
23
23
  }
24
24
 
25
25
  export declare namespace getOperation {
26
26
  /** Parameters for {@link getOperation}. */
27
27
  export type Options = {
28
- /** Multisig operation hash. */
28
+ /** Account operation hash. */
29
29
  hash: Hex.Hex
30
30
  }
31
31
 
32
32
  /** Return value for {@link getOperation}. */
33
- export type ReturnType = MultisigOperation.Operation | null
33
+ export type ReturnType = AccountOperation.Operation | null
34
34
 
35
35
  /** Error type for {@link getOperation}. */
36
36
  export type ErrorType = Errors.GlobalErrorType
@@ -1,20 +1,20 @@
1
1
  import type { Address, Errors } from 'ox'
2
2
  import { AbiEvent } from 'ox'
3
- import { MultisigConfig } from 'ox/tempo'
3
+ import { AccountConfig } from 'ox/tempo'
4
4
  import type * as Account from '../../../core/Account.js'
5
5
  import type * as Chain from '../../../core/Chain.js'
6
6
  import type * as Client from '../../../core/Client.js'
7
7
  import { write } from '../../../core/actions/contract/write.js'
8
8
  import { writeSync } from '../../../core/actions/contract/writeSync.js'
9
9
  import * as Abis from '../../Abis.js'
10
- import { fromMultisig, type MultisigAccount } from '../../Account.js'
10
+ import { type ConfigurableAccount, fromConfig } from '../../Account.js'
11
11
  import * as Addresses from '../../Addresses.js'
12
12
  import type { WriteParameters } from '../../internal/types.js'
13
13
  import { defineCall, dispatchWrite } from '../../internal/utils.js'
14
14
  import { getConfig } from './getConfig.js'
15
15
 
16
16
  /**
17
- * Replaces the current configuration for a native multisig account.
17
+ * Replaces the current configuration for a configurable account.
18
18
  *
19
19
  * The transaction must be authorized directly by the account's current owner
20
20
  * quorum. Local owner-signing flows can include {@link updateConfig.call} in a
@@ -30,7 +30,7 @@ import { getConfig } from './getConfig.js'
30
30
  * const owner = Account.fromSecp256k1(
31
31
  * '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
32
32
  * )
33
- * const account = Account.fromMultisig({
33
+ * const account = Account.fromConfig({
34
34
  * address: 'infer',
35
35
  * owners: [owner],
36
36
  * })
@@ -44,7 +44,7 @@ import { getConfig } from './getConfig.js'
44
44
  * to: account.address,
45
45
  * })
46
46
  *
47
- * const hash = await Actions.multisig.updateConfig(client, {
47
+ * const hash = await Actions.accounts.updateConfig(client, {
48
48
  * account,
49
49
  * nextConfig: {
50
50
  * owners: [{ owner: owner.address, weight: 1 }],
@@ -70,16 +70,16 @@ export async function updateConfig<
70
70
  export namespace updateConfig {
71
71
  export type Options = WriteParameters & {
72
72
  /** Complete current config. Inferred from the account or coordinator when omitted. */
73
- currentConfig?: MultisigConfig.Config | undefined
73
+ currentConfig?: AccountConfig.Config | undefined
74
74
  /** Replacement owners and threshold. */
75
- nextConfig: Pick<MultisigConfig.Config, 'owners' | 'threshold'>
75
+ nextConfig: Pick<AccountConfig.Config, 'owners' | 'threshold'>
76
76
  }
77
77
 
78
78
  export type Args = {
79
79
  /** Complete current config. */
80
- currentConfig: MultisigConfig.Config
80
+ currentConfig: AccountConfig.Config
81
81
  /** Replacement owners and threshold. */
82
- nextConfig: Pick<MultisigConfig.Config, 'owners' | 'threshold'>
82
+ nextConfig: Pick<AccountConfig.Config, 'owners' | 'threshold'>
83
83
  }
84
84
 
85
85
  export type ReturnType = write.ReturnType
@@ -108,9 +108,9 @@ export namespace updateConfig {
108
108
  if (
109
109
  typeof accountValue === 'object' &&
110
110
  'source' in accountValue &&
111
- accountValue.source === 'multisig'
111
+ accountValue.source === 'configurable'
112
112
  )
113
- return accountValue as MultisigAccount
113
+ return accountValue as ConfigurableAccount
114
114
  return undefined
115
115
  })()
116
116
  const config = (() => {
@@ -126,22 +126,22 @@ export namespace updateConfig {
126
126
  return undefined
127
127
  })()
128
128
  const currentConfig = await (async () => {
129
- if (config) return MultisigConfig.from(config)
129
+ if (config) return AccountConfig.from(config)
130
130
  if (!address)
131
131
  throw new Error(
132
- 'A multisig account address or current config is required.',
132
+ 'A configurable account address or current config is required.',
133
133
  )
134
134
  const cachedConfig = await getConfig(client, { address })
135
135
  if (!cachedConfig)
136
136
  throw new Error(
137
- `No current multisig config is cached for account ${address}. Provide the current config.`,
137
+ `No current account config is cached for account ${address}. Provide the current config.`,
138
138
  )
139
139
  return cachedConfig
140
140
  })()
141
141
  const resolvedAccount = (() => {
142
142
  if (account) return { ...account, config: currentConfig }
143
143
  if (typeof accountValue === 'object') return accountValue
144
- if (address) return fromMultisig({ address, ...currentConfig })
144
+ if (address) return fromConfig({ address, ...currentConfig })
145
145
  return undefined
146
146
  })()
147
147
  return dispatchWrite(action, client, {
@@ -161,11 +161,11 @@ export namespace updateConfig {
161
161
  *
162
162
  * @example
163
163
  * ```ts
164
- * import { Actions, type MultisigConfig } from 'viem/tempo'
164
+ * import { type AccountConfig, Actions } from 'viem/tempo'
165
165
  *
166
- * declare const currentConfig: MultisigConfig.Config
166
+ * declare const currentConfig: AccountConfig.Config
167
167
  *
168
- * const call = Actions.multisig.updateConfig.call({
168
+ * const call = Actions.accounts.updateConfig.call({
169
169
  * currentConfig,
170
170
  * nextConfig: {
171
171
  * owners: [{ owner: '0x...', weight: 1 }],
@@ -174,17 +174,12 @@ export namespace updateConfig {
174
174
  * })
175
175
  * ```
176
176
  *
177
- * @param args - Current and replacement multisig configurations.
177
+ * @param args - Current and replacement account configurations.
178
178
  * @returns The call.
179
179
  */
180
180
  export function call(args: Args) {
181
- const currentConfig = MultisigConfig.from(args.currentConfig)
182
- const nextConfig = MultisigConfig.from({
183
- owners: args.nextConfig.owners,
184
- salt: currentConfig.salt,
185
- threshold: args.nextConfig.threshold,
186
- version: currentConfig.version + 1n,
187
- })
181
+ const currentConfig = AccountConfig.from(args.currentConfig)
182
+ const nextConfig = AccountConfig.update(currentConfig, args.nextConfig)
188
183
  return defineCall({
189
184
  address: Addresses.nativeMultisig,
190
185
  abi: Abis.nativeMultisig,
@@ -1,5 +1,5 @@
1
1
  import type { Address } from 'ox'
2
- import { MultisigConfig } from 'ox/tempo'
2
+ import { AccountConfig } from 'ox/tempo'
3
3
  import type * as Account from '../../../core/Account.js'
4
4
  import type * as Chain from '../../../core/Chain.js'
5
5
  import type * as Client from '../../../core/Client.js'
@@ -8,16 +8,16 @@ import type { TransactionReceipt } from '../../chainConfig.js'
8
8
  import { updateConfig } from './updateConfig.js'
9
9
 
10
10
  /**
11
- * Replaces a native multisig configuration and waits for confirmation.
11
+ * Replaces a configurable account configuration and waits for confirmation.
12
12
  *
13
13
  * @example
14
14
  * ```ts
15
15
  * import { createWalletClient, custom, type EIP1193Provider } from 'viem'
16
16
  * import { tempo } from 'viem/chains'
17
- * import { Actions, type MultisigConfig } from 'viem/tempo'
17
+ * import { type AccountConfig, Actions } from 'viem/tempo'
18
18
  *
19
19
  * declare const provider: EIP1193Provider
20
- * declare const currentConfig: MultisigConfig.Config
20
+ * declare const currentConfig: AccountConfig.Config
21
21
  *
22
22
  * const client = createWalletClient({
23
23
  * account: '0x...',
@@ -25,7 +25,7 @@ import { updateConfig } from './updateConfig.js'
25
25
  * transport: custom(provider),
26
26
  * })
27
27
  *
28
- * const { receipt } = await Actions.multisig.updateConfigSync(client, {
28
+ * const { receipt } = await Actions.accounts.updateConfigSync(client, {
29
29
  * currentConfig,
30
30
  * nextConfig: {
31
31
  * owners: [{ owner: '0x...', weight: 1 }],
@@ -55,7 +55,7 @@ export async function updateConfigSync<
55
55
  const { args } = updateConfig.extractEvent(receipt.logs)
56
56
  return {
57
57
  account: args.account,
58
- config: MultisigConfig.from({
58
+ config: AccountConfig.from({
59
59
  owners: args.owners,
60
60
  salt: args.salt,
61
61
  threshold: args.threshold,
@@ -72,7 +72,7 @@ export namespace updateConfigSync {
72
72
 
73
73
  export type ReturnType = {
74
74
  account: Address.Address
75
- config: MultisigConfig.Config
75
+ config: AccountConfig.Config
76
76
  receipt: TransactionReceipt
77
77
  }
78
78
 
@@ -1,5 +1,7 @@
1
1
  // biome-ignore lint/performance/noBarrelFile: namespace module
2
2
  export * as accessKey from './accessKey/index.js'
3
+ /** Configurable account configuration and approval actions. */
4
+ export * as accounts from './accounts/index.js'
3
5
  export * as amm from './amm/index.js'
4
6
  export * as channel from './channel/index.js'
5
7
  export * as dex from './dex/index.js'
@@ -15,6 +17,3 @@ export * as validator from './validator/index.js'
15
17
  export * as virtualAddress from './virtualAddress/index.js'
16
18
  export * as wallet from './wallet/index.js'
17
19
  export * as zone from './zone/index.js'
18
-
19
- /** Native multisig configuration and approval actions. */
20
- export * as multisig from './multisig/index.js'