ox 1.8.5 → 1.8.7

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 (137) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/tempo/{MultisigConfig.d.ts → AccountConfig.d.ts} +116 -63
  3. package/dist/tempo/AccountConfig.d.ts.map +1 -0
  4. package/dist/tempo/{MultisigConfig.js → AccountConfig.js} +109 -55
  5. package/dist/tempo/AccountConfig.js.map +1 -0
  6. package/dist/tempo/{MultisigOperation.d.ts → AccountOperation.d.ts} +62 -62
  7. package/dist/tempo/AccountOperation.d.ts.map +1 -0
  8. package/dist/tempo/{MultisigOperation.js → AccountOperation.js} +64 -64
  9. package/dist/tempo/AccountOperation.js.map +1 -0
  10. package/dist/tempo/{MultisigSimulation.d.ts → AccountSimulation.d.ts} +21 -21
  11. package/dist/tempo/AccountSimulation.d.ts.map +1 -0
  12. package/dist/tempo/{MultisigSimulation.js → AccountSimulation.js} +20 -20
  13. package/dist/tempo/AccountSimulation.js.map +1 -0
  14. package/dist/tempo/KeyAuthorization.d.ts +37 -27
  15. package/dist/tempo/KeyAuthorization.d.ts.map +1 -1
  16. package/dist/tempo/KeyAuthorization.js +17 -19
  17. package/dist/tempo/KeyAuthorization.js.map +1 -1
  18. package/dist/tempo/RpcSchemaTempo.d.ts +13 -13
  19. package/dist/tempo/RpcSchemaTempo.d.ts.map +1 -1
  20. package/dist/tempo/SignatureEnvelope.d.ts +36 -33
  21. package/dist/tempo/SignatureEnvelope.d.ts.map +1 -1
  22. package/dist/tempo/SignatureEnvelope.js +77 -77
  23. package/dist/tempo/SignatureEnvelope.js.map +1 -1
  24. package/dist/tempo/TokenRole.d.ts +4 -2
  25. package/dist/tempo/TokenRole.d.ts.map +1 -1
  26. package/dist/tempo/TokenRole.js +4 -1
  27. package/dist/tempo/TokenRole.js.map +1 -1
  28. package/dist/tempo/TransactionRequest.d.ts +11 -9
  29. package/dist/tempo/TransactionRequest.d.ts.map +1 -1
  30. package/dist/tempo/TransactionRequest.js +14 -10
  31. package/dist/tempo/TransactionRequest.js.map +1 -1
  32. package/dist/tempo/index.d.ts +56 -54
  33. package/dist/tempo/index.d.ts.map +1 -1
  34. package/dist/tempo/index.js +56 -54
  35. package/dist/tempo/index.js.map +1 -1
  36. package/dist/zod/tempo/{MultisigConfig.d.ts → AccountConfig.d.ts} +6 -6
  37. package/dist/zod/tempo/AccountConfig.d.ts.map +1 -0
  38. package/dist/zod/tempo/{MultisigConfig.js → AccountConfig.js} +12 -12
  39. package/dist/zod/tempo/AccountConfig.js.map +1 -0
  40. package/dist/zod/tempo/{MultisigOperation.d.ts → AccountOperation.d.ts} +5 -5
  41. package/dist/zod/tempo/AccountOperation.d.ts.map +1 -0
  42. package/dist/zod/tempo/{MultisigOperation.js → AccountOperation.js} +10 -10
  43. package/dist/zod/tempo/AccountOperation.js.map +1 -0
  44. package/dist/zod/tempo/{MultisigSimulation.d.ts → AccountSimulation.d.ts} +5 -5
  45. package/dist/zod/tempo/AccountSimulation.d.ts.map +1 -0
  46. package/dist/zod/tempo/AccountSimulation.js +44 -0
  47. package/dist/zod/tempo/AccountSimulation.js.map +1 -0
  48. package/dist/zod/tempo/AuthorizationTempo.d.ts +10 -10
  49. package/dist/zod/tempo/KeyAuthorization.d.ts +12 -12
  50. package/dist/zod/tempo/KeyAuthorization.js +6 -6
  51. package/dist/zod/tempo/KeyAuthorization.js.map +1 -1
  52. package/dist/zod/tempo/RpcSchemaTempo.d.ts +59 -59
  53. package/dist/zod/tempo/RpcSchemaTempo.d.ts.map +1 -1
  54. package/dist/zod/tempo/RpcSchemaTempo.js +28 -28
  55. package/dist/zod/tempo/RpcSchemaTempo.js.map +1 -1
  56. package/dist/zod/tempo/SignatureEnvelope.d.ts +7 -7
  57. package/dist/zod/tempo/SignatureEnvelope.d.ts.map +1 -1
  58. package/dist/zod/tempo/SignatureEnvelope.js +22 -16
  59. package/dist/zod/tempo/SignatureEnvelope.js.map +1 -1
  60. package/dist/zod/tempo/TokenRole.d.ts +1 -1
  61. package/dist/zod/tempo/TokenRole.d.ts.map +1 -1
  62. package/dist/zod/tempo/Transaction.d.ts +24 -24
  63. package/dist/zod/tempo/TransactionRequest.d.ts +84 -84
  64. package/dist/zod/tempo/TransactionRequest.d.ts.map +1 -1
  65. package/dist/zod/tempo/TransactionRequest.js +26 -17
  66. package/dist/zod/tempo/TransactionRequest.js.map +1 -1
  67. package/dist/zod/tempo/TxEnvelopeTempo.d.ts +12 -12
  68. package/dist/zod/tempo/ZoneRpcAuthentication.d.ts +3 -3
  69. package/dist/zod/tempo/z.d.ts +3 -3
  70. package/dist/zod/tempo/z.d.ts.map +1 -1
  71. package/dist/zod/tempo/z.js +3 -3
  72. package/dist/zod/tempo/z.js.map +1 -1
  73. package/package.json +31 -31
  74. package/src/tempo/{MultisigConfig.test-d.ts → AccountConfig.test-d.ts} +22 -12
  75. package/src/tempo/{MultisigConfig.test.ts → AccountConfig.test.ts} +155 -37
  76. package/src/tempo/{MultisigConfig.ts → AccountConfig.ts} +138 -66
  77. package/src/tempo/AccountOperation.test-d.ts +79 -0
  78. package/src/tempo/{MultisigOperation.test.ts → AccountOperation.test.ts} +97 -97
  79. package/src/tempo/{MultisigOperation.ts → AccountOperation.ts} +95 -97
  80. package/src/tempo/{MultisigSimulation.test-d.ts → AccountSimulation.test-d.ts} +7 -9
  81. package/src/tempo/{MultisigSimulation.test.ts → AccountSimulation.test.ts} +28 -28
  82. package/src/tempo/{MultisigSimulation.ts → AccountSimulation.ts} +28 -30
  83. package/src/tempo/KeyAuthorization.test-d.ts +15 -6
  84. package/src/tempo/KeyAuthorization.test.ts +117 -37
  85. package/src/tempo/KeyAuthorization.ts +68 -59
  86. package/src/tempo/RpcSchemaTempo.test-d.ts +19 -19
  87. package/src/tempo/RpcSchemaTempo.ts +13 -13
  88. package/src/tempo/SignatureEnvelope.test-d.ts +7 -7
  89. package/src/tempo/SignatureEnvelope.test.ts +34 -34
  90. package/src/tempo/SignatureEnvelope.ts +112 -108
  91. package/src/tempo/TokenRole.ts +4 -1
  92. package/src/tempo/Transaction.test.ts +4 -4
  93. package/src/tempo/TransactionRequest.test-d.ts +17 -6
  94. package/src/tempo/TransactionRequest.test.ts +32 -17
  95. package/src/tempo/TransactionRequest.ts +27 -19
  96. package/src/tempo/{multisig.e2e.test.ts → configurableAccounts.e2e.test.ts} +16 -16
  97. package/src/tempo/e2e.test.ts +32 -20
  98. package/src/tempo/index.ts +56 -54
  99. package/src/version.ts +1 -1
  100. package/src/zod/tempo/{MultisigConfig.ts → AccountConfig.ts} +12 -12
  101. package/src/zod/tempo/{MultisigOperation.ts → AccountOperation.ts} +9 -9
  102. package/src/zod/tempo/AccountSimulation.ts +53 -0
  103. package/src/zod/tempo/KeyAuthorization.ts +8 -8
  104. package/src/zod/tempo/RpcSchemaTempo.ts +28 -28
  105. package/src/zod/tempo/SignatureEnvelope.ts +23 -17
  106. package/src/zod/tempo/TransactionRequest.ts +29 -18
  107. package/src/zod/tempo/_test/AccountConfig.test-d.ts +13 -0
  108. package/src/zod/tempo/_test/{MultisigConfig.test.ts → AccountConfig.test.ts} +7 -7
  109. package/src/zod/tempo/_test/AccountOperation.test-d.ts +27 -0
  110. package/src/zod/tempo/_test/{MultisigOperation.test.ts → AccountOperation.test.ts} +9 -9
  111. package/src/zod/tempo/_test/AccountSimulation.test-d.ts +13 -0
  112. package/src/zod/tempo/_test/{MultisigSimulation.test.ts → AccountSimulation.test.ts} +13 -13
  113. package/src/zod/tempo/_test/KeyAuthorization.test.ts +9 -9
  114. package/src/zod/tempo/_test/RpcSchemaTempo.test-d.ts +27 -27
  115. package/src/zod/tempo/_test/RpcSchemaTempo.test.ts +16 -18
  116. package/src/zod/tempo/_test/SignatureEnvelope.test-d.ts +5 -5
  117. package/src/zod/tempo/_test/SignatureEnvelope.test.ts +12 -9
  118. package/src/zod/tempo/_test/TransactionRequest.test.ts +28 -8
  119. package/src/zod/tempo/z.ts +3 -3
  120. package/dist/tempo/MultisigConfig.d.ts.map +0 -1
  121. package/dist/tempo/MultisigConfig.js.map +0 -1
  122. package/dist/tempo/MultisigOperation.d.ts.map +0 -1
  123. package/dist/tempo/MultisigOperation.js.map +0 -1
  124. package/dist/tempo/MultisigSimulation.d.ts.map +0 -1
  125. package/dist/tempo/MultisigSimulation.js.map +0 -1
  126. package/dist/zod/tempo/MultisigConfig.d.ts.map +0 -1
  127. package/dist/zod/tempo/MultisigConfig.js.map +0 -1
  128. package/dist/zod/tempo/MultisigOperation.d.ts.map +0 -1
  129. package/dist/zod/tempo/MultisigOperation.js.map +0 -1
  130. package/dist/zod/tempo/MultisigSimulation.d.ts.map +0 -1
  131. package/dist/zod/tempo/MultisigSimulation.js +0 -44
  132. package/dist/zod/tempo/MultisigSimulation.js.map +0 -1
  133. package/src/tempo/MultisigOperation.test-d.ts +0 -79
  134. package/src/zod/tempo/MultisigSimulation.ts +0 -53
  135. package/src/zod/tempo/_test/MultisigConfig.test-d.ts +0 -13
  136. package/src/zod/tempo/_test/MultisigOperation.test-d.ts +0 -27
  137. package/src/zod/tempo/_test/MultisigSimulation.test-d.ts +0 -13
