#pragma once #include #include "pubkey.h" #include #include using std::function; using std::optional; using std::shared_future; using std::string; using std::variant; using std::vector; namespace erebos { struct IdentityData { static IdentityData load(const Ref &); Ref store(const Storage & st) const; const vector>> prev {}; const optional name {}; const optional>> owner {}; const Stored keyIdentity; const optional> keyMessage; }; struct IdentityExtension { static IdentityExtension load(const Ref &); Ref store(const Storage & st) const; const Stored> base; const vector prev {}; const optional name {}; const optional owner {}; }; struct Identity::Priv { vector data; vector updates; shared_future> name; optional owner; Stored keyMessage; static bool verifySignatures(const StoredIdentityPart & sdata); static shared_ptr validate(const vector & sdata); static optional lookupProperty( const vector & data, function sel); }; struct Identity::Builder::Priv { Storage storage; vector>> prevBase = {}; vector prevExt = {}; optional name = nullopt; optional owner = nullopt; Stored keyIdentity; optional> keyMessage; }; }