Class MoneroWalletRpc
- All Implemented Interfaces:
MoneroWallet
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Compares two transfers by ascending account and subaddress indices.static class
Compares two outputs by ascending account and subaddress indices. -
Field Summary
Fields inherited from interface monero.wallet.MoneroWallet
DEFAULT_LANGUAGE
-
Constructor Summary
ConstructorDescriptionMoneroWalletRpc
(String uri) MoneroWalletRpc
(String uri, String username, String password) MoneroWalletRpc
(String uri, String username, String password, String zmqUri) MoneroWalletRpc
(List<String> cmd) Create an internal process running monero-wallet-rpc and connect to it. -
Method Summary
Modifier and TypeMethodDescriptionint
addAddressBookEntry
(String address, String description) Add an address book entry.void
addListener
(MoneroWalletListenerI listener) Register a listener to receive wallet notifications.void
changePassword
(String oldPassword, String newPassword) Change the wallet password.checkReserveProof
(String address, String message, String signature) Proves a wallet has a disposable reserve using a signature.boolean
checkSpendProof
(String txHash, String message, String signature) Prove a spend using a signature.checkTxKey
(String txHash, String txKey, String address) Check a transaction in the blockchain with its secret key.checkTxProof
(String txHash, String address, String message, String signature) Prove a transaction by checking its signature.void
close()
Close the wallet (does not save).void
close
(boolean save) Optionally save then close the wallet.Create a new account.createAccount
(String label) Create a new account with a label for the first subaddress.createSubaddress
(int accountIdx) Create a subaddress within an account and without a label.createSubaddress
(int accountIdx, String label) Create a subaddress within an account.createTx
(MoneroTxConfig config) Create a transaction to transfer funds from this wallet.createTxs
(MoneroTxConfig config) Create one or more transactions to transfer funds from this wallet.createWallet
(MoneroWalletConfig config) Create and open a wallet on the monero-wallet-rpc server.decodeIntegratedAddress
(String integratedAddress) Decode an integrated address to get its standard address and payment id.void
deleteAddressBookEntry
(int entryIdx) Delete an address book entry.describeMultisigTxSet
(String multisigTxHex) Describe a tx set from multisig tx hex.describeTxSet
(MoneroTxSet txSet) Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.describeUnsignedTxSet
(String unsignedTxHex) Describe a tx set from unsigned tx hex.void
editAddressBookEntry
(int index, boolean setAddress, String address, boolean setDescription, String description) Edit an address book entry.exchangeMultisigKeys
(List<String> multisigHexes, String password) Exchange multisig hex with participants in a M/N multisig wallet.Export key images since the last export.exportKeyImages
(boolean all) Export signed key images.Export this wallet's multisig info as hex for other participants.Export outputs since the last export.exportOutputs
(boolean all) Export outputs in hex format.void
freezeOutput
(String keyImage) Freeze an output.getAccount
(int accountIdx) Get an account without subaddress information.getAccount
(int accountIdx, boolean includeSubaddresses) Get an account.getAccount
(int accountIdx, boolean includeSubaddresses, boolean skipBalances) Get all accounts.getAccounts
(boolean includeSubaddresses) Get all accounts.getAccounts
(boolean includeSubaddresses, String tag) Get accounts with a given tag.getAccounts
(boolean includeSubaddresses, String tag, boolean skipBalances) getAccounts
(String tag) Get accounts with a given tag.Return all account tags.getAddress
(int accountIdx, int subaddressIdx) Get the address of a specific subaddress.Get all address book entries.getAddressBookEntries
(List<Integer> entryIndices) Get address book entries.getAddressIndex
(String address) Get the account and subaddress index of the given address.getAttribute
(String key) Get an attribute.Get the wallet's balance.getBalance
(Integer accountIdx) Get an account's balance.getBalance
(Integer accountIdx, Integer subaddressIdx) Get a subaddress's balance.Get the wallet's daemon connection manager.Get the wallet's daemon connection.long
Get the blockchain's height.long
Get the block height that the wallet is synced to.long
getHeightByDate
(int year, int month, int day) Get the blockchain's height by date as a conservative estimate for scanning.Get all of the wallet's incoming transfers.Get incoming transfers that meet a query.Get an integrated address based on this wallet's primary address and a randomly generated payment ID.getIntegratedAddress
(String standardAddress, String paymentId) Get an integrated address based on the given standard address and payment ID.Get the listeners registered with the wallet.Get multisig info about this wallet.Get new key images from the last imported outputs.Get all of the wallet's outgoing transfers.Get outgoing transfers that meet a query.Get outputs created from previous transactions that belong to the wallet (i.e.getOutputs
(MoneroOutputQuery query) Get outputs which meet the criteria defined in a query object.getPath()
Get the wallet's path.getPaymentUri
(MoneroTxConfig config) Creates a payment URI from a send configuration.Get the wallet's primary address.Get the wallet's private spend key.Get the wallet's private view key.Get the internal process running monero-wallet-rpc.Get the wallet's public spend key.Get the wallet's public view key.getReserveProofAccount
(int accountIdx, BigInteger amount, String message) Generate a signature to prove an available amount in an account.getReserveProofWallet
(String message) Generate a signature to prove the entire balance of the wallet.Get the wallet's RPC connection.getSeed()
Get the wallet's mnemonic phrase or seed.Get the language of the wallet's mnemonic phrase or seed.Get a list of available languages for the wallet's seed.getSpendProof
(String txHash) Generate a signature to prove a spend.getSpendProof
(String txHash, String message) Generate a signature to prove a spend.getSubaddress
(int accountIdx, int subaddressIdx) Get a subaddress.getSubaddresses
(int accountIdx) Get all subaddresses in an account.getSubaddresses
(int accountIdx, List<Integer> subaddressIndices) Get subaddresses in an account.getSubaddresses
(int accountIdx, List<Integer> subaddressIndices, boolean skipBalances) Get all incoming and outgoing transfers to and from this wallet.getTransfers
(int accountIdx) Get incoming and outgoing transfers to and from an account.getTransfers
(int accountIdx, int subaddressIdx) Get incoming and outgoing transfers to and from a subaddress.getTransfers
(MoneroTransferQuery query) Get tranfsers that meet the criteria defined in a query object.Get a wallet transaction by hash.Get a transaction's secret key from its hash.Get a transaction note.getTxNotes
(List<String> txHashes) Get notes for multiple transactions.getTxProof
(String txHash, String address) Get a transaction signature to prove it.getTxProof
(String txHash, String address, String message) Get a transaction signature to prove it.getTxs()
Get all wallet transactions.Get wallet transactions by hash.Get wallet transactions by hash.getTxs
(MoneroTxQuery query) Get wallet transactions that meet the criteria defined in a query object.Get the wallet's unlocked balance.getUnlockedBalance
(Integer accountIdx) Get an account's unlocked balance.getUnlockedBalance
(Integer accountIdx, Integer subaddressIdx) Get a subaddress's unlocked balance.Returns the wallet version.importKeyImages
(List<MoneroKeyImage> keyImages) Import signed key images and verify their spent status.int
importMultisigHex
(String... multisigHexes) Import multisig info as hex from other participants.int
importMultisigHex
(List<String> multisigHexes) Import multisig info as hex from other participants.int
importOutputs
(String outputsHex) Import outputs in hex format.boolean
isClosed()
Indicates if this wallet is closed or not.boolean
Indicates if the wallet is connected a daemon.boolean
Indicates if this wallet is a multisig wallet.boolean
Indicates if importing multisig data is needed for returning a correct balance.boolean
isOutputFrozen
(String keyImage) Check if an output is frozen.boolean
Indicates if the wallet is view-only, meaning it does not have the private spend key and can therefore only observe incoming outputs.makeMultisig
(List<String> multisigHexes, int threshold, String password) Make this wallet multisig by importing multisig hex from participants.openWallet
(String name, String password) Open an existing wallet on the monero-wallet-rpc server.openWallet
(MoneroWalletConfig config) Open an existing wallet on the monero-wallet-rpc server.parsePaymentUri
(String uri) Parses a payment URI to a transaction configuration.Get multisig info as hex to share with participants to begin creating a multisig wallet.Relay a previously created transaction.Relay a previously created transaction.relayTxs
(Collection<String> txMetadatas) Relay previously created transactions.relayTxs
(List<MoneroTxWallet> txs) Relay previously created transactions.void
removeListener
(MoneroWalletListenerI listener) Unregister a listener to receive wallet notifications.void
Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself.void
Rescan the blockchain for spent outputs.void
save()
Save the wallet at its current path.void
scanTxs
(Collection<String> txHashes) Scan transactions by their hash/id.void
setAccountLabel
(int accountIdx, String label) Set an account label.void
setAccountTagLabel
(String tag, String label) Sets a human-readable description for a tag.void
setAttribute
(String key, String val) Set an arbitrary attribute.void
setConnectionManager
(MoneroConnectionManager connectionManager) Set the wallet's daemon connection manager.void
Set the wallet's daemon connection.void
setDaemonConnection
(String uri, String username, String password) Set the wallet's daemon connection.void
setDaemonConnection
(MoneroRpcConnection connection) Set the wallet's daemon connectionvoid
setDaemonConnection
(MoneroRpcConnection connection, Boolean isTrusted, SslOptions sslOptions) void
setProxyUri
(String uri) Set the Tor proxy to the daemon.void
setSubaddressLabel
(int accountIdx, int subaddressIdx, String label) Set a subaddress label.void
Set a note for a specific transaction.void
setTxNotes
(List<String> txHashes, List<String> notes) Set notes for multiple transactions.signMessage
(String message) Sign a message.signMessage
(String msg, MoneroMessageSignatureType signatureType, int accountIdx, int subaddressIdx) Sign a message.signMultisigTxHex
(String multisigTxHex) Sign multisig transactions from a multisig wallet.Sign unsigned transactions from a view-only wallet.void
startMining
(Long numThreads, Boolean backgroundMining, Boolean ignoreBattery) Start mining.void
Start background synchronizing.void
startSyncing
(Long syncPeriodInMs) Start background synchronizing with a maximum period between syncs.void
stop()
Save and close the current wallet and stop the RPC server.void
Stop mining.int
Stop the internal process running monero-wallet-rpc, if applicable.int
stopProcess
(boolean force) Stop the internal process running monero-wallet-rpc, if applicable.void
Stop synchronizing the wallet with the daemon.submitMultisigTxHex
(String signedMultisigTxHex) Submit signed multisig transactions from a multisig wallet.Submit signed transactions from a view-only wallet.sweepDust
(boolean relay) Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.sweepOutput
(MoneroTxConfig config) Sweep an output with a given key image.sweepUnlocked
(MoneroTxConfig config) Sweep all unlocked funds according to the given config.sync()
Synchronize the wallet with the daemon as a one-time synchronous process.Synchronize the wallet with the daemon as a one-time synchronous process.sync
(Long startHeight, MoneroWalletListenerI listener) Synchronize the wallet with the daemon as a one-time synchronous process.sync
(MoneroWalletListenerI listener) Synchronize the wallet with the daemon as a one-time synchronous process.void
tagAccounts
(String tag, Collection<Integer> accountIndices) Tag accounts.void
thawOutput
(String keyImage) Thaw a frozen output.void
untagAccounts
(Collection<Integer> accountIndices) Untag acconts.verifyMessage
(String msg, String address, String signature) Verify a signature on a message.
-
Constructor Details
-
MoneroWalletRpc
-
MoneroWalletRpc
-
MoneroWalletRpc
-
MoneroWalletRpc
-
MoneroWalletRpc
Create an internal process running monero-wallet-rpc and connect to it. Use `stopProcess()` to stop the newly created process.- Parameters:
cmd
- path then arguments to external monero-wallet-rpc executable- Throws:
IOException
- if input/output error with process
-
-
Method Details
-
getProcess
Get the internal process running monero-wallet-rpc.- Returns:
- the process running monero-wallet-rpc, null if not created from new process
-
stopProcess
public int stopProcess()Stop the internal process running monero-wallet-rpc, if applicable.- Returns:
- the error code from stopping the process
-
stopProcess
public int stopProcess(boolean force) Stop the internal process running monero-wallet-rpc, if applicable.- Parameters:
force
- specifies if the process should be destroyed forcibly- Returns:
- the error code from stopping the process
-
getRpcConnection
Get the wallet's RPC connection.- Returns:
- the wallet's rpc connection
-
openWallet
Open an existing wallet on the monero-wallet-rpc server.- Parameters:
name
- is the name of the wallet file to openpassword
- is the wallet's password- Returns:
- this wallet client
-
openWallet
Open an existing wallet on the monero-wallet-rpc server.
Example:
MoneroWallet walletRpc = new MoneroWalletRpc("http://localhost:38083", "rpc_user", "abc123");
walletRpc.openWallet("mywallet1", "supersecretpassword");
walletRpc.openWallet(new MoneroWalletConfig()
.setPath("mywallet")
.setPassword("abc123")
.setServerUri("http://localhost:38081"));
All supported configuration:
path - path of the wallet to create (optional, in-memory wallet if not given)
password - password of the wallet to create
serverUri - uri of a daemon to use (optional, monero-wallet-rpc usually started with daemon config)
serverUsername - username to authenticate with the daemon (optional)
serverPassword - password to authenticate with the daemon (optional)
server - MoneroRpcConnection providing daemon configuration (optional)
- Parameters:
config
- configures the wallet to open- Returns:
- this wallet client
-
createWallet
Create and open a wallet on the monero-wallet-rpc server.
Example:
MoneroWallet walletRpc = new MoneroWalletRpc("http://localhost:38083", "rpc_user", "abc123");
walletRpc.createWallet(new MoneroWalletConfig()
.setPath("mywallet")
.setPassword("supersecretpassword")
.setSeed("coexist igloo pamphlet lagoon...")
.setRestoreHeight(1543218l));
All supported configuration:
path - path of the wallet to create (optional, in-memory wallet if not given)
password - password of the wallet to create
seed - seed of the wallet to create (optional, random wallet created if neither seed nor keys given)
seedOffset - the offset used to derive a new seed from the given seed to recover a secret wallet from the seed
isMultisig - restore multisig wallet from seed
primaryAddress - primary address of the wallet to create (only provide if restoring from keys)
privateViewKey - private view key of the wallet to create (optional)
privateSpendKey - private spend key of the wallet to create (optional)
restoreHeight - block height to start scanning from (defaults to 0 unless generating random wallet)
language - language of the wallet's seed (defaults to "English" or auto-detected)
server - MoneroRpcConnection to a monero daemon (optional)
serverUri - uri of the daemon to use (optional, monero-wallet-rpc usually started with daemon config)
serverUsername - username to authenticate with the daemon (optional)
serverPassword - password to authenticate with the daemon (optional)
connectionManager - manage connections to monerod (optional)
- Parameters:
config
- configures the wallet to create- Returns:
- this wallet client
-
getSeedLanguages
Get a list of available languages for the wallet's seed.- Returns:
- the available languages for the wallet's seed.
-
stop
public void stop()Save and close the current wallet and stop the RPC server. -
addListener
Description copied from interface:MoneroWallet
Register a listener to receive wallet notifications.- Specified by:
addListener
in interfaceMoneroWallet
- Parameters:
listener
- is the listener to receive wallet notifications
-
removeListener
Description copied from interface:MoneroWallet
Unregister a listener to receive wallet notifications.- Specified by:
removeListener
in interfaceMoneroWallet
- Parameters:
listener
- is the listener to unregister
-
isViewOnly
public boolean isViewOnly()Description copied from interface:MoneroWallet
Indicates if the wallet is view-only, meaning it does not have the private spend key and can therefore only observe incoming outputs.- Returns:
- {bool} true if the wallet is view-only, false otherwise
-
setDaemonConnection
Description copied from interface:MoneroWallet
Set the wallet's daemon connection- Parameters:
connection
- manages daemon connection information
-
setDaemonConnection
public void setDaemonConnection(MoneroRpcConnection connection, Boolean isTrusted, SslOptions sslOptions) -
setProxyUri
Description copied from interface:MoneroWallet
Set the Tor proxy to the daemon.- Parameters:
uri
- the Tor proxy URI
-
getDaemonConnection
Description copied from interface:MoneroWallet
Get the wallet's daemon connection.- Returns:
- the wallet's daemon connection
-
isConnectedToDaemon
public boolean isConnectedToDaemon()Description copied from interface:MoneroWallet
Indicates if the wallet is connected a daemon.- Returns:
- true if the wallet is connected to a daemon, false otherwise
-
getVersion
Description copied from interface:MoneroWallet
Returns the wallet version.- Returns:
- the wallet version
-
getPath
Description copied from interface:MoneroWallet
Get the wallet's path.- Returns:
- the path the wallet can be opened with
-
getSeed
Description copied from interface:MoneroWallet
Get the wallet's mnemonic phrase or seed.- Returns:
- the wallet's mnemonic phrase or seed.
-
getSeedLanguage
Description copied from interface:MoneroWallet
Get the language of the wallet's mnemonic phrase or seed.- Returns:
- the language of the wallet's mnemonic phrase or seed
-
getPrivateViewKey
Description copied from interface:MoneroWallet
Get the wallet's private view key.- Returns:
- the wallet's private view key
-
getPublicViewKey
Description copied from interface:MoneroWallet
Get the wallet's public view key.- Returns:
- the wallet's public view key
-
getPublicSpendKey
Description copied from interface:MoneroWallet
Get the wallet's public spend key.- Returns:
- the wallet's public spend key
-
getPrivateSpendKey
Description copied from interface:MoneroWallet
Get the wallet's private spend key.- Returns:
- the wallet's private spend key
-
getAddress
Description copied from interface:MoneroWallet
Get the address of a specific subaddress.- Parameters:
accountIdx
- specifies the account index of the address's subaddresssubaddressIdx
- specifies the subaddress index within the account- Returns:
- the receive address of the specified subaddress
-
getAddressIndex
Description copied from interface:MoneroWallet
Get the account and subaddress index of the given address.- Parameters:
address
- is the address to get the account and subaddress index from- Returns:
- the account and subaddress indices
-
getIntegratedAddress
Description copied from interface:MoneroWallet
Get an integrated address based on the given standard address and payment ID. Uses the wallet's primary address if an address is not given. Generates a random payment ID if a payment ID is not given.- Parameters:
standardAddress
- is the standard address to generate the integrated address from (wallet's primary address if null)paymentId
- is the payment ID to generate an integrated address from (randomly generated if null)- Returns:
- the integrated address
-
decodeIntegratedAddress
Description copied from interface:MoneroWallet
Decode an integrated address to get its standard address and payment id.- Parameters:
integratedAddress
- is an integrated address to decode- Returns:
- the decoded integrated address including standard address and payment id
-
getHeight
public long getHeight()Description copied from interface:MoneroWallet
Get the block height that the wallet is synced to.- Returns:
- the block height that the wallet is synced to
-
getDaemonHeight
public long getDaemonHeight()Description copied from interface:MoneroWallet
Get the blockchain's height.- Returns:
- the blockchain's height
-
getHeightByDate
public long getHeightByDate(int year, int month, int day) Description copied from interface:MoneroWallet
Get the blockchain's height by date as a conservative estimate for scanning.- Parameters:
year
- year of the height to getmonth
- month of the height to get as a number between 1 and 12day
- day of the height to get as a number between 1 and 31- Returns:
- the blockchain's approximate height at the given date
-
sync
Description copied from interface:MoneroWallet
Synchronize the wallet with the daemon as a one-time synchronous process.- Specified by:
sync
in interfaceMoneroWallet
- Parameters:
startHeight
- is the start height to sync from (defaults to the last synced block)listener
- listener to receive notifications during synchronization- Returns:
- the sync result
-
startSyncing
Description copied from interface:MoneroWallet
Start background synchronizing with a maximum period between syncs.- Parameters:
syncPeriodInMs
- maximum period between syncs in milliseconds
-
stopSyncing
public void stopSyncing()Description copied from interface:MoneroWallet
Stop synchronizing the wallet with the daemon. -
scanTxs
Description copied from interface:MoneroWallet
Scan transactions by their hash/id.- Parameters:
txHashes
- tx hashes to scan
-
rescanSpent
public void rescanSpent()Description copied from interface:MoneroWallet
Rescan the blockchain for spent outputs. Note: this can only be called with a trusted daemon. Example use case: peer multisig hex is import when connected to an untrusted daemon, so the wallet will not rescan spent outputs. Then the wallet connects to a trusted daemon. This method should be manually invoked to rescan outputs. -
rescanBlockchain
public void rescanBlockchain()Description copied from interface:MoneroWallet
Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself. WARNING: This method discards local wallet data like destination addresses, tx secret keys, tx notes, etc. -
getBalance
Description copied from interface:MoneroWallet
Get a subaddress's balance.- Parameters:
accountIdx
- index of the account to get the balance of (default all accounts if null)subaddressIdx
- index of the subaddress to get the balance of (default all subaddresses if null)- Returns:
- the requested balance
-
getUnlockedBalance
Description copied from interface:MoneroWallet
Get a subaddress's unlocked balance.- Parameters:
accountIdx
- index of the subaddress to get the unlocked balance of (default all accounts if null)subaddressIdx
- index of the subaddress to get the unlocked balance of (default all subaddresses if null)- Returns:
- the requested unlocked balance
-
getAccounts
Description copied from interface:MoneroWallet
Get accounts with a given tag.- Parameters:
includeSubaddresses
- specifies if subaddresses should be includedtag
- is the tag for filtering accounts, all accounts if null- Returns:
- all accounts with the given tag
-
getAccounts
public List<MoneroAccount> getAccounts(boolean includeSubaddresses, String tag, boolean skipBalances) -
getAccount
Description copied from interface:MoneroWallet
Get an account.- Parameters:
accountIdx
- specifies the account to getincludeSubaddresses
- specifies if subaddresses should be included- Returns:
- the retrieved account
-
getAccount
-
createAccount
Description copied from interface:MoneroWallet
Create a new account with a label for the first subaddress.- Parameters:
label
- specifies the label for account's first subaddress (optional)- Returns:
- the created account
-
getSubaddresses
Description copied from interface:MoneroWallet
Get subaddresses in an account.- Parameters:
accountIdx
- specifies the account to get subaddresses withinsubaddressIndices
- are specific subaddresses to get (optional)- Returns:
- the retrieved subaddresses
-
getSubaddresses
public List<MoneroSubaddress> getSubaddresses(int accountIdx, List<Integer> subaddressIndices, boolean skipBalances) -
createSubaddress
Description copied from interface:MoneroWallet
Create a subaddress within an account.- Parameters:
accountIdx
- specifies the index of the account to create the subaddress withinlabel
- specifies the the label for the subaddress (optional)- Returns:
- the created subaddress
-
setSubaddressLabel
Description copied from interface:MoneroWallet
Set a subaddress label.- Parameters:
accountIdx
- index of the account to set the label forsubaddressIdx
- index of the subaddress to set the label forlabel
- the label to set
-
getTxs
Description copied from interface:MoneroWallet
Get wallet transactions that meet the criteria defined in a query object.
Transactions must meet every criteria defined in the query in order to be returned. All criteria are optional and no filtering is applied when not defined.
All supported query criteria:
isConfirmed - path of the wallet to open
password - password of the wallet to open
networkType - network type of the wallet to open (one of MoneroNetworkType.MAINNET|TESTNET|STAGENET)
serverUri - uri of the wallet's daemon (optional)
serverUsername - username to authenticate with the daemon (optional)
serverPassword - password to authenticate with the daemon (optional)
server - MoneroRpcConnection to a monero daemon (optional)
isConfirmed - get txs that are confirmed or not (optional)
inTxPool - get txs that are in the tx pool or not (optional)
isRelayed - get txs that are relayed or not (optional)
isFailed - get txs that are failed or not (optional)
isMinerTx - get miner txs or not (optional)
hash - get a tx with the hash (optional)
hashes - get txs with the hashes (optional)
paymentId - get transactions with the payment id (optional)
paymentIds - get transactions with the payment ids (optional)
hasPaymentId - get transactions with a payment id or not (optional)
minHeight - get txs with height greater than or equal to the given height (optional)
maxHeight - get txs with height less than or equal to the given height (optional)
isOutgoing - get txs with an outgoing transfer or not (optional)
isIncoming - get txs with an incoming transfer or not (optional)
transferQuery - get txs that have a transfer that meets this query (optional)
includeOutputs - specifies that tx outputs should be returned with tx results (optional)
- Parameters:
query
- specifies properties of the transactions to get- Returns:
- wallet transactions that meet the query
-
getTransfers
Description copied from interface:MoneroWallet
Get tranfsers that meet the criteria defined in a query object.
Transfers must meet every criteria defined in the query in order to be returned. All criteria are optional and no filtering is applied when not defined.
All supported query criteria:
isOutgoing - get transfers that are outgoing or not (optional)
isIncoming - get transfers that are incoming or not (optional)
address - wallet's address that a transfer either originated from (if outgoing) or is destined for (if incoming) (optional)
accountIndex - get transfers that either originated from (if outgoing) or are destined for (if incoming) a specific account index (optional)
subaddressIndex - get transfers that either originated from (if outgoing) or are destined for (if incoming) a specific subaddress index (optional)
subaddressIndices - get transfers that either originated from (if outgoing) or are destined for (if incoming) specific subaddress indices (optional)
amount - amount being transferred (optional)
destinations - individual destinations of an outgoing transfer, which is local wallet data and NOT recoverable from the blockchain (optional)
hasDestinations - get transfers that have destinations or not (optional)
txQuery - get transfers whose transaction meets this query (optional)- Parameters:
query
- specifies attributes of transfers to get- Returns:
- wallet transfers that meet the query
-
getOutputs
Description copied from interface:MoneroWallet
Get outputs which meet the criteria defined in a query object.
Outputs must meet every criteria defined in the query in order to be returned. All criteria are optional and no filtering is applied when not defined.
All supported query criteria:
accountIndex - get outputs associated with a specific account index (optional)
subaddressIndex - get outputs associated with a specific subaddress index (optional)
subaddressIndices - get outputs associated with specific subaddress indices (optional)
amount - get outputs with a specific amount (optional)
minAmount - get outputs greater than or equal to a minimum amount (optional)
maxAmount - get outputs less than or equal to a maximum amount (optional)
isSpent - get outputs that are spent or not (optional)
keyImage - get outputs that match the fields defined in the given key image (optional)
txQuery - get outputs whose transaction meets this filter (optional)
- Parameters:
query
- specifies attributes of outputs to get- Returns:
- the queried outputs
-
exportOutputs
Description copied from interface:MoneroWallet
Export outputs in hex format.- Parameters:
all
- exports all outputs if true, else exports the outputs since the last export- Returns:
- outputs in hex format
-
importOutputs
Description copied from interface:MoneroWallet
Import outputs in hex format.- Parameters:
outputsHex
- are outputs in hex format- Returns:
- the number of outputs imported
-
exportKeyImages
Description copied from interface:MoneroWallet
Export signed key images.- Parameters:
all
- exports all key images if true, else exports the key images since the last export- Returns:
- signed key images
-
importKeyImages
Description copied from interface:MoneroWallet
Import signed key images and verify their spent status.- Parameters:
keyImages
- are key images to import and verify (requires hex and signature)- Returns:
- results of the import
-
getNewKeyImagesFromLastImport
Description copied from interface:MoneroWallet
Get new key images from the last imported outputs.- Returns:
- the key images from the last imported outputs
-
freezeOutput
Description copied from interface:MoneroWallet
Freeze an output.- Parameters:
keyImage
- key image of the output to freeze
-
thawOutput
Description copied from interface:MoneroWallet
Thaw a frozen output.- Parameters:
keyImage
- key image of the output to thaw
-
isOutputFrozen
Description copied from interface:MoneroWallet
Check if an output is frozen.- Parameters:
keyImage
- key image of the output to check if frozen- Returns:
- true if the output is frozen, false otherwise
-
createTxs
Description copied from interface:MoneroWallet
Create one or more transactions to transfer funds from this wallet.All supported configuration:
address - single destination address (required unless `destinations` provided)
amount - single destination amount (required unless `destinations` provided)
accountIndex - source account index to transfer funds from (required)
subaddressIndex - source subaddress index to transfer funds from (optional)
subaddressIndices - source subaddress indices to transfer funds from (optional)
relay - relay the transactions to peers to commit to the blockchain (default false)
priority - transaction priority (default MoneroTxPriority.NORMAL)
destinations - addresses and amounts in a multi-destination tx (required unless `address` and `amount` provided)
paymentId - transaction payment ID (optional)
unlockTime - minimum height or timestamp for the transactions to unlock (default 0)
canSplit - allow funds to be transferred using multiple transactions (default true)
- Parameters:
config
- configures the transactions to create- Returns:
- the created transactions
-
sweepOutput
Description copied from interface:MoneroWallet
Sweep an output with a given key image.All supported configuration:
address - single destination address (required)
keyImage - key image to sweep (required)
relay - relay the transaction to peers to commit to the blockchain (default false)
unlockTime - minimum height or timestamp for the transaction to unlock (default 0)
priority - transaction priority (default MoneroTxPriority.NORMAL)
- Parameters:
config
- configures the sweep transaction- Returns:
- the created transaction
-
sweepUnlocked
Description copied from interface:MoneroWallet
Sweep all unlocked funds according to the given config.All supported configuration:
address - single destination address (required)
accountIndex - source account index to sweep from (optional, defaults to all accounts)
subaddressIndex - source subaddress index to sweep from (optional, defaults to all subaddresses)
subaddressIndices - source subaddress indices to sweep from (optional)
relay - relay the transactions to peers to commit to the blockchain (default false)
priority - transaction priority (default MoneroTxPriority.NORMAL)
unlockTime - minimum height or timestamp for the transactions to unlock (default 0)
sweepEachSubaddress - sweep each subaddress individually if true (default false)
- Parameters:
config
- is the sweep configuration- Returns:
- the created transactions
-
sweepDust
Description copied from interface:MoneroWallet
Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix. NOTE: Dust only exists pre RCT, so this method will throw "no dust to sweep" on new wallets.- Parameters:
relay
- specifies if the resulting transaction should be relayed (defaults to false i.e. not relayed)- Returns:
- the created transactions
-
relayTxs
Description copied from interface:MoneroWallet
Relay previously created transactions.- Parameters:
txMetadatas
- are transaction metadata previously created without relaying- Returns:
- the hashes of the relayed txs
-
describeTxSet
Description copied from interface:MoneroWallet
Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.- Parameters:
txSet
- is a tx set containing unsigned or multisig tx hex- Returns:
- the tx set containing structured transactions
-
signTxs
Description copied from interface:MoneroWallet
Sign unsigned transactions from a view-only wallet.- Parameters:
unsignedTxHex
- is unsigned transaction hex from when the transactions were created- Returns:
- the signed transaction set
-
submitTxs
Description copied from interface:MoneroWallet
Submit signed transactions from a view-only wallet.- Parameters:
signedTxHex
- is signed transaction hex from signTxs()- Returns:
- the resulting transaction hashes
-
signMessage
public String signMessage(String msg, MoneroMessageSignatureType signatureType, int accountIdx, int subaddressIdx) Description copied from interface:MoneroWallet
Sign a message.- Parameters:
msg
- the message to signsignatureType
- sign with spend key or view keyaccountIdx
- the account index of the message signature (default 0)subaddressIdx
- the subaddress index of the message signature (default 0)- Returns:
- the signature
-
verifyMessage
Description copied from interface:MoneroWallet
Verify a signature on a message.- Parameters:
msg
- is the signed messageaddress
- is the signing addresssignature
- is the signature- Returns:
- the message signature verification result
-
getTxKey
Description copied from interface:MoneroWallet
Get a transaction's secret key from its hash.- Parameters:
txHash
- is the transaction's hash- Returns:
- is the transaction's secret key
-
checkTxKey
Description copied from interface:MoneroWallet
Check a transaction in the blockchain with its secret key.- Parameters:
txHash
- specifies the transaction to checktxKey
- is the transaction's secret keyaddress
- is the destination public address of the transaction- Returns:
- the result of the check
-
getTxProof
Description copied from interface:MoneroWallet
Get a transaction signature to prove it.- Parameters:
txHash
- specifies the transaction to proveaddress
- is the destination public address of the transactionmessage
- is a message to include with the signature to further authenticate the proof (optional)- Returns:
- the transaction signature
-
checkTxProof
Description copied from interface:MoneroWallet
Prove a transaction by checking its signature.- Parameters:
txHash
- specifies the transaction to proveaddress
- is the destination public address of the transactionmessage
- is a message included with the signature to further authenticate the proof (optional)signature
- is the transaction signature to confirm- Returns:
- the result of the check
-
getSpendProof
Description copied from interface:MoneroWallet
Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.- Parameters:
txHash
- specifies the transaction to provemessage
- is a message to include with the signature to further authenticate the proof (optional)- Returns:
- the transaction signature
-
checkSpendProof
Description copied from interface:MoneroWallet
Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.- Parameters:
txHash
- specifies the transaction to provemessage
- is a message included with the signature to further authenticate the proof (optional)signature
- is the transaction signature to confirm- Returns:
- true if the signature is good, false otherwise
-
getReserveProofWallet
Description copied from interface:MoneroWallet
Generate a signature to prove the entire balance of the wallet.- Parameters:
message
- is a message included with the signature to further authenticate the proof (optional)- Returns:
- the reserve proof signature
-
getReserveProofAccount
Description copied from interface:MoneroWallet
Generate a signature to prove an available amount in an account.- Parameters:
accountIdx
- specifies the account to prove ownership of the amountamount
- is the minimum amount to prove as available in the accountmessage
- is a message to include with the signature to further authenticate the proof (optional)- Returns:
- the reserve proof signature
-
checkReserveProof
Description copied from interface:MoneroWallet
Proves a wallet has a disposable reserve using a signature.- Parameters:
address
- is the public wallet addressmessage
- is a message included with the signature to further authenticate the proof (optional)signature
- is the reserve proof signature to check- Returns:
- the result of checking the signature proof
-
getTxNotes
Description copied from interface:MoneroWallet
Get notes for multiple transactions.- Parameters:
txHashes
- identify the transactions to get notes for- Returns:
- notes for the transactions
-
setTxNotes
Description copied from interface:MoneroWallet
Set notes for multiple transactions.- Parameters:
txHashes
- specify the transactions to set notes fornotes
- are the notes to set for the transactions
-
getAddressBookEntries
Description copied from interface:MoneroWallet
Get address book entries.- Parameters:
entryIndices
- are indices of the entries to get (optional)- Returns:
- the address book entries
-
addAddressBookEntry
Description copied from interface:MoneroWallet
Add an address book entry.- Parameters:
address
- is the entry addressdescription
- is the entry description (optional)- Returns:
- the index of the added entry
-
editAddressBookEntry
public void editAddressBookEntry(int index, boolean setAddress, String address, boolean setDescription, String description) Description copied from interface:MoneroWallet
Edit an address book entry.- Parameters:
index
- is the index of the address book entry to editsetAddress
- specifies if the address should be updatedaddress
- is the updated addresssetDescription
- specifies if the description should be updateddescription
- is the updated description
-
deleteAddressBookEntry
public void deleteAddressBookEntry(int entryIdx) Description copied from interface:MoneroWallet
Delete an address book entry.- Parameters:
entryIdx
- is the index of the entry to delete
-
tagAccounts
Description copied from interface:MoneroWallet
Tag accounts.- Parameters:
tag
- is the tag to apply to the specified accountsaccountIndices
- are the indices of the accounts to tag
-
untagAccounts
Description copied from interface:MoneroWallet
Untag acconts.- Parameters:
accountIndices
- are the indices of the accounts to untag
-
getAccountTags
Description copied from interface:MoneroWallet
Return all account tags.- Returns:
- the wallet's account tags
-
setAccountTagLabel
Description copied from interface:MoneroWallet
Sets a human-readable description for a tag.- Parameters:
tag
- is the tag to set a description forlabel
- is the label to set for the tag
-
getPaymentUri
Description copied from interface:MoneroWallet
Creates a payment URI from a send configuration.- Parameters:
config
- specifies configuration for a potential tx- Returns:
- the payment uri
-
parsePaymentUri
Description copied from interface:MoneroWallet
Parses a payment URI to a transaction configuration.- Parameters:
uri
- is the payment uri to parse- Returns:
- the send configuration parsed from the uri
-
getAttribute
Description copied from interface:MoneroWallet
Get an attribute.- Parameters:
key
- is the attribute to get the value of- Returns:
- the attribute's value
-
setAttribute
Description copied from interface:MoneroWallet
Set an arbitrary attribute.- Parameters:
key
- is the attribute keyval
- is the attribute value
-
startMining
Description copied from interface:MoneroWallet
Start mining.- Parameters:
numThreads
- is the number of threads created for mining (optional)backgroundMining
- specifies if mining should occur in the background (optional)ignoreBattery
- specifies if the battery should be ignored for mining (optional)
-
stopMining
public void stopMining()Description copied from interface:MoneroWallet
Stop mining. -
isMultisigImportNeeded
public boolean isMultisigImportNeeded()Description copied from interface:MoneroWallet
Indicates if importing multisig data is needed for returning a correct balance.- Returns:
- true if importing multisig data is needed for returning a correct balance, false otherwise
-
getMultisigInfo
Description copied from interface:MoneroWallet
Get multisig info about this wallet.- Returns:
- multisig info about this wallet
-
prepareMultisig
Description copied from interface:MoneroWallet
Get multisig info as hex to share with participants to begin creating a multisig wallet.- Returns:
- this wallet's multisig hex to share with participants
-
makeMultisig
Description copied from interface:MoneroWallet
Make this wallet multisig by importing multisig hex from participants.- Parameters:
multisigHexes
- are multisig hex from each participantthreshold
- is the number of signatures needed to sign transferspassword
- is the wallet password- Returns:
- this wallet's multisig hex to share with participants
-
exchangeMultisigKeys
Description copied from interface:MoneroWallet
Exchange multisig hex with participants in a M/N multisig wallet. This process must be repeated with participants exactly N-M times.- Parameters:
multisigHexes
- are multisig hex from each participantpassword
- is the wallet's password // TODO monero-project: redundant? wallet is created with password- Returns:
- the result which has the multisig's address xor this wallet's multisig hex to share with participants iff not done
-
exportMultisigHex
Description copied from interface:MoneroWallet
Export this wallet's multisig info as hex for other participants.- Returns:
- this wallet's multisig info as hex for other participants
-
importMultisigHex
Description copied from interface:MoneroWallet
Import multisig info as hex from other participants.- Parameters:
multisigHexes
- are multisig hex from each participant- Returns:
- the number of outputs signed with the given multisig hex
-
signMultisigTxHex
Description copied from interface:MoneroWallet
Sign multisig transactions from a multisig wallet.- Parameters:
multisigTxHex
- represents unsigned multisig transactions as hex- Returns:
- the result of signing the multisig transactions
-
submitMultisigTxHex
Description copied from interface:MoneroWallet
Submit signed multisig transactions from a multisig wallet.- Parameters:
signedMultisigTxHex
- is signed multisig hex returned from signMultisigTxHex()- Returns:
- the resulting transaction hashes
-
changePassword
Description copied from interface:MoneroWallet
Change the wallet password.- Parameters:
oldPassword
- is the wallet's old passwordnewPassword
- is the wallet's new password
-
save
public void save()Description copied from interface:MoneroWallet
Save the wallet at its current path. -
close
public void close(boolean save) Description copied from interface:MoneroWallet
Optionally save then close the wallet.- Specified by:
close
in interfaceMoneroWallet
- Parameters:
save
- specifies if the wallet should be saved before being closed (default false)
-
isClosed
public boolean isClosed()Description copied from interface:MoneroWallet
Indicates if this wallet is closed or not.- Specified by:
isClosed
in interfaceMoneroWallet
- Returns:
- true if the wallet is closed, false otherwise
-
getListeners
Description copied from interface:MoneroWallet
Get the listeners registered with the wallet.- Specified by:
getListeners
in interfaceMoneroWallet
- Returns:
- the registered listeners
-
setDaemonConnection
Description copied from interface:MoneroWallet
Set the wallet's daemon connection.- Specified by:
setDaemonConnection
in interfaceMoneroWallet
- Parameters:
uri
- is the uri of the daemon for the wallet to use
-
setDaemonConnection
Description copied from interface:MoneroWallet
Set the wallet's daemon connection.- Specified by:
setDaemonConnection
in interfaceMoneroWallet
- Parameters:
uri
- is the daemon's URIusername
- is the username to authenticate with the daemon (optional)password
- is the password to authenticate with the daemon (optional)
-
setConnectionManager
Description copied from interface:MoneroWallet
Set the wallet's daemon connection manager.- Specified by:
setConnectionManager
in interfaceMoneroWallet
- Parameters:
connectionManager
- manages connections to monerod
-
getConnectionManager
Description copied from interface:MoneroWallet
Get the wallet's daemon connection manager.- Specified by:
getConnectionManager
in interfaceMoneroWallet
- Returns:
- the wallet's daemon connection manager
-
getPrimaryAddress
Description copied from interface:MoneroWallet
Get the wallet's primary address.- Specified by:
getPrimaryAddress
in interfaceMoneroWallet
- Returns:
- the wallet's primary address
-
getIntegratedAddress
Description copied from interface:MoneroWallet
Get an integrated address based on this wallet's primary address and a randomly generated payment ID.- Specified by:
getIntegratedAddress
in interfaceMoneroWallet
- Returns:
- the integrated address
-
sync
Description copied from interface:MoneroWallet
Synchronize the wallet with the daemon as a one-time synchronous process.- Specified by:
sync
in interfaceMoneroWallet
- Returns:
- the sync result
-
sync
Description copied from interface:MoneroWallet
Synchronize the wallet with the daemon as a one-time synchronous process.- Specified by:
sync
in interfaceMoneroWallet
- Parameters:
listener
- listener to receive notifications during synchronization- Returns:
- the sync result
-
sync
Description copied from interface:MoneroWallet
Synchronize the wallet with the daemon as a one-time synchronous process.- Specified by:
sync
in interfaceMoneroWallet
- Parameters:
startHeight
- is the start height to sync from (defaults to the last synced block)- Returns:
- the sync result
-
startSyncing
public void startSyncing()Description copied from interface:MoneroWallet
Start background synchronizing.- Specified by:
startSyncing
in interfaceMoneroWallet
-
getBalance
Description copied from interface:MoneroWallet
Get the wallet's balance.- Specified by:
getBalance
in interfaceMoneroWallet
- Returns:
- the wallet's balance
-
getBalance
Description copied from interface:MoneroWallet
Get an account's balance.- Specified by:
getBalance
in interfaceMoneroWallet
- Parameters:
accountIdx
- index of the account to get the balance of (default all accounts if null)- Returns:
- the requested balance
-
getUnlockedBalance
Description copied from interface:MoneroWallet
Get the wallet's unlocked balance.- Specified by:
getUnlockedBalance
in interfaceMoneroWallet
- Returns:
- the wallet's unlocked balance
-
getUnlockedBalance
Description copied from interface:MoneroWallet
Get an account's unlocked balance.- Specified by:
getUnlockedBalance
in interfaceMoneroWallet
- Parameters:
accountIdx
- index of the account to get the unlocked balance of (default all accounts if null)- Returns:
- the requested unlocked balance
-
getAccounts
Description copied from interface:MoneroWallet
Get all accounts.- Specified by:
getAccounts
in interfaceMoneroWallet
- Returns:
- all accounts
-
getAccounts
Description copied from interface:MoneroWallet
Get all accounts.- Specified by:
getAccounts
in interfaceMoneroWallet
- Parameters:
includeSubaddresses
- specifies if subaddresses should be included- Returns:
- all accounts
-
getAccounts
Description copied from interface:MoneroWallet
Get accounts with a given tag.- Specified by:
getAccounts
in interfaceMoneroWallet
- Parameters:
tag
- is the tag for filtering accounts, all accounts if null- Returns:
- all accounts with the given tag
-
getAccount
Description copied from interface:MoneroWallet
Get an account without subaddress information.- Specified by:
getAccount
in interfaceMoneroWallet
- Parameters:
accountIdx
- specifies the account to get- Returns:
- the retrieved account
-
createAccount
Description copied from interface:MoneroWallet
Create a new account.- Specified by:
createAccount
in interfaceMoneroWallet
- Returns:
- the created account
-
setAccountLabel
Description copied from interface:MoneroWallet
Set an account label.- Specified by:
setAccountLabel
in interfaceMoneroWallet
- Parameters:
accountIdx
- index of the account to set the label forlabel
- the label to set
-
getSubaddresses
Description copied from interface:MoneroWallet
Get all subaddresses in an account.- Specified by:
getSubaddresses
in interfaceMoneroWallet
- Parameters:
accountIdx
- specifies the account to get subaddresses within- Returns:
- the retrieved subaddresses
-
getSubaddress
Description copied from interface:MoneroWallet
Get a subaddress.- Specified by:
getSubaddress
in interfaceMoneroWallet
- Parameters:
accountIdx
- specifies the index of the subaddress's accountsubaddressIdx
- specifies index of the subaddress within the account- Returns:
- the retrieved subaddress
-
createSubaddress
Description copied from interface:MoneroWallet
Create a subaddress within an account and without a label.- Specified by:
createSubaddress
in interfaceMoneroWallet
- Parameters:
accountIdx
- specifies the index of the account to create the subaddress within- Returns:
- the created subaddress
-
getTx
Description copied from interface:MoneroWallet
Get a wallet transaction by hash.- Specified by:
getTx
in interfaceMoneroWallet
- Parameters:
txHash
- is the hash of a transaction to get- Returns:
- the identified transaction or null if not found
-
getTxs
Description copied from interface:MoneroWallet
Get all wallet transactions. Wallet transactions contain one or more transfers that are either incoming or outgoing to the wallet.- Specified by:
getTxs
in interfaceMoneroWallet
- Returns:
- all wallet transactions
-
getTxs
Description copied from interface:MoneroWallet
Get wallet transactions by hash.- Specified by:
getTxs
in interfaceMoneroWallet
- Parameters:
txHashes
- are hashes of transactions to get- Returns:
- the found transactions
-
getTxs
Description copied from interface:MoneroWallet
Get wallet transactions by hash.- Specified by:
getTxs
in interfaceMoneroWallet
- Parameters:
txHashes
- are hashes of transactions to get- Returns:
- the found transactions
-
getTransfers
Description copied from interface:MoneroWallet
Get all incoming and outgoing transfers to and from this wallet. An outgoing transfer represents a total amount sent from one or more subaddresses within an account to individual destination addresses, each with their own amount. An incoming transfer represents a total amount received into a subaddress within an account. Transfers belong to transactions which are stored on the blockchain.- Specified by:
getTransfers
in interfaceMoneroWallet
- Returns:
- all wallet transfers
-
getTransfers
Description copied from interface:MoneroWallet
Get incoming and outgoing transfers to and from an account. An outgoing transfer represents a total amount sent from one or more subaddresses within an account to individual destination addresses, each with their own amount. An incoming transfer represents a total amount received into a subaddress within an account. Transfers belong to transactions which are stored on the blockchain.- Specified by:
getTransfers
in interfaceMoneroWallet
- Parameters:
accountIdx
- is the index of the account to get transfers from- Returns:
- transfers to/from the account
-
getTransfers
Description copied from interface:MoneroWallet
Get incoming and outgoing transfers to and from a subaddress. An outgoing transfer represents a total amount sent from one or more subaddresses within an account to individual destination addresses, each with their own amount. An incoming transfer represents a total amount received into a subaddress within an account. Transfers belong to transactions which are stored on the blockchain.- Specified by:
getTransfers
in interfaceMoneroWallet
- Parameters:
accountIdx
- is the index of the account to get transfers fromsubaddressIdx
- is the index of the subaddress to get transfers from- Returns:
- transfers to/from the subaddress
-
getIncomingTransfers
Description copied from interface:MoneroWallet
Get all of the wallet's incoming transfers.- Specified by:
getIncomingTransfers
in interfaceMoneroWallet
- Returns:
- the wallet's incoming transfers
-
getIncomingTransfers
Description copied from interface:MoneroWallet
Get incoming transfers that meet a query.
All supported query criteria:
address - get incoming transfers to a specific address in the wallet (optional)
accountIndex - get incoming transfers to a specific account index (optional)
subaddressIndex - get incoming transfers to a specific subaddress index (optional)
subaddressIndices - get transfers destined for specific subaddress indices (optional)
amount - amount being transferred (optional)
txQuery - get transfers whose transaction meets this query (optional)
- Specified by:
getIncomingTransfers
in interfaceMoneroWallet
- Parameters:
query
- specifies which incoming transfers to get- Returns:
- incoming transfers that meet the query
-
getOutgoingTransfers
Description copied from interface:MoneroWallet
Get all of the wallet's outgoing transfers.- Specified by:
getOutgoingTransfers
in interfaceMoneroWallet
- Returns:
- the wallet's outgoing transfers
-
getOutgoingTransfers
Description copied from interface:MoneroWallet
Get outgoing transfers that meet a query.
All supported query criteria:
address - get outgoing transfers from a specific address in the wallet (optional)
accountIndex - get outgoing transfers from a specific account index (optional)
subaddressIndex - get outgoing transfers from a specific subaddress index (optional)
subaddressIndices - get outgoing transfers from specific subaddress indices (optional)
amount - amount being transferred (optional)
destinations - individual destinations of an outgoing transfer, which is local wallet data and NOT recoverable from the blockchain (optional)
hasDestinations - get transfers that have destinations or not (optional)
txQuery - get transfers whose transaction meets this query (optional)
- Specified by:
getOutgoingTransfers
in interfaceMoneroWallet
- Parameters:
query
- specifies which outgoing transfers to get- Returns:
- outgoing transfers that meet the query
-
getOutputs
Description copied from interface:MoneroWallet
Get outputs created from previous transactions that belong to the wallet (i.e. that the wallet can spend one time). Outputs are part of transactions which are stored in blocks on the blockchain.- Specified by:
getOutputs
in interfaceMoneroWallet
- Returns:
- all wallet outputs
-
exportOutputs
Description copied from interface:MoneroWallet
Export outputs since the last export.- Specified by:
exportOutputs
in interfaceMoneroWallet
- Returns:
- outputs since the last export in hex format
-
exportKeyImages
Description copied from interface:MoneroWallet
Export key images since the last export.- Specified by:
exportKeyImages
in interfaceMoneroWallet
- Returns:
- signed key images since the last export
-
createTx
Description copied from interface:MoneroWallet
Create a transaction to transfer funds from this wallet.All supported configuration:
address - single destination address (required unless `destinations` provided)
amount - single destination amount (required unless `destinations` provided)
accountIndex - source account index to transfer funds from (required)
subaddressIndex - source subaddress index to transfer funds from (optional)
subaddressIndices - source subaddress indices to transfer funds from (optional)
relay - relay the transaction to peers to commit to the blockchain (default false)
priority - transaction priority (default MoneroTxPriority.NORMAL)
destinations - addresses and amounts in a multi-destination tx (required unless `address` and `amount` provided)
subtractFeeFrom - list of destination indices to split the transaction fee (optional)
paymentId - transaction payment ID (optional)
unlockTime - minimum height or timestamp for the transaction to unlock (default 0)
- Specified by:
createTx
in interfaceMoneroWallet
- Parameters:
config
- configures the transaction to create- Returns:
- the created transaction
-
relayTx
Description copied from interface:MoneroWallet
Relay a previously created transaction.- Specified by:
relayTx
in interfaceMoneroWallet
- Parameters:
txMetadata
- is transaction metadata previously created without relaying- Returns:
- the hash of the relayed tx
-
relayTx
Description copied from interface:MoneroWallet
Relay a previously created transaction.- Specified by:
relayTx
in interfaceMoneroWallet
- Parameters:
tx
- is the transaction to relay- Returns:
- the hash of the relayed tx
-
relayTxs
Description copied from interface:MoneroWallet
Relay previously created transactions.- Specified by:
relayTxs
in interfaceMoneroWallet
- Parameters:
txs
- are the transactions to relay- Returns:
- the hashes of the relayed txs
-
describeUnsignedTxSet
Description copied from interface:MoneroWallet
Describe a tx set from unsigned tx hex.- Specified by:
describeUnsignedTxSet
in interfaceMoneroWallet
- Parameters:
unsignedTxHex
- unsigned tx hex- Returns:
- the tx set containing structured transactions
-
describeMultisigTxSet
Description copied from interface:MoneroWallet
Describe a tx set from multisig tx hex.- Specified by:
describeMultisigTxSet
in interfaceMoneroWallet
- Parameters:
multisigTxHex
- multisig tx hex- Returns:
- the tx set containing structured transactions
-
signMessage
Description copied from interface:MoneroWallet
Sign a message.- Specified by:
signMessage
in interfaceMoneroWallet
- Parameters:
message
- is the message to sign- Returns:
- the signature
-
getTxProof
Description copied from interface:MoneroWallet
Get a transaction signature to prove it.- Specified by:
getTxProof
in interfaceMoneroWallet
- Parameters:
txHash
- specifies the transaction to proveaddress
- is the destination public address of the transaction- Returns:
- the transaction signature
-
getSpendProof
Description copied from interface:MoneroWallet
Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.- Specified by:
getSpendProof
in interfaceMoneroWallet
- Parameters:
txHash
- specifies the transaction to prove- Returns:
- the transaction signature
-
getTxNote
Description copied from interface:MoneroWallet
Get a transaction note.- Specified by:
getTxNote
in interfaceMoneroWallet
- Parameters:
txHash
- specifies the transaction to get the note of- Returns:
- the tx note
-
setTxNote
Description copied from interface:MoneroWallet
Set a note for a specific transaction.- Specified by:
setTxNote
in interfaceMoneroWallet
- Parameters:
txHash
- specifies the transactionnote
- specifies the note
-
getAddressBookEntries
Description copied from interface:MoneroWallet
Get all address book entries.- Specified by:
getAddressBookEntries
in interfaceMoneroWallet
- Returns:
- the address book entries
-
isMultisig
public boolean isMultisig()Description copied from interface:MoneroWallet
Indicates if this wallet is a multisig wallet.- Specified by:
isMultisig
in interfaceMoneroWallet
- Returns:
- true if this is a multisig wallet, false otherwise
-
importMultisigHex
Description copied from interface:MoneroWallet
Import multisig info as hex from other participants.- Specified by:
importMultisigHex
in interfaceMoneroWallet
- Parameters:
multisigHexes
- are multisig hex from each participant- Returns:
- the number of outputs signed with the given multisig hex
-
close
public void close()Description copied from interface:MoneroWallet
Close the wallet (does not save).- Specified by:
close
in interfaceMoneroWallet
-