mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-08 06:35:52 +01:00
bindings: MintVersion feilds
This commit is contained in:
@@ -214,6 +214,14 @@ interface MintVersion {
|
||||
|
||||
interface MintInfo {
|
||||
constructor(string? name, PublicKey? pubkey, MintVersion? version, string? description, string? description_long, sequence<sequence<string>>? contact, sequence<string> nuts, string? motd);
|
||||
string? name();
|
||||
PublicKey? pubkey();
|
||||
MintVersion? version();
|
||||
string? description();
|
||||
string? description_long();
|
||||
sequence<sequence<string>>? contact();
|
||||
sequence<string> nuts();
|
||||
string? motd();
|
||||
};
|
||||
|
||||
enum InvoiceStatus {
|
||||
|
||||
@@ -73,6 +73,38 @@ impl MintInfo {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn name(&self) -> Option<String> {
|
||||
self.inner.name.clone()
|
||||
}
|
||||
|
||||
pub fn pubkey(&self) -> Option<Arc<PublicKey>> {
|
||||
self.inner.pubkey.clone().map(|p| Arc::new(p.into()))
|
||||
}
|
||||
|
||||
pub fn version(&self) -> Option<Arc<MintVersion>> {
|
||||
self.inner.version.clone().map(|v| Arc::new(v.into()))
|
||||
}
|
||||
|
||||
pub fn description(&self) -> Option<String> {
|
||||
self.inner.description.clone()
|
||||
}
|
||||
|
||||
pub fn description_long(&self) -> Option<String> {
|
||||
self.inner.description_long.clone()
|
||||
}
|
||||
|
||||
pub fn contact(&self) -> Option<Vec<Vec<String>>> {
|
||||
self.inner.contact.clone()
|
||||
}
|
||||
|
||||
pub fn nuts(&self) -> Vec<String> {
|
||||
self.inner.nuts.clone()
|
||||
}
|
||||
|
||||
pub fn motd(&self) -> Option<String> {
|
||||
self.inner.motd.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<cashu::nuts::nut09::MintInfo> for MintInfo {
|
||||
|
||||
@@ -217,6 +217,14 @@ interface MintVersion {
|
||||
|
||||
interface MintInfo {
|
||||
constructor(string? name, PublicKey? pubkey, MintVersion? version, string? description, string? description_long, sequence<sequence<string>>? contact, sequence<string> nuts, string? motd);
|
||||
string? name();
|
||||
PublicKey? pubkey();
|
||||
MintVersion? version();
|
||||
string? description();
|
||||
string? description_long();
|
||||
sequence<sequence<string>>? contact();
|
||||
sequence<string> nuts();
|
||||
string? motd();
|
||||
};
|
||||
|
||||
enum InvoiceStatus {
|
||||
|
||||
Reference in New Issue
Block a user