* startup: do not rollback unknown melt quote states
* fix: provide overpaid fees on startup
* fix: check if outputs in db
* fix test: expect melt quote pending if payment state is unknown
* fix up comment
* remove MINT_LND_ENABLE_MPP from .env.example
since it is now default
* remove MINT_LND_ENABLE_MPP from CI regtest workflow
since it is now default
* enable MINT_CLNREST_ENABLE_MPP for CI regtest workflow
by removing false assignment, since it is now default
* nut-19 sign mint quote
* ephemeral key for quote
* `mint` adjustments + crypto/nut19.py
* wip: mint side working
* fix import
* post-merge fixups
* more fixes
* make format
* move nut19 to nuts directory
* `key` -> `privkey` and `pubkey`
* make format
* mint_info method for nut-19 support
* fix tests imports
* fix signature missing positional argument + fix db migration format not correctly escaped + pass in NUT-19 keypair to `request_mint` `request_mint_with_callback`
* make format
* fix `get_invoice_status`
* rename to xx
* nutxx -> nut20
* mypy
* remove `mint_quote_signature_required` as per spec
* wip edits
* clean up
* fix tests
* fix deprecated api tests
* fix redis tests
* fix cache tests
* fix regtest mint external
* fix mint regtest
* add test without signature
* test pubkeys in quotes
* wip
* add compat
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* fast-api-cache setup
* testing the cache
* fix
* still not working
* asynccontextmanager
* move test
* use redis & custom caching setup (like CDK)
* make format
* poetry lock
* fix format string + log when a cached response is found
* log when a cahced response is found
* fix tests
* poetry lock
* try tests on github
* use docker compose
* maybe we dont need docker
* fix types
* create_task instead of run
* how about we start postgres
* mint features
* format
* remove deprecated setex call
* use global expiry for all cached routes
* refactor feature map and set default to 1 week
* refactor feature construction
* Cache NUT-19
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* sort proofs
* outputs-ordering
* mypy fix
* clean up
* test if output amounts are sorted
* clean up test
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* skip db lock check in regtests
* revert?
* try this
* do not dispose conftests
* remove return
* test this
* try auto
* dispose stuff
* try uri=true
* remove the other flag
* move test
* reduce tests
* reduce more
* keep one
* skip on github?
* only skip in regtest
* trigger again
* restore cashu/mint/ledger.py
* WIP settle different units externally
* mint melt externally different units
* deprecated route return only sat
* comment
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* wait for uvicorn server to bind before running tests
Previously we had a simple `time.sleep(1)` call after `server.start()`
which was present to give the Mint's HTTP server time to spin up during
test runs. This meant that if the server took longer than 1s to start
on a dev's machine for any reason (even intermittently) then tests would
fail due to connection errors.
The fix is to use a simple repeated polling check which allows
the test runner to start only once the server is confirmed listening.
* fix linter errors
* prevent infinite loop
* specifically except httpx.ConnectError
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
---------
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>