Class MoneroWalletRpc

Implements a MoneroWallet as a client of monero-wallet-rpc.

Implements

Hierarchy

Properties

Methods

addAddressBookEntry addListener changePassword checkReserveProof checkSpendProof checkTxKey checkTxProof clear close createAccount createSubaddress createTx createTxs createWallet createWalletFromKeys createWalletFromSeed createWalletRandom decodeIntegratedAddress deleteAddressBookEntry describeMultisigTxSet describeTxSet describeUnsignedTxSet editAddressBookEntry exchangeMultisigKeys exportKeyImages exportMultisigHex exportOutputs freezeOutput getAccount getAccountIndices getAccountTags getAccounts getAddress getAddressBookEntries getAddressIndex getAttribute getBalance getBalances getConnectionManager getDaemonConnection getDaemonHeight getHeight getHeightByDate getIncomingTransfers getIntegratedAddress getListeners getMultisigInfo getNewKeyImagesFromLastImport getNumBlocksToUnlock getOutgoingTransfers getOutputs getOutputsAux getPath getPaymentUri getPrimaryAddress getPrivateSpendKey getPrivateViewKey getProcess getPublicSpendKey getPublicViewKey getReserveProofAccount getReserveProofWallet getRpcConnection getSeed getSeedLanguage getSeedLanguages getSpendProof getSubaddress getSubaddressIndices getSubaddresses getSyncPeriodInMs getTransfers getTransfersAux getTx getTxKey getTxNote getTxNotes getTxProof getTxs getUnlockedBalance getVersion handleCreateWalletError importKeyImages importMultisigHex importOutputs isClosed isConnectedToDaemon isMultisig isMultisigImportNeeded isOutputFrozen isViewOnly makeMultisig openWallet parsePaymentUri poll prepareMultisig refreshListening relayTx relayTxs removeListener rescanBlockchain rescanSpent rpcExportKeyImages rpcSweepAccount save scanTxs setAccountLabel setAccountTagLabel setAttribute setConnectionManager setDaemonConnection setSubaddressLabel setTxNote setTxNotes signMessage signMultisigTxHex signTxs startMining startSyncing stop stopMining stopProcess stopSyncing submitMultisigTxHex submitTxs sweepDust sweepOutput sweepUnlocked sync tagAccounts thawOutput untagAccounts verifyMessage compareIncomingTransfers compareOutputs compareTxsByHeight connectToWalletRpc convertRpcAccount convertRpcDescribeTransfer convertRpcSentTxsToTxSet convertRpcSubaddress convertRpcTxSet convertRpcTxToTxSet convertRpcTxWalletWithOutput convertRpcTxWithTransfer decodeRpcType decontextualize initSentTxWallet isContextual mergeTx normalizeConfig normalizeCreateTxsConfig normalizeOutputQuery normalizeSweepOutputConfig normalizeSweepUnlockedConfig normalizeTransferQuery normalizeTxQuery startWalletRpcProcess

Properties

_isClosed: boolean = false
addressCache: any
config: Partial<MoneroWalletConfig>
connectionManager: MoneroConnectionManager
connectionManagerListener: MoneroConnectionManagerListener
daemonConnection: MoneroRpcConnection
path: string
process: any
syncPeriodInMs: number
walletPoller: WalletPoller
DEFAULT_LANGUAGE: "English" = "English"
DEFAULT_SYNC_PERIOD_IN_MS: 20000 = 20000

