aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/account.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-13 15:29:31 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-17 16:12:12 +0000
commitf4eda44ce35c6e1ab77566a462470deaae5376ec (patch)
treec7705926d3794b066293c4dd440701f4c91049ca /src/cryptonote_basic/account.h
parentmultisig address generation RPC (diff)
downloadmonero-f4eda44ce35c6e1ab77566a462470deaae5376ec.tar.xz
N-1/N multisig
Diffstat (limited to '')
-rw-r--r--src/cryptonote_basic/account.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h
index ab837df3f..50af36a9d 100644
--- a/src/cryptonote_basic/account.h
+++ b/src/cryptonote_basic/account.h
@@ -42,11 +42,13 @@ namespace cryptonote
account_public_address m_account_address;
crypto::secret_key m_spend_secret_key;
crypto::secret_key m_view_secret_key;
+ std::vector<crypto::secret_key> m_multisig_keys;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(m_account_address)
KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(m_spend_secret_key)
KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(m_view_secret_key)
+ KV_SERIALIZE_CONTAINER_POD_AS_BLOB(m_multisig_keys)
END_KV_SERIALIZE_MAP()
};
@@ -60,7 +62,8 @@ namespace cryptonote
crypto::secret_key generate(const crypto::secret_key& recovery_key = crypto::secret_key(), bool recover = false, bool two_random = false);
void create_from_keys(const cryptonote::account_public_address& address, const crypto::secret_key& spendkey, const crypto::secret_key& viewkey);
void create_from_viewkey(const cryptonote::account_public_address& address, const crypto::secret_key& viewkey);
- bool make_multisig(const crypto::secret_key &view_secret_key, const crypto::public_key &spend_public_key);
+ bool make_multisig(const crypto::secret_key &view_secret_key, const crypto::secret_key &spend_secret_key, const crypto::public_key &spend_public_key, const std::vector<crypto::secret_key> &multisig_keys);
+ void finalize_multisig(const crypto::public_key &spend_public_key);
const account_keys& get_keys() const;
std::string get_public_address_str(bool testnet) const;
std::string get_public_integrated_address_str(const crypto::hash8 &payment_id, bool testnet) const;
@@ -72,6 +75,7 @@ namespace cryptonote
bool store(const std::string& file_path);
void forget_spend_key();
+ const std::vector<crypto::secret_key> &get_multisig_keys() const { return m_keys.m_multisig_keys; }
template <class t_archive>
inline void serialize(t_archive &a, const unsigned int /*ver*/)