UNPKG

sui-svelte-wallet-kit

Version:

Svelte 5 wallet kit for Sui: connect wallets, manage accounts, SuiNS, balance, sign transactions/messages

46 lines (45 loc) 1.44 kB
/** * PasskeyService * Handles WebAuthn operations for passkey creation and authentication */ import { type PasskeyCreateOptions, type PasskeyCredential, type PasskeyAuthOptions, type PasskeyAuthResult, type PasskeyConfig } from './types.js'; /** * PasskeyService class for WebAuthn passkey operations */ export declare class PasskeyService { private config; constructor(config: PasskeyConfig); /** * Validate passkey configuration */ private validateConfig; /** * Check if WebAuthn is supported in the current browser */ static isSupported(): boolean; /** * Check if platform authenticator is available (Face ID, Touch ID, Windows Hello) */ static isPlatformAuthenticatorAvailable(): Promise<boolean>; /** * Create a new passkey credential */ createCredential(options: PasskeyCreateOptions): Promise<PasskeyCredential>; /** * Authenticate with existing passkey credential */ authenticate(options: PasskeyAuthOptions): Promise<PasskeyAuthResult>; /** * Extract public key from attestation response * Returns the raw secp256r1 public key bytes (65 bytes: 0x04 || x || y) */ private extractPublicKey; /** * Derive Sui address from secp256r1 public key */ deriveSuiAddress(publicKey: Uint8Array): Promise<string>; /** * Get the current configuration */ getConfig(): PasskeyConfig; }