@@ -5,28 +5,33 @@ import * as Hash from '../core/Hash.js';
5
5
  import * as Hex from '../core/Hex.js';
6
6
  /** Maximum encoded byte length for one primitive owner approval. */
7
7
  export const maxOwnerSignatureBytes = 2049;
8
- /** Maximum number of owners allowed in a native multisig config. */
8
+ /** Maximum number of owners allowed in an account config. */
9
9
  export const maxOwners = 48;
10
- /** Maximum number of owner approvals in a native multisig signature. */
10
+ /** Maximum number of owner approvals in a configurable account signature. */
11
11
  export const maxSignatures = 8;
12
- /** Maximum threshold accepted by a native multisig config. */
13
- export const maxThreshold = 8;
14
- /** Maximum version accepted by a native multisig config. */
12
+ /**
13
+ * Maximum threshold accepted by an account config.
14
+ *
15
+ * The threshold must also be reachable by at most {@link ox#AccountConfig.maxSignatures}
16
+ * owner approvals.
17
+ */
18
+ export const maxThreshold = 0xff;
19
+ /** Maximum version accepted by an account config. */
15
20
  export const maxVersion = 2n ** 64n - 1n;
16
- /** Tempo signature type byte for native multisig signatures. */
21
+ /** Tempo signature type byte for configurable account signatures. */
17
22
  export const signatureTypeByte = '0x05';
