viem 2.44.1 → 2.44.4

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 (150) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/_cjs/actions/wallet/sendTransaction.js +6 -5
  3. package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
  4. package/_cjs/actions/wallet/sendTransactionSync.js +6 -5
  5. package/_cjs/actions/wallet/sendTransactionSync.js.map +1 -1
  6. package/_cjs/chains/definitions/adi.js +26 -0
  7. package/_cjs/chains/definitions/adi.js.map +1 -0
  8. package/_cjs/chains/definitions/tempo.js +28 -0
  9. package/_cjs/chains/definitions/tempo.js.map +1 -0
  10. package/_cjs/chains/definitions/zkXPLA.js +28 -0
  11. package/_cjs/chains/definitions/zkXPLA.js.map +1 -0
  12. package/_cjs/chains/definitions/zkXPLATestnet.js +28 -0
  13. package/_cjs/chains/definitions/zkXPLATestnet.js.map +1 -0
  14. package/_cjs/chains/index.js +22 -14
  15. package/_cjs/chains/index.js.map +1 -1
  16. package/_cjs/errors/version.js +1 -1
  17. package/_cjs/tempo/Abis.js +2 -2
  18. package/_cjs/tempo/Abis.js.map +1 -1
  19. package/_cjs/tempo/Addresses.js +2 -1
  20. package/_cjs/tempo/Addresses.js.map +1 -1
  21. package/_cjs/tempo/Decorator.js +19 -0
  22. package/_cjs/tempo/Decorator.js.map +1 -1
  23. package/_cjs/tempo/Transport.js +1 -1
  24. package/_cjs/tempo/Transport.js.map +1 -1
  25. package/_cjs/tempo/actions/fee.js +91 -0
  26. package/_cjs/tempo/actions/fee.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/validator.js +308 -0
  30. package/_cjs/tempo/actions/validator.js.map +1 -0
  31. package/_cjs/utils/abi/decodeEventLog.js +29 -12
  32. package/_cjs/utils/abi/decodeEventLog.js.map +1 -1
  33. package/_cjs/utils/encoding/fromHex.js +11 -1
  34. package/_cjs/utils/encoding/fromHex.js.map +1 -1
  35. package/_cjs/utils/rpc/http.js +25 -1
  36. package/_cjs/utils/rpc/http.js.map +1 -1
  37. package/_esm/actions/wallet/sendTransaction.js +6 -5
  38. package/_esm/actions/wallet/sendTransaction.js.map +1 -1
  39. package/_esm/actions/wallet/sendTransactionSync.js +6 -5
  40. package/_esm/actions/wallet/sendTransactionSync.js.map +1 -1
  41. package/_esm/chains/definitions/adi.js +23 -0
  42. package/_esm/chains/definitions/adi.js.map +1 -0
  43. package/_esm/chains/definitions/tempo.js +25 -0
  44. package/_esm/chains/definitions/tempo.js.map +1 -0
  45. package/_esm/chains/definitions/zkXPLA.js +25 -0
  46. package/_esm/chains/definitions/zkXPLA.js.map +1 -0
  47. package/_esm/chains/definitions/zkXPLATestnet.js +25 -0
  48. package/_esm/chains/definitions/zkXPLATestnet.js.map +1 -0
  49. package/_esm/chains/index.js +4 -0
  50. package/_esm/chains/index.js.map +1 -1
  51. package/_esm/errors/version.js +1 -1
  52. package/_esm/tempo/Abis.js +1 -1
  53. package/_esm/tempo/Abis.js.map +1 -1
  54. package/_esm/tempo/Account.js +6 -6
  55. package/_esm/tempo/Addresses.js +1 -0
  56. package/_esm/tempo/Addresses.js.map +1 -1
  57. package/_esm/tempo/Decorator.js +19 -0
  58. package/_esm/tempo/Decorator.js.map +1 -1
  59. package/_esm/tempo/Transport.js +1 -1
  60. package/_esm/tempo/Transport.js.map +1 -1
  61. package/_esm/tempo/WebAuthnP256.js +2 -2
  62. package/_esm/tempo/actions/amm.js +28 -28
  63. package/_esm/tempo/actions/dex.js +68 -68
  64. package/_esm/tempo/actions/faucet.js +4 -4
  65. package/_esm/tempo/actions/fee.js +236 -10
  66. package/_esm/tempo/actions/fee.js.map +1 -1
  67. package/_esm/tempo/actions/index.js +1 -0
  68. package/_esm/tempo/actions/index.js.map +1 -1
  69. package/_esm/tempo/actions/nonce.js +4 -4
  70. package/_esm/tempo/actions/policy.js +36 -36
  71. package/_esm/tempo/actions/reward.js +28 -28
  72. package/_esm/tempo/actions/token.js +122 -122
  73. package/_esm/tempo/actions/validator.js +1017 -0
  74. package/_esm/tempo/actions/validator.js.map +1 -0
  75. package/_esm/utils/abi/decodeEventLog.js +34 -13
  76. package/_esm/utils/abi/decodeEventLog.js.map +1 -1
  77. package/_esm/utils/encoding/fromHex.js +12 -2
  78. package/_esm/utils/encoding/fromHex.js.map +1 -1
  79. package/_esm/utils/rpc/http.js +26 -1
  80. package/_esm/utils/rpc/http.js.map +1 -1
  81. package/_types/actions/wallet/sendTransaction.d.ts +4 -1
  82. package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
  83. package/_types/actions/wallet/sendTransactionSync.d.ts +2 -0
  84. package/_types/actions/wallet/sendTransactionSync.d.ts.map +1 -1
  85. package/_types/chains/definitions/adi.d.ts +48 -0
  86. package/_types/chains/definitions/adi.d.ts.map +1 -0
  87. package/_types/chains/definitions/tempo.d.ts +916 -0
  88. package/_types/chains/definitions/tempo.d.ts.map +1 -0
  89. package/_types/chains/definitions/zkXPLA.d.ts +50 -0
  90. package/_types/chains/definitions/zkXPLA.d.ts.map +1 -0
  91. package/_types/chains/definitions/zkXPLATestnet.d.ts +50 -0
  92. package/_types/chains/definitions/zkXPLATestnet.d.ts.map +1 -0
  93. package/_types/chains/index.d.ts +4 -0
  94. package/_types/chains/index.d.ts.map +1 -1
  95. package/_types/errors/version.d.ts +1 -1
  96. package/_types/tempo/Abis.d.ts +1 -1
  97. package/_types/tempo/Abis.d.ts.map +1 -1
  98. package/_types/tempo/Account.d.ts +6 -6
  99. package/_types/tempo/Addresses.d.ts +1 -0
  100. package/_types/tempo/Addresses.d.ts.map +1 -1
  101. package/_types/tempo/Decorator.d.ts +607 -208
  102. package/_types/tempo/Decorator.d.ts.map +1 -1
  103. package/_types/tempo/Transport.d.ts.map +1 -1
  104. package/_types/tempo/WebAuthnP256.d.ts +2 -2
  105. package/_types/tempo/actions/amm.d.ts +28 -28
  106. package/_types/tempo/actions/dex.d.ts +68 -68
  107. package/_types/tempo/actions/faucet.d.ts +4 -4
  108. package/_types/tempo/actions/fee.d.ts +380 -10
  109. package/_types/tempo/actions/fee.d.ts.map +1 -1
  110. package/_types/tempo/actions/index.d.ts +1 -0
  111. package/_types/tempo/actions/index.d.ts.map +1 -1
  112. package/_types/tempo/actions/nonce.d.ts +4 -4
  113. package/_types/tempo/actions/policy.d.ts +36 -36
  114. package/_types/tempo/actions/reward.d.ts +28 -28
  115. package/_types/tempo/actions/token.d.ts +122 -122
  116. package/_types/tempo/actions/validator.d.ts +1174 -0
  117. package/_types/tempo/actions/validator.d.ts.map +1 -0
  118. package/_types/utils/abi/decodeEventLog.d.ts.map +1 -1
  119. package/_types/utils/encoding/fromHex.d.ts +2 -2
  120. package/_types/utils/encoding/fromHex.d.ts.map +1 -1
  121. package/_types/utils/rpc/http.d.ts +8 -1
  122. package/_types/utils/rpc/http.d.ts.map +1 -1
  123. package/actions/wallet/sendTransaction.ts +10 -5
  124. package/actions/wallet/sendTransactionSync.ts +8 -4
  125. package/chains/definitions/adi.ts +23 -0
  126. package/chains/definitions/tempo.ts +25 -0
  127. package/chains/definitions/zkXPLA.ts +25 -0
  128. package/chains/definitions/zkXPLATestnet.ts +25 -0
  129. package/chains/index.ts +4 -0
  130. package/errors/version.ts +1 -1
  131. package/package.json +1 -1
  132. package/tempo/Abis.ts +1 -1
  133. package/tempo/Account.ts +6 -6
  134. package/tempo/Addresses.ts +1 -0
  135. package/tempo/Decorator.ts +672 -208
  136. package/tempo/Transport.ts +4 -1
  137. package/tempo/WebAuthnP256.ts +2 -2
  138. package/tempo/actions/amm.ts +28 -28
  139. package/tempo/actions/dex.ts +68 -68
  140. package/tempo/actions/faucet.ts +4 -4
  141. package/tempo/actions/fee.ts +346 -10
  142. package/tempo/actions/index.ts +1 -0
  143. package/tempo/actions/nonce.ts +4 -4
  144. package/tempo/actions/policy.ts +36 -36
  145. package/tempo/actions/reward.ts +28 -28
  146. package/tempo/actions/token.ts +122 -122
  147. package/tempo/actions/validator.ts +1417 -0
  148. package/utils/abi/decodeEventLog.ts +38 -14
  149. package/utils/encoding/fromHex.ts +17 -2
  150. package/utils/rpc/http.ts +31 -1
