mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-07 15:05:34 +01:00
refactor: remove nut09 feature
This commit is contained in:
@@ -14,10 +14,9 @@ default = ["mint", "wallet", "all-nuts"]
|
||||
mint = ["cashu/mint"]
|
||||
wallet = ["cashu/wallet", "dep:minreq", "dep:once_cell"]
|
||||
gloo = ["dep:gloo"]
|
||||
all-nuts = ["nut07", "nut08", "nut09"]
|
||||
all-nuts = ["nut07", "nut08"]
|
||||
nut07 = ["cashu/nut07"]
|
||||
nut08 = ["cashu/nut08"]
|
||||
nut09 = ["cashu/nut09"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
//! gloo wasm http Client
|
||||
|
||||
use async_trait::async_trait;
|
||||
#[cfg(feature = "nut09")]
|
||||
use cashu::nuts::MintInfo;
|
||||
use cashu::nuts::{
|
||||
BlindedMessage, Keys, MeltBolt11Request, MeltBolt11Response, MintBolt11Request,
|
||||
MintBolt11Response, PreMintSecrets, Proof, SwapRequest, SwapResponse, *,
|
||||
MintBolt11Response, MintInfo, PreMintSecrets, Proof, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
#[cfg(feature = "nut07")]
|
||||
use cashu::nuts::{CheckSpendableRequest, CheckSpendableResponse};
|
||||
@@ -183,7 +181,6 @@ impl Client for HttpClient {
|
||||
}
|
||||
|
||||
/// Get Mint Info [NUT-09]
|
||||
#[cfg(feature = "nut09")]
|
||||
async fn get_mint_info(&self, mint_url: Url) -> Result<MintInfo, Error> {
|
||||
let url = join_url(mint_url, "info")?;
|
||||
let res = Request::get(url.as_str())
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
use std::println;
|
||||
|
||||
use async_trait::async_trait;
|
||||
#[cfg(feature = "nut09")]
|
||||
use cashu::nuts::MintInfo;
|
||||
use cashu::nuts::{
|
||||
BlindedMessage, Keys, MeltBolt11Request, MeltBolt11Response, MintBolt11Request,
|
||||
MintBolt11Response, PreMintSecrets, Proof, SwapRequest, SwapResponse, *,
|
||||
MintBolt11Response, MintInfo, PreMintSecrets, Proof, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
#[cfg(feature = "nut07")]
|
||||
use cashu::nuts::{CheckSpendableRequest, CheckSpendableResponse};
|
||||
@@ -148,7 +146,6 @@ impl Client for HttpClient {
|
||||
}
|
||||
|
||||
/// Get Mint Info [NUT-09]
|
||||
#[cfg(feature = "nut09")]
|
||||
async fn get_mint_info(&self, mint_url: Url) -> Result<MintInfo, Error> {
|
||||
let url = join_url(mint_url, "v1")?;
|
||||
let url = join_url(url, "info")?;
|
||||
|
||||
@@ -5,11 +5,9 @@ use async_trait::async_trait;
|
||||
use cashu::nuts::nut00;
|
||||
#[cfg(feature = "nut07")]
|
||||
use cashu::nuts::CheckSpendableResponse;
|
||||
#[cfg(feature = "nut09")]
|
||||
use cashu::nuts::MintInfo;
|
||||
use cashu::nuts::{
|
||||
BlindedMessage, Keys, KeysetResponse, MeltBolt11Response, MintBolt11Response, PreMintSecrets,
|
||||
Proof, SwapRequest, SwapResponse,
|
||||
BlindedMessage, Keys, KeysetResponse, MeltBolt11Response, MintBolt11Response, MintInfo,
|
||||
PreMintSecrets, Proof, SwapRequest, SwapResponse,
|
||||
};
|
||||
use cashu::utils;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -121,7 +119,6 @@ pub trait Client {
|
||||
proofs: Vec<nut00::mint::Proof>,
|
||||
) -> Result<CheckSpendableResponse, Error>;
|
||||
|
||||
#[cfg(feature = "nut09")]
|
||||
async fn get_mint_info(&self, mint_url: Url) -> Result<MintInfo, Error>;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,9 @@ description = "Cashu rust wallet and mint library"
|
||||
default = ["mint", "wallet", "all-nuts"]
|
||||
mint = []
|
||||
wallet = []
|
||||
all-nuts = ["nut07", "nut08", "nut09"]
|
||||
all-nuts = ["nut07", "nut08"]
|
||||
nut07 = []
|
||||
nut08 = []
|
||||
nut09 = []
|
||||
|
||||
|
||||
[dependencies]
|
||||
|
||||
Reference in New Issue
Block a user