18
23
  /** Zero 32-byte salt (the default when no salt is provided). */
19
24
  export const zeroSalt = `0x${'00'.repeat(32)}`;
20
- /** Domain prefix for the native multisig account address derivation. */
25
+ /** Domain prefix for the configurable account address derivation. */
21
26
  const accountDomain = 'tempo:multisig:account';
22
- /** Domain prefix for native multisig configuration commitments. */
27
+ /** Domain prefix for account configuration commitments. */
23
28
  const configDomain = 'tempo:multisig:config';
24
29
  /** Keccak-256 of the canonical recovery wallet creation code. */
25
30
  const recoveryWalletInitCodeHash = '0x583cc63a2e37f645b43eac911b1a6d6de08b83abdc308c61364edda8cfc3bd37';
26
- /** Domain prefix for native multisig owner approvals. */
31
+ /** Domain prefix for configurable account owner approvals. */
27
32
  const signatureDomain = 'tempo:multisig:signature';
28
33
  /**
29
- * Asserts that a native multisig {@link ox#MultisigConfig.Config} is valid.
34
+ * Asserts that an {@link ox#AccountConfig.Config} is valid.
30
35
  *
31
36
  * Mirrors the Tempo configuration rules: owners non-empty and
32
37
  * `<= maxOwners`, strictly ascending unique nonzero owner addresses, nonzero
@@ -36,9 +41,9 @@ const signatureDomain = 'tempo:multisig:signature';
36
41
  *
37
42
  * @example
38
43
  * ```ts twoslash
39
- * import { MultisigConfig } from 'ox/tempo'
44
+ * import { AccountConfig } from 'ox/tempo'
40
45
  *
41
- * MultisigConfig.assert({
46
+ * AccountConfig.assert({
42
47
  * threshold: 1,
43
48
  * owners: [
44
49
  * {
@@ -49,7 +54,7 @@ const signatureDomain = 'tempo:multisig:signature';
49
54
  * })
50
55
  * ```
51
56
  *
52
- * @param config - The multisig config.
57
+ * @param config - The account config.
53
58
  */
