import { Token } from "./common/types"; import { AgentPublicKey, AirEventListener, AirLoginResult, 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; }): 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; registerAgentKey(publicKey: 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` is set) 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. Required for `SD_JWT_VC` * programs; ignored for other program types. Bound into the key-binding JWT * as `nonce` */ verifyCredential({ authToken, programId, redirectUrl, fieldsToDisclose, nonce, headless, }: { authToken: string; programId: string; redirectUrl?: string; fieldsToDisclose?: "*" | string[]; /** * Challenge for SD-JWT key binding. Required for `SD_JWT_VC` programs; * omit for other program types. Bound into the key-binding JWT as `nonce` */ nonce?: string; headless?: boolean; }): Promise; } export default AirService;