viem 2.55.18 → 2.55.19

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 (127) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/_cjs/chains/definitions/morphTachyon.js +25 -0
  3. package/_cjs/chains/definitions/morphTachyon.js.map +1 -0
  4. package/_cjs/chains/definitions/morphTachyonTestnet.js +26 -0
  5. package/_cjs/chains/definitions/morphTachyonTestnet.js.map +1 -0
  6. package/_cjs/chains/definitions/ynxTestnet.js +26 -0
  7. package/_cjs/chains/definitions/ynxTestnet.js.map +1 -0
  8. package/_cjs/chains/index.js +13 -7
  9. package/_cjs/chains/index.js.map +1 -1
  10. package/_cjs/errors/version.js +1 -1
  11. package/_cjs/tempo/Abis.js +102 -1
  12. package/_cjs/tempo/Abis.js.map +1 -1
  13. package/_cjs/tempo/Account.js +188 -16
  14. package/_cjs/tempo/Account.js.map +1 -1
  15. package/_cjs/tempo/Addresses.js +2 -1
  16. package/_cjs/tempo/Addresses.js.map +1 -1
  17. package/_cjs/tempo/Decorator.js +8 -0
  18. package/_cjs/tempo/Decorator.js.map +1 -1
  19. package/_cjs/tempo/Formatters.js +1 -1
  20. package/_cjs/tempo/Formatters.js.map +1 -1
  21. package/_cjs/tempo/Selectors.js +7 -1
  22. package/_cjs/tempo/Selectors.js.map +1 -1
  23. package/_cjs/tempo/Transaction.js +31 -10
  24. package/_cjs/tempo/Transaction.js.map +1 -1
  25. package/_cjs/tempo/actions/accessKey.js +49 -8
  26. package/_cjs/tempo/actions/accessKey.js.map +1 -1
  27. package/_cjs/tempo/actions/index.js +2 -1
  28. package/_cjs/tempo/actions/index.js.map +1 -1
  29. package/_cjs/tempo/actions/multisig.js +95 -0
  30. package/_cjs/tempo/actions/multisig.js.map +1 -0
  31. package/_cjs/tempo/chainConfig.js +58 -29
  32. package/_cjs/tempo/chainConfig.js.map +1 -1
  33. package/_cjs/tempo/internal/multisig.js +56 -0
  34. package/_cjs/tempo/internal/multisig.js.map +1 -0
  35. package/_esm/chains/definitions/morphTachyon.js +22 -0
  36. package/_esm/chains/definitions/morphTachyon.js.map +1 -0
  37. package/_esm/chains/definitions/morphTachyonTestnet.js +23 -0
  38. package/_esm/chains/definitions/morphTachyonTestnet.js.map +1 -0
  39. package/_esm/chains/definitions/ynxTestnet.js +23 -0
  40. package/_esm/chains/definitions/ynxTestnet.js.map +1 -0
  41. package/_esm/chains/index.js +3 -0
  42. package/_esm/chains/index.js.map +1 -1
  43. package/_esm/errors/version.js +1 -1
  44. package/_esm/tempo/Abis.js +101 -0
  45. package/_esm/tempo/Abis.js.map +1 -1
  46. package/_esm/tempo/Account.js +196 -66
  47. package/_esm/tempo/Account.js.map +1 -1
  48. package/_esm/tempo/Addresses.js +1 -0
  49. package/_esm/tempo/Addresses.js.map +1 -1
  50. package/_esm/tempo/Decorator.js +8 -0
  51. package/_esm/tempo/Decorator.js.map +1 -1
  52. package/_esm/tempo/Formatters.js +3 -6
  53. package/_esm/tempo/Formatters.js.map +1 -1
  54. package/_esm/tempo/Selectors.js +6 -0
  55. package/_esm/tempo/Selectors.js.map +1 -1
  56. package/_esm/tempo/Transaction.js +31 -10
  57. package/_esm/tempo/Transaction.js.map +1 -1
  58. package/_esm/tempo/actions/accessKey.js +65 -23
  59. package/_esm/tempo/actions/accessKey.js.map +1 -1
  60. package/_esm/tempo/actions/index.js +1 -0
  61. package/_esm/tempo/actions/index.js.map +1 -1
  62. package/_esm/tempo/actions/multisig.js +245 -0
  63. package/_esm/tempo/actions/multisig.js.map +1 -0
  64. package/_esm/tempo/chainConfig.js +65 -35
  65. package/_esm/tempo/chainConfig.js.map +1 -1
  66. package/_esm/tempo/internal/multisig.js +56 -0
  67. package/_esm/tempo/internal/multisig.js.map +1 -0
  68. package/_types/chains/definitions/morphTachyon.d.ts +51 -0
  69. package/_types/chains/definitions/morphTachyon.d.ts.map +1 -0
  70. package/_types/chains/definitions/morphTachyonTestnet.d.ts +51 -0
  71. package/_types/chains/definitions/morphTachyonTestnet.d.ts.map +1 -0
  72. package/_types/chains/definitions/tempo.d.ts +30 -2
  73. package/_types/chains/definitions/tempo.d.ts.map +1 -1
  74. package/_types/chains/definitions/tempoDevnet.d.ts +30 -2
  75. package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
  76. package/_types/chains/definitions/tempoLocalnet.d.ts +30 -2
  77. package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
  78. package/_types/chains/definitions/tempoModerato.d.ts +30 -2
  79. package/_types/chains/definitions/tempoModerato.d.ts.map +1 -1
  80. package/_types/chains/definitions/ynxTestnet.d.ts +51 -0
  81. package/_types/chains/definitions/ynxTestnet.d.ts.map +1 -0
  82. package/_types/chains/index.d.ts +3 -0
  83. package/_types/chains/index.d.ts.map +1 -1
  84. package/_types/errors/version.d.ts +1 -1
  85. package/_types/tempo/Abis.d.ts +321 -0
  86. package/_types/tempo/Abis.d.ts.map +1 -1
  87. package/_types/tempo/Account.d.ts +42 -26
  88. package/_types/tempo/Account.d.ts.map +1 -1
  89. package/_types/tempo/Addresses.d.ts +1 -0
  90. package/_types/tempo/Addresses.d.ts.map +1 -1
  91. package/_types/tempo/Decorator.d.ts +32 -0
  92. package/_types/tempo/Decorator.d.ts.map +1 -1
  93. package/_types/tempo/Formatters.d.ts.map +1 -1
  94. package/_types/tempo/Selectors.d.ts +6 -0
  95. package/_types/tempo/Selectors.d.ts.map +1 -1
  96. package/_types/tempo/Transaction.d.ts +17 -2
  97. package/_types/tempo/Transaction.d.ts.map +1 -1
  98. package/_types/tempo/actions/accessKey.d.ts +35 -17
  99. package/_types/tempo/actions/accessKey.d.ts.map +1 -1
  100. package/_types/tempo/actions/index.d.ts +1 -0
  101. package/_types/tempo/actions/index.d.ts.map +1 -1
  102. package/_types/tempo/actions/multisig.d.ts +472 -0
  103. package/_types/tempo/actions/multisig.d.ts.map +1 -0
  104. package/_types/tempo/chainConfig.d.ts +15 -1
  105. package/_types/tempo/chainConfig.d.ts.map +1 -1
  106. package/_types/tempo/internal/multisig.d.ts +13 -0
  107. package/_types/tempo/internal/multisig.d.ts.map +1 -0
  108. package/_types/tempo/zones/zone.d.ts +90 -6
  109. package/_types/tempo/zones/zone.d.ts.map +1 -1
  110. package/chains/definitions/morphTachyon.ts +22 -0
  111. package/chains/definitions/morphTachyonTestnet.ts +23 -0
  112. package/chains/definitions/ynxTestnet.ts +23 -0
  113. package/chains/index.ts +3 -0
  114. package/errors/version.ts +1 -1
  115. package/package.json +2 -2
  116. package/tempo/Abis.ts +102 -0
  117. package/tempo/Account.ts +329 -51
  118. package/tempo/Addresses.ts +1 -0
  119. package/tempo/Decorator.ts +50 -0
  120. package/tempo/Formatters.ts +4 -5
  121. package/tempo/Selectors.ts +7 -0
  122. package/tempo/Transaction.ts +52 -12
  123. package/tempo/actions/accessKey.ts +128 -32
  124. package/tempo/actions/index.ts +1 -0
  125. package/tempo/actions/multisig.ts +356 -0
  126. package/tempo/chainConfig.ts +82 -35
  127. package/tempo/internal/multisig.ts +72 -0
