import { workerLog } from './logger'; import { Wallet, EventTargetImpl, helper, kaspacore, CONFIRMATION_COUNT, COINBASE_CFM_COUNT } from '@kaspa/wallet'; export { workerLog, CONFIRMATION_COUNT, COINBASE_CFM_COUNT }; import { CBItem } from './rpc'; export declare const initKaspaFramework: (opt?: { workerPath?: string; }) => Promise; import { NetworkOptions, TxSend, TxResp, WalletCache, IRPC, WalletOptions, TxInfo, TxCompoundOptions, ScaneMoreResult } from '@kaspa/wallet/types/custom-types'; declare class WalletWrapper extends EventTargetImpl { static networkTypes: Object; static KAS: typeof Wallet.KAS; static networkAliases: Object; static Mnemonic: any; static Crypto: typeof import("@kaspa/wallet/dist/wallet/crypto").Crypto; static checkPasswordValidity(password: string, encryptedMnemonic: string): Promise; static setWorkerLogLevel(level: string): Promise; static postMessage(op: string, data: any): Promise; static fromMnemonic(seedPhrase: string, networkOptions: NetworkOptions, options?: WalletOptions): WalletWrapper; /** * Creates a new Wallet from encrypted wallet data. * @param password the password the user encrypted their seed phrase with * @param encryptedMnemonic the encrypted seed phrase from local storage * @throws Will throw "Incorrect password" if password is wrong */ static import(password: string, encryptedMnemonic: string, networkOptions: NetworkOptions, options?: WalletOptions): Promise; worker: Worker; isWorkerReady: boolean; rpc: IRPC | undefined; _pendingCB: Map; syncSignal: helper.DeferredPromise | undefined; grpcFlagsSyncSignal: helper.DeferredPromise | undefined; workerReady: helper.DeferredPromise; balance: { available: number; pending: number; total: number; }; _rid2subUid: Map; uid: string; HDWallet: kaspacore.HDPrivateKey; grpcFlags: { utxoIndex?: Boolean; }; constructor(privKey: string, seedPhrase: string, networkOptions: NetworkOptions, options?: WalletOptions); checkGRPCFlags(): void; createUID(network: string): string; initWallet(privKey: string, seedPhrase: string, networkOptions: NetworkOptions, options?: WalletOptions): Promise; initWorker(): void; handleProperty(msg: { name: string; value: any; }): void; handleEvents(msg: { name: string; data: any; }): void; handleResponse(msg: { rid: string; error?: any; result?: any; }): Promise; handleRPCRequest(msg: { fn: string; args: any; rid?: string; }): Promise; postMessage(op: string, data: any): void; request(fn: string, args: any[], callback?: Function | undefined): Promise; requestPromisify(fn: string, ...args: any[]): Promise; createPendingCall(cb: Function): string; sync(syncOnce?: boolean | undefined): Promise; setLogLevel(level: string): void; startUTXOsPolling(): void; get(name: string, waitForSync?: boolean): Promise; getAfterSync(name: string): Promise; get mnemonic(): Promise; get receiveAddress(): Promise; /** * Send a transaction. Returns transaction id. * @param txParams * @param txParams.toAddr To address in cashaddr format (e.g. kaspatest:qq0d6h0prjm5mpdld5pncst3adu0yam6xch4tr69k2) * @param txParams.amount Amount to send in sompis (100000000 (1e8) sompis in 1 KAS) * @param txParams.fee Fee for miners in sompis * @throws `FetchError` if endpoint is down. API error message if tx error. Error if amount is too large to be represented as a javascript number. */ submitTransaction(txParamsArg: TxSend, debug?: boolean): Promise; /** * Send a transaction. Returns transaction id. * @param txParams * @param txParams.toAddr To address in cashaddr format (e.g. kaspatest:qq0d6h0prjm5mpdld5pncst3adu0yam6xch4tr69k2) * @param txParams.amount Amount to send in sompis (100000000 (1e8) sompis in 1 KAS) * @param txParams.fee Fee for miners in sompis * @throws `FetchError` if endpoint is down. API error message if tx error. Error if amount is too large to be represented as a javascript number. */ estimateTransaction(txParamsArg: TxSend): Promise; /** * Update transcations time */ startUpdatingTransactions(version?: undefined | number): Promise; /** * Compound UTXOs by re-sending funds to itself */ compoundUTXOs(txCompoundOptions?: TxCompoundOptions, debug?: boolean): Promise; scanMoreAddresses(count?: number, debug?: boolean, receiveStart?: number, changeStart?: number): Promise; /** * Generates encrypted wallet data. * @param password user's chosen password * @returns Promise that resolves to object-like string. Suggested to store as string for .import(). */ export(password: string): Promise; restoreCache(cache: WalletCache): void; clearUsedUTXOs(): void; } export { WalletWrapper }; //# sourceMappingURL=wallet-wrapper.d.ts.map