Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Debug Clone on send,receive mod types #376

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions payjoin/src/receive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl UncheckedProposal {
/// Typestate to validate that the Original PSBT has no receiver-owned inputs.
///
/// Call [`Self::check_inputs_not_owned`] to proceed.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct MaybeInputsOwned {
psbt: Psbt,
params: Params,
Expand Down Expand Up @@ -212,7 +212,7 @@ impl MaybeInputsOwned {
/// Typestate to validate that the Original PSBT has no inputs that have been seen before.
///
/// Call [`Self::check_no_inputs_seen_before`] to proceed.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct MaybeInputsSeen {
psbt: Psbt,
params: Params,
Expand Down Expand Up @@ -246,7 +246,7 @@ impl MaybeInputsSeen {
///
/// Only accept PSBTs that send us money.
/// Identify those outputs with [`Self::identify_receiver_outputs`] to proceed.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct OutputsUnknown {
psbt: Psbt,
params: Params,
Expand Down Expand Up @@ -864,7 +864,7 @@ impl ProvisionalProposal {

/// A finalized payjoin proposal, complete with fees and receiver signatures, that the sender
/// should find acceptable.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct PayjoinProposal {
payjoin_psbt: Psbt,
params: Params,
Expand Down
6 changes: 3 additions & 3 deletions payjoin/src/receive/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl UncheckedProposal {
/// Typestate to validate that the Original PSBT has no receiver-owned inputs.
///
/// Call [`check_no_receiver_owned_inputs()`](struct.UncheckedProposal.html#method.check_no_receiver_owned_inputs) to proceed.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct MaybeInputsOwned {
inner: super::MaybeInputsOwned,
context: SessionContext,
Expand All @@ -283,7 +283,7 @@ impl MaybeInputsOwned {
/// Typestate to validate that the Original PSBT has no inputs that have been seen before.
///
/// Call [`check_no_inputs_seen`](struct.MaybeInputsSeen.html#method.check_no_inputs_seen_before) to proceed.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct MaybeInputsSeen {
inner: super::MaybeInputsSeen,
context: SessionContext,
Expand All @@ -306,7 +306,7 @@ impl MaybeInputsSeen {
///
/// Only accept PSBTs that send us money.
/// Identify those outputs with `identify_receiver_outputs()` to proceed
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct OutputsUnknown {
inner: super::OutputsUnknown,
context: SessionContext,
Expand Down
3 changes: 3 additions & 0 deletions payjoin/src/send/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ pub enum Context {
V2(V2PostContext),
}

#[derive(Debug, Clone)]
pub struct V1Context {
psbt_context: PsbtContext,
}
Expand Down Expand Up @@ -418,6 +419,7 @@ impl V2PostContext {
}

#[cfg(feature = "v2")]
#[derive(Debug, Clone)]
pub struct V2GetContext {
endpoint: Url,
psbt_ctx: PsbtContext,
Expand Down Expand Up @@ -491,6 +493,7 @@ pub struct PsbtContext {
}

#[cfg(feature = "v2")]
#[derive(Debug, Clone)]
struct HpkeContext {
receiver: HpkePublicKey,
reply_pair: HpkeKeyPair,
Expand Down
Loading