/** * 0xio SDK — Wallet Transport Adapter Interface * * Implement WalletTransportAdapter to add support for a new wallet without * touching any core SDK code. Drop the adapter file in src/supports/ and * pass it to ZeroXIOWallet via SDKConfig.adapter. * * @example * ```typescript * import { ZeroXIOWallet } from '@0xio/sdk'; * import { QubitzAdapter } from '@0xio/sdk/supports/qubitz'; * * const wallet = new ZeroXIOWallet({ * appName: 'My DApp', * adapter: QubitzAdapter, * }); * ``` */ /** * Outbound request — the SDK passes this to adapter.postRequest() for every * outbound wallet call. Adapters translate this into their wallet-specific wire format. */ interface AdapterRequest { /** Unique request ID (UUID). Used to correlate the response. */ id: string; /** Method name, e.g. 'connect', 'sendTransaction', 'signMessage' */ method: string; /** Method parameters */ params: unknown; /** Unix timestamp (ms) when the request was created */ timestamp: number; } /** * Normalized inbound message from a wallet. * Adapters translate their wallet-specific wire format into this structure * and pass it to the handler registered via listen(). * * A message is either a response (requestId set) or a push event (eventType set). */ interface AdapterIncomingMessage { /** Must match the id from the outbound AdapterRequest */ requestId?: string; /** Whether the request succeeded. Required when requestId is set. */ success?: boolean; /** Response payload on success */ data?: unknown; /** Structured error on failure */ error?: { code: string; message: string; details?: unknown; }; /** Event type, e.g. 'connect', 'disconnect', 'accountChanged', 'balanceChanged' */ eventType?: string; /** Event payload */ eventData?: unknown; } /** * Wallet transport adapter. * * Encapsulates the entire wallet-specific communication layer: * - How to detect if the wallet is installed * - How to send requests (postRequest) * - How to receive responses and events (listen) * * Everything else — request lifecycle, timeouts, retries, rate limiting, * event routing — is handled by the SDK core and does not change per wallet. * * @example Minimal adapter for a hypothetical wallet * ```typescript * export const MyWalletAdapter: WalletTransportAdapter = { * name: 'mywallet', * displayName: 'My Wallet', * detect: () => !!(window as any).myWallet, * postRequest: (req) => * window.postMessage({ source: 'mywallet-request', ...req }, location.origin), * listen: (handler) => { * const fn = (e: MessageEvent) => { * if (e.data?.source !== 'mywallet-response') return; * handler({ requestId: e.data.id, success: e.data.ok, data: e.data.result }); * }; * window.addEventListener('message', fn); * return () => window.removeEventListener('message', fn); * }, * }; * ``` */ interface WalletTransportAdapter { /** * Machine-readable wallet identifier. Used in logs and adapter selection. * Examples: '0xio', 'qubitz', 'fhex' */ readonly name: string; /** * Human-readable wallet name shown in error messages. * Examples: '0xio Wallet', 'Qubitz Wallet', 'FHEX Wallet' */ readonly displayName: string; /** * Returns true when this wallet's extension / injected provider is present * in the current page context. Called periodically by the SDK to check availability. */ detect(): boolean; /** * Send a request to the wallet. * Called once per outbound request — translate AdapterRequest into your * wallet's wire format and post it (window.postMessage, direct API call, etc.). */ postRequest(request: AdapterRequest): void; /** * Optional: send the same request to a trusted parent frame (iframe/desktop bridge). * Only implement this if your wallet supports an embedded iframe bridge mode. * The SDK calls this when window.parent !== window and a trusted parent origin exists. */ postRequestToParent?(request: AdapterRequest, parentOrigin: string): void; /** * Set up response and event listening. * The SDK calls this once during initialization. Normalise all incoming wallet * messages into AdapterIncomingMessage and pass them to handler. * * @param handler Callback for responses and push events * @param options SDK-level options, e.g. additional trusted parent origins * @returns A teardown function — the SDK calls it on cleanup() */ listen(handler: (msg: AdapterIncomingMessage) => void, options?: { trustedParentOrigins?: string[]; }): () => void; /** * Optional: register wallet-ready event listeners (e.g. 'myWalletReady' CustomEvent). * Called once during SDK init. When the wallet signals it is ready, call onReady(). * Returns a cleanup function. * * If not implemented, the SDK falls back to polling detect() every 2 seconds. */ listenForReady?(onReady: () => void): () => void; } /** * 0xio Wallet SDK - Type Definitions * Comprehensive type system for 0xio wallet integration with Octra Network */ interface WalletAddress { readonly address: string; readonly publicKey?: string; } interface Balance { readonly public: number; readonly private?: number; readonly total: number; readonly currency: 'OCT'; } interface NetworkInfo { readonly id: string; readonly name: string; readonly rpcUrl: string; readonly explorerUrl?: string; readonly explorerAddressUrl?: string; readonly indexerUrl?: string; readonly supportsPrivacy: boolean; readonly color: string; readonly isTestnet: boolean; } interface TransactionData { readonly to: string; /** Amount in OCT. Accepts string or number — use string for amounts above 9 billion OCT to avoid JS number precision loss. */ readonly amount: string | number; readonly message?: string; readonly feeLevel?: 1 | 3; readonly isPrivate?: boolean; } /** * Contract method arguments — flat array of AML-compatible values. * Supports primitives and base64-encoded binary data (e.g. FHE ciphers, proofs). * Use `[arg1, arg2]` NOT `[[arg1, arg2]]` — flat, not nested. */ type ContractParam = string | number | boolean; type ContractParams = ReadonlyArray; interface ContractCallData { /** Contract address (oct-prefixed, 47 chars) */ readonly contract: string; /** Contract method name (e.g. 'swap', 'open_private_account') */ readonly method: string; /** * Method arguments — flat primitives, NOT array-wrapped. * For FHE/PVAC operations, encode binary data as base64 strings: * `[base64(pvacPubkey), base64(zeroCipher), base64(zeroProof)]` */ readonly params: ContractParams; /** * Native OCT to send with the call (in OCT, same unit as sendTransaction.amount). * Set to '0' for calls that don't transfer native tokens. */ readonly amount?: string | number; /** * Operation units / gas limit (default: 10000). * Higher values for complex contract operations. * The approval popup shows this as the fee, separate from `amount`. */ readonly ou?: string | number; } interface ContractViewCallData { /** Contract address (oct-prefixed, 47 chars) */ readonly contract: string; /** Contract method name (e.g. 'balance_of', 'get_active_bin', 'is_paused') */ readonly method: string; /** Method arguments — flat primitives, NOT array-wrapped */ readonly params: ContractParams; /** Caller address for view context (defaults to connected wallet) */ readonly caller?: string; } interface SignedTransaction { readonly from: string; readonly to_: string; readonly amount: string; readonly nonce: string; readonly ou: string; readonly timestamp: string; readonly message?: string; readonly signature: string; readonly public_key: string; } type TransactionFinality = 'pending' | 'confirmed' | 'rejected' | 'dropped'; interface TransactionResult { /** RFC-O-1 canonical hash field */ readonly hash?: string; /** RFC-O-1 canonical accepted field */ readonly accepted?: boolean; /** RFC-O-1 status field */ readonly status?: TransactionFinality; /** @deprecated Use hash */ readonly txHash?: string; /** @deprecated Use accepted */ readonly success?: boolean; readonly finality?: TransactionFinality; readonly message?: string; readonly explorerUrl?: string; } interface TransactionHistory { readonly transactions: Transaction[]; readonly totalCount: number; readonly page: number; readonly hasMore: boolean; } interface Transaction { readonly hash: string; readonly from: string; readonly to: string; /** Amount in OCT as returned by the node (may be string or number depending on extension version). */ readonly amount: string | number; /** Fee in OCT as returned by the node (may be string or number depending on extension version). */ readonly fee: string | number; readonly timestamp: number; readonly status: 'pending' | 'confirmed' | 'failed' | 'dropped'; readonly finality?: TransactionFinality; readonly message?: string; readonly blockHeight?: number; } interface ConnectionInfo { isConnected: boolean; address?: string; publicKey?: string; balance?: Balance; networkInfo?: NetworkInfo; connectedAt?: number; permissions?: Permission[]; } interface ConnectOptions { /** RFC-O-1 canonical field name */ readonly permissions?: Permission[]; /** @deprecated Use permissions */ readonly requestPermissions?: Permission[]; readonly networkId?: string; } type Permission = 'read_address' | 'read_balance' | 'read_public_key' | 'send_transactions' | 'sign_messages' | 'contract_calls' | 'view_private_balance' | 'view_encrypted_balance' | 'private_transfers' | 'encrypt_balance' | 'decrypt_balance' | 'stealth_scan' | 'stealth_claim'; type WalletEventType = 'connect' | 'disconnect' | 'accountChanged' | 'balanceChanged' | 'networkChanged' | 'transactionConfirmed' | 'permissionsChanged' | 'message' | 'error' | 'extensionLocked' | 'extensionUnlocked'; interface WalletEvent { readonly type: WalletEventType; readonly data: T; readonly timestamp: number; } interface ConnectEvent { readonly address: string; readonly publicKey: string | undefined; readonly balance: Balance; readonly networkInfo: NetworkInfo; readonly permissions: Permission[]; } interface DisconnectEvent { readonly reason: 'user_action' | 'extension_unavailable' | 'network_error' | 'extension_locked'; } interface AccountChangedEvent { readonly previousAddress?: string; readonly newAddress: string; readonly balance: Balance; readonly publicKey?: string; } interface BalanceChangedEvent { readonly address: string; readonly previousBalance: Balance | undefined; readonly newBalance: Balance; } interface NetworkChangedEvent { readonly previousNetwork?: NetworkInfo; readonly newNetwork: NetworkInfo; } interface TransactionConfirmedEvent { readonly transaction: Transaction; } interface ErrorEvent { readonly code: ErrorCode; readonly message: string; readonly details?: any; } declare enum ErrorCode { EXTENSION_NOT_FOUND = "EXTENSION_NOT_FOUND", CONNECTION_REFUSED = "CONNECTION_REFUSED", USER_REJECTED = "USER_REJECTED", INSUFFICIENT_BALANCE = "INSUFFICIENT_BALANCE", INVALID_ADDRESS = "INVALID_ADDRESS", INVALID_AMOUNT = "INVALID_AMOUNT", NETWORK_ERROR = "NETWORK_ERROR", TRANSACTION_FAILED = "TRANSACTION_FAILED", SIGNATURE_FAILED = "SIGNATURE_FAILED", PERMISSION_DENIED = "PERMISSION_DENIED", WALLET_LOCKED = "WALLET_LOCKED", RATE_LIMIT_EXCEEDED = "RATE_LIMIT_EXCEEDED", UNKNOWN_ERROR = "UNKNOWN_ERROR", MALFORMED_TRANSACTION = "MALFORMED_TRANSACTION", SELF_TRANSFER = "SELF_TRANSFER", SENDER_NOT_FOUND = "SENDER_NOT_FOUND", INVALID_SIGNATURE = "INVALID_SIGNATURE", DUPLICATE_TRANSACTION = "DUPLICATE_TRANSACTION", NONCE_TOO_FAR = "NONCE_TOO_FAR", INTERNAL_ERROR = "INTERNAL_ERROR" } declare class ZeroXIOWalletError extends Error { readonly code: ErrorCode; readonly details?: any | undefined; constructor(code: ErrorCode, message: string, details?: any | undefined); } interface PrivateBalanceInfo { readonly hasPrivateBalance: boolean; readonly encryptedAmount?: string; readonly canDecrypt: boolean; } interface PrivateTransferData { readonly to: string; /** Amount in OCT. Accepts string or number — use string for amounts above 9 billion OCT to avoid JS number precision loss. */ readonly amount: string | number; readonly message?: string; } interface PendingPrivateTransfer { readonly id: string; readonly from: string; readonly encryptedAmount: string; readonly message?: string; readonly timestamp: number; readonly canClaim: boolean; } interface SDKConfig { readonly appName: string; readonly appDescription?: string; readonly appVersion?: string; readonly appUrl?: string; readonly appIcon?: string; readonly requiredPermissions?: Permission[]; readonly networkId?: string; readonly debug?: boolean; /** * Exact origins allowed as parent iframe bridge (e.g. 'https://app.example.com'). * When set, only these origins (plus tauri://) are trusted — implicit localhost trust * is disabled. Leave unset for development (all localhost trusted by default). */ readonly trustedParentOrigins?: string[]; /** * Custom wallet transport adapter. * Defaults to ZeroXIOAdapter (0xio extension postMessage protocol). * Pass an adapter from src/supports/ to target a different wallet. * * @example * import { QubitzAdapter } from '@0xio/sdk/supports/qubitz'; * new ZeroXIOWallet({ appName: 'My DApp', adapter: QubitzAdapter }); */ readonly adapter?: WalletTransportAdapter; } interface ExtensionRequest { readonly id: string; readonly method: string; readonly params: any; readonly timestamp: number; } interface ExtensionResponse { readonly id: string; readonly success: boolean; readonly data?: T; readonly error?: { code: ErrorCode; message: string; details?: any; }; readonly timestamp: number; } type EventListener = (event: WalletEvent) => void; declare class EventEmitter { private listeners; constructor(_debug?: boolean); on(eventType: WalletEventType, listener: EventListener): void; off(eventType: WalletEventType, listener: EventListener): void; once(eventType: WalletEventType, listener: EventListener): void; emit(eventType: WalletEventType, data: T): void; removeAllListeners(eventType?: WalletEventType): void; listenerCount(eventType: WalletEventType): number; eventTypes(): WalletEventType[]; hasListeners(eventType: WalletEventType): boolean; } declare class ZeroXIOWallet extends EventEmitter { private communicator; private config; private connectionInfo; private isInitialized; private _initPromise; private _sessionVersion; private logger; constructor(config: SDKConfig); initialize(): Promise; isReady(): boolean; connect(options?: ConnectOptions): Promise; /** * Disconnect from wallet */ disconnect(): Promise; /** * Check if connected to wallet */ isConnected(): boolean; /** * Get current connection info */ getConnectionInfo(): ConnectionInfo; /** * Check connection status with extension */ getConnectionStatus(): Promise; /** * Switch the extension's active network (e.g. 'mainnet' → 'devnet'). * Works silently — no popup, no user confirmation needed. * The extension broadcasts 'networkChanged' event to all connected dApps. */ switchNetwork(networkId: string): Promise<{ network: string; switched: boolean; }>; /** * Get the extension's current network ID ('mainnet' or 'devnet') */ getNetworkId(): string | null; getAddress(): string | null; getBalance(forceRefresh?: boolean): Promise; getNetworkInfo(): Promise; sendTransaction(txData: TransactionData): Promise; /** * Sign a transaction without broadcasting it (RFC-O-1 octra_signTransaction). * Returns the signed transaction object for manual submission via submitTransaction(). */ signTransaction(txData: TransactionData): Promise<{ signedTx: any; }>; /** * Broadcast a pre-signed transaction (RFC-O-1 octra_submitTransaction). * Use after signTransaction() to submit the signed tx to the network. */ submitTransaction(signedTx: any): Promise; /** * Call a smart contract method (state-changing). * The extension builds, signs, and submits the transaction via octra_submit. */ callContract(callData: ContractCallData): Promise; /** * Read-only contract view call (no signing, no approval popup). * Use this to query contract state without submitting a transaction. */ contractCallView(viewData: ContractViewCallData): Promise; /** * Read contract storage by key. */ getContractStorage(contract: string, key: string): Promise; /** * Get transaction history */ getTransactionHistory(page?: number, limit?: number): Promise; getPrivateBalanceInfo(): Promise; /** * Encrypt public balance to private */ encryptBalance(amount: string | number): Promise; /** * Decrypt private balance to public */ decryptBalance(amount: string | number): Promise; /** * Send a private (encrypted) transfer to another address. * The extension builds the PVAC ciphertext subtraction + range proof + zero proof, * then submits the encrypted transaction to the network. The recipient's encrypted * balance is updated by the node using re-encryption under their public key. * Requires 'private_transfers' permission. * @since 2.6.0 */ sendPrivateTransfer(transferData: PrivateTransferData): Promise; /** * Get pending private transfers that can be claimed by this wallet. * Returns transfers where the connected address is the recipient. * @since 2.6.0 */ getPendingPrivateTransfers(): Promise; /** * Claim a pending private transfer, adding it to the wallet's encrypted balance. * @since 2.6.0 */ claimPrivateTransfer(transferId: string): Promise; /** * Sign an arbitrary message with the wallet's private key * The user will be prompted to approve the signature request in the extension * @param message - The message to sign (non-empty string) * @returns Promise resolving to the base64-encoded Ed25519 signature * @throws ZeroXIOWalletError with code SIGNATURE_FAILED if signing fails * @example * ```typescript * const signature = await wallet.signMessage('Hello, 0xio!'); * console.log('Signature:', signature); * ``` */ signMessage(message: string): Promise; /** * Sign a domain-separated authentication message. * Unlike `signMessage()`, this prepends a standard header that binds the signature * to the calling service and a one-time nonce, preventing cross-service replay attacks. * * @param service - Identifies the relying service (e.g. 'MyDApp' or 'api.mydapp.com') * @param nonce - Unique one-time value — use a server-generated UUID or challenge * @returns Promise resolving to the base64-encoded Ed25519 signature */ signAuthMessage(service: string, nonce: string): Promise; private ensureInitialized; private ensureConnected; private setupExtensionEventListeners; private handleAccountChanged; private handleNetworkChanged; private handleBalanceChanged; private handleExtensionLocked; private handleExtensionUnlocked; private handleTransactionConfirmed; /** * Reject numeric amounts that cannot be represented exactly in micro-OCT. * e.g. 0.1 + 0.2 = 0.30000000000000004 — the extension would sign the wrong value. * String amounts bypass this check (caller is responsible for correctness). */ private assertExactOCTAmount; cleanup(): void; } declare class ExtensionCommunicator extends EventEmitter { private pendingRequests; private isInitialized; private logger; private extensionDetectionInterval; private isExtensionAvailableState; private trustedOrigins; private _parentOrigin; /** Pluggable transport — defaults to the 0xio postMessage protocol. */ private adapter; /** Teardown fn returned by adapter.listen() */ private _adapterTeardown; /** Teardown fn returned by adapter.listenForReady() */ private _adapterReadyTeardown; /** * Set when a trusted walletReady has been received from window.parent. * The polling fallback must NOT clear this flag. */ private _parentTrusted; /** walletReady postMessage listener stored for cleanup */ private _walletReadyMessageListener; /** * In-flight interactive request lock. * Methods that open approval popups are serialized — only one at a time. */ private _interactiveInFlight; private readonly MAX_CONCURRENT_REQUESTS; private readonly RATE_LIMIT_WINDOW; private readonly MAX_REQUESTS_PER_WINDOW; private requestTimestamps; constructor(debug?: boolean, trustedOrigins?: string[], adapter?: WalletTransportAdapter); setTrustedOrigins(origins: string[]): void; initialize(): Promise; isExtensionAvailable(): boolean; private static readonly NO_RETRY_METHODS; private static readonly INTERACTIVE_METHODS; sendRequest(method: string, params?: any, timeout?: number): Promise; sendRequestWithRetry(method: string, params?: any, maxRetries?: number, timeout?: number): Promise; private setupMessageListener; private static readonly VALID_EVENT_TYPES; private handleExtensionEvent; private handleExtensionResponse; private postMessageToExtension; private hasExtensionContext; private checkRateLimit; private generateRequestId; private startExtensionDetection; private checkExtensionAvailability; private detectExtensionSignals; private waitForExtensionAvailability; private getBrowserDiagnostics; private getExtensionDiagnostics; /** * Clean up SDK resources. * After cleanup() the instance is terminal — do not call initialize() again. * Construct a new instance instead. */ cleanup(): void; getDebugInfo(): { initialized: boolean; available: boolean; pendingRequests: number; hasExtensionContext: boolean; extensionDiagnostics: any; }; } /** * 0xio Wallet transport adapter. * * Implements the postMessage protocol used by the 0xio browser extension (>= v2.4.0). * * Outbound wire format: * window.postMessage({ source: '0xio-sdk-request', request: { id, method, params, timestamp } }, origin) * * Inbound wire format: * window.postMessage({ source: '0xio-sdk-bridge', response: { id, success, data, error }, sessionNonce }) * window.postMessage({ source: '0xio-sdk-bridge', event: { type, data } }) * * H-2: Session nonce validation — injected.ts broadcasts the nonce received from the * isolated content script. Once set, any '0xio-sdk-bridge' response with a missing or * mismatched nonce is rejected, preventing response injection by malicious page scripts. */ /** * Creates a 0xio adapter. The factory accepts optional extra trusted parent origins * so the communicator can forward its own trustedOrigins setting to origin validation. */ declare function createZeroXIOAdapter(extraTrustedOrigins?: string[]): WalletTransportAdapter; /** Default 0xio adapter instance (no extra trusted origins). */ declare const ZeroXIOAdapter: WalletTransportAdapter; /** * RFC-O-1 OctraProvider transport adapter. * * Targets any wallet that exposes `window.octra` per the RFC-O-1 specification: * window.octra.isOctra === true * window.octra.request({ method, params }) → Promise * window.octra.on(event, listener) / removeListener(event, listener) * * This adapter translates the SDK's internal method names into RFC-O-1 method * names and maps events back to the SDK event vocabulary. * * Non-standard SDK methods (ping, register_dapp, getTransactionHistory, etc.) * are passed through as-is; the wallet's request() handles or rejects them. */ declare function createOctraProviderAdapter(): WalletTransportAdapter; /** Default RFC-O-1 adapter instance. */ declare const OctraProviderAdapter: WalletTransportAdapter; /** * 0xio SDK — Wallet Adapter Registry * * Add new wallet adapters here. Detection order determines which wallet takes * priority when multiple wallets are installed at the same time. */ /** * Auto-detects the first available wallet in the current page. * Returns null if no supported wallet is found. * * @example * const adapter = detectWalletAdapter(); * if (!adapter) throw new Error('No supported wallet found'); * const wallet = new ZeroXIOWallet({ appName: 'My DApp', adapter }); */ declare function detectWalletAdapter(): WalletTransportAdapter | null; /** Returns all registered adapter instances. */ declare function getAllAdapters(): WalletTransportAdapter[]; /** * Network configuration for 0xio SDK */ /** * Immutable public copy of the built-in network table. * Modifications to returned objects do not affect SDK-internal state. */ declare const NETWORKS: Readonly>>; declare const DEFAULT_NETWORK_ID = "mainnet"; /** * Get network configuration by ID. * Returns a frozen copy — callers cannot mutate SDK-internal state. */ declare function getNetworkConfig(networkId?: string): NetworkInfo; /** * Get all available networks. * Returns frozen copies — callers cannot mutate SDK-internal state. */ declare function getAllNetworks(): NetworkInfo[]; /** * Check if network ID is valid (own property check, prevents prototype pollution). */ declare function isValidNetworkId(networkId: string): boolean; /** * Default balance structure. * Accepts a numeric total or undefined — never pass a Balance object here. */ declare function createDefaultBalance(total?: number): Balance; declare const SDK_CONFIG: { readonly version: "2.7.1"; readonly defaultNetworkId: "mainnet"; readonly communicationTimeout: 30000; readonly retryAttempts: 3; readonly retryDelay: 1000; }; declare function getDefaultNetwork(): NetworkInfo; declare function isValidAddress(address: string): boolean; /** * Validate transaction amount. * Accepts both number and string representations. * String amounts avoid JS number precision loss for very large values. */ declare function isValidAmount(amount: string | number): boolean; declare function isValidMessage(message: string): boolean; declare function isValidFeeLevel(feeLevel: number): boolean; /** * Derive the canonical Octra address from a base64-encoded Ed25519 public key. * Algorithm: SHA-256(pubkey_bytes) → base58 → prepend "oct" * Source of truth: ocho-push-server/src/index.ts#deriveAddressFromPubkey */ declare function deriveOctraAddress(publicKeyBase64: string): Promise; declare function formatOCT(amount: number | string, decimals?: number): string; declare function formatAddress(address: string, prefixLength?: number, suffixLength?: number): string; declare function formatTimestamp(timestamp: number): string; declare function formatTxHash(hash: string, length?: number): string; declare function toMicroOCT(amount: number): string; declare function fromMicroOCT(microAmount: string | number): number; declare function createErrorMessage(code: ErrorCode, context?: string): string; declare function isErrorType(error: any, code: ErrorCode): boolean; declare function delay(ms: number): Promise; declare function isBrowser(): boolean; declare function checkBrowserSupport(): { supported: boolean; missingFeatures: string[]; }; declare function generateMockData(): { address: string; balance: { public: number; private: number; total: number; currency: "OCT"; }; networkInfo: { id: string; name: string; rpcUrl: string; explorerUrl: string; explorerAddressUrl: string; indexerUrl: string; supportsPrivacy: boolean; color: string; isTestnet: boolean; }; }; declare function createLogger(prefix: string, debug: boolean): { log: (...args: any[]) => void; warn: (...args: any[]) => void; error: (...args: any[]) => void; debug: (...args: any[]) => void; table: (data: any) => void; group: (label: string) => void; groupEnd: () => void; }; declare const SDK_VERSION = "2.7.1"; declare const MIN_EXTENSION_VERSION = "2.0.1"; declare const MIN_EXTENSION_VERSION_DEVNET = "2.2.1"; declare const SUPPORTED_EXTENSION_VERSIONS = "^2.0.1"; declare function createZeroXIOWallet(config: { appName: string; appDescription?: string; debug?: boolean; autoConnect?: boolean; adapter?: WalletTransportAdapter; }): Promise; declare function checkSDKCompatibility(): { compatible: boolean; issues: string[]; recommendations: string[]; }; export { DEFAULT_NETWORK_ID, ErrorCode, EventEmitter, ExtensionCommunicator, MIN_EXTENSION_VERSION, MIN_EXTENSION_VERSION_DEVNET, NETWORKS, OctraProviderAdapter, SDK_CONFIG, SDK_VERSION, SUPPORTED_EXTENSION_VERSIONS, ZeroXIOAdapter, ZeroXIOWallet, ZeroXIOWalletError, checkBrowserSupport, checkSDKCompatibility, createDefaultBalance, createErrorMessage, createLogger, createOctraProviderAdapter, createZeroXIOAdapter, createZeroXIOWallet, delay, deriveOctraAddress, detectWalletAdapter, formatAddress, formatOCT, formatTimestamp, formatTxHash, formatOCT as formatZeroXIO, fromMicroOCT, fromMicroOCT as fromMicroZeroXIO, generateMockData, getAllAdapters, getAllNetworks, getDefaultNetwork, getNetworkConfig, isBrowser, isErrorType, isValidAddress, isValidAmount, isValidFeeLevel, isValidMessage, isValidNetworkId, toMicroOCT, toMicroOCT as toMicroZeroXIO }; export type { AccountChangedEvent, AdapterIncomingMessage, AdapterRequest, Balance, BalanceChangedEvent, ConnectEvent, ConnectOptions, ConnectionInfo, ContractCallData, ContractParam, ContractParams, ContractViewCallData, DisconnectEvent, ErrorEvent, ExtensionRequest, ExtensionResponse, NetworkChangedEvent, NetworkInfo, PendingPrivateTransfer, Permission, PrivateBalanceInfo, PrivateTransferData, SDKConfig, SignedTransaction, Transaction, TransactionConfirmedEvent, TransactionData, TransactionFinality, TransactionHistory, TransactionResult, WalletAddress, WalletEvent, WalletEventType, WalletTransportAdapter };