import { Address } from './address'; import Input from './models/Input'; import Output from './models/Output'; export interface finalizePSBTResponse { psbt: string; hex?: string; complete: boolean; } export interface WalletProvider { /** * Get addresses/accounts of the user. * @param {number} [startingIndex] - Index to start * @param {number} [numAddresses] - Number of addresses to retrieve * @param {boolean} [change] - True for change addresses * @return {Promise} Resolves with a list * of addresses. * Rejects with InvalidProviderResponseError if provider's response is invalid. */ getAddresses(startingIndex?: number, numAddresses?: number, change?: boolean): Promise; /** * Get used addresses/accounts of the user. * @param {number} [numAddressPerCall] - Number of addresses to retrieve per call * @return {Promise} Resolves with a list * of addresses. * Rejects with InvalidProviderResponseError if provider's response is invalid. */ getUsedAddresses(numAddressPerCall?: number): Promise; /** * findAddress is an optimized version of upstream CAL's findAddress. * * It searches through both change and non-change addresses (if change arg is not provided) each iteration. * * This is in contrast to the original findAddress function which searches * through all non-change addresses before moving on to change addresses. * * @param addresses * @returns {Promise
} */ findAddress(addresses: string[]): Promise
; /** * Get unused address/account of the user. * @param {boolean} [change] - True for change addresses * @param {number} [numAddressPerCall] - Number of addresses to retrieve per call * @return {Promise} Resolves with a address * object. * Rejects with InvalidProviderResponseError if provider's response is invalid. */ getUnusedAddress(change?: boolean, numAddressPerCall?: number): Promise
; /** * Sign a message. * @param {!string} message - Message to be signed. * @param {!string} from - The address from which the message is signed. * @return {Promise} Resolves with a signed message. */ signMessage(message: string, from: string): Promise; /** * Retrieve the network connected to by the wallet * @return {Promise} Resolves with the network object */ getConnectedNetwork(): Promise; /** * Retrieve the availability status of the wallet * @return {Promise} True if the wallet is available to use */ isWalletAvailable(): Promise; /** * Flag indicating if the wallet allows apps to update transaction fees * @return {Promise} True if wallet accepts fee updating */ canUpdateFee?: boolean | (() => boolean); /** * Exports the private key for the account * for BTC, https://en.bitcoin.it/wiki/Wallet_import_format * for ETH, the privateKey * for NEAR, the secretKey * @return {Promise} Resolves with the key as a string */ exportPrivateKey?: () => Promise; buildSweepTransactionWithSetOutputs(externalChangeAddress: string, feePerByte: number, _outputs: Output[], fixedInputs: Input[]): any; getUnusedAddressesBlacklist(): any; setUnusedAddressesBlacklist(unusedAddressesBlacklist: any): any; sendSweepTransactionWithSetOutputs(externalChangeAddress: string, feePerByte: number, _outputs: Output[], fixedInputs: Input[]): any; }