import { type Address, type Hex, type PublicClient } from "viem"; import { type BuildQueryFn } from "../../utils/buildQuery.js"; import { type EulerPlugin } from "../types.js"; export interface KeyringCredentialData { trader: Address; policyId: number; chainId: number; validUntil: number; cost: number; key: Hex; signature: Hex; backdoor: Hex; } export declare class KeyringPluginAdapter { constructor(buildQuery?: BuildQueryFn); /** * Check if an account has a valid Keyring credential (or wildcard) on a hook target. */ queryKeyringCheckCredential: (provider: PublicClient, hookTarget: Address, account: Address) => Promise; /** * Read the policyId from a hook target contract. Falls back to `getPolicyId()` * for integrator hook targets (e.g. HookTargetAccessControlKeyringUnwind) that * expose `get`-prefixed getters instead of Euler's public immutables. */ queryKeyringPolicyId: (provider: PublicClient, hookTarget: Address) => Promise; /** * Read the keyring credentials contract address from a hook target. Falls back * to `getKeyring()` for integrator hook targets that use `get`-prefixed getters. */ queryKeyringAddress: (provider: PublicClient, hookTarget: Address) => Promise
; } export interface KeyringPluginConfig { /** Known Keyring hook target addresses per chain. Only vaults with these hookTargets will be handled. */ hookTargets: Record; /** Callback to get credential data. Called when a vault requires keyring and the account doesn't have a valid credential. */ getCredentialData: (args: { chainId: number; account: Address; hookTarget: Address; policyId: number; }) => Promise; buildQuery?: BuildQueryFn; } export declare function createKeyringPlugin(config: KeyringPluginConfig): EulerPlugin; //# sourceMappingURL=keyringPlugin.d.ts.map