import type { Address } from 'abitype'; import type { Hex } from 'ox/Hex'; import type { Account } from '../../accounts/types.js'; import type { ReadContractReturnType } from '../../actions/public/readContract.js'; import type { WriteContractReturnType } from '../../actions/wallet/writeContract.js'; import { writeContract } from '../../actions/wallet/writeContract.js'; import { writeContractSync } from '../../actions/wallet/writeContractSync.js'; import type { Client } from '../../clients/createClient.js'; import type { Transport } from '../../clients/transports/createTransport.js'; import type { BaseErrorType } from '../../errors/base.js'; import type { Chain } from '../../types/chain.js'; import type { TransactionReceipt } from '../../types/transaction.js'; import * as Abis from '../Abis.js'; import type { ReadParameters, WriteParameters } from '../internal/types.js'; /** * Adds a new validator (owner only). * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const hash = await Actions.validator.add(client, { * newValidatorAddress: '0x...', * publicKey: '0x...', * active: true, * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ export declare function add(client: Client, parameters: add.Parameters): Promise; export declare namespace add { type Parameters = WriteParameters & Args; type Args = { /** The address of the new validator. */ newValidatorAddress: Address; /** The validator's communication public key. */ publicKey: Hex; /** Whether the validator should be active. */ active: boolean; /** The validator's inbound address `:` for incoming connections. */ inboundAddress: string; /** The validator's outbound IP address `:` for firewall whitelisting (IP only, no hostnames). */ outboundAddress: string; }; type ReturnValue = WriteContractReturnType; type ErrorType = BaseErrorType; /** @internal */ function inner(action: action, client: Client, parameters: Parameters): Promise>; /** * Defines a call to the `addValidator` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls * * @example * ```ts * import { createClient, http, walletActions } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }).extend(walletActions) * * const { result } = await client.sendCalls({ * calls: [ * Actions.validator.add.call({ * newValidatorAddress: '0x...', * publicKey: '0x...', * active: true, * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "addValidator"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly type: "address"; readonly name: "newValidatorAddress"; }, { readonly type: "bytes32"; readonly name: "publicKey"; }, { readonly type: "bool"; readonly name: "active"; }, { readonly type: "string"; readonly name: "inboundAddress"; }, { readonly type: "string"; readonly name: "outboundAddress"; }]; readonly outputs: readonly []; }]; functionName: "addValidator"; } & { args: readonly [`0x${string}`, publicKey: `0x${string}`, active: boolean, string, string]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Adds a new validator (owner only) and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const { receipt } = await Actions.validator.addSync(client, { * newValidatorAddress: '0x...', * publicKey: '0x...', * active: true, * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt. */ export declare function addSync(client: Client, parameters: addSync.Parameters): Promise; export declare namespace addSync { type Parameters = add.Parameters; type Args = add.Args; type ReturnValue = { receipt: TransactionReceipt; }; } /** * Changes the owner of the validator config precompile. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const hash = await Actions.validator.changeOwner(client, { * newOwner: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ export declare function changeOwner(client: Client, parameters: changeOwner.Parameters): Promise; export declare namespace changeOwner { type Parameters = WriteParameters & Args; type Args = { /** The new owner address. */ newOwner: Address; }; type ReturnValue = WriteContractReturnType; type ErrorType = BaseErrorType; /** @internal */ function inner(action: action, client: Client, parameters: Parameters): Promise>; /** * Defines a call to the `changeOwner` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls * * @example * ```ts * import { createClient, http, walletActions } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }).extend(walletActions) * * const { result } = await client.sendCalls({ * calls: [ * Actions.validator.changeOwner.call({ * newOwner: '0x...', * }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "changeOwner"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly type: "address"; readonly name: "newOwner"; }]; readonly outputs: readonly []; }]; functionName: "changeOwner"; } & { args: readonly [newOwner: `0x${string}`]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Changes the owner and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const { receipt } = await Actions.validator.changeOwnerSync(client, { * newOwner: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt. */ export declare function changeOwnerSync(client: Client, parameters: changeOwnerSync.Parameters): Promise; export declare namespace changeOwnerSync { type Parameters = changeOwner.Parameters; type Args = changeOwner.Args; type ReturnValue = { receipt: TransactionReceipt; }; } /** * Changes validator active status (owner only). * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const hash = await Actions.validator.changeStatus(client, { * validator: '0x...', * active: false, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ export declare function changeStatus(client: Client, parameters: changeStatus.Parameters): Promise; export declare namespace changeStatus { type Parameters = WriteParameters & Args; type Args = { /** The validator address. */ validator: Address; /** Whether the validator should be active. */ active: boolean; }; type ReturnValue = WriteContractReturnType; type ErrorType = BaseErrorType; /** @internal */ function inner(action: action, client: Client, parameters: Parameters): Promise>; /** * Defines a call to the `changeValidatorStatus` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls * * @example * ```ts * import { createClient, http, walletActions } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }).extend(walletActions) * * const { result } = await client.sendCalls({ * calls: [ * Actions.validator.changeStatus.call({ * validator: '0x...', * active: false, * }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "changeValidatorStatus"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly type: "address"; readonly name: "validator"; }, { readonly type: "bool"; readonly name: "active"; }]; readonly outputs: readonly []; }]; functionName: "changeValidatorStatus"; } & { args: readonly [validator: `0x${string}`, active: boolean]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Changes validator active status and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const { receipt } = await Actions.validator.changeStatusSync(client, { * validator: '0x...', * active: false, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt. */ export declare function changeStatusSync(client: Client, parameters: changeStatusSync.Parameters): Promise; export declare namespace changeStatusSync { type Parameters = changeStatus.Parameters; type Args = changeStatus.Args; type ReturnValue = { receipt: TransactionReceipt; }; } /** * Gets the next epoch for a full DKG ceremony. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const epoch = await Actions.validator.getNextFullDkgCeremony(client) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The epoch number for the next full DKG ceremony. */ export declare function getNextFullDkgCeremony(client: Client, parameters?: getNextFullDkgCeremony.Parameters): Promise; export declare namespace getNextFullDkgCeremony { type Parameters = ReadParameters; type ReturnValue = ReadContractReturnType; /** * Defines a call to the `getNextFullDkgCeremony` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const result = await client.multicall({ * contracts: [Actions.validator.getNextFullDkgCeremony.call()], * }) * ``` * * @returns The call. */ function call(): { abi: [{ readonly name: "getNextFullDkgCeremony"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly type: "uint64"; }]; }]; functionName: "getNextFullDkgCeremony"; } & { args?: readonly [] | undefined; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Gets the contract owner. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const owner = await Actions.validator.getOwner(client) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The owner address. */ export declare function getOwner(client: Client, parameters?: getOwner.Parameters): Promise; export declare namespace getOwner { type Parameters = ReadParameters; type ReturnValue = ReadContractReturnType; /** * Defines a call to the `owner` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const result = await client.multicall({ * contracts: [Actions.validator.getOwner.call()], * }) * ``` * * @returns The call. */ function call(): { abi: [{ readonly name: "owner"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly type: "address"; }]; }]; functionName: "owner"; } & { args?: readonly [] | undefined; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Gets validator information by address. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const validator = await Actions.validator.get(client, { * validator: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The validator information. */ export declare function get(client: Client, parameters: get.Parameters): Promise; export declare namespace get { type Parameters = ReadParameters & Args; type Args = { /** Validator address. */ validator: Address; }; type ReturnValue = ReadContractReturnType; /** * Defines a call to the `validators` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const result = await client.multicall({ * contracts: [ * Actions.validator.get.call({ validator: '0x...' }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "validators"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly type: "address"; readonly name: "validator"; }]; readonly outputs: readonly [{ readonly type: "tuple"; readonly components: readonly [{ readonly type: "bytes32"; readonly name: "publicKey"; }, { readonly type: "bool"; readonly name: "active"; }, { readonly type: "uint64"; readonly name: "index"; }, { readonly type: "address"; readonly name: "validatorAddress"; }, { readonly type: "string"; readonly name: "inboundAddress"; }, { readonly type: "string"; readonly name: "outboundAddress"; }]; }]; }]; functionName: "validators"; } & { args: readonly [validator: `0x${string}`]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Gets validator address by index. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const validatorAddress = await Actions.validator.getByIndex(client, { * index: 0n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The validator address at the given index. */ export declare function getByIndex(client: Client, parameters: getByIndex.Parameters): Promise; export declare namespace getByIndex { type Parameters = ReadParameters & Args; type Args = { /** Validator index. */ index: bigint; }; type ReturnValue = ReadContractReturnType; /** * Defines a call to the `validatorsArray` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const result = await client.multicall({ * contracts: [ * Actions.validator.getByIndex.call({ index: 0n }), * Actions.validator.getByIndex.call({ index: 1n }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "validatorsArray"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly type: "uint256"; readonly name: "index"; }]; readonly outputs: readonly [{ readonly type: "address"; }]; }]; functionName: "validatorsArray"; } & { args: readonly [index: bigint]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Gets the total number of validators. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const count = await Actions.validator.getCount(client) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The total number of validators. */ export declare function getCount(client: Client, parameters?: getCount.Parameters): Promise; export declare namespace getCount { type Parameters = ReadParameters; type ReturnValue = ReadContractReturnType; /** * Defines a call to the `validatorCount` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const result = await client.multicall({ * contracts: [Actions.validator.getCount.call()], * }) * ``` * * @returns The call. */ function call(): { abi: [{ readonly name: "validatorCount"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly type: "uint64"; }]; }]; functionName: "validatorCount"; } & { args?: readonly [] | undefined; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Gets the complete set of validators. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const validators = await Actions.validator.list(client) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns Array of all validators with their information. */ export declare function list(client: Client, parameters?: list.Parameters): Promise; export declare namespace list { type Parameters = ReadParameters; type ReturnValue = ReadContractReturnType; /** * Defines a call to the `getValidators` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const result = await client.multicall({ * contracts: [Actions.validator.list.call()], * }) * ``` * * @returns The call. */ function call(): { abi: [{ readonly name: "getValidators"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly type: "tuple[]"; readonly name: "validators"; readonly components: readonly [{ readonly type: "bytes32"; readonly name: "publicKey"; }, { readonly type: "bool"; readonly name: "active"; }, { readonly type: "uint64"; readonly name: "index"; }, { readonly type: "address"; readonly name: "validatorAddress"; }, { readonly type: "string"; readonly name: "inboundAddress"; }, { readonly type: "string"; readonly name: "outboundAddress"; }]; }]; }]; functionName: "getValidators"; } & { args?: readonly [] | undefined; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Sets the next epoch for a full DKG ceremony. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const hash = await Actions.validator.setNextFullDkgCeremony(client, { * epoch: 100n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ export declare function setNextFullDkgCeremony(client: Client, parameters: setNextFullDkgCeremony.Parameters): Promise; export declare namespace setNextFullDkgCeremony { type Parameters = WriteParameters & Args; type Args = { /** The epoch number for the next full DKG ceremony. */ epoch: bigint; }; type ReturnValue = WriteContractReturnType; type ErrorType = BaseErrorType; /** @internal */ function inner(action: action, client: Client, parameters: Parameters): Promise>; /** * Defines a call to the `setNextFullDkgCeremony` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls * * @example * ```ts * import { createClient, http, walletActions } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }).extend(walletActions) * * const { result } = await client.sendCalls({ * calls: [ * Actions.validator.setNextFullDkgCeremony.call({ * epoch: 100n, * }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "setNextFullDkgCeremony"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly type: "uint64"; readonly name: "epoch"; }]; readonly outputs: readonly []; }]; functionName: "setNextFullDkgCeremony"; } & { args: readonly [epoch: bigint]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Sets the next epoch for a full DKG ceremony and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const { receipt } = await Actions.validator.setNextFullDkgCeremonySync(client, { * epoch: 100n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt. */ export declare function setNextFullDkgCeremonySync(client: Client, parameters: setNextFullDkgCeremonySync.Parameters): Promise; export declare namespace setNextFullDkgCeremonySync { type Parameters = setNextFullDkgCeremony.Parameters; type Args = setNextFullDkgCeremony.Args; type ReturnValue = { receipt: TransactionReceipt; }; } /** * Updates validator information (only callable by the validator themselves). * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const hash = await Actions.validator.update(client, { * newValidatorAddress: '0x...', * publicKey: '0x...', * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ export declare function update(client: Client, parameters: update.Parameters): Promise; export declare namespace update { type Parameters = WriteParameters & Args; type Args = { /** The new address for this validator. */ newValidatorAddress: Address; /** The validator's new communication public key. */ publicKey: Hex; /** The validator's inbound address `:` for incoming connections. */ inboundAddress: string; /** The validator's outbound IP address `:` for firewall whitelisting (IP only, no hostnames). */ outboundAddress: string; }; type ReturnValue = WriteContractReturnType; type ErrorType = BaseErrorType; /** @internal */ function inner(action: action, client: Client, parameters: Parameters): Promise>; /** * Defines a call to the `updateValidator` function. * * Can be passed as a parameter to: * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls * * @example * ```ts * import { createClient, http, walletActions } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }).extend(walletActions) * * const { result } = await client.sendCalls({ * calls: [ * Actions.validator.update.call({ * newValidatorAddress: '0x...', * publicKey: '0x...', * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }), * ], * }) * ``` * * @param args - Arguments. * @returns The call. */ function call(args: Args): { abi: [{ readonly name: "updateValidator"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly type: "address"; readonly name: "newValidatorAddress"; }, { readonly type: "bytes32"; readonly name: "publicKey"; }, { readonly type: "string"; readonly name: "inboundAddress"; }, { readonly type: "string"; readonly name: "outboundAddress"; }]; readonly outputs: readonly []; }]; functionName: "updateValidator"; } & { args: readonly [`0x${string}`, publicKey: `0x${string}`, string, string]; } & { address: Address; } & { data: import("../../index.js").Hex; to: Address; }; } /** * Updates validator information and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { Actions } from 'viem/tempo' * import { privateKeyToAccount } from 'viem/accounts' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }), * transport: http(), * }) * * const { receipt } = await Actions.validator.updateSync(client, { * newValidatorAddress: '0x...', * publicKey: '0x...', * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt. */ export declare function updateSync(client: Client, parameters: updateSync.Parameters): Promise; export declare namespace updateSync { type Parameters = update.Parameters; type Args = update.Args; type ReturnValue = { receipt: TransactionReceipt; }; } //# sourceMappingURL=validator.d.ts.map