hd_wallet_base

Module with base class for wallet generators.

class HdWalletBase(key_enum: Type[Enum])

Bases: HdWalletEnumDict, ABC

HD wallet base class. It shall be inherited by wallet classes.

abstract Generate(**kwargs: Any) None

Generate wallet keys and addresses.

Parameters:

**kwargs – Arbitrary arguments depending on the wallet type

abstract IsWatchOnly() bool

Get if the wallet is watch-only.

Returns :

bool: True if watch-only, false otherwise

ToDict() Dict[str, Any]

Get wallet data as a dictionary.

Returns:

Wallet data as a dictionary

Return type:

dict

HasData(key: HdWalletDataTypes) bool

Get if the specified key is present.

Parameters:

key (HdWalletKeyTypes) – Key

Returns:

True if present, false otherwise

Return type:

bool

Raises:

TypeError – If the enumerative is not of the correct type

GetData(key: HdWalletDataTypes) Optional[Any]

Get the specified key value.

Parameters:

key (HdWalletKeyTypes) – Key

Returns:

Key value None: If the key type is not found

Return type:

str

Raises:

TypeError – If the enumerative is not of the correct type

m_key_enum: Type[Enum]
m_dict_data: Dict[str, Any]