Class persona

#include <keychain/cache/persona.hpp>

Namespace: keychain

Inheritance: facadepersona

Description

persona represents a cryptographic identity, the private keys of which are created and managed within the same local database used by the gateway object that created the persona. The cryptographic identity comprises of an encryption keychain and a signature keychain. The persona class functions primarily as a handle for persona objects that are established by the gateway object.

Multiple personas may be managed by the same gateway object, and each persona maps to a different set of contacts. As such, persona objects provide context for gateway cryptographic operations such as encryption and signing.

The distinction between a persona and a contact is that a gateway creates a persona locally whereas a contact is created by another device.

persona objects are not constructed by the user directly. They are created through the gateway.

In fact, persona is a snapshot view of the underlying object at the time it is created or requested, because persona has no reference to the gateway or blockchain at all. This means developers should always refresh their view of the currently active persona with gateway#get_active_persona before acting on the object, as the persona_state may have changed.

Since: v2.0

Methods inherited from class facade

get_id, get_name, get_status, get_sub_name, get_uri, is_null