import type { TActivityId, TActivityStatus } from "@turnkey/http"; import type { WalletInterface, WalletStamper } from "@turnkey/wallet-stamper"; import type { WebauthnStamper } from "@turnkey/webauthn-stamper"; import type { IframeStamper } from "@turnkey/iframe-stamper"; import type { IndexedDbStamper } from "@turnkey/indexed-db-stamper"; import type { SessionType } from "@turnkey/sdk-types"; export type GrpcStatus = { message: string; code: number; details: unknown[] | null; }; export declare enum MethodType { Get = 0, List = 1, Command = 2 } export type TStamp = { stampHeaderName: string; stampHeaderValue: string; }; export interface TStamper { stamp: (input: string) => Promise; } export type THttpConfig = { baseUrl: string; }; export declare class TurnkeyRequestError extends Error { details: any[] | null; code: number; constructor(input: GrpcStatus); } export interface ActivityResponse { activity: { id: TActivityId; status: TActivityStatus; result: Record; }; } export interface ActivityMetadata { activity: { id: TActivityId; status: TActivityStatus; }; } export type TActivityPollerConfig = { intervalMs: number; numRetries: number; }; interface BaseSDKClientConfig { apiBaseUrl: string; organizationId: string; activityPoller?: TActivityPollerConfig | undefined; } interface SDKClientConfigWithStamper extends BaseSDKClientConfig { stamper: TStamper; readOnlySession?: never; } interface SDKClientConfigWithReadOnlySession extends BaseSDKClientConfig { stamper?: never; readOnlySession: string; } export type TurnkeySDKClientConfig = SDKClientConfigWithStamper | SDKClientConfigWithReadOnlySession; export interface TurnkeySDKBrowserConfig { apiBaseUrl: string; defaultOrganizationId: string; rpId?: string; serverSignUrl?: string; iframeUrl?: string; dangerouslyOverrideIframeKeyTtl?: number; } export type Stamper = WebauthnStamper | IframeStamper | WalletStamper | IndexedDbStamper; export type queryOverrideParams = { organizationId?: string; }; export type commandOverrideParams = { organizationId?: string; timestampMs?: string; }; export interface IframeClientParams { iframeContainer: HTMLElement | null | undefined; iframeUrl: string; iframeElementId?: string; dangerouslyOverrideIframeKeyTtl?: number; } export interface PasskeyClientParams { rpId?: string; timeout?: number; userVerification?: UserVerificationRequirement; allowCredentials?: PublicKeyCredentialDescriptor[]; } export interface RefreshSessionParams { sessionType?: SessionType; expirationSeconds?: string; invalidateExisting?: boolean; publicKey?: string; } export interface LoginWithBundleParams { bundle: string; expirationSeconds?: string; } export interface LoginWithPasskeyParams { publicKey?: string; organizationId?: string; sessionType: SessionType; expirationSeconds?: string | undefined; } export interface LoginWithWalletParams { publicKey?: string; organizationId?: string; sessionType: SessionType; expirationSeconds?: string | undefined; } export interface TurnkeyWalletClientConfig extends SDKClientConfigWithStamper { wallet: WalletInterface; } /** * The Client used to authenticate the user. */ export declare enum AuthClient { Passkey = "passkey", Wallet = "wallet", Iframe = "iframe", IndexedDb = "indexed-db" } export {}; //# sourceMappingURL=base.d.ts.map