import { T as Transport, P as PasskeyAssertor, R as RelyingPartyOriginInput } from './interfaces-_8SljvDt.js'; import { P as PostMessageType, a as PostMessageMethod } from './post-message-ufv3D_fs.js'; import { WalletChain, WalletImportSource, BitcoinAddressType } from './types/index.js'; interface ScopedPresenceToken { token: string; expiresAt: number; } interface GetInternalPresenceTokensResult { tokens: Record; tokenBatches: Record; dekBootstrapRequired: boolean; userHandleB64url: string; credentialIdB64url: string; } declare const SESSION_PRESENCE_SCOPES: ReadonlySet; declare const OTP_PRESENCE_SCOPES: ReadonlySet; declare const PASSKEY_ONLY_PRESENCE_SCOPES: ReadonlySet; interface PresenceOtpCodeRequest { publishableKey: string; expiresAt?: number; challengeId?: string; attempt?: number; error?: string; } type PresenceOtpCodeProvider = (request: PresenceOtpCodeRequest) => Promise; type PresenceOtpSettledHandler = (request: PresenceOtpCodeRequest) => void; declare const registerPresenceOtpCodeProvider: (publishableKey: string, provider: PresenceOtpCodeProvider, onSettled?: PresenceOtpSettledHandler) => (() => void); declare const PRESENCE_OTP_MAX_ATTEMPTS = 5; declare const getInternalPresenceTokens: ({ transport, passkey, publishableKey, relyingPartyOrigin, scopes, scopeCounts, requestOtpCode, walletId, }: { transport: Transport; passkey: PasskeyAssertor; publishableKey: string; relyingPartyOrigin: RelyingPartyOriginInput; scopes?: readonly string[]; scopeCounts?: Record; requestOtpCode?: PresenceOtpCodeProvider; walletId?: string; }) => Promise; declare const flattenPresenceTokens: (result: Pick & Partial) => Record; declare const flattenPresenceTokenBatches: (tokenBatches: GetInternalPresenceTokensResult["tokenBatches"]) => Record; type PresenceScope = "dek_bootstrap" | "keyshare_write" | "keyshare_read" | "passkey_enroll" | "passkey_remove" | "wrap_add" | "wrap_remove" | "ephemeral_signer_provision" | "ephemeral_signer_revoke" | "key_prove" | "key_export" | "login_method_add" | "login_method_remove" | "sign"; declare const SCOPES_CREATE_WALLET: readonly PresenceScope[]; declare const SCOPES_IMPORT_KEY: readonly PresenceScope[]; declare const SCOPES_REMOVE_PASSKEY: readonly PresenceScope[]; declare const SCOPES_LINK_LOGIN_METHOD: readonly PresenceScope[]; declare const SCOPES_UNLINK_LOGIN_METHOD: readonly PresenceScope[]; declare const SCOPES_REMOVE_KMS_WRAP: readonly PresenceScope[]; declare const SCOPES_ADD_PASSKEY: readonly PresenceScope[]; declare const SCOPE_PROVISION_EPHEMERAL_SIGNER: "ephemeral_signer_provision"; declare const SCOPES_PROVISION_EPHEMERAL_SIGNER: readonly ["keyshare_read"]; declare const SCOPES_REVOKE_EPHEMERAL_SIGNER: readonly PresenceScope[]; declare const SCOPES_SIGN: readonly PresenceScope[]; declare const SCOPES_EXPORT_KEY: readonly PresenceScope[]; type RegisterCreateWalletChain = "solana" | "ethereum" | "tron"; interface RegisterCreateWalletSpec { chain: RegisterCreateWalletChain; } declare const MAX_REGISTER_CREATE_TOKENS_PER_CEREMONY = 64; /** * Runtime validation for the public registerPasskey({ createWallets }) input. * * TypeScript callers normally get this shape checked at compile time, but the * package is also consumed from JavaScript. Validation must happen before the * native/browser credential-create call: rejecting after that call leaves an * OS passkey that was never registered with MoonX. */ declare const validateRegisterCreateWallets: (value: unknown) => RegisterCreateWalletSpec[]; declare const scopeCountsForRegisterCreate: (wallets: readonly RegisterCreateWalletSpec[]) => Record; interface BulkImportKeySpec { chain: WalletChain; source: string | WalletImportSource; addressType?: BitcoinAddressType; } declare const MAX_BULK_IMPORT_KEYS_PER_REQUEST = 20; /** * Runtime validation for the public bulkImport(keys) input. TypeScript * callers get this shape checked at compile time, but the package is also * consumed from JavaScript. Validation must happen before the WebAuthn * ceremony fires — rejecting after it would spend the user's one biometric * tap on a request that was always going to fail. * * Only shape (chain + presence of source material) is checked here; the key * material itself (hex/mnemonic format, derivation params) is validated * per-key inside the iframe's prepareWalletImport, same as the existing * single-key importKey path. */ declare const validateBulkImportKeys: (value: unknown) => BulkImportKeySpec[]; declare const scopeCountsForBulkImport: (keys: readonly BulkImportKeySpec[]) => Record; interface RegisterCreatedWallet { id: string; public_address: string; wallet_type: string; } interface RegistrationWalletClient { send, Response = unknown>(type: PostMessageType, method: PostMessageMethod | string, payload?: Payload): Promise; } type TokenBatches$1 = Record; interface CreateWalletsArgs { client: RegistrationWalletClient; publishableKey: string; createWallets: readonly RegisterCreateWalletSpec[]; userHandleB64url: string; credentialIdB64url: string; tokenBatches?: TokenBatches$1; } declare function createWalletsForRegistration({ client, publishableKey, createWallets, userHandleB64url, credentialIdB64url, tokenBatches, }: CreateWalletsArgs): Promise; interface BulkImportedWallet { id: string; public_address: string; wallet_type: string; derivation_path: string; } type BulkImportFailureScope = "key" | "batch"; interface BulkImportFailure { index: number; chain: BulkImportKeySpec["chain"]; reason: string; retryable: boolean; scope: BulkImportFailureScope; } declare const NON_RETRYABLE_FAILURE_REASONS: ReadonlySet; declare const BATCH_SCOPED_FAILURE_REASONS: ReadonlySet; interface BulkImportResult { wallets: BulkImportedWallet[]; failures: BulkImportFailure[]; } interface BulkImportWalletClient { send, Response = unknown>(type: PostMessageType, method: PostMessageMethod | string, payload?: Payload): Promise; } type TokenBatches = Record; interface BulkImportWalletsArgs { client: BulkImportWalletClient; publishableKey: string; keys: readonly BulkImportKeySpec[]; userHandleB64url: string; credentialIdB64url: string; tokenBatches?: TokenBatches; dekBootstrapRequired?: boolean; } declare function bulkImportWallets({ client, publishableKey, keys, userHandleB64url, credentialIdB64url, tokenBatches, dekBootstrapRequired, }: BulkImportWalletsArgs): Promise; export { bulkImportWallets as A, type BulkImportKeySpec as B, createWalletsForRegistration as C, flattenPresenceTokenBatches as D, flattenPresenceTokens as E, getInternalPresenceTokens as F, type GetInternalPresenceTokensResult as G, registerPresenceOtpCodeProvider as H, scopeCountsForBulkImport as I, scopeCountsForRegisterCreate as J, validateBulkImportKeys as K, validateRegisterCreateWallets as L, MAX_BULK_IMPORT_KEYS_PER_REQUEST as M, NON_RETRYABLE_FAILURE_REASONS as N, OTP_PRESENCE_SCOPES as O, PASSKEY_ONLY_PRESENCE_SCOPES as P, type RegisterCreateWalletChain as R, SCOPES_ADD_PASSKEY as S, type BulkImportFailure as a, BATCH_SCOPED_FAILURE_REASONS as b, type BulkImportFailureScope as c, type BulkImportResult as d, type BulkImportedWallet as e, MAX_REGISTER_CREATE_TOKENS_PER_CEREMONY as f, PRESENCE_OTP_MAX_ATTEMPTS as g, type PresenceOtpCodeProvider as h, type PresenceOtpCodeRequest as i, type PresenceOtpSettledHandler as j, type PresenceScope as k, type RegisterCreateWalletSpec as l, type RegisterCreatedWallet as m, SCOPES_CREATE_WALLET as n, SCOPES_EXPORT_KEY as o, SCOPES_IMPORT_KEY as p, SCOPES_LINK_LOGIN_METHOD as q, SCOPES_PROVISION_EPHEMERAL_SIGNER as r, SCOPES_REMOVE_KMS_WRAP as s, SCOPES_REMOVE_PASSKEY as t, SCOPES_REVOKE_EPHEMERAL_SIGNER as u, SCOPES_SIGN as v, SCOPES_UNLINK_LOGIN_METHOD as w, SCOPE_PROVISION_EPHEMERAL_SIGNER as x, SESSION_PRESENCE_SCOPES as y, type ScopedPresenceToken as z };