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 SetSubregistryWriteParametersParameters = { /** The parent registry address */ registryAddress: Address; /** The label to set the subregistry for */ label: string; /** The subregistry address to assign */ subregistryAddress: Address; }; export type SetSubregistryWriteParametersReturnType = ReturnType; export declare const setSubregistryWriteParameters: (client: Client, { registryAddress, label, subregistryAddress, }: SetSubregistryWriteParametersParameters) => { readonly address: `0x${string}`; readonly abi: readonly [{ readonly inputs: readonly [{ readonly name: "anyId"; readonly type: "uint256"; }, { readonly name: "registry"; readonly type: "address"; }]; readonly name: "setSubregistry"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; readonly type: "function"; }]; readonly functionName: "setSubregistry"; readonly args: readonly [bigint, `0x${string}`]; readonly chain: chain; readonly account: Account; }; export type SetSubregistryParameters = Prettify>; export type SetSubregistryReturnType = Hash; export type SetSubregistryErrorType = ClientWithOverridesErrorType | WriteContractErrorType; /** * Sets the subregistry for a name in the parent registry. * @param client - {@link Client} * @param parameters - {@link SetSubregistryParameters} * @returns Transaction hash. {@link SetSubregistryReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * import { setSubregistry } 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 setSubregistry(wallet, { * registryAddress: '0x...', // parent registry * label: 'myname', * subregistryAddress: '0x...', // deployed subregistry * }) * // 0x... */ export declare function setSubregistry(client: Client, { registryAddress, label, subregistryAddress, ...txArgs }: SetSubregistryParameters): Promise; //# sourceMappingURL=setSubregistry.d.ts.map