import type { Account, Address, Chain, Client, Hash, Transport, WriteContractErrorType } from 'viem'; import type { Prettify, WriteTransactionParameters } from '../../../../types/index.js'; import { type ClientWithOverridesErrorType } from '../../../../utils/clientWithOverrides.js'; export type SetParentWriteParametersParameters = { /** The registry whose canonical parent is being set */ registryAddress: Address; /** The parent registry that holds the registry's name */ parentRegistryAddress: Address; /** The registry's name's label in the parent registry */ label: string; }; export type SetParentWriteParametersReturnType = ReturnType; export declare const setParentWriteParameters: (client: Client, { registryAddress, parentRegistryAddress, label, }: SetParentWriteParametersParameters) => { readonly address: `0x${string}`; readonly abi: readonly [{ readonly inputs: readonly [{ readonly name: "parent"; readonly type: "address"; }, { readonly name: "label"; readonly type: "string"; }]; readonly name: "setParent"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; readonly type: "function"; }]; readonly functionName: "setParent"; readonly args: readonly [`0x${string}`, string]; readonly chain: chain; readonly account: Account; }; export type SetParentParameters = Prettify>; export type SetParentReturnType = Hash; export type SetParentErrorType = ClientWithOverridesErrorType | WriteContractErrorType; /** * Sets the canonical parent of a registry. * @param client - {@link Client} * @param parameters - {@link SetParentParameters} * @returns Transaction hash. {@link SetParentReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * import { setParent } from '@ensdomains/ensjs/wallet/v2' * * const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' }) * const wallet = createWalletClient({ * account, * chain: mainnet, * transport: custom(window.ethereum), * }) * const hash = await setParent(wallet, { * registryAddress: '0x...', // deployed subregistry * parentRegistryAddress: '0x...', // registry holding the name * label: 'myname', * }) * // 0x... */ export declare function setParent(client: Client, { registryAddress, parentRegistryAddress, label, ...txArgs }: SetParentParameters): Promise; //# sourceMappingURL=setParent.d.ts.map