diff --git a/src/carrot_core/payment_proposal.cpp b/src/carrot_core/payment_proposal.cpp index 66cc3c376..16d1730b4 100644 --- a/src/carrot_core/payment_proposal.cpp +++ b/src/carrot_core/payment_proposal.cpp @@ -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) { diff --git a/src/carrot_core/payment_proposal.h b/src/carrot_core/payment_proposal.h index c49f35a31..9bc3afbae 100644 --- a/src/carrot_core/payment_proposal.h +++ b/src/carrot_core/payment_proposal.h @@ -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 -