Wallet Operations Structures
Used to specify a HD wallet account_id
or address_id
for my_tx_history v2 requests.
Parameter | Type | Description |
---|---|---|
type | string | Filters results by account_id or address_id part of the derivation path. |
account_id | integer | ACCOUNT_ID child in the m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID BIP44 derivation path. |
address_id | integer | Only required when type is address_id . ADDRESS_ID child in the m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID BIP44 derivation path. |
chain | string | Only required when type is address_id . Internal , or External . External is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change. |
The InputTxns
object includes the following items:
Parameter | Type | Description |
---|---|---|
tx_hash | string | The transaction id of an unspent transaction from the same wallet output. |
index | integer | The output index of this unspent transaction output. |
script_pub_key | string | The scriptpubkey of this unspent transaction output. |
amount | float | The value of this unspent transaction output. |
amount |
The NewAddressInfo
response object includes the following items for request in HD mode:
Parameter | Type | Description |
---|---|---|
address | string | The account address for a specific derivation path under the account_index . |
derivation_path | string | The BIP44 derivation path of the address. If there are no more addresses with balances within the gap limit, the address index will increment. |
balance | object | A standard balanceInfo object. |
chain | string | Internal , or External . External is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change. |
The PayForGas
object includes the following items:
Parameter | Type | Description |
---|---|---|
tx_type | string | ETH/EVM coins and tokens only. Options are Legacy or Eip1559 . The type of transaction values being configured. |
gas_price | decimal | Only 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_gas | decimal | Only 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_gas | decimal | Only 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_time | integer | Optional, only used if tx_type is Eip1559 . Estimated minimum transaction wait time in mempool (in ms) for this priority level. |
max_wait_time | integer | Optional, 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 RawTxInfo
object includes the following items:
Parameter | Type | Description |
---|---|---|
tx_hex | string | UTXO only. The raw unsigned hex of a proposed transaction. |
prev_txns | list | UTXO only. A list of standard InputTxns objects. |
to | string | ETH/EVM only. A destination address to send the funds to. |
value | string | ETH/EVM only. The amount of funds to be sent as a string with a 0x prefix, in wei units. |
gas_limit | string | ETH/EVM only. The maximum gas to be used for sending the transaction, in gwei units. |
pay_for_gas | object | Optional, ETH/EVM only. Used for EIP-1559 fee policy config. A standard PayForGas object. |
The ScanAddressesInfo
response object includes the following items for request in HD mode:
Parameter | Type | Description |
---|---|---|
account_index | integer | ACCOUNT_ID child in the m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID BIP44 derivation path. Please don't confuse with the global account. |
derivation_path | string | The BIP44 derivation path of the account. |
new_addresses | list | A list of standard NewAddressInfo objects. |
The WalletBalanceInfo
object includes the following items in the activation response for a coin in HD mode:
Parameter | Type | Description |
---|---|---|
wallet_type | string | In HD wallet mode, this will return HD . |
accounts | object | A standard WalletAccountInfo object. |
{
"wallet_balance": {
"wallet_type": "HD",
"accounts": [
...
]
}
}
The WithdrawFromInfo
response object includes the following items for HD Wallet withdraw (v2) requests.
You can use either the derivation_path
on its own, or the account_id
, chain
and address_id
together.
Parameter | Type | Description |
---|---|---|
derivation_path | string | The BIP44 derivation path of the address. |
account_id | integer | ACCOUNT_ID child in the m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID BIP44 derivation path. Please don't confuse with the global account. |
address_id | integer | ADDRESS_ID child in the m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID BIP44 derivation path. |
chain | string | Internal , or External . External is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change. |
The WalletAccountInfo
object includes the following items in the activation response for a coin in HD mode:
Parameter | Type | Description |
---|---|---|
account_index | integer | ACCOUNT_ID child in the m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID BIP44 derivation path. Please don't confuse with the global account. |
derivation_path | string | Derivation path up to the COIN child. E.g. "m/44'/141'/0'" |
total_balance | object | A standard balanceInfo object. |
addresses | list | A list of standard AccountAddressInfo objects. |
{
"account_index": 0,
"derivation_path": "m/44'/141'/0'",
"total_balance": {
"spendable": "23.08710255",
"unspendable": "0"
},
"addresses": [
...
]
}