From d084c069be38b6f3ad74912ca629403d9fdaec58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 11 Dec 2019 22:14:12 +0100 Subject: Identity loading and validation --- src/identity.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/identity.h (limited to 'src/identity.h') diff --git a/src/identity.h b/src/identity.h new file mode 100644 index 0000000..d31951f --- /dev/null +++ b/src/identity.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include "pubkey.h" + +using std::function; +using std::optional; +using std::string; +using std::vector; + +namespace erebos { + +class IdentityData +{ +public: + static optional load(const Ref &); + + const vector>> prev; + const optional name; + const optional>> owner; + const Stored keyIdentity; + const optional> keyMessage; +}; + +class Identity::Priv +{ +public: + vector>> data; + shared_future> name; + optional owner; + + static bool verifySignatures(const Stored> & sdata); + static shared_ptr validate(const vector>> & sdata); + optional> lookupProperty( + function sel) const; +}; + +} -- cgit v1.2.3