UNPKG

bigblocks

Version:

Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React

160 lines 4.11 kB
export declare enum SchemaType { Person = "Person", Organization = "Organization" } export interface AuthUserWithBAP { id: string; address: string; idKey: string; profiles: unknown[]; activeProfileId: string; bapInstance?: ExtendedBAP; masterKey?: string; xprv?: string; } export type BapAddress = { address: string; txId: string; block: number; }; export interface BapIdentitySchema { "@context"?: string; "@type": SchemaType; alternateName?: string; description?: string; image?: string; logo?: string; address?: string; url?: string; email?: string; givenName?: string; familyName?: string; legalName?: string; paymail?: string; bitcoinAddress?: string; banner?: string; } export type IdentityData = { addresses?: BapAddress[]; block: number; currentAddress: string; firstSeen: number; idKey: string; identity: BapIdentitySchema; rootAddress: string; timestamp: number; valid: boolean; }; export interface KeyRotationOptions { autoBackup?: boolean; customBroadcast?: (tx: string) => Promise<string>; } export interface KeyRotationResult { success: boolean; data?: { newPath: string; newAddress: string; txid: string; }; error?: Error; } export interface UseBapKeyRotationOptions { autoRotate?: boolean; rotationInterval?: number; } export interface BapIdentity { idKey: string; rootPath: string; currentPath: string; } export interface BapIdentityType42 { idKey: string; counter: number; address: string; } export interface BapIdentityInstance { exportMemberBackup(): { derivedPrivateKey?: string; derivedPublicKey?: string; idKey?: string; }; getCurrentAddress(): string; getIdTransaction(path: string): string[]; signMessage(message: number[], signingPath?: string): { address: string; signature: string; }; getEncryptionKey(): { privKey: import("@bsv/sdk").PrivateKey; pubKey: import("@bsv/sdk").PublicKey; }; getEncryptionKeyType42(): { privKey: import("@bsv/sdk").PrivateKey; pubKey: import("@bsv/sdk").PublicKey; }; getEncryptionPublicKey(): string; encrypt(stringData: string, counterPartyPublicKey?: string): string; decrypt(ciphertext: string, counterPartyPublicKey?: string): string; } export interface ExtendedBAP { listIds(): BapIdentity[]; getAddress(rootPath: string, currentPath: string): string; newId(idKey: string): boolean; getId(idKey: string): BapIdentityInstance | null; getCurrentPublicKey(): string | undefined; } export interface BapKeyRotationManagerProps { /** * The BAP instance for the current identity */ bapInstance: ExtendedBAP; /** * Callback when rotation is complete */ onRotationComplete?: (newPath: string, txid: string) => void; /** * Whether to show rotation history */ showRotationHistory?: boolean; /** * Whether to auto-backup after rotation */ autoBackupAfterRotation?: boolean; /** * Custom broadcast function (defaults to using built-in broadcaster) */ onBroadcast?: (tx: string) => Promise<string>; /** * Theme variant for the component */ variant?: "surface" | "ghost" | "classic"; /** * Size of the component */ size?: "1" | "2" | "3"; } export interface BapKeyRotationEvent { id: string; timestamp: Date; fromPath: string; toPath: string; fromAddress: string; toAddress: string; txid: string; blockHeight?: number; status: "pending" | "confirmed" | "failed"; } export interface KeyRotationHistory { events: BapKeyRotationEvent[]; currentPath: string; currentAddress: string; rootPath: string; rootAddress: string; } export interface RotationConfirmationData { currentAddress: string; newAddress: string; estimatedFee: number; warningMessage?: string; } //# sourceMappingURL=identity.d.ts.map