This module contains the identity class.

Identity Objects

class Identity()

The identity holds the public elements identifying an agent.

It includes:

  • the agent name
  • the addresses, a map from address identifier to address (can be a single key-value pair)


 | __init__(name: str, address: Optional[str] = None, addresses: Optional[Dict[str, Address]] = None, default_address_key: str = DEFAULT_ADDRESS_KEY)

Instantiate the identity.


  • name: the name of the agent.
  • address: the default address of the agent.
  • addresses: the addresses of the agent.
  • default_address_key: the key for the default address.


 | @property
 | name() -> str

Get the agent name.


 | @property
 | addresses() -> Dict[str, Address]

Get the addresses.


 | @property
 | address() -> Address

Get the default address.