Class: MoneroTxConfig

MoneroTxConfig(config)

Configures a transaction to send, sweep, or create a payment URI.

Constructor

new MoneroTxConfig(config)

Generic request to transfer funds from a wallet.

Examples:

let config1 = new MoneroTxConfig({
   accountIndex: 0,
   address: "59aZULsUF3YN...",
   amount: new BigInteger("500000"),
   priority: MoneroTxPriority.NORMAL,
   relay: true
});

Parameters:
Name Type Description
config MoneroTxConfig | object configures the transaction to create (optional)
Properties
Name Type Description
address string single destination address
amount BigInteger single destination amount
accountIndex int source account index to transfer funds from
subaddressIndex int source subaddress index to transfer funds from
subaddressIndices Array.<int> source subaddress indices to transfer funds from
relay boolean relay the transaction to peers to commit to the blockchain
priority MoneroTxPriority transaction priority (default MoneroTxPriority.NORMAL)
destinations Array.<MoneroDestination> addresses and amounts in a multi-destination tx
paymentId string transaction payment ID
unlockHeight int minimum height for the transaction to unlock (default 0)
note string transaction note saved locally with the wallet
recipientName string recipient name saved locally with the wallet
canSplit boolean allow funds to be transferred using multiple transactions
belowAmount BigInteger for sweep requests, include outputs below this amount when sweeping wallet, account, subaddress, or all unlocked funds
sweepEachSubaddress boolean for sweep requests, sweep each subaddress individually instead of together if true
keyImage string key image to sweep (ignored except in sweepOutput() requests)
Source:

Methods

addDestination()

Source:

copy()

Source:

getAccountIndex()

Source:

getAddress() → {string}

Get the address of a single-destination configuration.
Source:
Returns:
the address of the single destination
Type
string

getAmount() → {BigInteger}

Get the amount of a single-destination configuration.
Source:
Returns:
the amount of the single destination
Type
BigInteger

getBelowAmount()

Source:

getCanSplit()

Source:

getDestinations()

Source:

getFee()

Source:

getKeyImage()

Get the key image hex of the output to sweep. return {string} is the key image hex of the output to sweep
Source:

getNote()

Source:

getPaymentId()

Source:

getPriority()

Source:

getRecipientName()

Source:

getRelay()

Source:

getSubaddressIndices()

Source:

getSweepEachSubaddress()

Source:

getUnlockHeight()

Source:

setAccountIndex()

Source:

setAddress(address) → {MoneroTxConfig}

Set the address of a single-destination configuration.
Parameters:
Name Type Description
address string the address to set for the single destination
Source:
Returns:
this configuration for chaining
Type
MoneroTxConfig

setAmount(amount) → {MoneroTxConfig}

Set the amount of a single-destination configuration.
Parameters:
Name Type Description
amount BigInteger | string the amount to set for the single destination
Source:
Returns:
this configuration for chaining
Type
MoneroTxConfig

setBelowAmount()

Source:

setCanSplit()

Source:

setDestination()

Source:

setDestinations()

Source:

setFee()

Source:

setKeyImage(keyImage)

Set the key image hex of the output to sweep.
Parameters:
Name Type Description
keyImage string is the key image hex of the output to sweep
Source:

setNote()

Source:

setPaymentId()

Source:

setPriority()

Source:

setRecipientName()

Source:

setRelay()

Source:

setSubaddressIndex()

Source:

setSubaddressIndices()

Source:

setSweepEachSubaddress()

Source:

setUnlockHeight()

Source:

toJson()

Source: