import type { AirOid4vpRequestInput } from "./common/air/oid4vp/types"; import { Token } from "./common/types"; import { AgentPublicKey, AirEventListener, AirLoginResult, AirOid4vpResult, AirSessionConfig, AirUserDetails, BUILD_ENV, BUILD_ENV_TYPE, ClaimAirIdOptions, ClaimAirIdResult, CredentialNetwork, CredentialVerificationResult, EIP1193Provider, ShowSwapUIOptions, ShowTransferUIOptions, ShowTransferUIResult, StartRecoveryPayload } from "./interfaces"; declare class AirService { #private; constructor({ partnerId }: { partnerId: string; }); get buildEnv(): BUILD_ENV_TYPE | undefined; get isInitialized(): boolean; get isLoggedIn(): boolean; get loginResult(): AirLoginResult | undefined; get isWalletInitialized(): boolean; get provider(): EIP1193Provider; private shouldEnableAutomation; init(config: ({ buildEnv?: Exclude; credentialNetwork?: never; } | { buildEnv?: typeof BUILD_ENV.PRODUCTION; credentialNetwork?: Extract; }) & { enableLogging?: boolean; skipRehydration?: boolean; preloadWallet?: boolean; preloadCredential?: boolean; sessionConfig?: Partial; }): Promise; login(options?: { authToken?: string; loginModalDismissible?: boolean; }): Promise; /** * @experimental This method is experimental and will change in the future. */ deploySmartAccount(): Promise<{ txHash: string; }>; /** * @experimental This method is experimental and will change in the future. */ isSmartAccountDeployed(): Promise; getProvider(): EIP1193Provider; preloadWallet(): Promise; setupOrUpdateMfa(): Promise; /** * @experimental This feature has not been officially released and might change in the future. */ claimAirId(options?: ClaimAirIdOptions): Promise; /** * @experimental This feature has not been officially released and might change in the future. */ showSwapUI(options?: ShowSwapUIOptions): Promise<{ txHash: `0x${string}`; from: Token & { amount: string; }; to: Token & { amount: string; }; }>; /** * @experimental This feature has not been officially released and might change in the future. */ showOnRampUI(options: { displayCurrencyCode: string; targetCurrencyCode?: string; }): Promise; /** * @experimental This feature has not been officially released and might change in the future. */ showTransferUI(options?: ShowTransferUIOptions): Promise; /** * @experimental This feature has not been officially released and might change in the future. */ showReceiveUI(): Promise; getAgentKeys(): Promise; /** * Bind an agent key for the logged-in holder. * `publicKey` is required only when `scope` includes `wallet.sign` (PIN MFA). * Credential-only scopes may omit it, same as partner REST bind. */ registerAgentKey(options?: { publicKey?: string; scope?: string; }): Promise; removeAgentKey(id: string): Promise; getUserInfo(): Promise; updateSessionConfig(config: Partial): Promise; goToPartner(partnerUrl: string): Promise<{ urlWithToken: string; }>; startRecovery(payload?: StartRecoveryPayload): Promise; getAccessToken(): Promise<{ token: string; }>; logout(): Promise; cleanUp(): Promise; on(listener: AirEventListener): void; off(listener: AirEventListener): void; preloadCredential(): Promise; /** * @param headless When true, never shows the credential UI: confirmation is * granted and the result is returned automatically. Where the interactive flow * would prompt to reissue an existing on-chain credential, headless resolves * without reissuing. Errors that would otherwise require a user-facing CTA * reject the returned promise instead. */ issueCredential({ authToken, issuerDid, credentialId, credentialSubject, curve, waitForOnchainCompletion, headless, }: { authToken: string; issuerDid: string; credentialId: string; credentialSubject: Record; curve?: "secp256r1" | "secp256k1"; waitForOnchainCompletion?: boolean; headless?: boolean; }): Promise<{ cakPublicKey?: string; }>; /** * @param headless When true, never shows the credential UI: consent is granted, * disclosure (if `fieldsToDisclose` lists claims or is `"*"`) is signed, and the result is returned * automatically. `redirectUrl` is ignored in this mode. Errors that would otherwise * require a user-facing CTA (e.g. an unrecoverable technical failure) reject the * returned promise instead. * @param nonce Challenge for SD-JWT key binding. Optional; ignored for non * `SD_JWT_VC` programs. When provided, bound into the key-binding JWT as * `nonce`. When `undefined`, the presentation omits the KB-JWT. * @param fieldsToDisclose Selective claim paths, or `"*"` for every disclosable * claim. Omit or pass `[]` to present only plaintext SD-JWT claims. */ verifyCredential({ authToken, programId, redirectUrl, fieldsToDisclose, nonce, headless, }: { authToken: string; programId: string; redirectUrl?: string; fieldsToDisclose?: "*" | string[]; /** * Challenge for SD-JWT key binding. Optional; ignored for non-`SD_JWT_VC` * programs. Bound into the key-binding JWT as `nonce` when provided. * Omit or pass `undefined` to skip the KB-JWT signature. */ nonce?: string; headless?: boolean; }): Promise; requestOid4vp({ authToken, request, headless, }: { authToken: string; request: AirOid4vpRequestInput; headless?: boolean; }): Promise; } export default AirService;