54
59
  export function assert(config) {
55
60
  const { owners, salt, threshold, version = 0n } = config;
@@ -120,13 +125,13 @@ export function from(config) {
120
125
  return normalized;
121
126
  }
122
127
  /**
123
- * Converts a JSON-RPC multisig configuration to its domain representation.
128
+ * Converts a JSON-RPC account configuration to its domain representation.
124
129
  *
125
130
  * @example
126
131
  * ```ts twoslash
127
- * import { MultisigConfig } from 'ox/tempo'
132
+ * import { AccountConfig } from 'ox/tempo'
128
133
  *
129
- * const config = MultisigConfig.fromRpc({
134
+ * const config = AccountConfig.fromRpc({
130
135
  * owners: [
131
136
  * {
132
137
  * owner: '0x1111111111111111111111111111111111111111',
@@ -139,8 +144,8 @@ export function from(config) {
139
144
  * })
140
145
  * ```
141
146
  *
142
- * @param config - The JSON-RPC multisig configuration.
143
- * @returns The normalized multisig configuration.
147
+ * @param config - The JSON-RPC account configuration.
148
+ * @returns The normalized account configuration.
144
149
  */
145
150
  export function fromRpc(config) {
146
151
  return from({
@@ -149,14 +154,14 @@ export function fromRpc(config) {
149
154
  });
150
155
  }
151
156
  /**
152
- * Converts an RLP {@link ox#MultisigConfig.Tuple} back to a
153
- * {@link ox#MultisigConfig.Config}.
157
+ * Converts an RLP {@link ox#AccountConfig.Tuple} back to a
158
+ * {@link ox#AccountConfig.Config}.
154
159
  *
155
160
  * @example
156
161
  * ```ts twoslash
157
- * import { MultisigConfig } from 'ox/tempo'
162
+ * import { AccountConfig } from 'ox/tempo'
158
163
  *
159
- * const config = MultisigConfig.fromTuple([
164
+ * const config = AccountConfig.fromTuple([
160
165
  * `0x${'00'.repeat(32)}`,
161
166
  * '0x',
162
167
  * '0x01',
@@ -165,7 +170,7 @@ export function fromRpc(config) {
165
170
  * ```
166
171
  *
167
172
  * @param tuple - The RLP tuple.
168
- * @returns The multisig config.
173
+ * @returns The account config.
169
174
  */
170
175
  export function fromTuple(tuple) {
171
176
  const [salt, version, threshold, owners] = tuple;
@@ -203,7 +208,7 @@ export function fromTuple(tuple) {
203
208
  return config;
204
209
  }
205
210
  /**
206
- * Derives the stable native multisig account address.
211
+ * Derives the stable configurable account address.
207
212
  *
208
213
  * The initial config is hashed into a CREATE2 salt using fixed-width
209
214
  * big-endian fields, not RLP. The account uses the chain-configured recovery
@@ -214,9 +219,9 @@ export function fromTuple(tuple) {
214
219
  *
215
220
  * @example
216
221
  * ```ts twoslash
217
- * import { MultisigConfig } from 'ox/tempo'
222
+ * import { AccountConfig } from 'ox/tempo'
218
223
  *
219
- * const initialConfig = MultisigConfig.from({
224
+ * const initialConfig = AccountConfig.from({
220
225
  * owners: [
221
226
  * {
222
227
  * owner: '0x1111111111111111111111111111111111111111',
@@ -226,14 +231,14 @@ export function fromTuple(tuple) {
226
231
  * threshold: 1
227
232
  * })
228
233
  *
229
- * const address = MultisigConfig.getAddress(initialConfig, {
234
+ * const address = AccountConfig.getAddress(initialConfig, {
230
235
  * factory: '0x7171717171717171717171717171717171717171'
231
236
  * })
232
237
  * ```
233
238
  *
234
- * @param config - The initial multisig config.
239
+ * @param config - The initial account config.
235
240
  * @param options - The recovery factory configured by the chain.
236
- * @returns The multisig account address.
241
+ * @returns The configurable account address.
237
242
  */
238
243
  export function getAddress(config, options) {
239
244
  Address.assert(options.factory);
@@ -260,16 +265,16 @@ export function getAddress(config, options) {
260
265
  return account;
261
266
  }
262
267
  /**
263
- * Computes the commitment for a native multisig configuration.
268
+ * Computes the commitment for an account configuration.
264
269
  *
265
270
  * The commitment uses raw fixed-width fields, not RLP or ABI encoding:
266
271
  * `keccak256("tempo:multisig:config" || salt || uint64be(version) || uint8(threshold) || uint8(owners.length) || owners)`.
267
272
  *
268
273
  * @example
269
274
  * ```ts twoslash
270
- * import { MultisigConfig } from 'ox/tempo'
275
+ * import { AccountConfig } from 'ox/tempo'
271
276
  *
272
- * const commitment = MultisigConfig.getCommitment({
277
+ * const commitment = AccountConfig.getCommitment({
273
278
  * owners: [
274
279
  * {
275
280
  * owner: '0x1111111111111111111111111111111111111111',
@@ -281,7 +286,7 @@ export function getAddress(config, options) {
281
286
  * })
282
287
  * ```
283
288
  *
284
- * @param config - The complete multisig configuration.
289
+ * @param config - The complete account configuration.
285
290
  * @returns The configuration commitment.
286
291
  */
287
292
  export function getCommitment(config) {
@@ -292,7 +297,7 @@ export function getCommitment(config) {
292
297
  ])));
293
298
  }
294
299
  /**
295
- * Computes the digest a native multisig owner approves (signs).
300
+ * Computes the digest a configurable account owner approves (signs).
296
301
  *
297
302
  * `keccak256("tempo:multisig:signature" || inner_digest || account || uint64be(version))`,
298
303
  * where `inner_digest` is the transaction sign payload
@@ -304,9 +309,9 @@ export function getCommitment(config) {
304
309
  *
305
310
  * @example
306
311
  * ```ts twoslash
307
- * import { MultisigConfig, TxEnvelopeTempo } from 'ox/tempo'
312
+ * import { AccountConfig, TxEnvelopeTempo } from 'ox/tempo'
308
313
  *
309
- * const config = MultisigConfig.from({
314
+ * const config = AccountConfig.from({
310
315
  * owners: [
311
316
  * {
312
317
  * owner: '0x1111111111111111111111111111111111111111',
@@ -321,8 +326,8 @@ export function getCommitment(config) {
321
326
  * calls: []
322
327
  * })
323
328
  *
324
- * const digest = MultisigConfig.getSignPayload({
325
- * account: MultisigConfig.getAddress(config, {
329
+ * const digest = AccountConfig.getSignPayload({
330
+ * account: AccountConfig.getAddress(config, {
326
331
  * factory: '0x7171717171717171717171717171717171717171'
327
332
  * }),
328
333
  * config,
@@ -342,13 +347,13 @@ export function getSignPayload(value) {
342
347
  return Hash.keccak256(Hex.concat(Hex.fromString(signatureDomain), Hex.from(payload), account, Hex.fromNumber(config.version ?? 0n, { size: 8 })));
343
348
  }
344
349
  /**
345
- * Converts a multisig configuration to its JSON-RPC representation.
350
+ * Converts an account configuration to its JSON-RPC representation.
346
351
  *
347
352
  * @example
348
353
  * ```ts twoslash
349
- * import { MultisigConfig } from 'ox/tempo'
354
+ * import { AccountConfig } from 'ox/tempo'
350
355
  *
351
- * const config = MultisigConfig.toRpc({
356
+ * const config = AccountConfig.toRpc({
352
357
  * owners: [
353
358
  * {
354
359
  * owner: '0x1111111111111111111111111111111111111111',
@@ -359,8 +364,8 @@ export function getSignPayload(value) {
359
364
  * })
360
365
  * ```
361
366
  *
362
- * @param config - The multisig configuration.
363
- * @returns The JSON-RPC multisig configuration.
367
+ * @param config - The account configuration.
368
+ * @returns The JSON-RPC account configuration.
364
369
  */
365
370
  export function toRpc(config) {
366
371
  const value = from(config);
@@ -375,7 +380,7 @@ export function toRpc(config) {
375
380
  };
376
381
  }
377
382
  /**
378
- * Converts a {@link ox#MultisigConfig.Config} to its RLP tuple form.
383
+ * Converts a {@link ox#AccountConfig.Config} to its RLP tuple form.
379
384
  *
380
385
  * Tuple shape: `[salt, version, threshold, [[owner, weight], ...]]`. The
381
386
  * 32-byte `salt` encodes as a full fixed-width string; other integers use
@@ -383,9 +388,9 @@ export function toRpc(config) {
383
388
  *
384
389
  * @example
385
390
  * ```ts twoslash
386
- * import { MultisigConfig } from 'ox/tempo'
391
+ * import { AccountConfig } from 'ox/tempo'
387
392
  *
388
- * const tuple = MultisigConfig.toTuple({
393
+ * const tuple = AccountConfig.toTuple({
389
394
  * owners: [
390
395
  * {
391
396
  * owner: '0x1111111111111111111111111111111111111111',
@@ -396,7 +401,7 @@ export function toRpc(config) {
396
401
  * })
397
402
  * ```
398
403
  *
399
- * @param config - The multisig config.
404
+ * @param config - The account config.
400
405
  * @returns The RLP tuple.
401
406
  */
402
407
  export function toTuple(config) {
@@ -414,14 +419,63 @@ export function toTuple(config) {
414
419
  ];
415
420
  }
416
421
  /**
417
- * Validates a native multisig {@link ox#MultisigConfig.Config}. Returns `true`
422
+ * Derives the configuration that replaces the current one in an owner update.
423
+ *
424
+ * Mirrors the `updateConfig` precompile ([TIP-1109](https://tips.sh/1109)):
425
+ * keeps the current salt, increments the version by one, and replaces the
426
+ * owners and threshold. Owners are sorted into canonical order and the next
427
+ * configuration is validated. The account address does not change.
428
+ *
429
+ * @example
430
+ * ```ts twoslash
431
+ * import { AccountConfig } from 'ox/tempo'
432
+ *
433
+ * const initialConfig = AccountConfig.from({
434
+ * owners: [
435
+ * {
436
+ * owner: '0x1111111111111111111111111111111111111111',
437
+ * weight: 1
438
+ * }
439
+ * ],
440
+ * threshold: 1
441
+ * })
442
+ *
443
+ * const config = AccountConfig.update(initialConfig, {
444
+ * owners: [
445
+ * {
446
+ * owner: '0x2222222222222222222222222222222222222222',
447
+ * weight: 1
448
+ * }
449
+ * ],
450
+ * threshold: 1
451
+ * })
452
+ * // config.version === 1n, with the initial salt
453
+ * ```
454
+ *
455
+ * @param config - The current account config.
456
+ * @param options - The replacement owners and threshold.
457
+ * @returns The next account config.
458
+ */
459
+ export function update(config, options) {
460
+ const current = from(config);
461
+ if (current.version === maxVersion)
462
+ throw new InvalidConfigError({ reason: 'version overflow' });
463
+ return from({
464
+ owners: options.owners,
465
+ salt: current.salt,
466
+ threshold: options.threshold,
467
+ version: current.version + 1n,
468
+ });
469
+ }
470
+ /**
471
+ * Validates an {@link ox#AccountConfig.Config}. Returns `true`
418
472
  * if valid, `false` otherwise.
419
473
  *
420
474
  * @example
421
475
  * ```ts twoslash
422
- * import { MultisigConfig } from 'ox/tempo'
476
+ * import { AccountConfig } from 'ox/tempo'
423
477
  *
424
- * const valid = MultisigConfig.validate({
478
+ * const valid = AccountConfig.validate({
425
479
  * owners: [
426
480
  * {
427
481
  * owner: '0x1111111111111111111111111111111111111111',
@@ -433,7 +487,7 @@ export function toTuple(config) {
433
487
  * // @log: true
434
488
  * ```
435
489
  *
436
- * @param config - The multisig config.
490
+ * @param config - The account config.
437
491
  * @returns Whether the config is valid.
438
492
  */
439
493
  export function validate(config) {
@@ -445,11 +499,11 @@ export function validate(config) {
445
499
  return false;
446
500
  }
447
501
  }
448
- /** Thrown when a native multisig config is invalid. */
502
+ /** Thrown when an account config is invalid. */
449
503
  export class InvalidConfigError extends Errors.BaseError {
450
- name = 'MultisigConfig.InvalidConfigError';
504
+ name = 'AccountConfig.InvalidConfigError';
451
505
  constructor({ reason }) {
452
- super(`Invalid native multisig config: ${reason}.`);
506
+ super(`Invalid account config: ${reason}.`);
453
507
  }
454
508
  }
455
509
  /** @internal */
@@ -462,4 +516,4 @@ function assertVersion(version) {
462
516
  reason: 'version must be an unsigned 64-bit integer',
463
517
  });
464
518
  }
465
- //# sourceMappingURL=MultisigConfig.js.map
519
+ //# sourceMappingURL=AccountConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountConfig.js","sourceRoot":"","sources":["../../src/tempo/AccountConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAE7C,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AAGrC,oEAAoE;AACpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAA;AAE1C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAA;AAE3B,6EAA6E;AAC7E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA;AAEhC,qDAAqD;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,IAAI,GAAG,GAAG,EAAE,CAAA;AAExC,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAe,CAAA;AAEhD,gEAAgE;AAChE,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAW,CAAA;AAEvD,qEAAqE;AACrE,MAAM,aAAa,GAAG,wBAAwB,CAAA;AAE9C,2DAA2D;AAC3D,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAE5C,iEAAiE;AACjE,MAAM,0BAA0B,GAC9B,oEAAoE,CAAA;AAEtE,8DAA8D;AAC9D,MAAM,eAAe,GAAG,0BAA0B,CAAA;AAqDlD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,MAAM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