Class MoneroTxConfig

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

Hierarchy

  • MoneroTxConfig

Constructors

  • Generic request to transfer funds from a wallet.

    Example:

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

    Parameters

    • Optional config: Partial<MoneroTxConfig>

      configures the transaction to create (optional)

    Returns MoneroTxConfig

Properties

accountIndex: number

Source account index to transfer funds from (required unless sweeping key image).

address: string

Single destination address (required unless destinations provided).

amount: bigint

Single destination amount (required unless `destinations provided).

belowAmount: bigint

For sweep requests, include outputs below this amount when sweeping wallet, account, subaddress, or all unlocked funds.

canSplit: boolean

Allow funds to be transferred using multiple transactions if necessary (default false).

destinations: Partial<MoneroDestination>[]

Multiple destinations to send funds to, if applicable.

fee: bigint

Miner fee (calculated automatically).

keyImage: string

For sweep requests, key image of the output to sweep.

note: string

Transaction note saved locally with the wallet (optional).

paymentId: string

Payment ID for the transaction.

Transaction priority to adjust the miner fee (default MoneroTxPriority.NORMAL).

recipientName: string

Recipient name saved locally with the wallet (optional).

relay: boolean

Relay the transaction to peers to commit to the blockchain if true (default false).

subaddressIndex: number

Source subaddress index to send funds from (default all).

subaddressIndices: number[]

Source subaddresses to send funds from (default all).

subtractFeeFrom: number[]

List of destination indices to split the miner fee (optional).

sweepEachSubaddress: boolean

For sweep requests, sweep each subaddress individually instead of together if true.

Methods

  • Returns number

  • Get the address of a single-destination configuration.

    Returns string

    the address of the single destination

  • Get the amount of a single-destination configuration.

    Returns bigint

    the amount of the single destination

  • Returns bigint

  • Returns boolean

  • Returns bigint

  • Get the key image hex of the output to sweep.

    return {string} is the key image hex of the output to sweep

    Returns string

  • Returns string

  • Returns string

  • Returns number

  • Returns string

  • Returns boolean

  • Returns number[]

  • Returns number[]

  • Returns boolean

  • Set the address of a single-destination configuration.

    Parameters

    • address: string

      the address to set for the single destination

    Returns MoneroTxConfig

    this configuration for chaining

  • Set the amount of a single-destination configuration.

    Parameters

    • amount: bigint

      the amount to set for the single destination

    Returns MoneroTxConfig

    this configuration for chaining

  • Set the key image hex of the output to sweep.

    Parameters

    • keyImage: any

      is the key image hex of the output to sweep

    Returns MoneroTxConfig

  • Returns any

Generated using TypeDoc