Methods

  • Add an address book entry.

    Parameters

    • address: string

      entry address

    • Optional description: string

      entry description (optional)

    Returns Promise<number>

    the index of the added entry

  • Register a listener to receive wallet notifications.

    Parameters

    Returns Promise<void>

  • Change the wallet password.

    Parameters

    • oldPassword: string

      the wallet's old password

    • newPassword: string

      the wallet's new password

    Returns Promise<void>

  • Proves a wallet has a disposable reserve using a signature.

    Parameters

    • address: string

      public wallet address

    • message: string

      message included with the signature to further authenticate the proof (optional)

    • signature: string

      reserve proof signature to check

    Returns Promise<MoneroCheckReserve>

    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.

    Parameters

    • txHash: string

      transaction to prove

    • message: string

      message included with the signature to further authenticate the proof (optional)

    • signature: string

      transaction signature to confirm

    Returns Promise<boolean>

    true if the signature is good, false otherwise

  • Check a transaction in the blockchain with its secret key.

    Parameters

    • txHash: string

      transaction to check

    • txKey: string

      transaction's secret key

    • address: string

      destination public address of the transaction

    Returns Promise<MoneroCheckTx>

    the result of the check

  • Prove a transaction by checking its signature.

    Parameters

    • txHash: string

      transaction to prove

    • address: string

      destination public address of the transaction

    • message: string

      message included with the signature to further authenticate the proof

    • signature: string

      transaction signature to confirm

    Returns Promise<MoneroCheckTx>

    the result of the check

  • Returns Promise<void>

  • Optionally save then close the wallet.

    Parameters

    • save: boolean = false

      specifies if the wallet should be saved before being closed (default false)

    Returns Promise<void>

  • Create a new account with a label for the first subaddress.

    Parameters

    • Optional label: string

      label for account's first subaddress (optional)

    Returns Promise<MoneroAccount>

    the created account

  • Create a subaddress within an account.

    Parameters

    • accountIdx: number

      index of the account to create the subaddress within

    • Optional label: string

      the label for the subaddress (optional)

    Returns Promise<MoneroSubaddress>

    the created subaddress

  • 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
    });

    Parameters

    Returns Promise<MoneroWalletRpc>

    this wallet client

  • Delete an address book entry.

    Parameters

    • entryIdx: number

      index of the entry to delete

    Returns Promise<void>

  • Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.

    Parameters

    • txSet: MoneroTxSet

      a tx set containing unsigned or multisig tx hex

    Returns Promise<MoneroTxSet>

    txSet - the tx set containing structured transactions

  • Edit an address book entry.

    Parameters

    • index: number

      index of the address book entry to edit

    • setAddress: boolean

      specifies if the address should be updated

    • address: string

      updated address

    • setDescription: boolean

      specifies if the description should be updated

    • description: string

      updated description

    Returns Promise<void>

  • Exchange multisig hex with participants in a M/N multisig wallet.

    This process must be repeated with participants exactly N-M times.

    Parameters

    • multisigHexes: string[]

      are multisig hex from each participant

    • password: string

      wallet's password // TODO monero-project: redundant? wallet is created with password

    Returns Promise<MoneroMultisigInitResult>

    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.

    Parameters

    • all: boolean = false

      export all key images if true, else export the key images since the last export (default false)

    Returns Promise<MoneroKeyImage[]>

    the wallet's signed key images

  • Export this wallet's multisig info as hex for other participants.

    Returns Promise<string>

    this wallet's multisig info as hex for other participants

  • Export outputs in hex format.

    Parameters

    • all: boolean = false

      export all outputs if true, else export the outputs since the last export (default false)

    Returns Promise<string>

    outputs in hex format

  • Freeze an output.

    Parameters

    • keyImage: string

      key image of the output to freeze

    Returns Promise<void>

  • Get an account.

    Parameters

    • accountIdx: number

      index of the account to get

    • Optional includeSubaddresses: boolean

      include subaddresses if true

    • Optional skipBalances: boolean

    Returns Promise<MoneroAccount>

    the retrieved account

  • Parameters

    • Optional getSubaddressIndices: any

    Returns Promise<Map<any, any>>

  • Get accounts with a given tag.

    Parameters

    • Optional includeSubaddresses: boolean

      include subaddresses if true

    • Optional tag: string

      tag for filtering accounts, all accounts if undefined

    • Optional skipBalances: boolean

    Returns Promise<MoneroAccount[]>

    all accounts with the given tag

  • Get the address of a specific subaddress.

    Parameters

    • accountIdx: number

      the account index of the address's subaddress

    • subaddressIdx: number

      the subaddress index within the account

    Returns Promise<string>

    the receive address of the specified subaddress

  • Get the account and subaddress index of the given address.

    Parameters

    • address: string

      address to get the account and subaddress index from

    Returns Promise<MoneroSubaddress>

    the account and subaddress indices

  • Get an attribute.

    Parameters

    • key: string

      attribute to get the value of

    Returns Promise<string>

    the attribute's value

  • Get the balance of the wallet, account, or subaddress.

    Parameters

    • Optional accountIdx: number

      index of the account to get the balance of (default all accounts)

    • Optional subaddressIdx: number

      index of the subaddress to get the balance of (default all subaddresses)

    Returns Promise<bigint>

    the balance of the wallet, account, or subaddress

  • Get the total and unlocked balances in a single request.

    Parameters

    • Optional accountIdx: number

      account index

    • Optional subaddressIdx: number

      subaddress index

    Returns Promise<bigint[]>

    is the total and unlocked balances in an array, respectively

  • Get the blockchain's height.

    Returns Promise<number>

    the blockchain's height

  • Get the block height that the wallet is synced to.

    Returns Promise<number>

    the block height that the wallet is synced to

  • Get the blockchain's height by date as a conservative estimate for scanning.

    Parameters

    • year: number

      year of the height to get

    • month: number

      month of the height to get as a number between 1 and 12

    • day: number

      day of the height to get as a number between 1 and 31

    Returns Promise<number>

    the blockchain's approximate height at the given date

  • 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

    • Optional standardAddress: string

      is the standard address to generate the integrated address from (wallet's primary address if undefined)

    • Optional paymentId: string

      is the payment ID to generate an integrated address from (randomly generated if undefined)

    Returns Promise<MoneroIntegratedAddress>

    the integrated address

  • Get the number of blocks until the next and last funds unlock. Ignores txs with unlock time as timestamp.

    Returns Promise<number[]>

    the number of blocks until the next and last funds unlock in elements 0 and 1, respectively, or undefined if no balance

  • 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.

    Parameters

    Returns Promise<MoneroOutputWallet[]>

    the queried outputs

  • Parameters

    • query: any

    Returns Promise<any[]>

  • Get the wallet's path.

    Returns Promise<string>

    the path the wallet can be opened with

  • Creates a payment URI from a send configuration.

    Parameters

    Returns Promise<string>

    the payment uri

  • Get the wallet's primary address.

    Returns Promise<string>

    the wallet's primary address

  • Get the wallet's private spend key.

    Returns Promise<string>

    the wallet's private spend key

  • Get the wallet's private view key.

    Returns Promise<string>

    the wallet's private view key

  • Get the internal process running monero-wallet-rpc.

    Returns ChildProcess

    the process running monero-wallet-rpc, undefined if not created from new process

  • Get the wallet's public spend key.

    Returns Promise<string>

    the wallet's public spend key

  • Get the wallet's public view key.

    Returns Promise<string>

    the wallet's public view key

  • Generate a signature to prove an available amount in an account.

    Parameters

    • accountIdx: number

      account to prove ownership of the amount

    • amount: bigint

      minimum amount to prove as available in the account

    • Optional message: string

      message to include with the signature to further authenticate the proof (optional)

    Returns Promise<string>

    the reserve proof signature

  • Generate a signature to prove the entire balance of the wallet.

    Parameters

    • Optional message: string

      message included with the signature to further authenticate the proof (optional)

    Returns Promise<string>

    the reserve proof signature

  • Get the wallet's mnemonic phrase or seed.

    Returns Promise<string>

    the wallet's mnemonic phrase or seed.

  • Get the language of the wallet's mnemonic phrase or seed.

    Returns Promise<string>

    the language of the wallet's mnemonic phrase or seed.

  • Get a list of available languages for the wallet's seed.

    Returns Promise<any>

    the available languages for the wallet's seed.

  • Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.

    Parameters

    • txHash: string

      transaction to prove

    • Optional message: string

      message to include with the signature to further authenticate the proof (optional)

    Returns Promise<string>

    the transaction signature

  • Get a subaddress.

    Parameters

    • accountIdx: number

      index of the subaddress's account

    • subaddressIdx: number

      index of the subaddress within the account

    • Optional skipBalances: boolean

    Returns Promise<MoneroSubaddress>

    the retrieved subaddress

  • Parameters

    • accountIdx: any

    Returns Promise<any[]>

  • Get subaddresses in an account.

    Parameters

    • accountIdx: number

      account to get subaddresses within

    • Optional subaddressIndices: number[]

      indices of subaddresses to get (optional)

    • Optional skipBalances: boolean

    Returns Promise<MoneroSubaddress[]>

    the retrieved subaddresses

  • Returns number

  • 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.

    Parameters

    Returns Promise<MoneroTransfer[]>

    wallet transfers that meet the query

  • Parameters

    Returns Promise<any[]>

  • Get a wallet transaction by hash.

    Parameters

    • txHash: string

      hash of a transaction to get

    Returns Promise<MoneroTxWallet>

    the identified transaction or undefined if not found

  • Get a transaction's secret key from its hash.

    Parameters

    • txHash: string

      transaction's hash

    Returns Promise<string>

    • transaction's secret key
  • Get a transaction note.

    Parameters

    • txHash: string

      transaction to get the note of

    Returns Promise<string>

    the tx note

  • Get notes for multiple transactions.

    Parameters

    • txHashes: string[]

      hashes of the transactions to get notes for

    Returns Promise<string[]>

    notes for the transactions

  • Get a transaction signature to prove it.

    Parameters

    • txHash: string

      transaction to prove

    • address: string

      destination public address of the transaction

    • Optional message: string

      message to include with the signature to further authenticate the proof (optional)

    Returns Promise<string>

    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.

    Parameters

    • Optional query: string[] | Partial<MoneroTxQuery>

      configures the query (optional)

    Returns Promise<MoneroTxWallet[]>

    wallet transactions per the configuration

  • Get the unlocked balance of the wallet, account, or subaddress.

    Parameters

    • Optional accountIdx: number

      index of the account to get the unlocked balance of (optional)

    • Optional subaddressIdx: number

      index of the subaddress to get the unlocked balance of (optional)

    Returns Promise<bigint>

    the unlocked balance of the wallet, account, or subaddress

  • Parameters

    • name: any
    • err: any

    Returns void

  • Import multisig info as hex from other participants.

    Parameters

    • multisigHexes: string[]

      multisig hex from each participant

    Returns Promise<number>

    the number of outputs signed with the given multisig hex

  • Import outputs in hex format.

    Parameters

    • outputsHex: string

      outputs in hex format

    Returns Promise<number>

    the number of outputs imported

  • Indicates if this wallet is closed or not.

    Returns Promise<boolean>

    true if the wallet is closed, false otherwise

  • Indicates if the wallet is connected to daemon.

    Returns Promise<boolean>

    true if the wallet is connected to a daemon, false otherwise

  • Indicates if this wallet is a multisig wallet.

    Returns Promise<boolean>

    true if this is a multisig wallet, false otherwise

  • Indicates if importing multisig data is needed for returning a correct balance.

    Returns Promise<boolean>

    true if importing multisig data is needed for returning a correct balance, false otherwise

  • Check if an output is frozen.

    Parameters

    • keyImage: string

      key image of the output to check if frozen

    Returns Promise<boolean>

    true if the output is frozen, false otherwise

  • Indicates if the wallet is view-only, meaning it does not have the private spend key and can therefore only observe incoming outputs.

    Returns Promise<boolean>

    true if the wallet is view-only, false otherwise

  • Make this wallet multisig by importing multisig hex from participants.

    Parameters

    • multisigHexes: string[]

      multisig hex from each participant

    • threshold: number

      number of signatures needed to sign transfers

    • password: string

      wallet password

    Returns Promise<string>

    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
    });

    Parameters

    • pathOrConfig: string | Partial<MoneroWalletConfig>

      the wallet's name or configuration to open

    • Optional password: string

      the wallet's password

    Returns Promise<MoneroWalletRpc>

    this wallet client

  • Poll if listening.

    Returns Promise<void>

  • Get multisig info as hex to share with participants to begin creating a multisig wallet.

    Returns Promise<string>

    this wallet's multisig hex to share with participants

  • Returns void

  • Relay a previously created transaction.

    Parameters

    • txOrMetadata: string | MoneroTxWallet

      transaction or its metadata to relay

    Returns Promise<string>

    the hash of the relayed tx

  • Relay previously created transactions.

    Parameters

    • txsOrMetadatas: (string | MoneroTxWallet)[]

      transactions or their metadata to relay

    Returns Promise<string[]>

    the hashes of the relayed txs

  • Unregister a listener to receive wallet notifications.

    Parameters

    • listener: any

      listener to unregister

    Returns Promise<void>

  • 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.

    Returns Promise<void>

  • 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.

    Returns Promise<void>

  • Common method to get key images.

    Parameters

    • all: any

      pecifies to get all xor only new images from last import

    Returns Promise<any>

    are the key images

  • Save the wallet at its current path.

    Returns Promise<void>

  • Scan transactions by their hash/id.

    Parameters

    • txHashes: string[]

      tx hashes to scan

    Returns Promise<void>

  • Set an account label.

    Parameters

    • accountIdx: number

      index of the account to set the label for

    • label: string

      the label to set

    Returns Promise<void>

  • Sets a human-readable description for a tag.

    Parameters

    • tag: string

      tag to set a description for

    • label: string

      label to set for the tag

    Returns Promise<void>

  • Set an arbitrary attribute.

    Parameters

    • key: string

      attribute key

    • val: string

      attribute value

    Returns Promise<void>

  • Set the wallet's daemon connection.

    Parameters

    • Optional uriOrConnection: string | MoneroRpcConnection

      the daemon's URI or connection (defaults to offline)

    • Optional isTrusted: boolean

      indicates if the daemon in trusted

    • Optional sslOptions: SslOptions

      custom SSL configuration

    Returns Promise<void>

  • Set a subaddress label.

    Parameters

    • accountIdx: number

      index of the account to set the label for

    • subaddressIdx: number

      index of the subaddress to set the label for

    • label: string

      the label to set

    Returns Promise<void>

  • Set a note for a specific transaction.

    Parameters

    • txHash: string

      hash of the transaction to set a note for

    • note: string

      the transaction note

    Returns Promise<void>

  • Set notes for multiple transactions.

    Parameters

    • txHashes: string[]

      transactions to set notes for

    • notes: string[]

      notes to set for the transactions

    Returns Promise<void>

  • Sign a message.

    Parameters

    • message: string

      the message to sign

    • signatureType: MoneroMessageSignatureType = MoneroMessageSignatureType.SIGN_WITH_SPEND_KEY

      sign with spend key or view key (default spend key)

    • accountIdx: number = 0

      the account index of the message signature (default 0)

    • subaddressIdx: number = 0

      the subaddress index of the message signature (default 0)

    Returns Promise<string>

    the signature

  • Sign unsigned transactions from a view-only wallet.

    Parameters

    • unsignedTxHex: string

      unsigned transaction hex from when the transactions were created

    Returns Promise<MoneroTxSet>

    the signed transaction set

  • Start mining.

    Parameters

    • numThreads: number

      number of threads created for mining (optional)

    • Optional backgroundMining: boolean

      specifies if mining should occur in the background (optional)

    • Optional ignoreBattery: boolean

      specifies if the battery should be ignored for mining (optional)

    Returns Promise<void>

  • Start background synchronizing with a maximum period between syncs.

    Parameters

    • Optional syncPeriodInMs: number

      maximum period between syncs in milliseconds (default is wallet-specific)

    Returns Promise<void>

  • Save and close the current wallet and stop the RPC server.

    Returns Promise<void>

  • Stop the internal process running monero-wallet-rpc, if applicable.

    Parameters

    • force: boolean = false

      specifies if the process should be destroyed forcibly (default false)

    Returns Promise<number>

    the exit code from stopping the process

  • Stop synchronizing the wallet with the daemon.

    Returns Promise<void>

  • Submit signed multisig transactions from a multisig wallet.

    Parameters

    • signedMultisigTxHex: string

      signed multisig hex returned from signMultisigTxHex()

    Returns Promise<string[]>

    the resulting transaction hashes

  • Submit signed transactions from a view-only wallet.

    Parameters

    • signedTxHex: string

      signed transaction hex from signTxs()

    Returns Promise<string[]>

    the resulting transaction hashes

  • 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

    • Optional relay: boolean

      specifies if the resulting transaction should be relayed (default false)

    Returns Promise<MoneroTxWallet[]>

    the created transactions

  • Synchronize the wallet with the daemon as a one-time synchronous process.

    Parameters

    • Optional listenerOrStartHeight: number | MoneroWalletListener

      listener xor start height (defaults to no sync listener, the last synced block)

    • Optional startHeight: number

      startHeight if not given in first arg (defaults to last synced block)

    Returns Promise<MoneroSyncResult>

  • Tag accounts.

    Parameters

    • tag: any

      tag to apply to the specified accounts

    • accountIndices: any

      indices of the accounts to tag

    Returns Promise<void>

  • Thaw a frozen output.

    Parameters

    • keyImage: string

      key image of the output to thaw

    Returns Promise<void>

  • Untag accounts.

    Parameters

    • accountIndices: number[]

      indices of the accounts to untag

    Returns Promise<void>

  • Compares two transfers by ascending account and subaddress indices.

    Parameters

    • t1: any
    • t2: any

    Returns number

  • Compares two outputs by ascending account and subaddress indices.

    Parameters

    • o1: any
    • o2: any

    Returns any

  • Compares two transactions by their height.

    Parameters

    • tx1: any
    • tx2: any

    Returns number

  • Parameters

    • rpcDescribeTransferResult: any

    Returns MoneroTxSet

  • Initializes a MoneroTxSet from a list of rpc txs.

    Parameters

    • rpcTxs: any

      rpc txs to initialize the set from

    • Optional txs: any

      existing txs to further initialize (optional)

    • Optional config: any

      tx config

    Returns MoneroTxSet

    the converted tx set

  • Initializes a tx set from a RPC map excluding txs.

    Parameters

    • rpcMap: any

      map to initialize the tx set from

    Returns MoneroTxSet

    MoneroTxSet - initialized tx set

  • Converts a rpc tx with a transfer to a tx set with a tx and transfer.

    Parameters

    • rpcTx: any

      rpc tx to build from

    • tx: any

      existing tx to continue initializing (optional)

    • isOutgoing: any

      specifies if the tx is outgoing if true, incoming if false, or decodes from type if undefined

    • config: any

      tx config

    Returns MoneroTxSet

    the initialized tx set with a tx

  • Builds a MoneroTxWallet from a RPC tx.

    Parameters

    • rpcTx: any

      rpc tx to build from

    • Optional tx: any

      existing tx to continue initializing (optional)

    • Optional isOutgoing: any

      specifies if the tx is outgoing if true, incoming if false, or decodes from type if undefined

    • Optional config: any

      tx config

    Returns any

    is the initialized tx

  • Decodes a "type" from monero-wallet-rpc to initialize type and state fields in the given transaction.

    TODO: these should be safe set

    Parameters

    • rpcType: any

      is the type to decode

    • tx: any

      is the transaction to decode known fields to

    Returns any

    true if the rpc type indicates outgoing xor incoming

  • Remove criteria which requires looking up other transfers/outputs to fulfill query.

    Parameters

    • query: any

      the query to decontextualize

    Returns any

    a reference to the query for convenience

  • Initializes a sent transaction.

    TODO: remove copyDestinations after >18.3.1 when subtractFeeFrom fully supported

    Parameters

    • config: Partial<MoneroTxConfig>

      send config

    • Optional tx: any

      existing transaction to initialize (optional)

    • copyDestinations: any

      copies config destinations if true

    Returns any

    is the initialized send tx

  • Parameters

    • query: any

    Returns boolean

  • Merges a transaction into a unique set of transactions.

    Parameters

    • tx: any

      the transaction to merge into the existing txs

    • txMap: any

      maps tx hashes to txs

    • blockMap: any

      maps block heights to blocks

    Returns void

Generated using TypeDoc