import { z } from "zod"; import { BaseAlchemySigner } from "./base.js"; import { AlchemySignerWebClient } from "./client/index.js"; import type { CredentialCreationOptionOverrides, VerifyMfaParams } from "./client/types.js"; export type AccessKeyAuthParams = { accessKey: string; accountId?: string; }; export type AuthParams = { type: "email"; email: string; /** @deprecated This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. */ emailMode?: "magicLink" | "otp"; redirectParams?: URLSearchParams; multiFactors?: VerifyMfaParams[]; } | { type: "email"; bundle: string; orgId?: string; isNewUser?: boolean; } | { type: "sms"; phone: string; } | { type: "passkey"; email: string; creationOpts?: CredentialCreationOptionOverrides; } | { type: "passkey"; createNew: false; } | { type: "passkey"; createNew: true; username: string; creationOpts?: CredentialCreationOptionOverrides; } | ({ type: "oauth"; scope?: string; claims?: string; otherParameters?: Record; } & OauthProviderConfig & OauthRedirectConfig) | { type: "oauthReturn"; bundle: string; orgId: string; idToken: string; accessToken?: string; isNewUser?: boolean; } | { type: "custom-jwt"; jwt: string; authProviderId?: string; } | { type: "otp"; otpCode: string; multiFactors?: VerifyMfaParams[]; } | ({ type: "accessKey"; } & AccessKeyAuthParams); export type OauthProviderConfig = { authProviderId: "auth0"; isCustomProvider?: false; auth0Connection?: string; } | { authProviderId: KnownAuthProvider; isCustomProvider?: false; auth0Connection?: never; } | { authProviderId: string; isCustomProvider: true; auth0Connection?: never; }; export type OauthRedirectConfig = { mode: "redirect"; redirectUrl: string; } | { mode: "popup"; redirectUrl?: never; }; export type KnownAuthProvider = "google" | "apple" | "facebook" | "twitch" | "auth0"; export type OauthMode = "redirect" | "popup"; export declare const AlchemySignerParamsSchema: z.ZodObject<{ client: z.ZodUnion<[z.ZodType, z.ZodObject<{ connection: z.ZodIntersection; apiKey: z.ZodString; jwt: z.ZodOptional; }, "strip", z.ZodTypeAny, { apiKey: string; rpcUrl?: undefined; jwt?: undefined; }, { apiKey: string; rpcUrl?: undefined; jwt?: undefined; }>, z.ZodObject<{ rpcUrl: z.ZodOptional; apiKey: z.ZodOptional; jwt: z.ZodString; }, "strip", z.ZodTypeAny, { jwt: string; rpcUrl?: undefined; apiKey?: undefined; }, { jwt: string; rpcUrl?: undefined; apiKey?: undefined; }>, z.ZodObject<{ rpcUrl: z.ZodString; apiKey: z.ZodOptional; jwt: z.ZodOptional; }, "strip", z.ZodTypeAny, { rpcUrl: string; apiKey?: undefined; jwt?: undefined; }, { rpcUrl: string; apiKey?: undefined; jwt?: undefined; }>, z.ZodObject<{ rpcUrl: z.ZodString; apiKey: z.ZodOptional; jwt: z.ZodString; }, "strip", z.ZodTypeAny, { rpcUrl: string; jwt: string; apiKey?: undefined; }, { rpcUrl: string; jwt: string; apiKey?: undefined; }>]>, z.ZodObject<{ chainAgnosticUrl: z.ZodOptional; }, "strip", z.ZodTypeAny, { chainAgnosticUrl?: string | undefined; }, { chainAgnosticUrl?: string | undefined; }>>; iframeConfig: z.ZodObject<{ iframeElementId: z.ZodDefault; iframeContainerId: z.ZodString; }, "strip", z.ZodTypeAny, { iframeElementId: string; iframeContainerId: string; }, { iframeContainerId: string; iframeElementId?: string | undefined; }>; rpId: z.ZodOptional; rootOrgId: z.ZodDefault>; oauthCallbackUrl: z.ZodDefault>; enablePopupOauth: z.ZodDefault>; }, "strip", z.ZodTypeAny, { connection: ({ apiKey: string; rpcUrl?: undefined; jwt?: undefined; } | { jwt: string; rpcUrl?: undefined; apiKey?: undefined; } | { rpcUrl: string; apiKey?: undefined; jwt?: undefined; } | { rpcUrl: string; jwt: string; apiKey?: undefined; }) & { chainAgnosticUrl?: string | undefined; }; iframeConfig: { iframeElementId: string; iframeContainerId: string; }; rootOrgId: string; oauthCallbackUrl: string; enablePopupOauth: boolean; rpId?: string | undefined; }, { connection: ({ apiKey: string; rpcUrl?: undefined; jwt?: undefined; } | { jwt: string; rpcUrl?: undefined; apiKey?: undefined; } | { rpcUrl: string; apiKey?: undefined; jwt?: undefined; } | { rpcUrl: string; jwt: string; apiKey?: undefined; }) & { chainAgnosticUrl?: string | undefined; }; iframeConfig: { iframeContainerId: string; iframeElementId?: string | undefined; }; rpId?: string | undefined; rootOrgId?: string | undefined; oauthCallbackUrl?: string | undefined; enablePopupOauth?: boolean | undefined; }>]>; } & { sessionConfig: z.ZodOptional; storage: z.ZodUnion<[z.ZodDefault>, z.ZodType]>; expirationTimeMs: z.ZodDefault; client: z.ZodType, z.ZodTypeDef, import("./index.js").BaseSignerClient>; }, "client">, "strip", z.ZodTypeAny, { storage: Storage | "localStorage" | "sessionStorage"; sessionKey: string; expirationTimeMs: number; }, { storage?: Storage | "localStorage" | "sessionStorage" | undefined; sessionKey?: string | undefined; expirationTimeMs?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { client: { connection: ({ apiKey: string; rpcUrl?: undefined; jwt?: undefined; } | { jwt: string; rpcUrl?: undefined; apiKey?: undefined; } | { rpcUrl: string; apiKey?: undefined; jwt?: undefined; } | { rpcUrl: string; jwt: string; apiKey?: undefined; }) & { chainAgnosticUrl?: string | undefined; }; iframeConfig: { iframeElementId: string; iframeContainerId: string; }; rootOrgId: string; oauthCallbackUrl: string; enablePopupOauth: boolean; rpId?: string | undefined; } | AlchemySignerWebClient; sessionConfig?: { storage: Storage | "localStorage" | "sessionStorage"; sessionKey: string; expirationTimeMs: number; } | undefined; }, { client: { connection: ({ apiKey: string; rpcUrl?: undefined; jwt?: undefined; } | { jwt: string; rpcUrl?: undefined; apiKey?: undefined; } | { rpcUrl: string; apiKey?: undefined; jwt?: undefined; } | { rpcUrl: string; jwt: string; apiKey?: undefined; }) & { chainAgnosticUrl?: string | undefined; }; iframeConfig: { iframeContainerId: string; iframeElementId?: string | undefined; }; rpId?: string | undefined; rootOrgId?: string | undefined; oauthCallbackUrl?: string | undefined; enablePopupOauth?: boolean | undefined; } | AlchemySignerWebClient; sessionConfig?: { storage?: Storage | "localStorage" | "sessionStorage" | undefined; sessionKey?: string | undefined; expirationTimeMs?: number | undefined; } | undefined; }>; export type AlchemySignerParams = z.input; /** * A SmartAccountSigner that can be used with any SmartContractAccount */ export declare class AlchemyWebSigner extends BaseAlchemySigner { private static replaceStateFilterInstalled; /** * Initializes an instance with the provided Alchemy signer parameters after parsing them with a schema. * * @example * ```ts * import { AlchemyWebSigner } from "@account-kit/signer"; * * const signer = new AlchemyWebSigner({ * client: { * connection: { * rpcUrl: "/api/rpc", * }, * iframeConfig: { * iframeContainerId: "alchemy-signer-iframe-container", * }, * }, * }); * ``` * * @param {AlchemySignerParams} params The parameters for the Alchemy signer, including the client and session configuration */ constructor(params: AlchemySignerParams); } //# sourceMappingURL=signer.d.ts.map