hd_wallet_addr_base

Module with base class for wallet addresses.

class HdWalletAddrBaseConst

Bases: object

Class container for HD wallet addresses base constants.

DICT_KEY_DEF_FORMAT: str = 'address_{:d}'
class HdWalletAddrBase(addr_off: int, dict_key_str_format: Optional[str] = None)

Bases: ABC

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

m_addr_off: int
m_addr: List[Any]
m_dict_key_str_format: str
ToDict() Dict[str, Any]

Get addresses as a dictionary.

Returns:

Addresses as a dictionary

Return type:

dict

ToJson(json_indent: int = 4) str

Get addresses as string in JSON format.

Parameters:

json_indent (int, optional) – Indent for JSON format, 4 by default

Returns:

Addresses as string in JSON format

Return type:

str

Count() int

Get the addresses count.

Returns:

Number of addresses

Return type:

int

__getitem__(addr_idx: int) Any

Get the specified address index.

Parameters:

addr_idx (int) – Address index

Returns:

Address

Return type:

Any

__iter__() Iterator[str]

Get the iterator to the current element.

Returns:

Iterator to the current element

Return type:

Iterator object