import { Device } from 'react-native-ble-plx'; import { Connection } from '@solana/web3.js'; import type { SolanaIntent } from '../intent'; import type { OfflineTransaction } from '../types/nonceAccount'; import type { TossUser } from '../types/tossUser'; import { NonceAccountManager } from '../client/NonceAccountManager'; /** * State for BLE transaction transmission */ export interface BLETransmissionState { isTransmitting: boolean; progress: { sentFragments: number; totalFragments: number; messageId?: string; }; error?: string; lastSent?: { messageId: string; timestamp: number; }; } /** * State for offline transaction preparation */ export interface OfflineTransactionState { isPreparing: boolean; transaction?: OfflineTransaction; error?: string; isReady: boolean; } /** * useOfflineTransaction Hook * Manages offline transaction creation with nonce accounts * Handles biometric protection and secure storage */ export declare function useOfflineTransaction(user: TossUser, connection: Connection): { createOfflineTransaction: (instructions: any[], metadata?: { description?: string; tags?: string[]; }) => Promise; clearTransaction: () => void; nonceManager: NonceAccountManager | null; isPreparing: boolean; transaction?: OfflineTransaction; error?: string; isReady: boolean; }; /** * useBLETransactionTransmission Hook * Handles secure BLE transmission of fragmented transactions * with Noise Protocol encryption */ export declare function useBLETransactionTransmission(platform?: 'android' | 'ios'): { sendTransactionBLE: (device: Device, transaction: OfflineTransaction | SolanaIntent, sendFn: (deviceId: string, characteristicUUID: string, data: Buffer) => Promise, noiseEncryptFn?: (data: Uint8Array) => Promise, isIntent?: boolean) => Promise; receiveTransactionFragment: (fragment: any, noiseDecryptFn?: (encrypted: any) => Promise) => Promise<{ complete: boolean; transaction?: OfflineTransaction | SolanaIntent; progress: { received: number; total: number; }; }>; getMTUConfig: () => import("..").BLEMTUConfig; setMTUConfig: (config: Partial) => void; isTransmitting: boolean; progress: { sentFragments: number; totalFragments: number; messageId?: string; }; error?: string; lastSent?: { messageId: string; timestamp: number; }; }; /** * useNonceAccountManagement Hook * Manages nonce account lifecycle: creation, renewal, revocation */ export declare function useNonceAccountManagement(user: TossUser, connection: Connection): { isLoading: boolean; error: string | undefined; createNonceAccount: (userKeypair: any) => Promise; renewNonceAccount: () => Promise; revokeNonceAccount: () => Promise; isNonceAccountValid: () => boolean; hasNonceAccount: boolean; }; //# sourceMappingURL=useOfflineBLETransactions.d.ts.map