Commit Graph

66 Commits

Author SHA1 Message Date
callebtc
4d8b6a7a74 bump version to 0.16.1 (#633) 2024-10-04 14:02:46 +02:00
callebtc
eccbf6f789 bump version to 0.16.0 (#573) 2024-07-09 16:36:09 +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
callebtc
4ff9e6de5d bump version to 0.15.2 (#495) 2024-03-26 22:01:09 +01:00
callebtc
53cd8ff016 bump version to 0.15.1 (#461) 2024-02-26 01:50:37 +01:00
callebtc
94db0fc4c6 Docker: use python 3.10 (#432)
* Docker: use python 3.10

* Add Docker workflow

* Build always

* add all
2024-02-17 12:02:26 +01:00
callebtc
a518274f7e Nutshell cleanup wishlist (#332)
* fix keys

* fix tests

* backwards compatible api upgrade

* upgrade seems to work

* fix tests

* add deprecated api functions

* add more tests of backwards compat

* add test serialization for nut00

* remove a redundant test

* move mint and melt to new api

* mypy works

* CI: mypy --check-untyped-defs

* add deprecated router

* add hints and remove logs

* fix tests

* cleanup

* use new mint and melt endpoints

* tests passing?

* fix mypy

* make format

* make format

* make format

* commit

* errors gone

* save

* adjust the API

* store quotes in db

* make mypy happy

* add fakewallet settings

* remove LIGHTNING=True and pass quote id for melt

* format

* tests passing

* add CoreLightningRestWallet

* add macaroon loader

* add correct config

* preimage -> proof

* move wallet.status() to cli.helpers.print_status()

* remove statuses from tests

* remove

* make format

* Use httpx in deprecated wallet

* fix cln interface

* create invoice before quote

* internal transactions and deprecated api testing

* fix tests

* add deprecated API tests

* fastapi type hints break things

* fix duplicate wallet error

* make format

* update poetry in CI to 1.7.1

* precommit restore

* remove bolt11

* oops

* default poetry

* store fee reserve for melt quotes and refactor melt()

* works?

* make format

* test

* finally

* fix deprecated models

* rename v1 endpoints to bolt11

* raise restore and check to v1, bump version to 0.15.0

* add version byte to keyset id

* remove redundant fields in json

* checks

* generate bip32 keyset wip

* migrate old keysets

* load duplicate keys

* duplicate old keysets

* revert router changes

* add deprecated /check and /restore endpoints

* try except invalidate

* parse unit from derivation path, adjust keyset id calculation with bytes

* remove keyest id from functions again and rely on self.keyset_id

* mosts tests work

* mint loads multiple derivation paths

* make format

* properly print units

* fix tests

* wallet works with multiple units

* add strike wallet and choose backend dynamically

* fix mypy

* add get_payment_quote to lightning backends

* make format

* fix startup

* fix lnbitswallet

* fix tests

* LightningWallet -> LightningBackend

* remove comments

* make format

* remove msat conversion

* add Amount type

* fix regtest

* use melt_quote as argument for pay_invoice

* test old api

* fees in sats

* fix deprecated fees

* fixes

* print balance correctly

* internally index keyset response by int

* add pydantic validation to input models

* add timestamps to mint db

* store timestamps for invoices, promises, proofs_used

* fix wallet migration

* rotate keys correctly for testing

* remove print

* update latest keyset

* fix tests

* fix test

* make format

* make format with correct black version

* remove nsat and cheese

* test against deprecated mint

* fix tests?

* actually use env var

* mint run with env vars

* moar test

* cleanup

* simplify tests, load all keys

* try out testing with internal invoices

* fix internal melt test

* fix test

* deprecated checkfees expects appropriate fees

* adjust comment

* drop lightning table

* split migration for testing for now, remove it later

* remove unused lightning table

* skip_private_key -> skip_db_read

* throw error on migration error

* reorder

* fix migrations

* fix lnbits fee return value negative

* fix typo

* comments

* add type

* make format

* split must use correct amount

* fix tests

* test deprecated api with internal/external melts

* do not split if not necessary

* refactor

* fix test

* make format with new black

* cleanup and add comments

* add quote state check endpoints

* fix deprecated wallet response

* split -> swap endpoint

* make format

* add expiry to quotes, get quote endpoints, and adjust to nut review comments

* allow overpayment of melt

* add lightning wallet tests

* commiting to save

* fix tests a bit

* make format

* remove comments

* get mint info

* check_spendable default False, and return payment quote checking id

* make format

* bump version in pyproject

* update to /v1/checkstate

* make format

* fix mint api checks

* return witness on /v1/checkstate

* no failfast

* try fail-fast: false in ci.yaml

* fix db lookup

* clean up literals
2024-01-08 00:57:15 +01:00
callebtc
6c8b1a858f Wallet/fix_nostr_timeout (#376)
* fix nostr receive

* split with amount pre 0.13

* drop 0.13.0 amount with split compatibility
2023-12-03 01:56:58 +01:00
callebtc
64805e4a9a Bump to 0.14.0-rc1 (#329)
* bump to 0.14.0

* bump python version

* use python 3.10.4 in check workflow
2023-09-24 19:10:25 +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
callebtc
01d498309b [Wallet/mint] P2PK with timelocks (#270)
* p2pk with nostr privatekey and timelocks

* add p2pk

* fix test

* fix test with custom secret

* sign whole split transaction

* p2pk signature now commits to entire secret and thus to a nonce

* use schnorr signatures

* revamp P2SH and P2PK with new Secret model

* test p2pk

* add comments

* add nostr private key to tests

* fix nostr receive

* make format

* test redemption after timelock

* refactor Server.serialize()

* sign sha256(secret)

* add optional refund pubkey that triggers after timelock

* use nostr private key for now (including nsec parser)

* use nostr private key and fix tests

* bump version to 0.12.2
2023-07-02 01:56:05 +02:00
callebtc
205b5b9805 bump version to 0.12.1 (#258) 2023-06-23 20:04: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
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
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
fe802c00fe wallet: fix variable assignments (#124) 2023-03-05 03:16:28 +01:00
calle
da2d003291 fix manifest (#111) 2023-02-25 13:23:33 +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
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
0d3ef4f8b6 rename clihelpers 2023-01-14 14:36:36 +01:00
callebtc
20b99ee792 bumop to 0.8 2023-01-14 13:46:33 +01:00
callebtc
9fc7694c6b bump 2022-12-26 17:24:16 +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
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
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
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
callebtc
a042ee8327 bump version and make format 2022-10-05 22:31:28 +02:00
callebtc
47042bdcb3 bump version 2022-10-05 21:31:44 +02:00