carrot_core: get_enote_ephemeral_privkey from normal payment proposal

This commit is contained in:
jeffro256
2025-04-20 16:30:56 -05:00
committed by akildemir
parent 09b886b324
commit 88e104423f
2 changed files with 14 additions and 0 deletions
+6
View File
@@ -220,6 +220,12 @@ bool operator==(const CarrotPaymentProposalSelfSendV1 &a, const CarrotPaymentPro
0 == memcmp(&a.enote_ephemeral_pubkey, &b.enote_ephemeral_pubkey, sizeof(mx25519_pubkey));
}
//-------------------------------------------------------------------------------------------------------------------
crypto::secret_key get_enote_ephemeral_privkey(const CarrotPaymentProposalV1 &proposal,
const input_context_t &input_context)
{
return get_enote_ephemeral_privkey(proposal.randomness, proposal.destination, input_context);
}
//-------------------------------------------------------------------------------------------------------------------
mx25519_pubkey get_enote_ephemeral_pubkey(const CarrotPaymentProposalV1 &proposal,
const input_context_t &input_context)
{
+8
View File
@@ -96,6 +96,14 @@ bool operator==(const CarrotPaymentProposalV1 &a, const CarrotPaymentProposalV1
/// equality operators
bool operator==(const CarrotPaymentProposalSelfSendV1 &a, const CarrotPaymentProposalSelfSendV1 &b);
/**
* brief: get_enote_ephemeral_privkey - get the proposal's enote ephemeral privkey d_e
* param: proposal -
* param: input_context -
* return: d_e
*/
crypto::secret_key get_enote_ephemeral_privkey(const CarrotPaymentProposalV1 &proposal,
const input_context_t &input_context);
/**
* brief: get_enote_ephemeral_pubkey - get the proposal's enote ephemeral pubkey D_e
* param: proposal -