mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-08 15:35:35 +01:00
FIX: NUT04 breaking change
This commit is contained in:
@@ -45,17 +45,10 @@ impl CashuWallet {
|
||||
}
|
||||
|
||||
/// Mint Token
|
||||
pub async fn mint_token(
|
||||
&self,
|
||||
amount: Amount,
|
||||
payment_hash: &str,
|
||||
) -> Result<Vec<Proof>, Error> {
|
||||
pub async fn mint_token(&self, amount: Amount, hash: &str) -> Result<Vec<Proof>, Error> {
|
||||
let blinded_messages = BlindedMessages::random(amount)?;
|
||||
|
||||
let mint_res = self
|
||||
.client
|
||||
.mint(blinded_messages.clone(), payment_hash)
|
||||
.await?;
|
||||
let mint_res = self.client.mint(blinded_messages.clone(), hash).await?;
|
||||
|
||||
let proofs = construct_proofs(
|
||||
mint_res.promises,
|
||||
|
||||
@@ -64,11 +64,10 @@ impl Client {
|
||||
pub async fn mint(
|
||||
&self,
|
||||
blinded_messages: BlindedMessages,
|
||||
payment_hash: &str,
|
||||
hash: &str,
|
||||
) -> Result<PostMintResponse, Error> {
|
||||
let mut url = self.mint_url.join("mint")?;
|
||||
url.query_pairs_mut()
|
||||
.append_pair("payment_hash", payment_hash);
|
||||
url.query_pairs_mut().append_pair("hash", hash);
|
||||
|
||||
let request = MintRequest {
|
||||
outputs: blinded_messages.blinded_messages,
|
||||
|
||||
@@ -136,7 +136,7 @@ pub struct MintKeySets {
|
||||
pub struct RequestMintResponse {
|
||||
/// Bolt11 payment request
|
||||
pub pr: Invoice,
|
||||
/// Hash of Invoice
|
||||
/// Random Hash
|
||||
pub hash: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user