import { type Account, type Address, type Chain, type Client, type EncodeFunctionDataErrorType, type Transport, type WriteContractErrorType, type WriteContractReturnType } from 'viem'; import { NoRecordsSpecifiedError } from '../../../../errors/public.js'; import type { Prettify, WriteTransactionParameters } from '../../../../types/index.js'; import { type ClientWithOverridesErrorType } from '../../../../utils/clientWithOverrides.js'; import { type RecordOptions, type ResolverMulticallItemErrorType } from '../../../../utils/v2/resolver/resolverMulticallParameters.js'; export type SetRecordsWriteParametersParameters = { /** The name to set records for */ name: string; /** The resolver address to set records on */ resolverAddress: Address; } & RecordOptions; export type SetRecordsWriteParametersReturnType = ReturnType; export type SetRecordsWriteParametersErrorType = NoRecordsSpecifiedError | ResolverMulticallItemErrorType | EncodeFunctionDataErrorType; /** * Builds the write parameters for setting records on a V2 * `PermissionedResolver`. * * A single change goes out as the bare setter; several are batched through * `multicall(bytes[])`. Unlike the v1 equivalent, no node argument is needed — * every setter already carries the DNS-encoded name. */ export declare const setRecordsWriteParameters: (client: Client, { name, resolverAddress, ...records }: SetRecordsWriteParametersParameters) => Promise<({ abi: import("viem").Abi; functionName: string; } & { args?: readonly unknown[] | undefined; } & { address: Address; } & { chain: Chain | null | undefined; } & { account: `0x${string}` | Account | null; value?: bigint | undefined; dataSuffix?: `0x${string}` | undefined; } & { gas?: bigint | undefined; nonce?: number | undefined; type?: "legacy" | undefined; blobs?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; gasPrice?: bigint | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; accessList?: undefined; sidecars?: undefined; authorizationList?: undefined; }) | ({ abi: import("viem").Abi; functionName: string; } & { args?: readonly unknown[] | undefined; } & { address: Address; } & { chain: Chain | null | undefined; } & { account: `0x${string}` | Account | null; value?: bigint | undefined; dataSuffix?: `0x${string}` | undefined; } & { gas?: bigint | undefined; nonce?: number | undefined; type?: "eip2930" | undefined; blobs?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; gasPrice?: bigint | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; accessList?: import("viem").AccessList | undefined; sidecars?: undefined; authorizationList?: undefined; }) | ({ abi: import("viem").Abi; functionName: string; } & { args?: readonly unknown[] | undefined; } & { address: Address; } & { chain: Chain | null | undefined; } & { account: `0x${string}` | Account | null; value?: bigint | undefined; dataSuffix?: `0x${string}` | undefined; } & { gas?: bigint | undefined; nonce?: number | undefined; type?: "eip1559" | undefined; blobs?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: bigint | undefined; maxPriorityFeePerGas?: bigint | undefined; accessList?: import("viem").AccessList | undefined; sidecars?: undefined; authorizationList?: undefined; }) | ({ abi: import("viem").Abi; functionName: string; } & { args?: readonly unknown[] | undefined; } & { address: Address; } & { chain: Chain | null | undefined; } & { account: `0x${string}` | Account | null; value?: bigint | undefined; dataSuffix?: `0x${string}` | undefined; } & { gas?: bigint | undefined; nonce?: number | undefined; type?: "eip4844" | undefined; blobs?: readonly `0x${string}`[] | readonly import("viem").ByteArray[] | undefined; blobVersionedHashes: readonly import("viem").Hex[]; kzg?: undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: bigint | undefined; maxFeePerGas?: bigint | undefined; maxPriorityFeePerGas?: bigint | undefined; accessList?: import("viem").AccessList | undefined; sidecars?: readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; authorizationList?: undefined; }) | ({ abi: import("viem").Abi; functionName: string; } & { args?: readonly unknown[] | undefined; } & { address: Address; } & { chain: Chain | null | undefined; } & { account: `0x${string}` | Account | null; value?: bigint | undefined; dataSuffix?: `0x${string}` | undefined; } & { gas?: bigint | undefined; nonce?: number | undefined; type?: "eip4844" | undefined; blobs: readonly import("viem").Hex[] | readonly import("viem").ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[] | undefined; kzg?: import("viem").Kzg | undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: bigint | undefined; maxFeePerGas?: bigint | undefined; maxPriorityFeePerGas?: bigint | undefined; accessList?: import("viem").AccessList | undefined; sidecars?: readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined; authorizationList?: undefined; }) | ({ abi: import("viem").Abi; functionName: string; } & { args?: readonly unknown[] | undefined; } & { address: Address; } & { chain: Chain | null | undefined; } & { account: `0x${string}` | Account | null; value?: bigint | undefined; dataSuffix?: `0x${string}` | undefined; } & { gas?: bigint | undefined; nonce?: number | undefined; type?: "eip7702" | undefined; blobs?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: bigint | undefined; maxPriorityFeePerGas?: bigint | undefined; accessList?: import("viem").AccessList | undefined; sidecars?: undefined; authorizationList?: import("viem").AuthorizationList | undefined; }) | { readonly abi: readonly [{ readonly inputs: readonly [{ readonly name: "data"; readonly type: "bytes[]"; }]; readonly name: "multicall"; readonly outputs: readonly [{ readonly name: "results"; readonly type: "bytes[]"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }]; readonly functionName: "multicall"; readonly args: readonly [`0x${string}`[]]; readonly address: `0x${string}`; readonly account: account; readonly chain: chain; }>; export type SetRecordsParameters = Prettify>; export type SetRecordsReturnType = WriteContractReturnType; export type SetRecordsErrorType = SetRecordsWriteParametersErrorType | ClientWithOverridesErrorType | WriteContractErrorType; /** * Sets multiple records for a name on a V2 `PermissionedResolver`. * * @param client - {@link Client} * @param options - {@link SetRecordsParameters} * @returns Transaction hash. {@link SetRecordsReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { sepolia } from 'viem/chains' * import { addEnsContracts } from '@ensdomains/ensjs' * import { setRecords } from '@ensdomains/ensjs/wallet/v2' * * const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' }) * const wallet = createWalletClient({ * account, * chain: addEnsContracts(sepolia), * transport: custom(window.ethereum), * }) * const hash = await setRecords(wallet, { * name: 'ens.eth', * coins: [{ coin: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], * texts: [{ key: 'foo', value: 'bar' }], * resolverAddress: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41', * }) * // 0x... */ export declare function setRecords(client: Client, { name, resolverAddress, contentHash, texts, coins, abi, ...txArgs }: SetRecordsParameters): Promise; //# sourceMappingURL=setRecords.d.ts.map