Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mint] Synthetic USD E-Cash with LNMarketsWallet #608

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3687c29
lnmarkets stuff
lollerfirst Aug 11, 2024
4cdb96f
more logging and some error fixes
lollerfirst Aug 12, 2024
31a2e44
make format
lollerfirst Aug 12, 2024
f108ed8
small corrections
lollerfirst Aug 12, 2024
89208c3
amount usd equation fix + trying to fix fee conversion bug on `Paymen…
lollerfirst Aug 12, 2024
d6f424e
remove sat support
lollerfirst Aug 12, 2024
fed9d0b
can now also specify paths in `access_key`, `secret`, `passphrase`
lollerfirst Aug 12, 2024
8140b19
fix missing import
lollerfirst Aug 12, 2024
1aefc69
update `env.example`, remove mean comment about the hmac auth token
lollerfirst Aug 13, 2024
a7a6174
`lastPrice` instead of `bidPrice`
lollerfirst Aug 20, 2024
efab7cf
Better error messages
lollerfirst Aug 30, 2024
dca102f
make format
lollerfirst Aug 30, 2024
2ba4b4d
fixed fee estimation + enable unit sat support
lollerfirst Sep 5, 2024
6bc4b54
format
lollerfirst Sep 5, 2024
67128e4
add constants and exhaustive if..else
callebtc Sep 6, 2024
2cd3e1b
hide lnmarkets secrets
callebtc Sep 6, 2024
1e106e5
fee min->max
callebtc Sep 6, 2024
bd4ef85
adjust logs
callebtc Sep 6, 2024
ab6baa0
fix fee unit
callebtc Sep 6, 2024
c104a28
fee return working for sat
callebtc Sep 6, 2024
8b9ce72
fee return conversion for unit usd
lollerfirst Sep 9, 2024
cb33b4f
explicit utf-8 encoding
lollerfirst Sep 9, 2024
5d4a23d
Merge branch 'cashubtc:main' into lnmarkets
lollerfirst Oct 18, 2024
b9a41b2
keep up with new melt logic
lollerfirst Oct 18, 2024
b39636f
make format
lollerfirst Oct 18, 2024
6b7e2ee
Merge remote-tracking branch 'upstream/main' into lnmarkets
lollerfirst Nov 4, 2024
4994dda
`get_payment_status` FAILED/PENDING logic with timeout.
lollerfirst Nov 4, 2024
c510540
payment timestamp is in milliseconds
lollerfirst Nov 12, 2024
2269f9c
Merge remote-tracking branch 'upstream/main' into lnmarkets
lollerfirst Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ MINT_BLINK_KEY=blink_abcdefgh
# Use with StrikeWallet for BTC, USD, and EUR
MINT_STRIKE_KEY=ABC123

# Use with LNMarketsWallet for USD
# you can also specify paths from which `ACCESS_KEY`, `SECRET` and `PASSPHRASE` will be read
MINT_LNMARKETS_REST_URL="https://api.lnmarkets.com"
MINT_LNMARKETS_REST_ACCESS_KEY="<YOUR_API_ACCESS_KEY>"
MINT_LNMARKETS_REST_SECRET="<YOUR_API_SECRET>"
MINT_LNMARKETS_REST_PASSPHRASE="<YOUR_API_PASSPHRASE>"

# fee to reserve in percent of the amount
LIGHTNING_FEE_PERCENT=1.0
# minimum fee to reserve
Expand Down
7 changes: 7 additions & 0 deletions cashu/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,20 @@ class CoreLightningRestFundingSource(MintSettings):
mint_corelightning_rest_macaroon: Optional[str] = Field(default=None)
mint_corelightning_rest_cert: Optional[str] = Field(default=None)

class LNMarketsRestFundingSource(MintSettings):
mint_lnmarkets_rest_url: Optional[str] = Field(default=None)
mint_lnmarkets_rest_access_key: Optional[str] = Field(default=None)
mint_lnmarkets_rest_passphrase: Optional[str] = Field(default=None)
mint_lnmarkets_rest_secret: Optional[str] = Field(default=None)


class Settings(
EnvSettings,
LndRPCFundingSource,
LndRestFundingSource,
CoreLightningRestFundingSource,
CLNRestFundingSource,
LNMarketsRestFundingSource,
FakeWalletSettings,
MintLimits,
MintBackends,
Expand Down
1 change: 1 addition & 0 deletions cashu/lightning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .lnbits import LNbitsWallet # noqa: F401
from .lnd_grpc.lnd_grpc import LndRPCWallet # noqa: F401
from .lndrest import LndRestWallet # noqa: F401
from .lnmarkets import LNMarketsWallet # noqa: F401
from .strike import StrikeWallet # noqa: F401

backend_settings = [
Expand Down
Loading
Loading