aboutsummaryrefslogtreecommitdiff
path: root/include/axolotl/account.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/axolotl/account.hh')
-rw-r--r--include/axolotl/account.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/axolotl/account.hh b/include/axolotl/account.hh
index 5edb799..dd9c819 100644
--- a/include/axolotl/account.hh
+++ b/include/axolotl/account.hh
@@ -2,6 +2,8 @@
#define AXOLOTL_ACCOUNT_HH_
#include "axolotl/list.hh"
+#include "axolotl/crypto.hh"
+#include "axolotl/error.hh"
#include <cstdint>
@@ -25,16 +27,21 @@ struct Account {
LocalKey identity_key;
LocalKey last_resort_one_time_key;
List<LocalKey, MAX_ONE_TIME_KEYS> one_time_keys;
+ ErrorCode last_error;
/** Number of random bytes needed to create a new account */
std::size_t new_account_random_length();
/** Create a new account. Returns NOT_ENOUGH_RANDOM if the number of random
* bytes is too small. */
- ErrorCode new_account(
+ std::size_t new_account(
uint8_t const * random, std::size_t random_length
);
+ LocalKey const * lookup_key(
+ std::uint32_t id
+ );
+
/** The number of bytes needed to persist this account. */
std::size_t pickle_length();