AddressBook

AddressBook

class AddressBook(**kwargs)

Implements the addressbook api endpoints.

add(address: Union[str, pystratis.core.types.address.Address], label: str, **kwargs) → pystratis.api.addressbook.responsemodels.addressbookentrymodel.AddressBookEntryModel

Adds an entry to the address book.

Parameters:
  • address (str, Address) – The address to add to the address book.
  • label (str) – The address label.
Returns:

The address book entry.

Return type:

AddressBookEntryModel

Raises:

APIError – Error thrown by node API. See message for details.

remove(label: str, **kwargs) → pystratis.api.addressbook.responsemodels.addressbookentrymodel.AddressBookEntryModel

Removes an entry from the address book.

Parameters:label (str) – The label to remove.
Returns:The address book entry.
Return type:AddressBookEntryModel
Raises:APIError – Error thrown by node API. See message for details.

AddressBookEntryModel

class AddressBookEntryModel

A pydantic model representing an address book entry.