@@ -0,0 +1,472 @@
1
+ import type { Address } from 'abitype';
2
+ import { MultisigConfig } from 'ox/tempo';
3
+ import type { Account } from '../../accounts/types.js';
4
+ import type { ReadContractReturnType } from '../../actions/public/readContract.js';
5
+ import type { WriteContractReturnType } from '../../actions/wallet/writeContract.js';
6
+ import { writeContract } from '../../actions/wallet/writeContract.js';
7
+ import { writeContractSync } from '../../actions/wallet/writeContractSync.js';
8
+ import type { Client } from '../../clients/createClient.js';
9
+ import type { Transport } from '../../clients/transports/createTransport.js';
10
+ import type { BaseErrorType } from '../../errors/base.js';
11
+ import type { Chain } from '../../types/chain.js';
12
+ import type { GetEventArgs } from '../../types/contract.js';
13
+ import type { Log } from '../../types/log.js';
14
+ import type { Compute } from '../../types/utils.js';
15
+ import * as Abis from '../Abis.js';
16
+ import type { ReadParameters, WriteParameters } from '../internal/types.js';
17
+ import type { TransactionReceipt } from '../Transaction.js';
18
+ /**
19
+ * Checks whether an address is an initialized native multisig account.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { createClient, http } from 'viem'
24
+ * import { tempo } from 'viem/chains'
25
+ * import { Actions } from 'viem/tempo'
26
+ *
27
+ * const client = createClient({
28
+ * chain: tempo,
29
+ * transport: http(),
30
+ * })
31
+ *
32
+ * const initialized = await Actions.multisig.isInitialized(client, {
33
+ * account: '0x...',
34
+ * })
35
+ * ```
36
+ *
37
+ * @param client - Client.
38
+ * @param parameters - Parameters.
39
+ * @returns Whether the account is an initialized native multisig account.
40
+ */
41
+ export declare function isInitialized<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: isInitialized.Parameters): Promise<isInitialized.ReturnValue>;
42
+ export declare namespace isInitialized {
43
+ type Parameters = ReadParameters & Args;
44
+ type Args = {
45
+ /** Account address. */
46
+ account: Address;
47
+ };
48
+ type ReturnValue = ReadContractReturnType<typeof Abis.nativeMultisig, 'isMultisigAccount', never>;
49
+ /**
50
+ * Defines a call to the precompile's `isMultisigAccount` function.
51
+ *
52
+ * Can be passed to [`multicall`](https://viem.sh/docs/contract/multicall).
53
+ *
54
+ * @param args - Arguments.
55
+ * @returns The call.
56
+ */
57
+ function call(args: Args): {
58
+ abi: [{
59
+ readonly name: "isMultisigAccount";
60
+ readonly type: "function";
61
+ readonly stateMutability: "view";
62
+ readonly inputs: readonly [{
63
+ readonly type: "address";
64
+ readonly name: "account";
65
+ }];
66
+ readonly outputs: readonly [{
67
+ readonly type: "bool";
68
+ }];
69
+ }];
70
+ functionName: "isMultisigAccount";
71
+ } & {
72
+ args: readonly [account: `0x${string}`];
73
+ } & {
74
+ address: Address;
75
+ } & {
76
+ data: import("../../index.js").Hex;
77
+ to: Address;
78
+ };
79
+ }
80
+ /**
81
+ * Gets the current configuration for an initialized native multisig account.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * import { createClient, http } from 'viem'
86
+ * import { tempo } from 'viem/chains'
87
+ * import { Actions } from 'viem/tempo'
88
+ *
89
+ * const client = createClient({
90
+ * chain: tempo,
91
+ * transport: http(),
92
+ * })
93
+ *
94
+ * const config = await Actions.multisig.getConfig(client, {
95
+ * account: '0x...',
96
+ * })
97
+ * ```
98
+ *
99
+ * @param client - Client.
100
+ * @param parameters - Parameters.
101
+ * @returns The current version, threshold, and owners.
102
+ */
103
+ export declare function getConfig<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: getConfig.Parameters): Promise<getConfig.ReturnValue>;
104
+ export declare namespace getConfig {
105
+ type Parameters = ReadParameters & Args;
106
+ type Args = {
107
+ /** Initialized multisig account address. */
108
+ account: Address;
109
+ };
110
+ type ReturnValue = ReadContractReturnType<typeof Abis.nativeMultisig, 'getConfig', never>;
111
+ /**
112
+ * Defines a call to the `getConfig` function.
113
+ *
114
+ * Can be passed to [`multicall`](https://viem.sh/docs/contract/multicall).
115
+ *
116
+ * @param args - Arguments.
117
+ * @returns The call.
118
+ */
119
+ function call(args: Args): {
120
+ abi: [{
121
+ readonly name: "getConfig";
122
+ readonly type: "function";
123
+ readonly stateMutability: "view";
124
+ readonly inputs: readonly [{
125
+ readonly type: "address";
126
+ readonly name: "account";
127
+ }];
128
+ readonly outputs: readonly [{
129
+ readonly type: "tuple";
130
+ readonly components: readonly [{
131
+ readonly type: "uint64";
132
+ readonly name: "version";
133
+ }, {
134
+ readonly type: "uint8";
135
+ readonly name: "threshold";
136
+ }, {
137
+ readonly type: "tuple[]";
138
+ readonly name: "owners";
139
+ readonly components: readonly [{
140
+ readonly type: "address";
141
+ readonly name: "owner";
142
+ }, {
143
+ readonly type: "uint8";
144
+ readonly name: "weight";
145
+ }];
146
+ }];
147
+ }];
148
+ }];
149
+ functionName: "getConfig";
150
+ } & {
151
+ args: readonly [account: `0x${string}`];
152
+ } & {
153
+ address: Address;
154
+ } & {
155
+ data: import("../../index.js").Hex;
156
+ to: Address;
157
+ };
158
+ }
159
+ /**
160
+ * Replaces the current configuration for a native multisig account.
161
+ *
162
+ * The transaction must be authorized directly by the account's current owner
163
+ * quorum. Local owner-signing flows can include {@link updateConfig.call} in a
164
+ * prepared transaction before collecting approvals.
165
+ *
166
+ * @example
167
+ * ```ts
168
+ * import { createClient, http } from 'viem'
169
+ * import { sendTransactionSync } from 'viem/actions'
170
+ * import { tempoLocalnet } from 'viem/chains'
171
+ * import { Account, Actions } from 'viem/tempo'
172
+ *
173
+ * const owner = Account.fromSecp256k1(
174
+ * '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
175
+ * )
176
+ * const account = Account.fromMultisig({ owners: [owner] })
177
+ * const client = createClient({
178
+ * chain: tempoLocalnet,
179
+ * transport: http(),
180
+ * })
181
+ *
182
+ * await sendTransactionSync(client, {
183
+ * account,
184
+ * to: account.address,
185
+ * })
186
+ *
187
+ * const hash = await Actions.multisig.updateConfig(client, {
188
+ * account,
189
+ * threshold: 1,
190
+ * owners: [{ owner: owner.address, weight: 1 }],
191
+ * })
192
+ * ```
193
+ *
194
+ * @param client - Client.
195
+ * @param parameters - Parameters.
196
+ * @returns The transaction hash.
197
+ */
198
+ export declare function updateConfig<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: updateConfig.Parameters<chain, account>): Promise<updateConfig.ReturnValue>;
199
+ export declare namespace updateConfig {
200
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
201
+ type Args = {
202
+ /** New multisig owners and their weights. */
203
+ owners: MultisigConfig.Config['owners'];
204
+ /** New signature weight required to authorize the account. */
205
+ threshold: MultisigConfig.Config['threshold'];
206
+ };
207
+ type ReturnValue = WriteContractReturnType;
208
+ type ErrorType = BaseErrorType;
209
+ /** @internal */
210
+ function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: Parameters<chain, account>): Promise<ReturnType<action>>;
211
+ /**
212
+ * Defines a call to the `updateConfig` function.
213
+ *
214
+ * Can be passed as a parameter to:
215
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate gas
216
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the update
217
+ * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): include the update in a call batch
218
+ *
219
+ * @example
220
+ * ```ts
221
+ * import { Actions } from 'viem/tempo'
222
+ *
223
+ * const call = Actions.multisig.updateConfig.call({
224
+ * threshold: 1,
225
+ * owners: [{ owner: '0x...', weight: 1 }],
226
+ * })
227
+ * ```
228
+ *
229
+ * @param args - New multisig configuration.
230
+ * @returns The call.
231
+ */
232
+ function call(args: Args): {
233
+ abi: [{
234
+ readonly name: "updateConfig";
235
+ readonly type: "function";
236
+ readonly stateMutability: "nonpayable";
237
+ readonly inputs: readonly [{
238
+ readonly type: "uint8";
239
+ readonly name: "threshold";
240
+ }, {
241
+ readonly type: "tuple[]";
242
+ readonly name: "owners";
243
+ readonly components: readonly [{
244
+ readonly type: "address";
245
+ readonly name: "owner";
246
+ }, {
247
+ readonly type: "uint8";
248
+ readonly name: "weight";
249
+ }];
250
+ }];
251
+ readonly outputs: readonly [];
252
+ }];
253
+ functionName: "updateConfig";
254
+ } & {
255
+ args: readonly [threshold: number, owners: readonly {
256
+ owner: `0x${string}`;
257
+ weight: number;
258
+ }[]];
259
+ } & {
260
+ address: Address;
261
+ } & {
262
+ data: import("../../index.js").Hex;
263
+ to: Address;
264
+ };
265
+ /**
266
+ * Extracts the `MultisigConfigUpdated` event from logs.
267
+ *
268
+ * @param logs - Transaction logs.
269
+ * @returns The configuration update event.
270
+ */
271
+ function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
272
+ readonly name: "deriveAccount";
273
+ readonly type: "function";
274
+ readonly stateMutability: "pure";
275
+ readonly inputs: readonly [{
276
+ readonly type: "bytes32";
277
+ readonly name: "salt";
278
+ }, {
279
+ readonly type: "uint8";
280
+ readonly name: "threshold";
281
+ }, {
282
+ readonly type: "tuple[]";
283
+ readonly name: "owners";
284
+ readonly components: readonly [{
285
+ readonly type: "address";
286
+ readonly name: "owner";
287
+ }, {
288
+ readonly type: "uint8";
289
+ readonly name: "weight";
290
+ }];
291
+ }];
292
+ readonly outputs: readonly [{
293
+ readonly type: "address";
294
+ readonly name: "account";
295
+ }];
296
+ }, {
297
+ readonly name: "isMultisigAccount";
298
+ readonly type: "function";
299
+ readonly stateMutability: "view";
300
+ readonly inputs: readonly [{
301
+ readonly type: "address";
302
+ readonly name: "account";
303
+ }];
304
+ readonly outputs: readonly [{
305
+ readonly type: "bool";
306
+ }];
307
+ }, {
308
+ readonly name: "getConfig";
309
+ readonly type: "function";
310
+ readonly stateMutability: "view";
311
+ readonly inputs: readonly [{
312
+ readonly type: "address";
313
+ readonly name: "account";
314
+ }];
315
+ readonly outputs: readonly [{
316
+ readonly type: "tuple";
317
+ readonly components: readonly [{
318
+ readonly type: "uint64";
319
+ readonly name: "version";
320
+ }, {
321
+ readonly type: "uint8";
322
+ readonly name: "threshold";
323
+ }, {
324
+ readonly type: "tuple[]";
325
+ readonly name: "owners";
326
+ readonly components: readonly [{
327
+ readonly type: "address";
328
+ readonly name: "owner";
329
+ }, {
330
+ readonly type: "uint8";
331
+ readonly name: "weight";
332
+ }];
333
+ }];
334
+ }];
335
+ }, {
336
+ readonly name: "updateConfig";
337
+ readonly type: "function";
338
+ readonly stateMutability: "nonpayable";
339
+ readonly inputs: readonly [{
340
+ readonly type: "uint8";
341
+ readonly name: "threshold";
342
+ }, {
343
+ readonly type: "tuple[]";
344
+ readonly name: "owners";
345
+ readonly components: readonly [{
346
+ readonly type: "address";
347
+ readonly name: "owner";
348
+ }, {
349
+ readonly type: "uint8";
350
+ readonly name: "weight";
351
+ }];
352
+ }];
353
+ readonly outputs: readonly [];
354
+ }, {
355
+ readonly name: "MultisigInitialized";
356
+ readonly type: "event";
357
+ readonly inputs: readonly [{
358
+ readonly type: "address";
359
+ readonly name: "account";
360
+ readonly indexed: true;
361
+ }];
362
+ }, {
363
+ readonly name: "MultisigConfigUpdated";
364
+ readonly type: "event";
365
+ readonly inputs: readonly [{
366
+ readonly type: "address";
367
+ readonly name: "account";
368
+ readonly indexed: true;
369
+ }, {
370
+ readonly type: "uint8";
371
+ readonly name: "threshold";
372
+ }, {
373
+ readonly type: "tuple[]";
374
+ readonly name: "owners";
375
+ readonly components: readonly [{
376
+ readonly type: "address";
377
+ readonly name: "owner";
378
+ }, {
379
+ readonly type: "uint8";
380
+ readonly name: "weight";
381
+ }];
382
+ }];
383
+ }, {
384
+ readonly name: "NotMultisigAccount";
385
+ readonly type: "error";
386
+ readonly inputs: readonly [];
387
+ }, {
388
+ readonly name: "InvalidAccount";
389
+ readonly type: "error";
390
+ readonly inputs: readonly [];
391
+ }, {
392
+ readonly name: "InvalidConfig";
393
+ readonly type: "error";
394
+ readonly inputs: readonly [];
395
+ }, {
396
+ readonly name: "InvalidThreshold";
397
+ readonly type: "error";
398
+ readonly inputs: readonly [];
399
+ }, {
400
+ readonly name: "InvalidOwner";
401
+ readonly type: "error";
402
+ readonly inputs: readonly [];
403
+ }, {
404
+ readonly name: "InvalidWeight";
405
+ readonly type: "error";
406
+ readonly inputs: readonly [];
407
+ }, {
408
+ readonly name: "TooManyOwners";
409
+ readonly type: "error";
410
+ readonly inputs: readonly [];
411
+ }, {
412
+ readonly name: "DuplicateOwner";
413
+ readonly type: "error";
414
+ readonly inputs: readonly [];
415
+ }, {
416
+ readonly name: "InvalidOwnerOrder";
417
+ readonly type: "error";
418
+ readonly inputs: readonly [];
419
+ }, {
420
+ readonly name: "AccountAlreadyInitialized";
421
+ readonly type: "error";
422
+ readonly inputs: readonly [];
423
+ }, {
424
+ readonly name: "UnauthorizedCaller";
425
+ readonly type: "error";
426
+ readonly inputs: readonly [];
427
+ }, {
428
+ readonly name: "SameTransactionUpdateNotAllowed";
429
+ readonly type: "error";
430
+ readonly inputs: readonly [];
431
+ }], "MultisigConfigUpdated">;
432
+ }
433
+ /**
434
+ * Replaces a native multisig configuration and waits for confirmation.
435
+ *
436
+ * @example
437
+ * ```ts
438
+ * import { createWalletClient, custom, type EIP1193Provider } from 'viem'
439
+ * import { tempo } from 'viem/chains'
440
+ * import { Actions } from 'viem/tempo'
441
+ *
442
+ * declare const provider: EIP1193Provider
443
+ *
444
+ * const client = createWalletClient({
445
+ * account: '0x...',
446
+ * chain: tempo,
447
+ * transport: custom(provider),
448
+ * })
449
+ *
450
+ * const { receipt } = await Actions.multisig.updateConfigSync(client, {
451
+ * threshold: 1,
452
+ * owners: [{ owner: '0x...', weight: 1 }],
453
+ * })
454
+ * ```
455
+ *
456
+ * @param client - Client.
457
+ * @param parameters - Parameters.
458
+ * @returns The updated configuration event and transaction receipt.
459
+ */
460
+ export declare function updateConfigSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: updateConfigSync.Parameters<chain, account>): Promise<updateConfigSync.ReturnValue>;
461
+ export declare namespace updateConfigSync {
462
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = updateConfig.Parameters<chain, account>;
463
+ type Args = updateConfig.Args;
464
+ type ReturnValue = Compute<GetEventArgs<typeof Abis.nativeMultisig, 'MultisigConfigUpdated', {
465
+ IndexedOnly: false;
466
+ Required: true;
467
+ }> & {
468
+ receipt: TransactionReceipt;
469
+ }>;
470
+ type ErrorType = updateConfig.ErrorType;
471
+ }
472
+ //# sourceMappingURL=multisig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multisig.d.ts","sourceRoot":"","sources":["../../../tempo/actions/multisig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAElF,OAAO,KAAK,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,SAAS,OAAO,GAAG,SAAS,EAEnC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,GACtD,OAAO,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAQvC;AAED,yBAAiB,gBAAgB,CAAC;IAChC,KAAY,UAAU,CACpB,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACvD,YAAY,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAE3C,KAAY,IAAI,GAAG,YAAY,CAAC,IAAI,CAAA;IAEpC,KAAY,WAAW,GAAG,OAAO,CAC/B,YAAY,CACV,OAAO,IAAI,CAAC,cAAc,EAC1B,uBAAuB,EACvB;QAAE,WAAW,EAAE,KAAK,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE,CACvC,GAAG;QACF,OAAO,EAAE,kBAAkB,CAAA;KAC5B,CACF,CAAA;IAED,KAAY,SAAS,GAAG,YAAY,CAAC,SAAS,CAAA;CAC/C"}
@@ -282,7 +282,9 @@ export declare const chainConfig: {
282
282
  validBefore?: undefined;
283
283
  multisig?: undefined;
284
284
  multisigInit?: undefined;
285
+ multisigOwnerStates?: undefined;
285
286
  multisigSignatureCount?: undefined;
287
+ multisigVersion?: undefined;
286
288
  } | {
287
289
  data?: `0x${string}` | undefined;
288
290
  from?: `0x${string}` | undefined;
@@ -312,7 +314,9 @@ export declare const chainConfig: {
312
314
  validBefore?: undefined;
313
315
  multisig?: undefined;
314
316
  multisigInit?: undefined;
317
+ multisigOwnerStates?: undefined;
315
318
  multisigSignatureCount?: undefined;
319
+ multisigVersion?: undefined;
316
320
  } | {
317
321
  data?: `0x${string}` | undefined;
318
322
  from?: `0x${string}` | undefined;
@@ -342,7 +346,9 @@ export declare const chainConfig: {
342
346
  validBefore?: undefined;
343
347
  multisig?: undefined;
344
348
  multisigInit?: undefined;
349
+ multisigOwnerStates?: undefined;
345
350
  multisigSignatureCount?: undefined;
351
+ multisigVersion?: undefined;
346
352
  } | {
347
353
  type?: "0x3" | undefined;
348
354
  data?: `0x${string}` | undefined;
@@ -372,7 +378,9 @@ export declare const chainConfig: {
372
378
  validBefore?: undefined;
373
379
  multisig?: undefined;
374
380
  multisigInit?: undefined;
381
+ multisigOwnerStates?: undefined;
375
382
  multisigSignatureCount?: undefined;
383
+ multisigVersion?: undefined;
376
384
  } | {
377
385
  type?: "0x3" | undefined;
378
386
  data?: `0x${string}` | undefined;
@@ -402,7 +410,9 @@ export declare const chainConfig: {
402
410
  validBefore?: undefined;
403
411
  multisig?: undefined;
404
412
  multisigInit?: undefined;
413
+ multisigOwnerStates?: undefined;
405
414
  multisigSignatureCount?: undefined;
415
+ multisigVersion?: undefined;
406
416
  } | {
407
417
  type?: "0x4" | undefined;
408
418
  gasPrice?: undefined | undefined;
@@ -432,7 +442,9 @@ export declare const chainConfig: {
432
442
  validBefore?: undefined;
433
443
  multisig?: undefined;
434
444
  multisigInit?: undefined;
445
+ multisigOwnerStates?: undefined;
435
446
  multisigSignatureCount?: undefined;
447
+ multisigVersion?: undefined;
436
448
  } | {
437
449
  data?: `0x${string}` | undefined;
438
450
  from?: `0x${string}` | undefined;
@@ -453,7 +465,7 @@ export declare const chainConfig: {
453
465
  feePayer?: true | import("../index.js").Account | undefined;
454
466
  feeToken?: bigint | import("ox/tempo/TempoAddress").Address | undefined;
455
467
  keyAuthorization?: Transaction.z_KeyAuthorization.Signed<`0x${string}`, `0x${string}`, `0x${string}`> | undefined;
456
- multisig?: {
468
+ multisig?: `0x${string}` | {
457
469
  salt?: `0x${string}` | undefined;
458
470
  threshold: `0x${string}`;
459
471
  owners: readonly MultisigConfig.Owner<`0x${string}`>[];
@@ -466,7 +478,9 @@ export declare const chainConfig: {
466
478
  weight: number;
467
479
  }[];
468
480
  } | undefined | undefined;
481
+ multisigOwnerStates?: readonly Transaction.MultisigOwnerState[] | undefined;
469
482
  multisigSignatureCount?: number | undefined | undefined;
483
+ multisigVersion?: bigint | undefined | undefined;
470
484
  nonceKey?: `0x${string}` | "expiring" | undefined;
471
485
  signatures?: readonly `0x${string}`[] | undefined;
472
486
  validBefore?: `0x${string}` | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"chainConfig.d.ts","sourceRoot":"","sources":["../../tempo/chainConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAA;AAY1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAA;AAI1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAY/C,eAAO,MAAM,WAAW;;;mBAGT,OAAO,CAAC,gBAAgB,GAAG,SAAS;mBACpC,QAAQ,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAyNqB,sBAAsB;;;CAuFjB,CAAA;AAE7D,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA"}
@@ -0,0 +1,13 @@
1
+ import type { Address } from 'abitype';
2
+ import type { MultisigConfig } from 'ox/tempo';
3
+ import type { MultisigAccount } from '../Account.js';
4
+ import type { MultisigOwnerState } from '../Transaction.js';
5
+ /** @internal */
6
+ export declare function createMultisigStateResolver(getConfig: (account: Address) => Promise<{
7
+ owners: MultisigConfig.Config['owners'];
8
+ threshold: MultisigConfig.Config['threshold'];
9
+ version: bigint;
10
+ }>): (account: Address) => Promise<MultisigOwnerState>;
11
+ /** @internal */
12
+ export declare function getMultisigOwnerStates(account: MultisigAccount, getState: (account: Address) => Promise<MultisigOwnerState>): Promise<readonly MultisigOwnerState[]>;
13
+ //# sourceMappingURL=multisig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multisig.d.ts","sourceRoot":"","sources":["../../../tempo/internal/multisig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,gBAAgB;AAChB,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IACvC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACvC,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;IAC7C,OAAO,EAAE,MAAM,CAAA;CAChB,CAAC,IAIM,SAAS,OAAO,KAAG,OAAO,CAAC,kBAAkB,CAAC,CAgCvD;AAED,gBAAgB;AAChB,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,kBAAkB,CAAC,GAC1D,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAgBxC"}