import { Bytes } from '../types/index.js'; import { Signer } from './signer.js'; import { SigningEnvelope } from './envelope.js'; import { BitcoinAddress } from '../address/index.js'; /** * Bitcoin wallet signer that automatically adds Bitcoin message prefix */ export declare abstract class BitcoinWalletSigner extends Signer { readonly autoPrefix: boolean; abstract getBitcoinAddress(): BitcoinAddress; } /** * WebAuthn signer that provides assertion-based signing */ export declare abstract class WebAuthnSigner extends Signer { abstract signAssertion(challenge: Bytes): Promise; } /** * Type guard to check if a signer is a Bitcoin wallet signer */ export declare function isBitcoinWalletSigner(signer: Signer): signer is BitcoinWalletSigner; /** * Type guard to check if a signer is a WebAuthn signer */ export declare function isWebAuthnSigner(signer: Signer): signer is WebAuthnSigner; export declare class BitcoinSignMessage { readonly messagePrefix: string; readonly messageInfo: string; readonly txHash: Bytes; constructor(txData: Bytes, messageInfo: string); raw(): string; encode(): Bytes; hash(): Bytes; } export declare enum BuiltinAuthValidator { ROOCH = 0, SESSION = 0, BITCOIN = 1, BITCOIN_MULTISIGN = 2, WEBAUTHN = 3, DID = 4 } export declare class Authenticator { readonly authValidatorId: number; readonly payload: Bytes; constructor(authValidatorId: number, payload: Bytes); encode(): Bytes; static rooch(input: Bytes, signer: Signer): Promise; static session(input: Bytes, signer: Signer): Promise; static bitcoin(input: BitcoinSignMessage, signer: Signer, signWith?: 'hash' | 'raw'): Promise; static did(txHash: Bytes, signer: Signer, vmFragment: string, envelope?: SigningEnvelope): Promise; static didBitcoinMessage(txHash: Bytes, signer: Signer, vmFragment: string): Promise; static didWebAuthn(txHash: Bytes, signer: Signer, vmFragment: string): Promise; } export interface DIDAuthPayload { envelope: number; vmFragment: string; signature: string | Uint8Array; message: string | Uint8Array | null | undefined; } export declare class DIDAuthenticator { static sign(txHash: Bytes, signer: Signer, vmFragment: string, envelope?: SigningEnvelope): Promise; static signWebAuthn(txHash: Bytes, vmFragment: string, response: AuthenticatorAssertionResponse): Promise; }