A hierarchical-deterministic (HD) wallet generates a new key pair from a master key pair, allowing for multiple addresses to be generated from the same seed so that change from transactions go to a previously unused address, enhancing privacy and security. The hierarchical structure resembles that of a tree, with the master key βdeterminingβ the key pairs that follow it in the hierarchy. If you have activated a coin with the task::enable_utxo::init or task::enable_qtum::init and used the "priv_key_policy": "Trezor" parameter, you can use the methods below to generate new addresses.
If we don't already have too many unused addresses, we can use the get_new_address method to generate a new address. The generated address will be shown in account_balance and init_account_balance RPCs and on the next coin activation.
The ticker of the coin you want to get a new address for
account_id
integer
Generally this will be 0 unless you have multiple accounts registered on your Trezor
chain
string
Internal, or External. Defaults to External. External is used for addresses that are intended 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 to return the leftover change from a transaction.
gap_limit
integer
Optional. The maximum number of empty addresses in a row. Defaults to the value provided on activation or 20 if no value was provided