Skip to main content

terra_sdk.key.mnemonic

MnemonicKey Objects


_1
class MnemonicKey(RawKey)

A MnemonicKey derives a private key using a BIP39 mnemonic seed phrase, and provides key-derivation options based on the BIP44 HD path standard.

.. note:: You can change coin_type to 118 to derive the key for a legacy Fluid wallet (shares coin_type with ATOM).

Arguments:

  • mnemonic str, optional - space-separated mnemonic seed phrase. If not provided, a 24-word mnemonic will be generated.
  • account int, optional - HD path parameter - account number.
  • index int, optional - HD path parameter - account index.
  • coin_type int, optional - HD path parameter - coin type.

mnemonic

Mnemonic key phrase associated with the account (space-separated).

account

HD path parameter: account number.

index

HD path parameter: account index.

coin_type

HD path parameter: coin type

hd_path


_2
@property
_2
def hd_path() -> str

Returns the BIP32 HD path for key-derivation:

m/44'/COIN_TYPE'/ACCOUNT'/0/INDEX'

Returns:

  • str - full BIP32 HD path