summaryrefslogtreecommitdiff
path: root/src/identity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity.cpp')
-rw-r--r--src/identity.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/identity.cpp b/src/identity.cpp
index f55f6dd..0d35122 100644
--- a/src/identity.cpp
+++ b/src/identity.cpp
@@ -6,6 +6,8 @@
#include <set>
#include <stdexcept>
+#include <iostream>
+
using namespace erebos;
using std::async;
@@ -38,6 +40,11 @@ optional<Identity> Identity::load(const vector<Ref> & refs)
for (const auto & ref : refs)
data.push_back(Stored<Signed<IdentityData>>::load(ref));
+ return load(data);
+}
+
+optional<Identity> Identity::load(const vector<Stored<Signed<IdentityData>>> & data)
+{
if (auto ptr = Priv::validate(data))
return Identity(ptr);
return nullopt;
@@ -61,6 +68,11 @@ vector<Ref> Identity::store(const Storage & st) const
return res;
}
+const vector<Stored<Signed<IdentityData>>> & Identity::data() const
+{
+ return p->data;
+}
+
optional<string> Identity::name() const
{
return p->name.get();