Commit Graph

114 Commits

Author SHA1 Message Date
callebtc
4088ab2876 Wallet REST API (#199)
* Add REST API for Cashu wallet

* Add simple way to start REST API server

* Add simple tests for wallet REST API

* Add TokenV3 to REST API

* Improve tests for wallet REST API

* Make format

* Remove unused import

* Rename nostr module for API

* Unify helper functions for CLI and API

* Make format

* Move error handling from helper functions to API

* Remove 'is_api' flag where possible

* Make format, cleanup, add comments

* Fix typo for burn also in API

* Improve error handling for API

* Add flag 'trust_new_mint' to receive command

To enable trusting or mistrusting unknown mints via API

* Allow selecting mint for sending from API

* Fix: set specific mint via API

* Fix: select mint with maximum balance via CLI

* Use different variables for mint_nr

* Allow selecting mint when sending via nostr via API

* Remove unnessecary 'is_api' flags from 'send_nostr'

* Remove HTTPException from nostr.py

* Allow selecting mint for sending with parameter also via CLI

* Allow trusting unknown mint for receiving also via CLI

* Make format

* Enable trusting unknown mint also when receiving via nostr

* Fix: wrong indentation of in receive function

* Use relative imports for wallet API

* Unify get_mint_wallet for CLI and API

* Unify send command for CLI and API

* Unify receive for CLI and API

* Catch errors in nostr via API

* Remove flag 'is_api' from verify_mints_tokenv2

* Remove cli_helpers left from last merge

* refactor cli selection

* load mint in nostr_send

* cleanup

* add cli_helpers.py

* legacy deserialization in cli

* make format

* clean up api response

* fix tests

* try pk

* verify mints in api

* try github tests

* Fix: verify_mints for API

* Uncomment verify_mints in receive of API

* update README

* Show mint url in pending

* clean up balance response

* fix test

* mint selection in api

* clean up API

* CLI: verify mint for receive -a

* clean up

* Rest -> REST

* Remove unused imports

---------

Co-authored-by: sihamon <sihamon@proton.me>
Co-authored-by: sihamon <126967444+sihamon@users.noreply.github.com>
2023-05-11 23:27:13 +02:00
calle
61078ce7c8 [Mint] add mint api tests (#189)
* add mint api tests

* add /info test and fix NUT-09 contact info strings

* add test mint api

* replace with requests
2023-05-02 00:43:49 +02:00
calle
321fc733c8 [Mint] Fix key derivation (#187)
* fix private key derivation

* add backwards compatilibity for old keysets

* bump version

* test pubkeys and private keys

* make format

* reset keys for tests

* fix cli tests
2023-05-01 22:43:51 +02:00
calle
d201b89df2 settings: add mint derivation path (#166) 2023-05-01 22:39:50 +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
6b631111d1 Fix/ln unsuccessful payment (#159)
* throws error for unsuccessful payment so that wallets get error message

* bump to 0.11.2
2023-04-03 20:52:14 +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
callebtc
a673077005 bump to 0.11.0 2023-03-29 03:38:17 +02:00
calle
4784163a0e bump version to 0.10.0 (#146) 2023-03-16 01:48:48 +01:00
calle
f3a31fd09e use settings module (#136)
* use settings module
2023-03-16 00:59:50 +01:00
calle
3333102327 lightning: add fakewallet (#134)
* lightning: add fakewallet

* make format

* fix mypy

* make backend configurable

* weird mypy
2023-03-07 17:49:27 +01:00
calle
39e71b20d8 Mint database setting (#126)
* mint: new .env variable MINT_DATABASE

* make format
2023-03-05 11:13:55 +01:00
calle
fe802c00fe wallet: fix variable assignments (#124) 2023-03-05 03:16:28 +01:00
calle
46eeb2c36e Nostr-p2nip5 (#110)
* move cli

* set_requests decorator

* fix wrapper

* refactor nostr.py

* ignore coroutine unpack error

* nostr lib 0.8

* make format
2023-02-25 12:27:33 +01:00
calle
5ec2c3604e Nostr bech32 dm (#109)
* nostr: bech32 keys and remember last DM check

* cump to 0.9.2

* make format
2023-02-13 23:19:19 +01:00
calle
53aa73b7c7 Fix/multimind_redeem_unused_keysets (#108)
* multmind fix

* bump version

* fix verify_mints
2023-02-03 23:44:05 +01:00
callebtc
75662462b4 update checking message 2023-01-30 21:03:11 +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
01d9cef407 fix nostr relay and refactor nostr_send and nostr_receive (#100)
* fix nostr relay and refactor nostr_send and nostr_receive

* bump to 0.8.4

* make format

* check test

* close nostr
2023-01-25 01:50:02 +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
68b5b54c9b bump version 2023-01-15 19:21:58 +01:00
callebtc
6e801145e5 bump to 0.8.1 2023-01-15 11:02:30 +01:00
calle
344210d266 fix versions (#97) 2023-01-15 10:59:17 +01:00
callebtc
20b99ee792 bumop to 0.8 2023-01-14 13:46:33 +01:00
callebtc
542f4c7141 nostr relay setting 2022-12-27 15:39:06 +01:00
callebtc
c1c8a00c64 v 0.7.0 2022-12-26 23:24:40 +01:00
callebtc
eabe19e675 bump to 0.7.1 2022-12-26 19:45:20 +01:00
callebtc
9fc7694c6b bump 2022-12-26 17:24:16 +01:00
callebtc
01c6e12b5a add nostr 2022-12-26 16:12:31 +01:00
callebtc
4e965b05b2 bump to 0.6.0 2022-12-14 23:51:56 +01:00
callebtc
bc333ac01b bump to 0.5.5 2022-11-30 17:37:13 +01:00
callebtc
6cf8483cb6 bump to 0.5.4 2022-11-26 02:45:43 +01:00
callebtc
a58f27dd7c bump to 0.5.3 2022-11-26 01:53:09 +01:00
callebtc
00735385fb fix migration 2022-11-05 04:04:16 +01:00
callebtc
86aea47e90 force tor if not manually disabled 2022-11-03 14:28:50 +01:00
callebtc
6936e801e4 works 2022-10-30 00:00:47 +02:00
callebtc
8222af9649 tor works 2022-10-29 20:51:30 +02:00
callebtc
d8cd648714 add tor 2022-10-29 18:07:13 +02:00
callebtc
6afc165a86 version changes for lnbits compatibility 2022-10-21 15:07:02 +02:00
callebtc
41acd32fc4 turn off recurse for env 2022-10-18 18:11:22 +02:00
callebtc
a58458b3a2 new command: invoices 2022-10-18 11:41:25 +02:00
callebtc
223a40e9bd bump version to 0.4.0 2022-10-15 01:08:35 +02:00
callebtc
6838b0be05 mypy 2022-10-11 00:41:55 +02:00
callebtc
224e5c44ca add derivation path 2022-10-10 21:23:12 +02:00
callebtc
f47c006f7a cashu wallets fix 2022-10-09 22:18:27 +02:00
callebtc
c832b339ab bump to 0.3.1 2022-10-09 22:12:35 +02:00
callebtc
359bbaac0a bump version 2022-10-08 20:26:54 +02:00
callebtc
19742deb2e bump version 2022-10-07 22:49:48 +02:00
calle
2877e55838 Update cashu/core/settings.py 2022-10-07 22:47:13 +02:00
Vlad Stan
64028d559f feat: add MINT_URL env var for 3rd party mints 2022-10-07 21:53:04 +03:00