-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f0bdde
commit 6e80a1d
Showing
15 changed files
with
145 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
use std::ops::Deref; | ||
use std::sync::Arc; | ||
|
||
use cashu_sdk::types::KeysetInfo as KeySetInfoSdk; | ||
|
||
use crate::Id; | ||
|
||
pub struct KeySetInfo { | ||
inner: KeySetInfoSdk, | ||
} | ||
|
||
impl Deref for KeySetInfo { | ||
type Target = KeySetInfoSdk; | ||
fn deref(&self) -> &Self::Target { | ||
&self.inner | ||
} | ||
} | ||
|
||
impl From<KeySetInfoSdk> for KeySetInfo { | ||
fn from(inner: KeySetInfoSdk) -> KeySetInfo { | ||
KeySetInfo { inner } | ||
} | ||
} | ||
|
||
impl KeySetInfo { | ||
pub fn new( | ||
id: Arc<Id>, | ||
symbol: String, | ||
valid_from: u64, | ||
valid_to: Option<u64>, | ||
derivation_path: String, | ||
max_order: u8, | ||
) -> Self { | ||
Self { | ||
inner: KeySetInfoSdk { | ||
id: *id.as_ref().deref(), | ||
symbol, | ||
valid_from, | ||
valid_to, | ||
derivation_path, | ||
max_order, | ||
}, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
pub mod keyset_info; | ||
pub mod melted; | ||
pub mod proofs_status; | ||
pub mod send_proofs; | ||
|
||
pub use keyset_info::KeySetInfo as MintKeySetInfo; | ||
pub use melted::Melted; | ||
pub use proofs_status::ProofsStatus; | ||
pub use send_proofs::SendProofs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.