Commit Graph

61 Commits

Author SHA1 Message Date
callebtc
b196c34427 [WIP] [NUTs] NUT-06 update: deprecate amount field in /split (#263)
* mint upgraded and still backwards compatible

* cleanup

* fix tests

* fix things

* add deprecated message to new struct

* fix test

* fix typo

* readd endpoint that got lost during merge

* version bump in pyproject.toml

* remove wallet backwards compatibility because it makes no sense

* comment for backwards compat

* fix comment
2023-07-25 11:13:20 +02:00
callebtc
0b2468914d Determinstic secrets / ecash restore (#131)
* first working version but some sats go missing

* back at it

* make format

* restore to main

* move mint database

* fix some tests

* make format

* remove old _construct_outputs we reintroduced in merge with main

* add type annotations

* add wallet private key to tests

* wallet: load proofs

* fix tests

* _generate_secrets with deterministic generation (temporary)

* allow wallet initialization with custom private key

* add pk to wallet api test

* mint scope=module

* remove private_key from test_wallet.py to see if it helps with the github tests

* readd private keys to tests

* workflow without env

* add more private key!

* readd env

* ledger scope session

* add default private key for testing

* generate private keys if not available

* testing

* its working!!!

* first iteration of bip32 working

* get mint info and add many type annotations

* tests

* fix tests with bip32

* restore from multiple mints

* disable profiler

* make format

* failed POST /mint do not increment secret counter

* store derivation path in each token

* fix tests

* refactor migrations so private keys can be generated by the wallet with .with_db() classmethod

* start fixing tests

* all tests passing except those that need to set a specific private key

* bip39 mnemonic to seed - with db but restore doesnt work yet with custom seed

* mnemonic restore works

* enter mnemonic in cli

* fix tests to use different mnemonic

* properly ask user for seed input

* tests: dont ask for inputs

* try to fix tests

* fix cashu -d

* fixing

* bump version and add more text to mnemonic enter

* add more comments

* add many more comments and type annotations in the wallet

* dont print generated mnemonic and dont wait for input

* fix test

* does this fix tests?

* sigh....

* make format

* do not restore from an initialized wallet

* fix mnemonics

* fix nitpicks

* print wallet name if nonstandard wallet

* fix merge error and remove comments

* poetry lock and requirements

* remove unused code

* fix tests

* mnemonic.lower() and add keyset id if not present for backwards compat

* edit comment
2023-07-24 13:42:56 +02:00
callebtc
73b015b642 Nut07/proof pending (#277)
* add pending state

* proofs spendable check and tests

* bump version to 0.12.3

* remove sleep for testing

* comment clarify

* use list comprehension in pending list
2023-07-08 22:50:17 +02:00
Angus Pearson
e25100c1e0 Mint API: Check ?amount is within a sensible range (#226) 2023-05-18 22:31:20 +02:00
callebtc
4789e2a504 Mint/moremore_traces (#215)
* more trace logging

* a lot more logging
2023-05-15 00:15:07 +02:00
callebtc
68d9020cb3 mint: add trace logs (#213) 2023-05-14 23:06:35 +02:00
sihamon
e7df2028fa Allow to set maximum peg in/out for mint (#209)
* Allow to set maximum peg in/out for mint

* Make format

* remove duplicate error

* move business logic to ledger

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2023-05-13 20:41:24 +02:00
callebtc
e9f33337db Fix/nut 04 payment hash (#191)
* payment_hash -> hash

* add aes encryption

* urlsafe base64 for free

* move files to crypto

* use random hash instead of encryption

* get rid of useless code

* simplify
2023-05-04 00:12:18 +02:00
calle
89fb2787e6 Python/relative_import (#186)
* relative import all the things

* make format

* add __init__.py to cli/

* fix mypy errors

* get rid of more mypy

* mypy fix crud.py

* fix another mypy error
2023-05-01 22:39:23 +02:00
sihamon
e7d7659767 Allow setting mint as peg-out only (#160)
* Allow setting mint as peg-out only

* Update cashu/mint/router.py

* Update cashu/mint/router.py

---------

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2023-04-16 15:49:57 +02:00
calle
47f886487c nut-09 mint info (#155)
* nut-09 mint info

* bump to 0.11.1

* make format
2023-04-01 00:47:27 +02:00
calle
70828b59d5 NUT-08 Lightning fee return (#114)
* skeleton

* works

* comments

* docsctrings ledger.py

* bump version to 0.10.

* fixes mypy stuff

* make format

* remove unwanted changes
2023-03-16 01:28:33 +01:00
calle
a7eef68c97 wallet: load keys without keysets (#123)
* wallet: load keys without keysets

* fix cli
2023-03-05 02:51:20 +01:00
calle
7e39e1b036 BREAKING: PostMeltRequest, CheckSpendableResponse ` (#106)
* fix PostMeltRequest and /checkfees to GET

* POST /check -> GET /check

* fix GetCheckSpendableResponse

* rename models

* make format

* revert GET

* bump version to 0.9

* skip nostr test
2023-01-30 09:13:46 +01:00
calle
e63db82641 update readme and errors for mint (#107) 2023-01-28 00:08:33 +01:00
calle
2dd9fd356f Fix/tokenv2mints (#98)
* adjust tokenv2 and make it backwards compatible

* fix dict to list

* use pydantic object and not the dtoken

* make format

* fix typo in _meltrequest_include_fields

* reorder functions

* fixes and tests working

* bump version to 0.8.3
2023-01-19 08:35:32 +01:00
callebtc
97aee02e0c get rid of baggage 2023-01-14 21:31:09 +01:00
callebtc
3cbdebf5a5 BlindedMessages is now List[BlindedMessage] (no blinded_messages field) and PostMintRequest (new) is now with outputs field 2023-01-14 21:23:06 +01:00
callebtc
012987c356 clean 2023-01-11 03:03:12 +01:00
callebtc
fc5347d47d make format 2023-01-11 03:00:02 +01:00
callebtc
53a8387a0d refactor 2023-01-11 02:57:59 +01:00
callebtc
ff11e7878b mint: endpoint get pubkeys for keyset 2022-12-25 11:42:37 +01:00
callebtc
519b375953 comments 2022-11-05 17:24:33 +01:00
callebtc
6f913e3cc9 make format 2022-10-15 00:59:21 +02:00
callebtc
d2363f8f2a wallet sends only relevant fields for /check endpoint 2022-10-14 00:30:24 +02:00
callebtc
5022d4e47f test melt without lightning 2022-10-14 00:05:47 +02:00
callebtc
3437af041e ability to specify the keyset for generating promises mint 2022-10-13 20:07:04 +02:00
callebtc
8721694785 can import, migration dont work yet 2022-10-12 20:52:35 +02:00
callebtc
65cba2aa84 idk 2022-10-11 10:47:08 +02:00
callebtc
fe9de4cbca restart imports 2022-10-11 10:08:05 +02:00
callebtc
7eb8ec8ccc make format 2022-10-11 00:49:27 +02:00
callebtc
74df219d6d mypy 2022-10-11 00:48:05 +02:00
callebtc
6838b0be05 mypy 2022-10-11 00:41:55 +02:00
callebtc
13b9cd17bd set context version in http middleware 2022-10-10 21:36:29 +02:00
callebtc
080ae4b224 context 2022-10-10 21:17:53 +02:00
callebtc
e4747910c9 refactor 2022-10-09 17:51:37 +02:00
callebtc
2c93fee565 fix 2022-10-09 10:54:42 +02:00
callebtc
9f1e180274 file 2022-10-09 10:31:10 +02:00
callebtc
244ea4a343 multiple keysets per mint 2022-10-08 19:25:03 +02:00
callebtc
b411fcc79b Merge branch 'main' into keyset_id 2022-10-07 23:42:16 +02:00
callebtc
a265c93cd5 make format 2022-10-07 22:49:05 +02:00
callebtc
1bdb4568c4 started 2022-10-07 16:30:50 +02:00
callebtc
a042ee8327 bump version and make format 2022-10-05 22:31:28 +02:00
callebtc
2d48c3116c request fee from mint 2022-10-05 22:26:57 +02:00
callebtc
d8b5a6d402 validate pay 2022-10-05 21:20:24 +02:00
callebtc
8361ded765 fix types 2022-10-05 20:32:55 +02:00
callebtc
063d01bbe7 black and isort 2022-10-05 20:08:45 +02:00
callebtc
792b4566ee isort 2022-10-05 20:07:11 +02:00
callebtc
89ebac1c23 black formatting 2022-10-05 20:05:21 +02:00
callebtc
149d69f99d isort 2022-10-05 20:03:04 +02:00