This is a big update towards working protocol transactions.

1. The CONVERT TX is creating the necessary information.
2. The PROTOCOL TX is creating the necessary information.
3. The wallet recognises the subaddress (kind of) on incoming amounts.

At present, the PROTOCOL TX outputs are NOT spendable or included in balances.
This commit is contained in:
Some Random Crypto Guy
2023-12-13 14:41:59 +00:00
parent 4955910886
commit 6787d1d018
19 changed files with 487 additions and 142 deletions
+18
View File
@@ -124,6 +124,10 @@ namespace hw {
return crypto::wallet::derive_subaddress_public_key(out_key, derivation, uniqueness, derived_key);
}
bool device_default::derive_subaddress_public_key(const crypto::public_key &out_key, const crypto::key_derivation &derivation, std::size_t output_index, crypto::public_key &derived_key) {
return crypto::wallet::derive_subaddress_public_key(out_key, derivation, output_index, derived_key);
}
crypto::public_key device_default::get_subaddress_spend_public_key(const cryptonote::account_keys& keys, const cryptonote::subaddress_index &index) {
if (index.is_zero())
return keys.m_account_address.m_spend_public_key;
@@ -240,6 +244,20 @@ namespace hw {
return crypto::wallet::generate_key_derivation(key1, key2, derivation);
}
bool device_default::derivation_to_scalar(const crypto::key_derivation &derivation, const size_t output_index, crypto::ec_scalar &res){
crypto::derivation_to_scalar(derivation,output_index, res);
return true;
}
bool device_default::derive_secret_key(const crypto::key_derivation &derivation, const std::size_t output_index, const crypto::secret_key &base, crypto::secret_key &derived_key){
crypto::derive_secret_key(derivation, output_index, base, derived_key);
return true;
}
bool device_default::derive_public_key(const crypto::key_derivation &derivation, const std::size_t output_index, const crypto::public_key &base, crypto::public_key &derived_key){
return crypto::derive_public_key(derivation, output_index, base, derived_key);
}
bool device_default::derivation_to_scalar(const crypto::key_derivation &derivation, const crypto::hash& uniqueness, crypto::ec_scalar &res){
crypto::derivation_to_scalar(derivation, uniqueness, res);
return true;