import { n as FheChain } from "../types-BgczXqW2.js"; import { G as ReadContractConfig, P as GenericProvider, V as TransactionReceipt, Y as WriteContractConfig, l as EIP712TypedData, p as EncryptedValue } from "../relayer-cleartext-CSeMlmGO.js"; import { a as ZamaConfig } from "../types-Gn5MeDsr.js"; import { t as BaseSigner } from "../base-signer-C3Wc5oi9.js"; import { t as ZamaConfigViem } from "../types-piBsdTIP.js"; import { Abi, Address, ContractFunctionArgs, ContractFunctionName, ContractFunctionReturnType, EIP1193Provider, Hex, Hex as Hex$1, PublicClient, WalletClient } from "viem"; //#region src/viem/config.d.ts /** Create a {@link ZamaConfig} from viem clients. */ declare function createConfig(params: ZamaConfigViem): ZamaConfig; //#endregion //#region src/viem/viem-signer.d.ts /** * Configuration for {@link ViemSigner}. * * The optional `ethereum` field is needed for `subscribe()` (EIP-1193 * `accountsChanged` / `disconnect` events). It cannot be auto-extracted from * `walletClient` because viem's `custom(ethereum)` transport captures the * provider in a closure and does **not** expose `on` / `removeListener` on * `walletClient.transport`. * * If you omit `ethereum`, `subscribe()` returns a no-op. For automatic * wallet lifecycle handling, consider using `WagmiSigner` instead. */ interface ViemSignerConfig { /** Wallet client for signing and write operations. */ walletClient: WalletClient; ethereum?: EIP1193Provider; } declare class ViemSigner extends BaseSigner { #private; constructor(config: ViemSignerConfig); signTypedData(typedData: EIP712TypedData): Promise; writeContract, const TArgs extends ContractFunctionArgs>(config: WriteContractConfig): Promise; protected onDispose(): void; } //#endregion //#region src/viem/viem-provider.d.ts /** Configuration for {@link ViemProvider}. */ interface ViemProviderConfig { /** A viem `PublicClient` backing all read operations. */ publicClient: PublicClient; } /** * Read-only {@link GenericProvider} backed by a viem `PublicClient`. * * Use this for integrations that only need public chain reads before the user has Pair with a * {@link ViemSigner} when wallet authority is required; the two can share a transport or point at * independent RPCs. * * @example * ```ts * const publicClient = createPublicClient({ chain: sepolia, transport: http(ALCHEMY_URL) }); * const provider = new ViemProvider({ publicClient }); * ``` */ declare class ViemProvider implements GenericProvider { #private; constructor(config: ViemProviderConfig); getChainId(): Promise; readContract, const TArgs extends ContractFunctionArgs>(config: ReadContractConfig): Promise>; waitForTransactionReceipt(hash: Hex$1): Promise; getBlockTimestamp(): Promise; } //#endregion //#region src/viem/contracts.d.ts declare function readConfidentialBalanceOfContract(client: PublicClient, tokenAddress: Address, userAddress: Address): Promise<`0x${string}`>; declare function readUnderlyingTokenContract(client: PublicClient, wrapperAddress: Address): Promise<`0x${string}`>; declare function readSupportsInterfaceContract(client: PublicClient, tokenAddress: Address, interfaceId: Address): Promise; declare function writeConfidentialTransferContract(client: WalletClient, tokenAddress: Address, to: Address, encryptedAmount: EncryptedValue, inputProof: Hex$1): Promise<`0x${string}`>; declare function writeUnwrapContract(client: WalletClient, encryptedErc20: Address, from: Address, to: Address, encryptedAmount: EncryptedValue, inputProof: Hex$1): Promise<`0x${string}`>; declare function writeUnwrapFromBalanceContract(client: WalletClient, encryptedErc20: Address, from: Address, to: Address, encryptedBalance: EncryptedValue): Promise<`0x${string}`>; declare function writeFinalizeUnwrapContract(client: WalletClient, wrapper: Address, unwrapRequestId: EncryptedValue, unwrapAmountCleartext: bigint, decryptionProof: Hex$1): Promise<`0x${string}`>; declare function writeSetOperatorContract(client: WalletClient, tokenAddress: Address, operator: Address, until?: number): Promise<`0x${string}`>; declare function writeWrapContract(client: WalletClient, wrapperAddress: Address, to: Address, amount: bigint): Promise<`0x${string}`>; declare function readTokenPairsContract(client: PublicClient, registry: Address): Promise; declare function readTokenPairsLengthContract(client: PublicClient, registry: Address): Promise; declare function readTokenPairsSliceContract(client: PublicClient, registry: Address, fromIndex: bigint, toIndex: bigint): Promise; declare function readTokenPairContract(client: PublicClient, registry: Address, index: bigint): Promise<{ tokenAddress: `0x${string}`; confidentialTokenAddress: `0x${string}`; isValid: boolean; }>; declare function readConfidentialTokenAddressContract(client: PublicClient, registry: Address, tokenAddress: Address): Promise; declare function readTokenAddressContract(client: PublicClient, registry: Address, confidentialTokenAddress: Address): Promise; declare function readIsConfidentialTokenValidContract(client: PublicClient, registry: Address, confidentialTokenAddress: Address): Promise; //#endregion export { type EncryptedValue, type Hex, ViemProvider, type ViemProviderConfig, ViemSigner, type ViemSignerConfig, type ZamaConfigViem, createConfig, readConfidentialBalanceOfContract, readConfidentialTokenAddressContract, readIsConfidentialTokenValidContract, readSupportsInterfaceContract, readTokenAddressContract, readTokenPairContract, readTokenPairsContract, readTokenPairsLengthContract, readTokenPairsSliceContract, readUnderlyingTokenContract, writeConfidentialTransferContract, writeFinalizeUnwrapContract, writeSetOperatorContract, writeUnwrapContract, writeUnwrapFromBalanceContract, writeWrapContract }; //# sourceMappingURL=index.d.ts.map