AddressBook¶
AddressBook¶
- class AddressBook(**kwargs)¶
Implements the addressbook api endpoints.
- add(address: str | Address, label: str, **kwargs) AddressBookEntryModel ¶
Adds an entry to the address book.
- remove(label: str, **kwargs) AddressBookEntryModel ¶
Removes an entry from the address book.
- Parameters:
label (str) – The label to remove.
- Returns:
The address book entry.
- Return type:
- Raises:
APIError – Error thrown by node API. See message for details.
- __call__(skip: int | None = None, take: int | None = None, **kwargs) List[AddressBookEntryModel] ¶
Gets the address book entries with option to implement pagination.
- Parameters:
skip (int, optional) – The number of entries to skip.
take (int, optional) – The maximum number of entries to take.
- Returns:
A list of address book entries.
- Return type:
List[AddressBookEntryModel]
- Raises:
APIError – Error thrown by node API. See message for details.
Note
If neither skip or take arguments are specified, returns the entire address book. An address book can be accessed from a wallet, but it is a standalone feature, which is not attached to any wallet.