On this page

latest contributor to this doc

Last Edit:

@smk762

Wallet Operations Structures

The AddressPath object includes the following items:

ParameterTypeDescription
account_idintegerThe index of the account in the wallet, starting from 0.
chainintegerOptional, only used for HD wallets. The chain is either External or Internal, and expressed as an integer with External being 0 and Internal being 1.
address_idintegerOptional, only used for HD wallets. The index of the address in the account, starting from 0.
derivation_pathstringOptional, only used for HD wallets. The derivation path of the address, following the format m/44'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID (or m/84'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID for segwit coins).

If using the derivation_path parameter, the account_id, chain and address_id parameters are not required (and vice-versa). If the address parameter is not provided for a HD wallet, the root derivation path will be used, for example m/84'/2'/0'/0/0. The two examples above point to the same address. The derivation path follows the format m/44'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID (or m/84'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID for segwit coins). The coin_id is defined in the coins file. For more information about derivation paths, check out this explanation.

The InputTxns object includes the following items:

ParameterTypeDescription
tx_hashstringThe transaction id of an unspent transaction from the same wallet output.
indexintegerThe output index of this unspent transaction output.
script_pub_keystringThe scriptpubkey of this unspent transaction output.
amountfloatThe value of this unspent transaction output.

The PayForGas object includes the following items:

ParameterTypeDescription
tx_typestringETH/EVM coins and tokens only. Options are Legacy or Eip1559. The type of transaction values being configured.
gas_pricedecimalOnly used if tx_type is Legacy. Values are in Gwei. The maximium price per gas unit the user is willing to pay for the transaction.
max_fee_per_gasdecimalOnly used if tx_type is Eip1559. Values are in Gwei. The maximum amount to pay per unit of gas to get your transaction included in a block.
max_priority_fee_per_gasdecimalOnly used if tx_type is Eip1559. Values are in Gwei. This is paid directly to the miner, and can be set by the user to attract minimal delay in transaction confirmation.
min_wait_timeintegerOptional, only used if tx_type is Eip1559. Estimated minimum transaction wait time in mempool (in ms) for this priority level.
max_wait_timeintegerOptional, only used if tx_type is Eip1559. Estimated maximum transaction wait time in mempool (in ms) for this priority level.

Eip1559 allows users to save on gas fees. To use this feature for a coin/token, its entry in your coins file must include fields for chain_id and max_eth_tx_type. To allow eip-1559 transactions, max_eth_tx_type should be set to 2. To find the chain_id for an [EVM network(https://blog.thirdweb.com/evm-compatible-blockchains-and-ethereum-virtual-machine/)], refer to chainlist.org. There is also a new gas_fee_estimator parameter in the coins file, which can be set to provider or simple.

By default, simple gas fee estimation suggests a fee based on fee history. If set gas_fee_estimator is set to provider, users must set the gas_api setting in their MM2.json file to source recommended fee values from third party providers Infura or Blocknative.

Use the start_eth_fee_estimator method to begin tracking the fee market for a coin (and its tokens). You can stop tracking the fee market with stop_eth_fee_estimator.

To set or view the current swap transaction fee policy, use the get_swap_transaction_fee_policy and set_swap_transaction_fee_policy methods.

For more information about EIP1559, refer to https://www.blocknative.com/blog/eip-1559-fees

The StakingDetails object includes the following items:

ParameterTypeDescription
typestringThe coin type. Currently, only 'Cosmos' and Qtum are supported.
validator_addressstringThe address of the validator to delegate staking to.
amountstringThe amount of coins to stake send to the validator for delegated staking (Cosmos only - QTUM will stake your whole balance).

The StakingInfoDetails object includes the following items:

ParameterTypeDescription
typestringThe coin type. Currently, only 'Cosmos' is supported.
filter_by_statusstringReturn only validators matching a specific status. Options are Bonded, Unbonded, and All. Defaults to Bonded.
limitintegerOptional, defaults to 10. The number of validators displayed per page in response.
page_numberintegerOptional, defaults to 1. The page offset for items in response.

The ClaimingDetails object includes the following items:

ParameterTypeDescription
typestringThe coin type. Currently, only 'Cosmos' and Qtum are supported.
validator_addressstringThe address of the validator to delegate staking to.
forcebooleanDefaults to false. If true, will process unprofitable transactions (reward value less than network fees)

The RawTxInfo object includes the following items:

ParameterTypeDescription
tx_hexstringUTXO only. The raw unsigned hex of a proposed transaction.
prev_txnslistUTXO only. A list of standard InputTxns objects.
tostringETH/EVM only. A destination address to send the funds to.
valuestringETH/EVM only. The amount of funds to be sent as a string with a 0x prefix, in wei units.
gas_limitstringETH/EVM only. The maximum gas to be used for sending the transaction, in gwei units.
pay_for_gasobjectOptional, ETH/EVM only. Used for EIP-1559 fee policy config. A standard PayForGas object.