@@ -0,0 +1,1174 @@
1
+ import type { Address } from 'abitype';
2
+ import type { Hex } from 'ox/Hex';
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 { TransactionReceipt } from '../../types/transaction.js';
13
+ import * as Abis from '../Abis.js';
14
+ import type { ReadParameters, WriteParameters } from '../internal/types.js';
15
+ /**
16
+ * Adds a new validator (owner only).
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import { createClient, http } from 'viem'
21
+ * import { tempo } from 'viem/chains'
22
+ * import { Actions } from 'viem/tempo'
23
+ * import { privateKeyToAccount } from 'viem/accounts'
24
+ *
25
+ * const client = createClient({
26
+ * account: privateKeyToAccount('0x...'),
27
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
28
+ * transport: http(),
29
+ * })
30
+ *
31
+ * const hash = await Actions.validator.add(client, {
32
+ * newValidatorAddress: '0x...',
33
+ * publicKey: '0x...',
34
+ * active: true,
35
+ * inboundAddress: '192.168.1.1:8080',
36
+ * outboundAddress: '192.168.1.1:8080',
37
+ * })
38
+ * ```
39
+ *
40
+ * @param client - Client.
41
+ * @param parameters - Parameters.
42
+ * @returns The transaction hash.
43
+ */
44
+ export declare function add<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: add.Parameters<chain, account>): Promise<add.ReturnValue>;
45
+ export declare namespace add {
46
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
47
+ type Args = {
48
+ /** The address of the new validator. */
49
+ newValidatorAddress: Address;
50
+ /** The validator's communication public key. */
51
+ publicKey: Hex;
52
+ /** Whether the validator should be active. */
53
+ active: boolean;
54
+ /** The validator's inbound address `<hostname|ip>:<port>` for incoming connections. */
55
+ inboundAddress: string;
56
+ /** The validator's outbound IP address `<ip>:<port>` for firewall whitelisting (IP only, no hostnames). */
57
+ outboundAddress: string;
58
+ };
59
+ type ReturnValue = WriteContractReturnType;
60
+ type ErrorType = BaseErrorType;
61
+ /** @internal */
62
+ 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>>;
63
+ /**
64
+ * Defines a call to the `addValidator` function.
65
+ *
66
+ * Can be passed as a parameter to:
67
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
68
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
69
+ * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * import { createClient, http, walletActions } from 'viem'
74
+ * import { tempo } from 'viem/chains'
75
+ * import { Actions } from 'viem/tempo'
76
+ *
77
+ * const client = createClient({
78
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
79
+ * transport: http(),
80
+ * }).extend(walletActions)
81
+ *
82
+ * const { result } = await client.sendCalls({
83
+ * calls: [
84
+ * Actions.validator.add.call({
85
+ * newValidatorAddress: '0x...',
86
+ * publicKey: '0x...',
87
+ * active: true,
88
+ * inboundAddress: '192.168.1.1:8080',
89
+ * outboundAddress: '192.168.1.1:8080',
90
+ * }),
91
+ * ],
92
+ * })
93
+ * ```
94
+ *
95
+ * @param args - Arguments.
96
+ * @returns The call.
97
+ */
98
+ function call(args: Args): {
99
+ abi: [{
100
+ readonly name: "addValidator";
101
+ readonly type: "function";
102
+ readonly stateMutability: "nonpayable";
103
+ readonly inputs: readonly [{
104
+ readonly type: "address";
105
+ readonly name: "newValidatorAddress";
106
+ }, {
107
+ readonly type: "bytes32";
108
+ readonly name: "publicKey";
109
+ }, {
110
+ readonly type: "bool";
111
+ readonly name: "active";
112
+ }, {
113
+ readonly type: "string";
114
+ readonly name: "inboundAddress";
115
+ }, {
116
+ readonly type: "string";
117
+ readonly name: "outboundAddress";
118
+ }];
119
+ readonly outputs: readonly [];
120
+ }];
121
+ functionName: "addValidator";
122
+ } & {
123
+ args: readonly [`0x${string}`, publicKey: `0x${string}`, active: boolean, string, string];
124
+ } & {
125
+ address: Address;
126
+ } & {
127
+ data: import("../../index.js").Hex;
128
+ to: Address;
129
+ };
130
+ }
131
+ /**
132
+ * Adds a new validator (owner only) and waits for the transaction receipt.
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * import { createClient, http } from 'viem'
137
+ * import { tempo } from 'viem/chains'
138
+ * import { Actions } from 'viem/tempo'
139
+ * import { privateKeyToAccount } from 'viem/accounts'
140
+ *
141
+ * const client = createClient({
142
+ * account: privateKeyToAccount('0x...'),
143
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
144
+ * transport: http(),
145
+ * })
146
+ *
147
+ * const { receipt } = await Actions.validator.addSync(client, {
148
+ * newValidatorAddress: '0x...',
149
+ * publicKey: '0x...',
150
+ * active: true,
151
+ * inboundAddress: '192.168.1.1:8080',
152
+ * outboundAddress: '192.168.1.1:8080',
153
+ * })
154
+ * ```
155
+ *
156
+ * @param client - Client.
157
+ * @param parameters - Parameters.
158
+ * @returns The transaction receipt.
159
+ */
160
+ export declare function addSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: addSync.Parameters<chain, account>): Promise<addSync.ReturnValue>;
161
+ export declare namespace addSync {
162
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = add.Parameters<chain, account>;
163
+ type Args = add.Args;
164
+ type ReturnValue = {
165
+ receipt: TransactionReceipt;
166
+ };
167
+ }
168
+ /**
169
+ * Changes the owner of the validator config precompile.
170
+ *
171
+ * @example
172
+ * ```ts
173
+ * import { createClient, http } from 'viem'
174
+ * import { tempo } from 'viem/chains'
175
+ * import { Actions } from 'viem/tempo'
176
+ * import { privateKeyToAccount } from 'viem/accounts'
177
+ *
178
+ * const client = createClient({
179
+ * account: privateKeyToAccount('0x...'),
180
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
181
+ * transport: http(),
182
+ * })
183
+ *
184
+ * const hash = await Actions.validator.changeOwner(client, {
185
+ * newOwner: '0x...',
186
+ * })
187
+ * ```
188
+ *
189
+ * @param client - Client.
190
+ * @param parameters - Parameters.
191
+ * @returns The transaction hash.
192
+ */
193
+ export declare function changeOwner<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: changeOwner.Parameters<chain, account>): Promise<changeOwner.ReturnValue>;
194
+ export declare namespace changeOwner {
195
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
196
+ type Args = {
197
+ /** The new owner address. */
198
+ newOwner: Address;
199
+ };
200
+ type ReturnValue = WriteContractReturnType;
201
+ type ErrorType = BaseErrorType;
202
+ /** @internal */
203
+ 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>>;
204
+ /**
205
+ * Defines a call to the `changeOwner` function.
206
+ *
207
+ * Can be passed as a parameter to:
208
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
209
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
210
+ * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
211
+ *
212
+ * @example
213
+ * ```ts
214
+ * import { createClient, http, walletActions } from 'viem'
215
+ * import { tempo } from 'viem/chains'
216
+ * import { Actions } from 'viem/tempo'
217
+ *
218
+ * const client = createClient({
219
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
220
+ * transport: http(),
221
+ * }).extend(walletActions)
222
+ *
223
+ * const { result } = await client.sendCalls({
224
+ * calls: [
225
+ * Actions.validator.changeOwner.call({
226
+ * newOwner: '0x...',
227
+ * }),
228
+ * ],
229
+ * })
230
+ * ```
231
+ *
232
+ * @param args - Arguments.
233
+ * @returns The call.
234
+ */
235
+ function call(args: Args): {
236
+ abi: [{
237
+ readonly name: "changeOwner";
238
+ readonly type: "function";
239
+ readonly stateMutability: "nonpayable";
240
+ readonly inputs: readonly [{
241
+ readonly type: "address";
242
+ readonly name: "newOwner";
243
+ }];
244
+ readonly outputs: readonly [];
245
+ }];
246
+ functionName: "changeOwner";
247
+ } & {
248
+ args: readonly [newOwner: `0x${string}`];
249
+ } & {
250
+ address: Address;
251
+ } & {
252
+ data: import("../../index.js").Hex;
253
+ to: Address;
254
+ };
255
+ }
256
+ /**
257
+ * Changes the owner and waits for the transaction receipt.
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * import { createClient, http } from 'viem'
262
+ * import { tempo } from 'viem/chains'
263
+ * import { Actions } from 'viem/tempo'
264
+ * import { privateKeyToAccount } from 'viem/accounts'
265
+ *
266
+ * const client = createClient({
267
+ * account: privateKeyToAccount('0x...'),
268
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
269
+ * transport: http(),
270
+ * })
271
+ *
272
+ * const { receipt } = await Actions.validator.changeOwnerSync(client, {
273
+ * newOwner: '0x...',
274
+ * })
275
+ * ```
276
+ *
277
+ * @param client - Client.
278
+ * @param parameters - Parameters.
279
+ * @returns The transaction receipt.
280
+ */
281
+ export declare function changeOwnerSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: changeOwnerSync.Parameters<chain, account>): Promise<changeOwnerSync.ReturnValue>;
282
+ export declare namespace changeOwnerSync {
283
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = changeOwner.Parameters<chain, account>;
284
+ type Args = changeOwner.Args;
285
+ type ReturnValue = {
286
+ receipt: TransactionReceipt;
287
+ };
288
+ }
289
+ /**
290
+ * Changes validator active status (owner only).
291
+ *
292
+ * @example
293
+ * ```ts
294
+ * import { createClient, http } from 'viem'
295
+ * import { tempo } from 'viem/chains'
296
+ * import { Actions } from 'viem/tempo'
297
+ * import { privateKeyToAccount } from 'viem/accounts'
298
+ *
299
+ * const client = createClient({
300
+ * account: privateKeyToAccount('0x...'),
301
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
302
+ * transport: http(),
303
+ * })
304
+ *
305
+ * const hash = await Actions.validator.changeStatus(client, {
306
+ * validator: '0x...',
307
+ * active: false,
308
+ * })
309
+ * ```
310
+ *
311
+ * @param client - Client.
312
+ * @param parameters - Parameters.
313
+ * @returns The transaction hash.
314
+ */
315
+ export declare function changeStatus<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: changeStatus.Parameters<chain, account>): Promise<changeStatus.ReturnValue>;
316
+ export declare namespace changeStatus {
317
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
318
+ type Args = {
319
+ /** The validator address. */
320
+ validator: Address;
321
+ /** Whether the validator should be active. */
322
+ active: boolean;
323
+ };
324
+ type ReturnValue = WriteContractReturnType;
325
+ type ErrorType = BaseErrorType;
326
+ /** @internal */
327
+ 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>>;
328
+ /**
329
+ * Defines a call to the `changeValidatorStatus` function.
330
+ *
331
+ * Can be passed as a parameter to:
332
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
333
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
334
+ * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
335
+ *
336
+ * @example
337
+ * ```ts
338
+ * import { createClient, http, walletActions } from 'viem'
339
+ * import { tempo } from 'viem/chains'
340
+ * import { Actions } from 'viem/tempo'
341
+ *
342
+ * const client = createClient({
343
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
344
+ * transport: http(),
345
+ * }).extend(walletActions)
346
+ *
347
+ * const { result } = await client.sendCalls({
348
+ * calls: [
349
+ * Actions.validator.changeStatus.call({
350
+ * validator: '0x...',
351
+ * active: false,
352
+ * }),
353
+ * ],
354
+ * })
355
+ * ```
356
+ *
357
+ * @param args - Arguments.
358
+ * @returns The call.
359
+ */
360
+ function call(args: Args): {
361
+ abi: [{
362
+ readonly name: "changeValidatorStatus";
363
+ readonly type: "function";
364
+ readonly stateMutability: "nonpayable";
365
+ readonly inputs: readonly [{
366
+ readonly type: "address";
367
+ readonly name: "validator";
368
+ }, {
369
+ readonly type: "bool";
370
+ readonly name: "active";
371
+ }];
372
+ readonly outputs: readonly [];
373
+ }];
374
+ functionName: "changeValidatorStatus";
375
+ } & {
376
+ args: readonly [validator: `0x${string}`, active: boolean];
377
+ } & {
378
+ address: Address;
379
+ } & {
380
+ data: import("../../index.js").Hex;
381
+ to: Address;
382
+ };
383
+ }
384
+ /**
385
+ * Changes validator active status and waits for the transaction receipt.
386
+ *
387
+ * @example
388
+ * ```ts
389
+ * import { createClient, http } from 'viem'
390
+ * import { tempo } from 'viem/chains'
391
+ * import { Actions } from 'viem/tempo'
392
+ * import { privateKeyToAccount } from 'viem/accounts'
393
+ *
394
+ * const client = createClient({
395
+ * account: privateKeyToAccount('0x...'),
396
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
397
+ * transport: http(),
398
+ * })
399
+ *
400
+ * const { receipt } = await Actions.validator.changeStatusSync(client, {
401
+ * validator: '0x...',
402
+ * active: false,
403
+ * })
404
+ * ```
405
+ *
406
+ * @param client - Client.
407
+ * @param parameters - Parameters.
408
+ * @returns The transaction receipt.
409
+ */
410
+ export declare function changeStatusSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: changeStatusSync.Parameters<chain, account>): Promise<changeStatusSync.ReturnValue>;
411
+ export declare namespace changeStatusSync {
412
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = changeStatus.Parameters<chain, account>;
413
+ type Args = changeStatus.Args;
414
+ type ReturnValue = {
415
+ receipt: TransactionReceipt;
416
+ };
417
+ }
418
+ /**
419
+ * Gets the next epoch for a full DKG ceremony.
420
+ *
421
+ * @example
422
+ * ```ts
423
+ * import { createClient, http } from 'viem'
424
+ * import { tempo } from 'viem/chains'
425
+ * import { Actions } from 'viem/tempo'
426
+ *
427
+ * const client = createClient({
428
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
429
+ * transport: http(),
430
+ * })
431
+ *
432
+ * const epoch = await Actions.validator.getNextFullDkgCeremony(client)
433
+ * ```
434
+ *
435
+ * @param client - Client.
436
+ * @param parameters - Parameters.
437
+ * @returns The epoch number for the next full DKG ceremony.
438
+ */
439
+ export declare function getNextFullDkgCeremony<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters?: getNextFullDkgCeremony.Parameters): Promise<getNextFullDkgCeremony.ReturnValue>;
440
+ export declare namespace getNextFullDkgCeremony {
441
+ type Parameters = ReadParameters;
442
+ type ReturnValue = ReadContractReturnType<typeof Abis.validator, 'getNextFullDkgCeremony', never>;
443
+ /**
444
+ * Defines a call to the `getNextFullDkgCeremony` function.
445
+ *
446
+ * Can be passed as a parameter to:
447
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
448
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
449
+ * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
450
+ *
451
+ * @example
452
+ * ```ts
453
+ * import { createClient, http } from 'viem'
454
+ * import { tempo } from 'viem/chains'
455
+ * import { Actions } from 'viem/tempo'
456
+ *
457
+ * const client = createClient({
458
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
459
+ * transport: http(),
460
+ * })
461
+ *
462
+ * const result = await client.multicall({
463
+ * contracts: [Actions.validator.getNextFullDkgCeremony.call()],
464
+ * })
465
+ * ```
466
+ *
467
+ * @returns The call.
468
+ */
469
+ function call(): {
470
+ abi: [{
471
+ readonly name: "getNextFullDkgCeremony";
472
+ readonly type: "function";
473
+ readonly stateMutability: "view";
474
+ readonly inputs: readonly [];
475
+ readonly outputs: readonly [{
476
+ readonly type: "uint64";
477
+ }];
478
+ }];
479
+ functionName: "getNextFullDkgCeremony";
480
+ } & {
481
+ args?: readonly [] | undefined;
482
+ } & {
483
+ address: Address;
484
+ } & {
485
+ data: import("../../index.js").Hex;
486
+ to: Address;
487
+ };
488
+ }
489
+ /**
490
+ * Gets the contract owner.
491
+ *
492
+ * @example
493
+ * ```ts
494
+ * import { createClient, http } from 'viem'
495
+ * import { tempo } from 'viem/chains'
496
+ * import { Actions } from 'viem/tempo'
497
+ *
498
+ * const client = createClient({
499
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
500
+ * transport: http(),
501
+ * })
502
+ *
503
+ * const owner = await Actions.validator.getOwner(client)
504
+ * ```
505
+ *
506
+ * @param client - Client.
507
+ * @param parameters - Parameters.
508
+ * @returns The owner address.
509
+ */
510
+ export declare function getOwner<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters?: getOwner.Parameters): Promise<getOwner.ReturnValue>;
511
+ export declare namespace getOwner {
512
+ type Parameters = ReadParameters;
513
+ type ReturnValue = ReadContractReturnType<typeof Abis.validator, 'owner', never>;
514
+ /**
515
+ * Defines a call to the `owner` function.
516
+ *
517
+ * Can be passed as a parameter to:
518
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
519
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
520
+ * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
521
+ *
522
+ * @example
523
+ * ```ts
524
+ * import { createClient, http } from 'viem'
525
+ * import { tempo } from 'viem/chains'
526
+ * import { Actions } from 'viem/tempo'
527
+ *
528
+ * const client = createClient({
529
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
530
+ * transport: http(),
531
+ * })
532
+ *
533
+ * const result = await client.multicall({
534
+ * contracts: [Actions.validator.getOwner.call()],
535
+ * })
536
+ * ```
537
+ *
538
+ * @returns The call.
539
+ */
540
+ function call(): {
541
+ abi: [{
542
+ readonly name: "owner";
543
+ readonly type: "function";
544
+ readonly stateMutability: "view";
545
+ readonly inputs: readonly [];
546
+ readonly outputs: readonly [{
547
+ readonly type: "address";
548
+ }];
549
+ }];
550
+ functionName: "owner";
551
+ } & {
552
+ args?: readonly [] | undefined;
553
+ } & {
554
+ address: Address;
555
+ } & {
556
+ data: import("../../index.js").Hex;
557
+ to: Address;
558
+ };
559
+ }
560
+ /**
561
+ * Gets validator information by address.
562
+ *
563
+ * @example
564
+ * ```ts
565
+ * import { createClient, http } from 'viem'
566
+ * import { tempo } from 'viem/chains'
567
+ * import { Actions } from 'viem/tempo'
568
+ *
569
+ * const client = createClient({
570
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
571
+ * transport: http(),
572
+ * })
573
+ *
574
+ * const validator = await Actions.validator.get(client, {
575
+ * validator: '0x...',
576
+ * })
577
+ * ```
578
+ *
579
+ * @param client - Client.
580
+ * @param parameters - Parameters.
581
+ * @returns The validator information.
582
+ */
583
+ export declare function get<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: get.Parameters): Promise<get.ReturnValue>;
584
+ export declare namespace get {
585
+ type Parameters = ReadParameters & Args;
586
+ type Args = {
587
+ /** Validator address. */
588
+ validator: Address;
589
+ };
590
+ type ReturnValue = ReadContractReturnType<typeof Abis.validator, 'validators', never>;
591
+ /**
592
+ * Defines a call to the `validators` function.
593
+ *
594
+ * Can be passed as a parameter to:
595
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
596
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
597
+ * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
598
+ *
599
+ * @example
600
+ * ```ts
601
+ * import { createClient, http } from 'viem'
602
+ * import { tempo } from 'viem/chains'
603
+ * import { Actions } from 'viem/tempo'
604
+ *
605
+ * const client = createClient({
606
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
607
+ * transport: http(),
608
+ * })
609
+ *
610
+ * const result = await client.multicall({
611
+ * contracts: [
612
+ * Actions.validator.get.call({ validator: '0x...' }),
613
+ * ],
614
+ * })
615
+ * ```
616
+ *
617
+ * @param args - Arguments.
618
+ * @returns The call.
619
+ */
620
+ function call(args: Args): {
621
+ abi: [{
622
+ readonly name: "validators";
623
+ readonly type: "function";
624
+ readonly stateMutability: "view";
625
+ readonly inputs: readonly [{
626
+ readonly type: "address";
627
+ readonly name: "validator";
628
+ }];
629
+ readonly outputs: readonly [{
630
+ readonly type: "tuple";
631
+ readonly components: readonly [{
632
+ readonly type: "bytes32";
633
+ readonly name: "publicKey";
634
+ }, {
635
+ readonly type: "bool";
636
+ readonly name: "active";
637
+ }, {
638
+ readonly type: "uint64";
639
+ readonly name: "index";
640
+ }, {
641
+ readonly type: "address";
642
+ readonly name: "validatorAddress";
643
+ }, {
644
+ readonly type: "string";
645
+ readonly name: "inboundAddress";
646
+ }, {
647
+ readonly type: "string";
648
+ readonly name: "outboundAddress";
649
+ }];
650
+ }];
651
+ }];
652
+ functionName: "validators";
653
+ } & {
654
+ args: readonly [validator: `0x${string}`];
655
+ } & {
656
+ address: Address;
657
+ } & {
658
+ data: import("../../index.js").Hex;
659
+ to: Address;
660
+ };
661
+ }
662
+ /**
663
+ * Gets validator address by index.
664
+ *
665
+ * @example
666
+ * ```ts
667
+ * import { createClient, http } from 'viem'
668
+ * import { tempo } from 'viem/chains'
669
+ * import { Actions } from 'viem/tempo'
670
+ *
671
+ * const client = createClient({
672
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
673
+ * transport: http(),
674
+ * })
675
+ *
676
+ * const validatorAddress = await Actions.validator.getByIndex(client, {
677
+ * index: 0n,
678
+ * })
679
+ * ```
680
+ *
681
+ * @param client - Client.
682
+ * @param parameters - Parameters.
683
+ * @returns The validator address at the given index.
684
+ */
685
+ export declare function getByIndex<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: getByIndex.Parameters): Promise<getByIndex.ReturnValue>;
686
+ export declare namespace getByIndex {
687
+ type Parameters = ReadParameters & Args;
688
+ type Args = {
689
+ /** Validator index. */
690
+ index: bigint;
691
+ };
692
+ type ReturnValue = ReadContractReturnType<typeof Abis.validator, 'validatorsArray', never>;
693
+ /**
694
+ * Defines a call to the `validatorsArray` function.
695
+ *
696
+ * Can be passed as a parameter to:
697
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
698
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
699
+ * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
700
+ *
701
+ * @example
702
+ * ```ts
703
+ * import { createClient, http } from 'viem'
704
+ * import { tempo } from 'viem/chains'
705
+ * import { Actions } from 'viem/tempo'
706
+ *
707
+ * const client = createClient({
708
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
709
+ * transport: http(),
710
+ * })
711
+ *
712
+ * const result = await client.multicall({
713
+ * contracts: [
714
+ * Actions.validator.getByIndex.call({ index: 0n }),
715
+ * Actions.validator.getByIndex.call({ index: 1n }),
716
+ * ],
717
+ * })
718
+ * ```
719
+ *
720
+ * @param args - Arguments.
721
+ * @returns The call.
722
+ */
723
+ function call(args: Args): {
724
+ abi: [{
725
+ readonly name: "validatorsArray";
726
+ readonly type: "function";
727
+ readonly stateMutability: "view";
728
+ readonly inputs: readonly [{
729
+ readonly type: "uint256";
730
+ readonly name: "index";
731
+ }];
732
+ readonly outputs: readonly [{
733
+ readonly type: "address";
734
+ }];
735
+ }];
736
+ functionName: "validatorsArray";
737
+ } & {
738
+ args: readonly [index: bigint];
739
+ } & {
740
+ address: Address;
741
+ } & {
742
+ data: import("../../index.js").Hex;
743
+ to: Address;
744
+ };
745
+ }
746
+ /**
747
+ * Gets the total number of validators.
748
+ *
749
+ * @example
750
+ * ```ts
751
+ * import { createClient, http } from 'viem'
752
+ * import { tempo } from 'viem/chains'
753
+ * import { Actions } from 'viem/tempo'
754
+ *
755
+ * const client = createClient({
756
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
757
+ * transport: http(),
758
+ * })
759
+ *
760
+ * const count = await Actions.validator.getCount(client)
761
+ * ```
762
+ *
763
+ * @param client - Client.
764
+ * @param parameters - Parameters.
765
+ * @returns The total number of validators.
766
+ */
767
+ export declare function getCount<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters?: getCount.Parameters): Promise<getCount.ReturnValue>;
768
+ export declare namespace getCount {
769
+ type Parameters = ReadParameters;
770
+ type ReturnValue = ReadContractReturnType<typeof Abis.validator, 'validatorCount', never>;
771
+ /**
772
+ * Defines a call to the `validatorCount` function.
773
+ *
774
+ * Can be passed as a parameter to:
775
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
776
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
777
+ * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
778
+ *
779
+ * @example
780
+ * ```ts
781
+ * import { createClient, http } from 'viem'
782
+ * import { tempo } from 'viem/chains'
783
+ * import { Actions } from 'viem/tempo'
784
+ *
785
+ * const client = createClient({
786
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
787
+ * transport: http(),
788
+ * })
789
+ *
790
+ * const result = await client.multicall({
791
+ * contracts: [Actions.validator.getCount.call()],
792
+ * })
793
+ * ```
794
+ *
795
+ * @returns The call.
796
+ */
797
+ function call(): {
798
+ abi: [{
799
+ readonly name: "validatorCount";
800
+ readonly type: "function";
801
+ readonly stateMutability: "view";
802
+ readonly inputs: readonly [];
803
+ readonly outputs: readonly [{
804
+ readonly type: "uint64";
805
+ }];
806
+ }];
807
+ functionName: "validatorCount";
808
+ } & {
809
+ args?: readonly [] | undefined;
810
+ } & {
811
+ address: Address;
812
+ } & {
813
+ data: import("../../index.js").Hex;
814
+ to: Address;
815
+ };
816
+ }
817
+ /**
818
+ * Gets the complete set of validators.
819
+ *
820
+ * @example
821
+ * ```ts
822
+ * import { createClient, http } from 'viem'
823
+ * import { tempo } from 'viem/chains'
824
+ * import { Actions } from 'viem/tempo'
825
+ *
826
+ * const client = createClient({
827
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
828
+ * transport: http(),
829
+ * })
830
+ *
831
+ * const validators = await Actions.validator.list(client)
832
+ * ```
833
+ *
834
+ * @param client - Client.
835
+ * @param parameters - Parameters.
836
+ * @returns Array of all validators with their information.
837
+ */
838
+ export declare function list<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters?: list.Parameters): Promise<list.ReturnValue>;
839
+ export declare namespace list {
840
+ type Parameters = ReadParameters;
841
+ type ReturnValue = ReadContractReturnType<typeof Abis.validator, 'getValidators', never>;
842
+ /**
843
+ * Defines a call to the `getValidators` function.
844
+ *
845
+ * Can be passed as a parameter to:
846
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
847
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
848
+ * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
849
+ *
850
+ * @example
851
+ * ```ts
852
+ * import { createClient, http } from 'viem'
853
+ * import { tempo } from 'viem/chains'
854
+ * import { Actions } from 'viem/tempo'
855
+ *
856
+ * const client = createClient({
857
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
858
+ * transport: http(),
859
+ * })
860
+ *
861
+ * const result = await client.multicall({
862
+ * contracts: [Actions.validator.list.call()],
863
+ * })
864
+ * ```
865
+ *
866
+ * @returns The call.
867
+ */
868
+ function call(): {
869
+ abi: [{
870
+ readonly name: "getValidators";
871
+ readonly type: "function";
872
+ readonly stateMutability: "view";
873
+ readonly inputs: readonly [];
874
+ readonly outputs: readonly [{
875
+ readonly type: "tuple[]";
876
+ readonly name: "validators";
877
+ readonly components: readonly [{
878
+ readonly type: "bytes32";
879
+ readonly name: "publicKey";
880
+ }, {
881
+ readonly type: "bool";
882
+ readonly name: "active";
883
+ }, {
884
+ readonly type: "uint64";
885
+ readonly name: "index";
886
+ }, {
887
+ readonly type: "address";
888
+ readonly name: "validatorAddress";
889
+ }, {
890
+ readonly type: "string";
891
+ readonly name: "inboundAddress";
892
+ }, {
893
+ readonly type: "string";
894
+ readonly name: "outboundAddress";
895
+ }];
896
+ }];
897
+ }];
898
+ functionName: "getValidators";
899
+ } & {
900
+ args?: readonly [] | undefined;
901
+ } & {
902
+ address: Address;
903
+ } & {
904
+ data: import("../../index.js").Hex;
905
+ to: Address;
906
+ };
907
+ }
908
+ /**
909
+ * Sets the next epoch for a full DKG ceremony.
910
+ *
911
+ * @example
912
+ * ```ts
913
+ * import { createClient, http } from 'viem'
914
+ * import { tempo } from 'viem/chains'
915
+ * import { Actions } from 'viem/tempo'
916
+ * import { privateKeyToAccount } from 'viem/accounts'
917
+ *
918
+ * const client = createClient({
919
+ * account: privateKeyToAccount('0x...'),
920
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
921
+ * transport: http(),
922
+ * })
923
+ *
924
+ * const hash = await Actions.validator.setNextFullDkgCeremony(client, {
925
+ * epoch: 100n,
926
+ * })
927
+ * ```
928
+ *
929
+ * @param client - Client.
930
+ * @param parameters - Parameters.
931
+ * @returns The transaction hash.
932
+ */
933
+ export declare function setNextFullDkgCeremony<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: setNextFullDkgCeremony.Parameters<chain, account>): Promise<setNextFullDkgCeremony.ReturnValue>;
934
+ export declare namespace setNextFullDkgCeremony {
935
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
936
+ type Args = {
937
+ /** The epoch number for the next full DKG ceremony. */
938
+ epoch: bigint;
939
+ };
940
+ type ReturnValue = WriteContractReturnType;
941
+ type ErrorType = BaseErrorType;
942
+ /** @internal */
943
+ 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>>;
944
+ /**
945
+ * Defines a call to the `setNextFullDkgCeremony` function.
946
+ *
947
+ * Can be passed as a parameter to:
948
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
949
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
950
+ * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
951
+ *
952
+ * @example
953
+ * ```ts
954
+ * import { createClient, http, walletActions } from 'viem'
955
+ * import { tempo } from 'viem/chains'
956
+ * import { Actions } from 'viem/tempo'
957
+ *
958
+ * const client = createClient({
959
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
960
+ * transport: http(),
961
+ * }).extend(walletActions)
962
+ *
963
+ * const { result } = await client.sendCalls({
964
+ * calls: [
965
+ * Actions.validator.setNextFullDkgCeremony.call({
966
+ * epoch: 100n,
967
+ * }),
968
+ * ],
969
+ * })
970
+ * ```
971
+ *
972
+ * @param args - Arguments.
973
+ * @returns The call.
974
+ */
975
+ function call(args: Args): {
976
+ abi: [{
977
+ readonly name: "setNextFullDkgCeremony";
978
+ readonly type: "function";
979
+ readonly stateMutability: "nonpayable";
980
+ readonly inputs: readonly [{
981
+ readonly type: "uint64";
982
+ readonly name: "epoch";
983
+ }];
984
+ readonly outputs: readonly [];
985
+ }];
986
+ functionName: "setNextFullDkgCeremony";
987
+ } & {
988
+ args: readonly [epoch: bigint];
989
+ } & {
990
+ address: Address;
991
+ } & {
992
+ data: import("../../index.js").Hex;
993
+ to: Address;
994
+ };
995
+ }
996
+ /**
997
+ * Sets the next epoch for a full DKG ceremony and waits for the transaction receipt.
998
+ *
999
+ * @example
1000
+ * ```ts
1001
+ * import { createClient, http } from 'viem'
1002
+ * import { tempo } from 'viem/chains'
1003
+ * import { Actions } from 'viem/tempo'
1004
+ * import { privateKeyToAccount } from 'viem/accounts'
1005
+ *
1006
+ * const client = createClient({
1007
+ * account: privateKeyToAccount('0x...'),
1008
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
1009
+ * transport: http(),
1010
+ * })
1011
+ *
1012
+ * const { receipt } = await Actions.validator.setNextFullDkgCeremonySync(client, {
1013
+ * epoch: 100n,
1014
+ * })
1015
+ * ```
1016
+ *
1017
+ * @param client - Client.
1018
+ * @param parameters - Parameters.
1019
+ * @returns The transaction receipt.
1020
+ */
1021
+ export declare function setNextFullDkgCeremonySync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: setNextFullDkgCeremonySync.Parameters<chain, account>): Promise<setNextFullDkgCeremonySync.ReturnValue>;
1022
+ export declare namespace setNextFullDkgCeremonySync {
1023
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = setNextFullDkgCeremony.Parameters<chain, account>;
1024
+ type Args = setNextFullDkgCeremony.Args;
1025
+ type ReturnValue = {
1026
+ receipt: TransactionReceipt;
1027
+ };
1028
+ }
1029
+ /**
1030
+ * Updates validator information (only callable by the validator themselves).
1031
+ *
1032
+ * @example
1033
+ * ```ts
1034
+ * import { createClient, http } from 'viem'
1035
+ * import { tempo } from 'viem/chains'
1036
+ * import { Actions } from 'viem/tempo'
1037
+ * import { privateKeyToAccount } from 'viem/accounts'
1038
+ *
1039
+ * const client = createClient({
1040
+ * account: privateKeyToAccount('0x...'),
1041
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
1042
+ * transport: http(),
1043
+ * })
1044
+ *
1045
+ * const hash = await Actions.validator.update(client, {
1046
+ * newValidatorAddress: '0x...',
1047
+ * publicKey: '0x...',
1048
+ * inboundAddress: '192.168.1.1:8080',
1049
+ * outboundAddress: '192.168.1.1:8080',
1050
+ * })
1051
+ * ```
1052
+ *
1053
+ * @param client - Client.
1054
+ * @param parameters - Parameters.
1055
+ * @returns The transaction hash.
1056
+ */
1057
+ export declare function update<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: update.Parameters<chain, account>): Promise<update.ReturnValue>;
1058
+ export declare namespace update {
1059
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
1060
+ type Args = {
1061
+ /** The new address for this validator. */
1062
+ newValidatorAddress: Address;
1063
+ /** The validator's new communication public key. */
1064
+ publicKey: Hex;
1065
+ /** The validator's inbound address `<hostname|ip>:<port>` for incoming connections. */
1066
+ inboundAddress: string;
1067
+ /** The validator's outbound IP address `<ip>:<port>` for firewall whitelisting (IP only, no hostnames). */
1068
+ outboundAddress: string;
1069
+ };
1070
+ type ReturnValue = WriteContractReturnType;
1071
+ type ErrorType = BaseErrorType;
1072
+ /** @internal */
1073
+ 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>>;
1074
+ /**
1075
+ * Defines a call to the `updateValidator` function.
1076
+ *
1077
+ * Can be passed as a parameter to:
1078
+ * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
1079
+ * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
1080
+ * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
1081
+ *
1082
+ * @example
1083
+ * ```ts
1084
+ * import { createClient, http, walletActions } from 'viem'
1085
+ * import { tempo } from 'viem/chains'
1086
+ * import { Actions } from 'viem/tempo'
1087
+ *
1088
+ * const client = createClient({
1089
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
1090
+ * transport: http(),
1091
+ * }).extend(walletActions)
1092
+ *
1093
+ * const { result } = await client.sendCalls({
1094
+ * calls: [
1095
+ * Actions.validator.update.call({
1096
+ * newValidatorAddress: '0x...',
1097
+ * publicKey: '0x...',
1098
+ * inboundAddress: '192.168.1.1:8080',
1099
+ * outboundAddress: '192.168.1.1:8080',
1100
+ * }),
1101
+ * ],
1102
+ * })
1103
+ * ```
1104
+ *
1105
+ * @param args - Arguments.
1106
+ * @returns The call.
1107
+ */
1108
+ function call(args: Args): {
1109
+ abi: [{
1110
+ readonly name: "updateValidator";
1111
+ readonly type: "function";
1112
+ readonly stateMutability: "nonpayable";
1113
+ readonly inputs: readonly [{
1114
+ readonly type: "address";
1115
+ readonly name: "newValidatorAddress";
1116
+ }, {
1117
+ readonly type: "bytes32";
1118
+ readonly name: "publicKey";
1119
+ }, {
1120
+ readonly type: "string";
1121
+ readonly name: "inboundAddress";
1122
+ }, {
1123
+ readonly type: "string";
1124
+ readonly name: "outboundAddress";
1125
+ }];
1126
+ readonly outputs: readonly [];
1127
+ }];
1128
+ functionName: "updateValidator";
1129
+ } & {
1130
+ args: readonly [`0x${string}`, publicKey: `0x${string}`, string, string];
1131
+ } & {
1132
+ address: Address;
1133
+ } & {
1134
+ data: import("../../index.js").Hex;
1135
+ to: Address;
1136
+ };
1137
+ }
1138
+ /**
1139
+ * Updates validator information and waits for the transaction receipt.
1140
+ *
1141
+ * @example
1142
+ * ```ts
1143
+ * import { createClient, http } from 'viem'
1144
+ * import { tempo } from 'viem/chains'
1145
+ * import { Actions } from 'viem/tempo'
1146
+ * import { privateKeyToAccount } from 'viem/accounts'
1147
+ *
1148
+ * const client = createClient({
1149
+ * account: privateKeyToAccount('0x...'),
1150
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
1151
+ * transport: http(),
1152
+ * })
1153
+ *
1154
+ * const { receipt } = await Actions.validator.updateSync(client, {
1155
+ * newValidatorAddress: '0x...',
1156
+ * publicKey: '0x...',
1157
+ * inboundAddress: '192.168.1.1:8080',
1158
+ * outboundAddress: '192.168.1.1:8080',
1159
+ * })
1160
+ * ```
1161
+ *
1162
+ * @param client - Client.
1163
+ * @param parameters - Parameters.
1164
+ * @returns The transaction receipt.
1165
+ */
1166
+ export declare function updateSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: updateSync.Parameters<chain, account>): Promise<updateSync.ReturnValue>;
1167
+ export declare namespace updateSync {
1168
+ type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = update.Parameters<chain, account>;
1169
+ type Args = update.Args;
1170
+ type ReturnValue = {
1171
+ receipt: TransactionReceipt;
1172
+ };
1173
+ }
1174
+ //# sourceMappingURL=validator.d.ts.map