Commit Graph

866 Commits

Author SHA1 Message Date
Caleb Beery
bb7730694d Refactored the request mint wallet method to generate the invoice from a returned MintQuoteResponse. (#507) 2024-04-15 18:43:13 +02:00
callebtc
bdaed8451c [Mint] Migrate duplicate keysets to db (#511)
* wip

* remove all deprecated keyset tests

* fix more tests

* fixups
2024-04-15 00:33:23 +02:00
Caleb Beery
26afd71d89 Restore wallet now restores tokens for all mint keysets. (#509) 2024-04-13 10:31:05 +02:00
callebtc
19de10bfea [Refactor] Mint: remove output.id optional (#504)
* remove output.id optional

* asserts

* wip

* wip

* working
2024-04-10 12:23:53 +02:00
Guilherme Pereira
3b2f1aa6f4 Issue #313: allow checking pending invoices (#493)
* Update deprecated datetime

* Add options to Invoices cli
With these options, we are able to return:
1) all invoices (this is the default);
2) pending invoices (paid False, out False);
3) paid invoices;
4) and unpaid invoices.

* make format

* Fix mypy error with datetime

* sort imports

* Remove unneeded unit when printing out info

* Fix wrong method doc

* Try to mint pending invoices

* make pre-commit

* Refactor --tests flag to --mint
The default will be false, i.e., if the user does not
pass in the --mint flag, it will not try to mint
the pending invoice.

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2024-04-03 17:51:15 +02:00
callebtc
b8ad0e0a8f Mint: Recover pending melts at startup (#499)
* wip works with fakewallet

* startup refactor

* add tests

* regtest tests for pending melts

* wip CLN

* remove db migration

* remove foreign key relation to keyset id

* fix: get_promise from db and restore DLEQs

* test: check for keyset not found error

* fix migrations

* lower-case all db column names

* add more tests for regtest

* simlate failure for lightning

* test wallet spent state with hodl invoices

* retry

* regtest with postgres

* retry postgres

* add sleeps

* longer sleep on github

* more sleep for github sigh

* increase sleep ffs

* add sleep loop

* try something

* do not pay with wallet but with ledger

* fix lnbits pending state

* fix pipeline to use fake admin from docker
2024-04-03 17:14:21 +02:00
callebtc
1f1daca232 Add test for NUT-12 (#498) 2024-03-29 22:34:51 +01:00
callebtc
b41b485f05 change sponsor link (#496) 2024-03-27 20:29:48 +01:00
callebtc
4ff9e6de5d bump version to 0.15.2 (#495) 2024-03-26 22:01:09 +01:00
findingsov
f7ad912b13 Update .env.example, add MINT_MAX_BALANCE (#474)
Changed MINT_MAX_PEG_IN/OUT defaults to 10000

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2024-03-26 16:04:07 +01:00
callebtc
e040479795 Fix CLNRest return model (#494)
* returs different model

* new way to get local balance
2024-03-26 12:00:13 +01:00
callebtc
3feb02312e fix: fakewallet payment fee unit (#490) 2024-03-23 03:08:13 +01:00
callebtc
adeec000a7 Mint: Add slowapi (#481)
* Add slowapi

* fix startup

* adjust settings

* add rate limits to tx routes

* elastic
2024-03-23 02:25:19 +01:00
callebtc
b288a6d50e Refactor: melt quote unit validation (#489)
* refactor: mint quote validation

* convert amount in Lightning backend for later validation

* fix blink amount return tests

* retry tests

* fix conftest fakewallet

* fix start
2024-03-23 01:16:28 +01:00
callebtc
3ba1e81fcb Mint: Fakewallet support for USD (#488)
* fakewallet usd wip

* FakeWallet support for USD

* fix api return for receive

* use MINT_BACKEND_BOLT11_SAT everywhere
2024-03-22 12:11:40 +01:00
callebtc
f4621345f3 Use PostRestoreRequest for all restore operations (#483)
* use PostRestoreRequest for all restore operations

* refactor: unit method verification
2024-03-21 22:59:47 +01:00
callebtc
df2c81ee89 NUTs: info endpoint method settings (#487)
* adjust info endpoint settings

* respect MINT_MAX_PEG_IN MINT_MAX_PEG_OUT settings
2024-03-21 14:53:47 +01:00
callebtc
e93837f2ea Add PyPi pipeline (#482)
* add pypi pipeline

* build and publish

* prepare inputs

* matrix strategy

* matrix

* install only whl

* try upload should error

* try token

* retry token

* use token directly

* no poetry config

* try again

* upload on release

* bump
2024-03-17 15:42:30 +01:00
callebtc
30cdb81041 Melt quotes use case-insensitive request (#479)
* use lowerstr melt quote

* case insensitive melt quotes
2024-03-16 18:45:53 +01:00
callebtc
86b8f5811f Mint: lookup internal quote settlement by request (#478) 2024-03-16 17:14:50 +01:00
callebtc
e7b1e0c0ed Batch update Y columns in proofs_used and proofs_pending tables (#475)
* mint: migration 16 batch update

* migrate: only if data exists
2024-03-16 10:56:51 +01:00
callebtc
7ecf14f87b Tests: mint restore api test (#473)
* tests: mint restore api test

* skipifs for deprecated tests

* use correct secret counter for tests

* docker only on release
2024-03-14 13:17:05 +01:00
callebtc
5ba19a17cf Seed encrypt: init mint with encrypted keys after migration (#472)
* seed encrypt: init mint with encrypted keys after migration

* adjust build pipeline
2024-03-14 12:48:24 +01:00
callebtc
752ab3c4c5 Fix seed encrypt migration (#405)
* print

* print before ledger

* print

* remove decryption

* make format
2024-03-14 12:21:21 +01:00
thesimplekid
6cb967fc02 fix: mint and melt quote expiry time (#453) 2024-03-14 12:17:42 +01:00
findingsov
f4777aad3e Update .env.example (#455)
StrikeWallet is StrikeUSDWallet, changed in 2 places, and added that it's usd only (in case it's not obvious).
2024-03-14 12:16:33 +01:00
callebtc
150195d66a Token state check with Y (#468)
* Token state check with Y

* remove backwards compat for v1
2024-03-12 15:53:18 +01:00
callebtc
4f52973908 Update PostRestoreResponse class to use "signatures" instead of "promises" (#467)
* update nut-09 endpoint

* add to deprecated router and wallet
2024-03-12 15:52:20 +01:00
callebtc
ff1e7597d1 Merge both h2c tests and add tests for deterministic blinding factor generation (#466) 2024-03-04 15:34:51 +01:00
callebtc
72573865ad Add checkout latest tag (#465) 2024-03-03 12:20:59 +01:00
callebtc
29be002495 Wallet: deprecate old h2c (#459)
* wallet: deprecate old hash to curve

* fix order

* added migration: untested

* recompute Y always
2024-02-26 23:07:13 +01:00
callebtc
53cd8ff016 bump version to 0.15.1 (#461) 2024-02-26 01:50:37 +01:00
callebtc
cfebf70a0a Wallet: fix nostr receive cli linebreak prints (#462) 2024-02-26 01:49:51 +01:00
callebtc
a77b7dd5e8 Wallet: fix nostr receive (#460)
* fix wallet nostr receive

* add log

* add more relays and print info nicer
2024-02-26 01:25:05 +01:00
callebtc
be7a8a744f Revert "Wallet: deprecate old hash to curve (#457)" (#458)
This reverts commit b06d93c5ff.
2024-02-26 00:30:42 +01:00
callebtc
b06d93c5ff Wallet: deprecate old hash to curve (#457)
* wallet: deprecate old hash to curve

* fix order
2024-02-26 00:24:58 +01:00
callebtc
a546a246e2 Tests: add step2 domain separated test (#456)
* add step2 domain separated test

* add test3 derived from domain separated outputs

* Fix comment
2024-02-23 17:26:46 +01:00
findingsov
ac0ddd57a1 Update .env.example (#450)
* Update .env.example

Minor comment add suggestions..

* Update .env.example

* Update .env.example

* Update .env.example

* Update .env.example

* Update .env.example

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2024-02-21 11:13:34 +01:00
callebtc
e2c8f7f694 Add tests for domain separated h2c (#451)
* add tests for domain separated h2c

* refactor b_dhke and add domain separated test
2024-02-21 11:10:50 +01:00
callebtc
c630fc8c40 blink: return preimage (#447) 2024-02-19 20:17:04 +01:00
callebtc
1c2c01ccfa test blink failed payment (#446) 2024-02-19 19:42:06 +01:00
callebtc
2189728771 blink: round up fees to next satoshi (#445) 2024-02-19 16:30:44 +01:00
callebtc
1e26f235d5 Blink: timeout for LN probes (#444)
* blink: timeout for ln probes

* make MINIMUM_FEE_MSAT a const

* format
2024-02-18 23:47:21 +01:00
callebtc
a3145a93d5 do not chcek melt status before payment attempt (#443) 2024-02-18 23:26:55 +01:00
callebtc
c4e8618cad Catch CashuErrors (#442) 2024-02-18 23:20:44 +01:00
callebtc
03c7c61f45 Ruff pre-commit max line length (#441)
* test ruff

* test

* test

* ruff

* remove line break

* remove black configuration
2024-02-18 21:15:19 +01:00
callebtc
9c3949d197 Mint: fix Blink multiple failed attempts (#440)
* fix: blink multiple failed attempts

* fix line length again
2024-02-18 19:26:10 +01:00
callebtc
ad906df788 Mint: blink fix fee estimation (#439)
* blink: fix fee esimation

* fix line length

* fix line length

* fix line length

* remove noqa
2024-02-18 12:24:41 +01:00
callebtc
48158cd497 update ruff (#437)
* update ruff

* test

* update ruff

* update pyproject
2024-02-17 21:43:26 +01:00
callebtc
c4f4f3ccf2 Revert "Dev: Update ruff precommit hooks (#434)" (#436)
This reverts commit fca2a6cb4b.
2024-02-17 21:33:16 +01:00