diff --git a/cashu/mint/ledger.py b/cashu/mint/ledger.py index 0f3b96a9..de010a35 100644 --- a/cashu/mint/ledger.py +++ b/cashu/mint/ledger.py @@ -390,7 +390,7 @@ async def mint( id: Optional[str] = None, keyset: Optional[MintKeyset] = None, ) -> List[BlindedSignature]: - """Mints new coins if payment `id` was successful. Ingest blind messages `outputs` and returns blind signatures `promises`. + """Mints new coins if payment `id` was made. Ingest blind messages `outputs` and returns blind signatures `promises`. Args: outputs (List[BlindedMessage]): Outputs (blinded messages) to sign. diff --git a/cashu/mint/router_deprecated.py b/cashu/mint/router_deprecated.py index 70131738..d33414ef 100644 --- a/cashu/mint/router_deprecated.py +++ b/cashu/mint/router_deprecated.py @@ -134,7 +134,7 @@ async def mint_deprecated( hash = payment_hash or hash # END: backwards compatibility < 0.12 - promises = await ledger.mint(payload.outputs, id=hash) + promises = await ledger.mint(outputs=payload.outputs, id=hash) blinded_signatures = PostMintResponse(promises=promises) logger.trace(f"< POST /mint: {blinded_signatures}") return blinded_signatures diff --git a/tests/test_mint.py b/tests/test_mint.py index 906dddba..fe3cfbb6 100644 --- a/tests/test_mint.py +++ b/tests/test_mint.py @@ -84,7 +84,7 @@ async def test_mint(ledger: Ledger): B_="02634a2c2b34bec9e8a4aba4361f6bf202d7fa2365379b0840afe249a7a9d71239", ) ] - promises = await ledger.mint(blinded_messages_mock, hash=payment_hash) + promises = await ledger.mint(outputs=blinded_messages_mock, id=payment_hash) assert len(promises) assert promises[0].amount == 8 assert ( @@ -103,7 +103,7 @@ async def test_mint_invalid_blinded_message(ledger: Ledger): ) ] await assert_err( - ledger.mint(blinded_messages_mock_invalid_key, hash=payment_hash), + ledger.mint(outputs=blinded_messages_mock_invalid_key, id=payment_hash), "invalid public key", )