mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-31 19:45:23 +01:00
convert proof to mint::proof
This commit is contained in:
@@ -118,6 +118,22 @@ pub struct Proof {
|
||||
/// List of proofs
|
||||
pub type Proofs = Vec<Proof>;
|
||||
|
||||
impl From<Proof> for mint::Proof {
|
||||
fn from(proof: Proof) -> Self {
|
||||
Self {
|
||||
amount: Some(proof.amount),
|
||||
secret: proof.secret,
|
||||
c: Some(proof.c),
|
||||
id: proof.id,
|
||||
script: proof.script,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mint_proofs_from_proofs(proofs: Proofs) -> mint::Proofs {
|
||||
proofs.iter().map(|p| p.to_owned().into()).collect()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct MintProofs {
|
||||
#[serde(with = "serde_url")]
|
||||
|
||||
Reference in New Issue
Block a user