mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-15 01:56:06 +01:00
refactor: include wallet and mint in cdk
This commit is contained in:
@@ -11,7 +11,7 @@ license.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["mint", "wallet", "all-nuts", "redb"]
|
||||
mint = []
|
||||
mint = ["dep:bip39"]
|
||||
wallet = ["dep:minreq"]
|
||||
gloo = ["dep:gloo"]
|
||||
all-nuts = ["nut13"]
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
//! gloo wasm http Client
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::nuts::nut09::{RestoreRequest, RestoreResponse};
|
||||
use cashu::nuts::{
|
||||
BlindedMessage, CheckSpendableRequest, CheckSpendableResponse, MeltBolt11Request,
|
||||
MeltBolt11Response, MintBolt11Request, MintBolt11Response, MintInfo, PreMintSecrets, Proof,
|
||||
PublicKey, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
use cashu::{Amount, Bolt11Invoice};
|
||||
use gloo::net::http::Request;
|
||||
use serde_json::Value;
|
||||
use url::Url;
|
||||
|
||||
use super::join_url;
|
||||
use crate::client::{Client, Error};
|
||||
use crate::nuts::{
|
||||
BlindedMessage, CheckSpendableRequest, CheckSpendableResponse, MeltBolt11Request,
|
||||
MeltBolt11Response, MintBolt11Request, MintBolt11Response, MintInfo, PreMintSecrets, Proof,
|
||||
PublicKey, RestoreRequest, RestoreResponse, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
use crate::{Amount, Bolt11Invoice};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct HttpClient {}
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
//! Minreq http Client
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::error::ErrorResponse;
|
||||
use cashu::nuts::nut09::{RestoreRequest, RestoreResponse};
|
||||
use cashu::nuts::{
|
||||
BlindedMessage, CheckStateRequest, CheckStateResponse, CurrencyUnit, Id, KeySet, KeysResponse,
|
||||
KeysetResponse, MeltBolt11Request, MeltBolt11Response, MeltQuoteBolt11Request,
|
||||
MeltQuoteBolt11Response, MintBolt11Request, MintBolt11Response, MintInfo,
|
||||
MintQuoteBolt11Request, MintQuoteBolt11Response, PreMintSecrets, Proof, PublicKey, SwapRequest,
|
||||
SwapResponse,
|
||||
};
|
||||
use cashu::{Amount, Bolt11Invoice};
|
||||
use serde_json::Value;
|
||||
use tracing::warn;
|
||||
use url::Url;
|
||||
|
||||
use super::join_url;
|
||||
use crate::client::{Client, Error};
|
||||
use crate::error::ErrorResponse;
|
||||
use crate::nuts::{
|
||||
BlindedMessage, CheckStateRequest, CheckStateResponse, CurrencyUnit, Id, KeySet, KeysResponse,
|
||||
KeysetResponse, MeltBolt11Request, MeltBolt11Response, MeltQuoteBolt11Request,
|
||||
MeltQuoteBolt11Response, MintBolt11Request, MintBolt11Response, MintInfo,
|
||||
MintQuoteBolt11Request, MintQuoteBolt11Response, PreMintSecrets, Proof, PublicKey,
|
||||
RestoreRequest, RestoreResponse, SwapRequest, SwapResponse,
|
||||
};
|
||||
use crate::{Amount, Bolt11Invoice};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct HttpClient {}
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
//! Client to connet to mint
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::error::ErrorResponse;
|
||||
use cashu::nuts::nut09::{RestoreRequest, RestoreResponse};
|
||||
use cashu::nuts::{
|
||||
use thiserror::Error;
|
||||
use url::Url;
|
||||
|
||||
use crate::error::ErrorResponse;
|
||||
use crate::nuts::nut09::{RestoreRequest, RestoreResponse};
|
||||
use crate::nuts::{
|
||||
BlindedMessage, CheckStateResponse, CurrencyUnit, Id, KeySet, KeysetResponse,
|
||||
MeltBolt11Response, MeltQuoteBolt11Response, MintBolt11Response, MintInfo,
|
||||
MintQuoteBolt11Response, PreMintSecrets, Proof, PublicKey, SwapRequest, SwapResponse,
|
||||
};
|
||||
use cashu::Amount;
|
||||
use thiserror::Error;
|
||||
use url::Url;
|
||||
use crate::Amount;
|
||||
|
||||
#[cfg(feature = "gloo")]
|
||||
pub mod gloo_client;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub mod minreq_client;
|
||||
|
||||
pub use cashu::Bolt11Invoice;
|
||||
pub use crate::Bolt11Invoice;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
@@ -33,7 +34,7 @@ pub enum Error {
|
||||
SerdeJson(#[from] serde_json::Error),
|
||||
/// Cashu Url Error
|
||||
#[error("`{0}`")]
|
||||
CashuUrl(#[from] cashu::url::Error),
|
||||
CashuUrl(#[from] crate::url::Error),
|
||||
/// Min req error
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[error("`{0}`")]
|
||||
@@ -42,7 +43,7 @@ pub enum Error {
|
||||
#[error("`{0}`")]
|
||||
Gloo(String),
|
||||
#[error("Unknown Error response")]
|
||||
UnknownErrorResponse(cashu::error::ErrorResponse),
|
||||
UnknownErrorResponse(crate::error::ErrorResponse),
|
||||
/// Custom Error
|
||||
#[error("`{0}`")]
|
||||
Custom(String),
|
||||
|
||||
@@ -5,14 +5,20 @@ pub use bitcoin::secp256k1;
|
||||
pub use lightning_invoice::{self, Bolt11Invoice};
|
||||
|
||||
pub mod amount;
|
||||
#[cfg(feature = "wallet")]
|
||||
pub mod client;
|
||||
pub mod dhke;
|
||||
pub mod error;
|
||||
#[cfg(feature = "mint")]
|
||||
pub mod mint;
|
||||
pub mod nuts;
|
||||
pub mod secret;
|
||||
pub mod serde_utils;
|
||||
pub mod types;
|
||||
pub mod url;
|
||||
pub mod util;
|
||||
#[cfg(feature = "wallet")]
|
||||
pub mod wallet;
|
||||
|
||||
pub use self::amount::Amount;
|
||||
pub use self::util::SECP256K1;
|
||||
|
||||
@@ -2,14 +2,14 @@ use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::dhke::hash_to_curve;
|
||||
use cashu::nuts::nut02::mint::KeySet;
|
||||
use cashu::nuts::{BlindSignature, CurrencyUnit, Id, MintInfo, Proof, Proofs, PublicKey};
|
||||
use cashu::secret::Secret;
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use super::{Error, LocalStore};
|
||||
use crate::dhke::hash_to_curve;
|
||||
use crate::nuts::nut02::mint::KeySet;
|
||||
use crate::nuts::{BlindSignature, CurrencyUnit, Id, MintInfo, Proof, Proofs, PublicKey};
|
||||
use crate::secret::Secret;
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct MemoryLocalStore {
|
||||
|
||||
@@ -6,15 +6,16 @@ use std::collections::HashMap;
|
||||
use std::num::ParseIntError;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::nuts::nut02::mint::KeySet;
|
||||
use cashu::nuts::{BlindSignature, CurrencyUnit, Id, MintInfo, Proof, PublicKey};
|
||||
use cashu::secret::Secret;
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
pub use memory::MemoryLocalStore;
|
||||
#[cfg(all(not(target_arch = "wasm32"), feature = "redb"))]
|
||||
pub use redb_store::RedbLocalStore;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::nuts::nut02::mint::KeySet;
|
||||
use crate::nuts::{BlindSignature, CurrencyUnit, Id, MintInfo, Proof, PublicKey};
|
||||
use crate::secret::Secret;
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[cfg(all(not(target_arch = "wasm32"), feature = "redb"))]
|
||||
@@ -43,11 +44,11 @@ pub enum Error {
|
||||
#[error("Unknown Mint Info")]
|
||||
UnknownMintInfo,
|
||||
#[error("`{0}`")]
|
||||
Cashu(#[from] cashu::error::Error),
|
||||
Cashu(#[from] crate::error::Error),
|
||||
#[error("`{0}`")]
|
||||
CashuNut02(#[from] cashu::nuts::nut02::Error),
|
||||
CashuNut02(#[from] crate::nuts::nut02::Error),
|
||||
#[error("`{0}`")]
|
||||
Secret(#[from] cashu::secret::Error),
|
||||
Secret(#[from] crate::secret::Error),
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
|
||||
@@ -3,17 +3,17 @@ use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::dhke::hash_to_curve;
|
||||
use cashu::nuts::{
|
||||
BlindSignature, CurrencyUnit, Id, MintInfo, MintKeySet as KeySet, Proof, PublicKey,
|
||||
};
|
||||
use cashu::secret::Secret;
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
use redb::{Database, ReadableTable, TableDefinition};
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::debug;
|
||||
|
||||
use super::{Error, LocalStore};
|
||||
use crate::dhke::hash_to_curve;
|
||||
use crate::nuts::{
|
||||
BlindSignature, CurrencyUnit, Id, MintInfo, MintKeySet as KeySet, Proof, PublicKey,
|
||||
};
|
||||
use crate::secret::Secret;
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
|
||||
const ACTIVE_KEYSETS_TABLE: TableDefinition<&str, &str> = TableDefinition::new("active_keysets");
|
||||
const KEYSETS_TABLE: TableDefinition<&str, &str> = TableDefinition::new("keysets");
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
use std::collections::HashSet;
|
||||
use std::sync::Arc;
|
||||
|
||||
use cashu::dhke::{hash_to_curve, sign_message, verify_message};
|
||||
use cashu::error::ErrorResponse;
|
||||
use cashu::nuts::nut07::{ProofState, State};
|
||||
use cashu::nuts::{
|
||||
BlindSignature, BlindedMessage, CheckStateRequest, CheckStateResponse, MeltBolt11Request,
|
||||
MeltBolt11Response, Proof, RestoreRequest, RestoreResponse, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
use cashu::Amount;
|
||||
use bip39::Mnemonic;
|
||||
use http::StatusCode;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use thiserror::Error;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use crate::Mnemonic;
|
||||
use crate::dhke::{hash_to_curve, sign_message, verify_message};
|
||||
use crate::error::ErrorResponse;
|
||||
use crate::nuts::nut07::{ProofState, State};
|
||||
use crate::nuts::{
|
||||
BlindSignature, BlindedMessage, CheckStateRequest, CheckStateResponse, MeltBolt11Request,
|
||||
MeltBolt11Response, Proof, RestoreRequest, RestoreResponse, SwapRequest, SwapResponse, *,
|
||||
};
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
use crate::Amount;
|
||||
|
||||
mod localstore;
|
||||
#[cfg(all(not(target_arch = "wasm32"), feature = "redb"))]
|
||||
@@ -45,15 +45,15 @@ pub enum Error {
|
||||
#[error("`{0}`")]
|
||||
Custom(String),
|
||||
#[error("`{0}`")]
|
||||
CashuMint(#[from] cashu::error::mint::Error),
|
||||
CashuMint(#[from] crate::error::mint::Error),
|
||||
#[error("`{0}`")]
|
||||
Cashu(#[from] cashu::error::Error),
|
||||
Cashu(#[from] crate::error::Error),
|
||||
#[error("`{0}`")]
|
||||
Localstore(#[from] localstore::Error),
|
||||
#[error("`{0}`")]
|
||||
Secret(#[from] cashu::secret::Error),
|
||||
Secret(#[from] crate::secret::Error),
|
||||
#[error("`{0}`")]
|
||||
Nut12(#[from] cashu::nuts::nut12::Error),
|
||||
Nut12(#[from] crate::nuts::nut12::Error),
|
||||
#[error("Unknown quote")]
|
||||
UnknownQuote,
|
||||
#[error("Unknown secret kind")]
|
||||
@@ -460,7 +460,7 @@ impl Mint {
|
||||
async fn verify_proof(&self, proof: &Proof) -> Result<(), Error> {
|
||||
// Check if secret is a nut10 secret with conditions
|
||||
if let Ok(secret) =
|
||||
<&cashu::secret::Secret as TryInto<cashu::nuts::nut10::Secret>>::try_into(&proof.secret)
|
||||
<&crate::secret::Secret as TryInto<crate::nuts::nut10::Secret>>::try_into(&proof.secret)
|
||||
{
|
||||
// Verify if p2pk
|
||||
if secret.kind.eq(&Kind::P2PK) {
|
||||
|
||||
@@ -30,8 +30,7 @@ pub use nut05::{
|
||||
MeltBolt11Request, MeltBolt11Response, MeltQuoteBolt11Request, MeltQuoteBolt11Response,
|
||||
};
|
||||
pub use nut06::{MintInfo, MintVersion, Nuts};
|
||||
#[cfg(feature = "wallet")]
|
||||
pub use nut07::{CheckStateRequest, CheckStateResponse};
|
||||
pub use nut07::{CheckStateRequest, CheckStateResponse, ProofState, State};
|
||||
pub use nut09::{RestoreRequest, RestoreResponse};
|
||||
pub use nut10::{Kind, Secret as Nut10Secret, SecretData};
|
||||
pub use nut11::{P2PKConditions, SigFlag, Signatures, SigningKey, VerifyingKey};
|
||||
|
||||
@@ -2,12 +2,12 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::nuts::{Id, KeySetInfo, Keys, MintInfo, Proof, Proofs};
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
use cashu::url::UncheckedUrl;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use super::{Error, LocalStore};
|
||||
use crate::nuts::{Id, KeySetInfo, Keys, MintInfo, Proof, Proofs};
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
use crate::url::UncheckedUrl;
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct MemoryLocalStore {
|
||||
|
||||
@@ -7,14 +7,15 @@ use std::collections::HashMap;
|
||||
use std::num::ParseIntError;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::nuts::{Id, KeySetInfo, Keys, MintInfo, Proofs};
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
use cashu::url::UncheckedUrl;
|
||||
pub use memory::MemoryLocalStore;
|
||||
#[cfg(all(not(target_arch = "wasm32"), feature = "redb"))]
|
||||
pub use redb_store::RedbLocalStore;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::nuts::{Id, KeySetInfo, Keys, MintInfo, Proofs};
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
use crate::url::UncheckedUrl;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[cfg(all(not(target_arch = "wasm32"), feature = "redb"))]
|
||||
|
||||
@@ -3,13 +3,13 @@ use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cashu::nuts::{Id, KeySetInfo, Keys, MintInfo, Proofs};
|
||||
use cashu::types::{MeltQuote, MintQuote};
|
||||
use cashu::url::UncheckedUrl;
|
||||
use redb::{Database, MultimapTableDefinition, ReadableTable, TableDefinition};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use super::{Error, LocalStore};
|
||||
use crate::nuts::{Id, KeySetInfo, Keys, MintInfo, Proofs};
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
use crate::url::UncheckedUrl;
|
||||
|
||||
const MINTS_TABLE: TableDefinition<&str, &str> = TableDefinition::new("mints_table");
|
||||
const MINT_KEYSETS_TABLE: MultimapTableDefinition<&str, &str> =
|
||||
|
||||
@@ -5,23 +5,21 @@ use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use bip39::Mnemonic;
|
||||
use cashu::dhke::{construct_proofs, unblind_message};
|
||||
use cashu::nuts::nut07::{ProofState, State};
|
||||
use cashu::nuts::nut09::RestoreRequest;
|
||||
use cashu::nuts::nut11::SigningKey;
|
||||
use cashu::nuts::{
|
||||
BlindSignature, CurrencyUnit, Id, KeySet, KeySetInfo, Keys, MintInfo, P2PKConditions,
|
||||
PreMintSecrets, PreSwap, Proof, Proofs, PublicKey, SigFlag, SwapRequest, Token,
|
||||
};
|
||||
use cashu::types::{MeltQuote, Melted, MintQuote};
|
||||
use cashu::url::UncheckedUrl;
|
||||
use cashu::util::unix_time;
|
||||
use cashu::{Amount, Bolt11Invoice};
|
||||
use localstore::LocalStore;
|
||||
use thiserror::Error;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use crate::client::Client;
|
||||
use crate::dhke::{construct_proofs, hash_to_curve, unblind_message};
|
||||
use crate::nuts::{
|
||||
BlindSignature, CurrencyUnit, Id, KeySet, KeySetInfo, Keys, MintInfo, P2PKConditions,
|
||||
PreMintSecrets, PreSwap, Proof, ProofState, Proofs, PublicKey, RestoreRequest, SigFlag,
|
||||
SigningKey, State, SwapRequest, Token,
|
||||
};
|
||||
use crate::types::{MeltQuote, Melted, MintQuote};
|
||||
use crate::url::UncheckedUrl;
|
||||
use crate::util::unix_time;
|
||||
use crate::{Amount, Bolt11Invoice};
|
||||
|
||||
pub mod localstore;
|
||||
|
||||
@@ -31,12 +29,12 @@ pub enum Error {
|
||||
#[error("Insufficient Funds")]
|
||||
InsufficientFunds,
|
||||
#[error("`{0}`")]
|
||||
CashuWallet(#[from] cashu::error::wallet::Error),
|
||||
CashuWallet(#[from] crate::error::wallet::Error),
|
||||
#[error("`{0}`")]
|
||||
Client(#[from] crate::client::Error),
|
||||
/// Cashu Url Error
|
||||
#[error("`{0}`")]
|
||||
CashuUrl(#[from] cashu::url::Error),
|
||||
CashuUrl(#[from] crate::url::Error),
|
||||
#[error("Quote Expired")]
|
||||
QuoteExpired,
|
||||
#[error("Quote Unknown")]
|
||||
@@ -46,7 +44,7 @@ pub enum Error {
|
||||
#[error("`{0}`")]
|
||||
LocalStore(#[from] localstore::Error),
|
||||
#[error("`{0}`")]
|
||||
Cashu(#[from] cashu::error::Error),
|
||||
Cashu(#[from] crate::error::Error),
|
||||
#[error("Could not verify Dleq")]
|
||||
CouldNotVerifyDleq,
|
||||
#[error("P2PK Condition Not met `{0}`")]
|
||||
@@ -187,8 +185,6 @@ impl Wallet {
|
||||
mint_url: UncheckedUrl,
|
||||
proofs: Proofs,
|
||||
) -> Result<Vec<ProofState>, Error> {
|
||||
use cashu::dhke::hash_to_curve;
|
||||
|
||||
let spendable = self
|
||||
.client
|
||||
.post_check_state(
|
||||
@@ -361,7 +357,7 @@ impl Wallet {
|
||||
let key = keys.amount_key(sig.amount).ok_or(Error::UnknownKey)?;
|
||||
match sig.verify_dleq(key, premint.blinded_message.b) {
|
||||
Ok(_) => (),
|
||||
Err(cashu::nuts::nut12::Error::MissingDleqProof) => (),
|
||||
Err(crate::nuts::nut12::Error::MissingDleqProof) => (),
|
||||
Err(_) => return Err(Error::CouldNotVerifyDleq),
|
||||
}
|
||||
}
|
||||
@@ -411,7 +407,7 @@ impl Wallet {
|
||||
let key = keys.amount_key(proof.amount).ok_or(Error::UnknownKey)?;
|
||||
match proof.verify_dleq(key) {
|
||||
Ok(_) => continue,
|
||||
Err(cashu::nuts::nut12::Error::MissingDleqProof) => continue,
|
||||
Err(crate::nuts::nut12::Error::MissingDleqProof) => continue,
|
||||
Err(_) => return Err(Error::CouldNotVerifyDleq),
|
||||
}
|
||||
}
|
||||
@@ -571,7 +567,7 @@ impl Wallet {
|
||||
let key = keys.amount_key(promise.amount).ok_or(Error::UnknownKey)?;
|
||||
match promise.verify_dleq(key, premint.blinded_message.b) {
|
||||
Ok(_) => (),
|
||||
Err(cashu::nuts::nut12::Error::MissingDleqProof) => (),
|
||||
Err(crate::nuts::nut12::Error::MissingDleqProof) => (),
|
||||
Err(_) => return Err(Error::CouldNotVerifyDleq),
|
||||
}
|
||||
}
|
||||
@@ -932,7 +928,7 @@ impl Wallet {
|
||||
let mut change_proofs = vec![];
|
||||
|
||||
for proof in post_swap_proofs {
|
||||
let conditions: Result<cashu::nuts::nut10::Secret, _> = (&proof.secret).try_into();
|
||||
let conditions: Result<crate::nuts::nut10::Secret, _> = (&proof.secret).try_into();
|
||||
if conditions.is_ok() {
|
||||
send_proofs.push(proof);
|
||||
} else {
|
||||
@@ -1001,7 +997,7 @@ impl Wallet {
|
||||
}
|
||||
|
||||
if let Ok(secret) =
|
||||
<cashu::secret::Secret as TryInto<cashu::nuts::nut10::Secret>>::try_into(
|
||||
<crate::secret::Secret as TryInto<crate::nuts::nut10::Secret>>::try_into(
|
||||
proof.secret.clone(),
|
||||
)
|
||||
{
|
||||
@@ -1183,7 +1179,7 @@ impl Wallet {
|
||||
token: &Token,
|
||||
spending_conditions: P2PKConditions,
|
||||
) -> Result<(), Error> {
|
||||
use cashu::nuts::nut10;
|
||||
use crate::nuts::nut10;
|
||||
|
||||
if spending_conditions.refund_keys.is_some() && spending_conditions.locktime.is_none() {
|
||||
warn!(
|
||||
|
||||
Reference in New Issue
Block a user