;
/**
* Get the wallet's RPC connection.
*
* @return {MoneroRpcConnection | undefined} the wallet's rpc connection
*/
getRpcConnection(): MoneroRpcConnection | undefined;
/**
* Open an existing wallet on the monero-wallet-rpc server.
*
* Example:
*
*
* let wallet = new MoneroWalletRpc("http://localhost:38084", "rpc_user", "abc123");
* await wallet.openWallet("mywallet1", "supersecretpassword");
*
* await wallet.openWallet({
* path: "mywallet2",
* password: "supersecretpassword",
* server: "http://locahost:38081", // or object with uri, username, password, etc
* rejectUnauthorized: false
* });
*
*
* @param {string|MoneroWalletConfig} pathOrConfig - the wallet's name or configuration to open
* @param {string} pathOrConfig.path - path of the wallet to create (optional, in-memory wallet if not given)
* @param {string} pathOrConfig.password - password of the wallet to create
* @param {string|Partial} pathOrConfig.server - uri or MoneroRpcConnection of a daemon to use (optional, monero-wallet-rpc usually started with daemon config)
* @param {string} [password] the wallet's password
* @return {Promise} this wallet client
*/
openWallet(pathOrConfig: string | Partial, password?: string): Promise;
/**
* Create and open a wallet on the monero-wallet-rpc server.
*
*
Example:
*
*
* // construct client to monero-wallet-rpc
* let walletRpc = new MoneroWalletRpc("http://localhost:38084", "rpc_user", "abc123");
*
* // create and open wallet on monero-wallet-rpc
* await walletRpc.createWallet({
* path: "mywallet",
* password: "abc123",
* seed: "coexist igloo pamphlet lagoon...",
* restoreHeight: 1543218l
* });
*
*
* @param {Partial} config - MoneroWalletConfig or equivalent JS object
* @param {string} [config.path] - path of the wallet to create (optional, in-memory wallet if not given)
* @param {string} [config.password] - password of the wallet to create
* @param {string} [config.seed] - seed of the wallet to create (optional, random wallet created if neither seed nor keys given)
* @param {string} [config.seedOffset] - the offset used to derive a new seed from the given seed to recover a secret wallet from the seed
* @param {boolean} [config.isMultisig] - restore multisig wallet from seed
* @param {string} [config.primaryAddress] - primary address of the wallet to create (only provide if restoring from keys)
* @param {string} [config.privateViewKey] - private view key of the wallet to create (optional)
* @param {string} [config.privateSpendKey] - private spend key of the wallet to create (optional)
* @param {number} [config.restoreHeight] - block height to start scanning from (defaults to 0 unless generating random wallet)
* @param {string} [config.language] - language of the wallet's mnemonic phrase or seed (defaults to "English" or auto-detected)
* @param {MoneroRpcConnection} [config.server] - MoneroRpcConnection to a monero daemon (optional)
* @param {string} [config.serverUri] - uri of a daemon to use (optional, monero-wallet-rpc usually started with daemon config)
* @param {string} [config.serverUsername] - username to authenticate with the daemon (optional)
* @param {string} [config.serverPassword] - password to authenticate with the daemon (optional)
* @param {MoneroConnectionManager} [config.connectionManager] - manage connections to monerod (optional)
* @param {boolean} [config.rejectUnauthorized] - reject self-signed server certificates if true (defaults to true)
* @param {MoneroRpcConnection} [config.server] - MoneroRpcConnection or equivalent JS object providing daemon configuration (optional)
* @param {boolean} [config.saveCurrent] - specifies if the current RPC wallet should be saved before being closed (default true)
* @return {MoneroWalletRpc} this wallet client
*/
createWallet(config: Partial): Promise;
protected createWalletRandom(config: MoneroWalletConfig): Promise;
protected createWalletFromSeed(config: MoneroWalletConfig): Promise;
protected createWalletFromKeys(config: MoneroWalletConfig): Promise;
protected handleCreateWalletError(name: any, err: any): void;
isViewOnly(): Promise;
/**
* Set the wallet's daemon connection.
*
* @param {string|MoneroRpcConnection} [uriOrConnection] - the daemon's URI or connection (defaults to offline)
* @param {boolean} isTrusted - indicates if the daemon in trusted
* @param {SslOptions} sslOptions - custom SSL configuration
*/
setDaemonConnection(uriOrConnection?: Partial | string, isTrusted?: boolean, sslOptions?: SslOptions): Promise;
getDaemonConnection(): Promise;
/**
* Get the total and unlocked balances in a single request.
*
* @param {number} [accountIdx] account index
* @param {number} [subaddressIdx] subaddress index
* @return {Promise} is the total and unlocked balances in an array, respectively
*/
getBalances(accountIdx?: number, subaddressIdx?: number): Promise;
addListener(listener: MoneroWalletListener): Promise;
removeListener(listener: any): Promise;
isConnectedToDaemon(): Promise;
getVersion(): Promise;
getPath(): Promise;
getSeed(): Promise;
getSeedLanguage(): Promise;
/**
* Get a list of available languages for the wallet's seed.
*
* @return {string[]} the available languages for the wallet's seed.
*/
getSeedLanguages(): Promise;
getPrivateViewKey(): Promise;
getPrivateSpendKey(): Promise;
getAddress(accountIdx: number, subaddressIdx: number): Promise;
getAddressIndex(address: string): Promise;
getIntegratedAddress(standardAddress?: string, paymentId?: string): Promise;
decodeIntegratedAddress(integratedAddress: string): Promise;
getHeight(): Promise;
getDaemonHeight(): Promise;
getHeightByDate(year: number, month: number, day: number): Promise;
sync(listenerOrStartHeight?: MoneroWalletListener | number, startHeight?: number): Promise;
startSyncing(syncPeriodInMs?: number): Promise;
getSyncPeriodInMs(): number;
stopSyncing(): Promise;
scanTxs(txHashes: string[]): Promise;
rescanSpent(): Promise;
rescanBlockchain(): Promise;
getBalance(accountIdx?: number, subaddressIdx?: number): Promise;
getUnlockedBalance(accountIdx?: number, subaddressIdx?: number): Promise;
getAccounts(includeSubaddresses?: boolean, tag?: string, skipBalances?: boolean): Promise;
getAccount(accountIdx: number, includeSubaddresses?: boolean, skipBalances?: boolean): Promise;
createAccount(label?: string): Promise;
getSubaddresses(accountIdx: number, subaddressIndices?: number[], skipBalances?: boolean): Promise;
getSubaddress(accountIdx: number, subaddressIdx: number, skipBalances?: boolean): Promise;
createSubaddress(accountIdx: number, label?: string): Promise;
setSubaddressLabel(accountIdx: number, subaddressIdx: number, label: string): Promise;
getTxs(query?: string[] | Partial): Promise;
getTransfers(query?: Partial): Promise;
getOutputs(query?: Partial): Promise;
exportOutputs(all?: boolean): Promise;
importOutputs(outputsHex: string): Promise;
exportKeyImages(all?: boolean): Promise;
importKeyImages(keyImages: MoneroKeyImage[]): Promise;
getNewKeyImagesFromLastImport(): Promise;
freezeOutput(keyImage: string): Promise;
thawOutput(keyImage: string): Promise;
isOutputFrozen(keyImage: string): Promise;
getDefaultFeePriority(): Promise;
createTxs(config: Partial): Promise;
sweepOutput(config: Partial): Promise;
sweepUnlocked(config: Partial): Promise;
sweepDust(relay?: boolean): Promise;
relayTxs(txsOrMetadatas: (MoneroTxWallet | string)[]): Promise;
describeTxSet(txSet: MoneroTxSet): Promise;
signTxs(unsignedTxHex: string): Promise;
submitTxs(signedTxHex: string): Promise;
signMessage(message: string, signatureType?: MoneroMessageSignatureType, accountIdx?: number, subaddressIdx?: number): Promise;
verifyMessage(message: string, address: string, signature: string): Promise;
getTxKey(txHash: string): Promise;
checkTxKey(txHash: string, txKey: string, address: string): Promise;
getTxProof(txHash: string, address: string, message?: string): Promise;
checkTxProof(txHash: string, address: string, message: string | undefined, signature: string): Promise;
getSpendProof(txHash: string, message?: string): Promise;
checkSpendProof(txHash: string, message: string | undefined, signature: string): Promise;
getReserveProofWallet(message?: string): Promise;
getReserveProofAccount(accountIdx: number, amount: bigint, message?: string): Promise;
checkReserveProof(address: string, message: string | undefined, signature: string): Promise;
getTxNotes(txHashes: string[]): Promise;
setTxNotes(txHashes: string[], notes: string[]): Promise;
getAddressBookEntries(entryIndices?: number[]): Promise;
addAddressBookEntry(address: string, description?: string): Promise;
editAddressBookEntry(index: number, setAddress: boolean, address: string | undefined, setDescription: boolean, description: string | undefined): Promise;
deleteAddressBookEntry(entryIdx: number): Promise;
tagAccounts(tag: any, accountIndices: any): Promise;
untagAccounts(accountIndices: number[]): Promise;
getAccountTags(): Promise;
setAccountTagLabel(tag: string, label: string): Promise;
getPaymentUri(config: MoneroTxConfig): Promise;
parsePaymentUri(uri: string): Promise;
getAttribute(key: string): Promise;
setAttribute(key: string, val: string): Promise;
startMining(numThreads: number, backgroundMining?: boolean, ignoreBattery?: boolean): Promise;
stopMining(): Promise;
isMultisigImportNeeded(): Promise;
getMultisigInfo(): Promise;
prepareMultisig(): Promise;
makeMultisig(multisigHexes: string[], threshold: number, password: string): Promise;
exchangeMultisigKeys(multisigHexes: string[], password: string): Promise;
exportMultisigHex(): Promise;
importMultisigHex(multisigHexes: string[]): Promise;
signMultisigTxHex(multisigTxHex: string): Promise;
submitMultisigTxHex(signedMultisigTxHex: string): Promise;
changePassword(oldPassword: string, newPassword: string): Promise;
save(): Promise;
close(save?: boolean): Promise;
isClosed(): Promise;
/**
* Save and close the current wallet and stop the RPC server.
*
* @return {Promise}
*/
stop(): Promise;
getNumBlocksToUnlock(): Promise;
getTx(txHash: string): Promise;
getIncomingTransfers(query: Partial): Promise;
getOutgoingTransfers(query: Partial): Promise;
createTx(config: Partial): Promise;
relayTx(txOrMetadata: MoneroTxWallet | string): Promise;
getTxNote(txHash: string): Promise;
setTxNote(txHash: string, note: string): Promise;
static connectToWalletRpc(uriOrConfig: string | Partial | Partial | string[], username?: string, password?: string): Promise;
protected static startWalletRpcProcess(config: Partial): Promise;
protected clear(): Promise;
protected getAccountIndices(getSubaddressIndices?: any): Promise