Protected
_isProtected
addressProtected
configProtected
connectionProtected
connectionProtected
daemonProtected
listenersProtected
pathProtected
processProtected
syncProtected
walletStatic
Readonly
DEFAULT_Static
Protected
Readonly
DEFAULT_Register a listener to receive wallet notifications.
listener to receive wallet notifications
Proves a wallet has a disposable reserve using a signature.
public wallet address
message included with the signature to further authenticate the proof (optional)
reserve proof signature to check
the result of checking the signature proof
Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.
transaction to prove
message included with the signature to further authenticate the proof (optional)
transaction signature to confirm
true if the signature is good, false otherwise
Check a transaction in the blockchain with its secret key.
transaction to check
transaction's secret key
destination public address of the transaction
the result of the check
Prove a transaction by checking its signature.
transaction to prove
destination public address of the transaction
message included with the signature to further authenticate the proof
transaction signature to confirm
the result of the check
Protected
clearCreate a new account with a label for the first subaddress.
Optional
label: stringlabel for account's first subaddress (optional)
the created account
Create a subaddress within an account.
index of the account to create the subaddress within
Optional
label: stringthe label for the subaddress (optional)
the created subaddress
Create a transaction to transfer funds from this wallet.
configures the transaction to create (required)
the created transaction
Create one or more transactions to transfer funds from this wallet.
configures the transactions to create (required)
the created transactions
Create and open a wallet on the monero-wallet-rpc server.
Example:
// create and open wallet on monero-wallet-rpc
// construct client to monero-wallet-rpc
let walletRpc = new MoneroWalletRpc("http://localhost:38084", "rpc_user", "abc123");
await walletRpc.createWallet({
path: "mywallet",
password: "abc123",
seed: "coexist igloo pamphlet lagoon...",
restoreHeight: 1543218l
});
MoneroWalletConfig or equivalent JS object
this wallet client
Protected
createProtected
createProtected
createDecode an integrated address to get its standard address and payment id.
integrated address to decode
the decoded integrated address including standard address and payment id
Describe a tx set from multisig tx hex.
multisig tx hex
the tx set containing structured transactions
Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
a tx set containing unsigned or multisig tx hex
txSet - the tx set containing structured transactions
Describe a tx set from unsigned tx hex.
unsigned tx hex
the tx set containing structured transactions
Edit an address book entry.
index of the address book entry to edit
specifies if the address should be updated
updated address
specifies if the description should be updated
updated description
Exchange multisig hex with participants in a M/N multisig wallet.
This process must be repeated with participants exactly N-M times.
are multisig hex from each participant
wallet's password // TODO monero-project: redundant? wallet is created with password
the result which has the multisig's address xor this wallet's multisig hex to share with participants iff not done
Export signed key images.
export all key images if true, else export the key images since the last export (default false)
the wallet's signed key images
Get an account.
index of the account to get
Optional
includeSubaddresses: booleaninclude subaddresses if true
Optional
skipBalances: booleanthe retrieved account
Protected
getReturn all account tags.
the wallet's account tags
Get accounts with a given tag.
Optional
includeSubaddresses: booleaninclude subaddresses if true
Optional
tag: stringtag for filtering accounts, all accounts if undefined
Optional
skipBalances: booleanall accounts with the given tag
Get the address of a specific subaddress.
the account index of the address's subaddress
the subaddress index within the account
the receive address of the specified subaddress
Get address book entries.
Optional
entryIndices: number[]indices of the entries to get
the address book entries
Get the account and subaddress index of the given address.
address to get the account and subaddress index from
the account and subaddress indices
Get the balance of the wallet, account, or subaddress.
Optional
accountIdx: numberindex of the account to get the balance of (default all accounts)
Optional
subaddressIdx: numberindex of the subaddress to get the balance of (default all subaddresses)
the balance of the wallet, account, or subaddress
Get the total and unlocked balances in a single request.
Optional
accountIdx: numberaccount index
Optional
subaddressIdx: numbersubaddress index
is the total and unlocked balances in an array, respectively
Get the wallet's daemon connection manager.
the wallet's daemon connection manager
Get the wallet's daemon connection.
the wallet's daemon connection
Get the blockchain's height by date as a conservative estimate for scanning.
year of the height to get
month of the height to get as a number between 1 and 12
day of the height to get as a number between 1 and 31
the blockchain's approximate height at the given date
Get incoming transfers.
configures the query (optional)
incoming transfers that meet the query
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.
Optional
standardAddress: stringis the standard address to generate the integrated address from (wallet's primary address if undefined)
Optional
paymentId: stringis the payment ID to generate an integrated address from (randomly generated if undefined)
the integrated address
Get the listeners registered with the wallet.
the registered listeners
Get multisig info about this wallet.
multisig info about this wallet
Get new key images from the last imported outputs.
the key images from the last imported outputs
Get outgoing transfers.
configures the query (optional)
outgoing transfers that meet the query
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.
Results can be filtered by passing a query object. Outputs must meet every criteria defined in the query in order to be returned. All filtering is optional and no filtering is applied when not defined.
Optional
query: Partial<MoneroOutputQuery>configures the query (optional)
the queried outputs
Protected
getCreates a payment URI from a send configuration.
specifies configuration for a potential tx
the payment uri
Generate a signature to prove an available amount in an account.
account to prove ownership of the amount
minimum amount to prove as available in the account
Optional
message: stringmessage to include with the signature to further authenticate the proof (optional)
the reserve proof signature
Get the wallet's RPC connection.
the wallet's rpc connection
Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
transaction to prove
Optional
message: stringmessage to include with the signature to further authenticate the proof (optional)
the transaction signature
Get a subaddress.
index of the subaddress's account
index of the subaddress within the account
Optional
skipBalances: booleanthe retrieved subaddress
Protected
getGet subaddresses in an account.
account to get subaddresses within
Optional
subaddressIndices: number[]indices of subaddresses to get (optional)
Optional
skipBalances: booleanthe retrieved subaddresses
Get 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.
Results can be filtered by passing 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.
Optional
query: Partial<MoneroTransferQuery>configures the query (optional)
wallet transfers that meet the query
Protected
getGet a wallet transaction by hash.
hash of a transaction to get
the identified transaction or undefined if not found
Get a transaction signature to prove it.
transaction to prove
destination public address of the transaction
Optional
message: stringmessage to include with the signature to further authenticate the proof (optional)
the transaction signature
Get wallet transactions. Wallet transactions contain one or more transfers that are either incoming or outgoing to the wallet.
Results can be filtered by passing 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.
Optional
query: string[] | Partial<MoneroTxQuery>configures the query (optional)
wallet transactions per the configuration
Get the unlocked balance of the wallet, account, or subaddress.
Optional
accountIdx: numberindex of the account to get the unlocked balance of (optional)
Optional
subaddressIdx: numberindex of the subaddress to get the unlocked balance of (optional)
the unlocked balance of the wallet, account, or subaddress
Gets the version of the wallet.
the version of the wallet
Protected
handleImport signed key images and verify their spent status.
images to import and verify (requires hex and signature)
results of the import
Make this wallet multisig by importing multisig hex from participants.
multisig hex from each participant
number of signatures needed to sign transfers
wallet password
this wallet's multisig hex to share with participants
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
});
the wallet's name or configuration to open
Optional
password: stringthe wallet's password
this wallet client
Parses a payment URI to a tx config.
payment uri to parse
the send configuration parsed from the uri
Protected
pollProtected
refreshRelay a previously created transaction.
transaction or its metadata to relay
the hash of the relayed tx
Relay previously created transactions.
transactions or their metadata to relay
the hashes of the relayed txs
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.
Protected
rpcProtected
rpcSet the wallet's daemon connection manager.
Optional
connectionManager: MoneroConnectionManagermanages connections to monerod
Set the wallet's daemon connection.
Optional
uriOrConnection: string | MoneroRpcConnectionthe daemon's URI or connection (defaults to offline)
Optional
isTrusted: booleanindicates if the daemon in trusted
Optional
sslOptions: SslOptionscustom SSL configuration
Sign a message.
the message to sign
sign with spend key or view key (default spend key)
the account index of the message signature (default 0)
the subaddress index of the message signature (default 0)
the signature
Sign multisig transactions from a multisig wallet.
unsigned multisig transactions as hex
the result of signing the multisig transactions
Sign unsigned transactions from a view-only wallet.
unsigned transaction hex from when the transactions were created
the signed transaction set
Start mining.
number of threads created for mining (optional)
Optional
backgroundMining: booleanspecifies if mining should occur in the background (optional)
Optional
ignoreBattery: booleanspecifies if the battery should be ignored for mining (optional)
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.
Optional
relay: booleanspecifies if the resulting transaction should be relayed (default false)
the created transactions
Sweep an output by key image.
configures the transaction to create (required)
the created transaction
Sweep all unlocked funds according to the given configuration.
configures the transactions to create (required)
the created transactions
Synchronize the wallet with the daemon as a one-time synchronous process.
Optional
listenerOrStartHeight: number | MoneroWalletListenerlistener xor start height (defaults to no sync listener, the last synced block)
Optional
startHeight: numberstartHeight if not given in first arg (defaults to last synced block)
Verify a signature on a message.
signed message
signing address
signature
true if the signature is good, false otherwise
Static
compareStatic
Protected
compareStatic
Protected
compareStatic
connectOptional
username: stringOptional
password: stringStatic
Protected
convertStatic
Protected
convertStatic
Protected
convertInitializes a MoneroTxSet from a list of rpc txs.
rpc txs to initialize the set from
Optional
txs: anyexisting txs to further initialize (optional)
Optional
config: anytx config
the converted tx set
Static
Protected
convertStatic
Protected
convertInitializes a tx set from a RPC map excluding txs.
map to initialize the tx set from
MoneroTxSet - initialized tx set
Static
Protected
convertConverts a rpc tx with a transfer to a tx set with a tx and transfer.
rpc tx to build from
existing tx to continue initializing (optional)
specifies if the tx is outgoing if true, incoming if false, or decodes from type if undefined
tx config
the initialized tx set with a tx
Static
Protected
convertStatic
Protected
convertBuilds a MoneroTxWallet from a RPC tx.
rpc tx to build from
Optional
tx: anyexisting tx to continue initializing (optional)
Optional
isOutgoing: anyspecifies if the tx is outgoing if true, incoming if false, or decodes from type if undefined
Optional
config: anytx config
is the initialized tx
Static
Protected
decodeDecodes a "type" from monero-wallet-rpc to initialize type and state fields in the given transaction.
TODO: these should be safe set
is the type to decode
is the transaction to decode known fields to
true if the rpc type indicates outgoing xor incoming
Static
Protected
decontextualizeStatic
Protected
initInitializes a sent transaction.
TODO: remove copyDestinations after >18.3.1 when subtractFeeFrom fully supported
send config
Optional
tx: anyexisting transaction to initialize (optional)
copies config destinations if true
is the initialized send tx
Static
Protected
isStatic
Protected
mergeStatic
Protected
normalizeOptional
username: stringOptional
password: stringStatic
Protected
normalizeStatic
Protected
normalizeStatic
Protected
normalizeStatic
Protected
normalizeStatic
Protected
normalizeStatic
Protected
normalizeStatic
Protected
startGenerated using TypeDoc
Implements a MoneroWallet as a client of monero-wallet-rpc.
Implements