mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 12:04:21 +01:00
* clean up db * db: table lock * db.table_with_schema * fix encrypt.py * postgres nowait * add timeout to lock * melt quote state in db * kinda working * kinda working with postgres * remove dispose * getting there * porperly clean up db for tests * faster tests * configure connection pooling * try github with connection pool * invoice dispatcher does not lock db * fakewallet: pay_if_regtest waits * pay fakewallet invoices * add more * faster * slower * pay_if_regtest async * do not lock the invoice dispatcher * test: do I get disk I/O errors if we disable the invoice_callback_dispatcher? * fix fake so it workss without a callback dispatchert * test on github * readd tasks * refactor * increase time for lock invoice disatcher * try avoiding a race * remove task * github actions: test regtest with postgres * mint per module * no connection pool for testing * enable pool * do not resend paid event * reuse connection * close db connections * sessions * enable debug * dispose engine * disable connection pool for tests * enable connection pool for postgres only * clean up shutdown routine * remove wait for lightning fakewallet lightning invoice * cancel invoice listener tasks on shutdown * fakewallet conftest: decrease outgoing delay * delay payment and set postgres only if needed * disable fail fast for regtest * clean up regtest.yml * change order of tests_db.py * row-specific mint_quote locking * refactor * fix lock statement * refactor swap * refactor * remove psycopg2 * add connection string example to .env.example * remove unnecessary pay * shorter sleep in test_wallet_subscription_swap
117 lines
3.7 KiB
Plaintext
117 lines
3.7 KiB
Plaintext
DEBUG=FALSE
|
|
CASHU_DIR=~/.cashu
|
|
|
|
# --------- WALLET ---------
|
|
|
|
# Address of the default mint to connect to
|
|
# MINT_URL=https://localhost:3338
|
|
MINT_HOST=127.0.0.1
|
|
MINT_PORT=3338
|
|
|
|
# use builtin tor, this overrides SOCKS_PROXY, HTTP_PROXY
|
|
TOR=TRUE
|
|
|
|
# use custom proxy, this will only work with TOR=false
|
|
#SOCKS_PROXY=socks5://localhost:9050
|
|
#HTTP_PROXY=http://localhost:8088
|
|
|
|
# NOSTR
|
|
# nostr private key to which to receive tokens to
|
|
# NOSTR_PRIVATE_KEY=nostr_privatekey_here_hex_or_bech32_nsec
|
|
# nostr relays (comma separated list)
|
|
NOSTR_RELAYS=["wss://nostr-pub.wellorder.net"]
|
|
|
|
# Wallet API port
|
|
API_PORT=4448
|
|
|
|
# Wallet default unit
|
|
WALLET_UNIT="sat"
|
|
|
|
# --------- MINT ---------
|
|
|
|
# Network
|
|
MINT_LISTEN_HOST=127.0.0.1
|
|
MINT_LISTEN_PORT=3338
|
|
|
|
# Mint information
|
|
MINT_INFO_NAME="My Cashu mint"
|
|
MINT_INFO_DESCRIPTION="The short mint description"
|
|
MINT_INFO_DESCRIPTION_LONG="A long mint description that can be a long piece of text."
|
|
MINT_INFO_CONTACT=[["email","contact@me.com"], ["twitter","@me"], ["nostr", "npub..."]]
|
|
MINT_INFO_MOTD="Message to users"
|
|
|
|
MINT_PRIVATE_KEY=supersecretprivatekey
|
|
|
|
# Increment derivation path to rotate to a new keyset
|
|
# Example: m/0'/0'/0' -> m/0'/0'/1'
|
|
MINT_DERIVATION_PATH="m/0'/0'/0'"
|
|
|
|
# Multiple derivation paths and units. Unit is parsed from the derivation path.
|
|
# m/0'/0'/0' is "sat" (default)
|
|
# m/0'/1'/0' is "msat"
|
|
# m/0'/2'/0' is "usd"
|
|
# m/0'/3'/0' is "eur"
|
|
# In this example, we have 2 keysets for sat, 1 for msat and 1 for usd
|
|
# MINT_DERIVATION_PATH_LIST=["m/0'/0'/0'", "m/0'/0'/1'", "m/0'/1'/0'", "m/0'/2'/0'"]
|
|
|
|
# To use SQLite, choose a directory to store the database
|
|
MINT_DATABASE=data/mint
|
|
# To use PostgreSQL, set the connection string
|
|
# MINT_DATABASE=postgres://cashu:cashu@localhost:5432/cashu
|
|
|
|
# Funding source backends
|
|
# Supported: FakeWallet, LndRestWallet, CLNRestWallet, BlinkWallet, LNbitsWallet, StrikeWallet, CoreLightningRestWallet (deprecated)
|
|
MINT_BACKEND_BOLT11_SAT=FakeWallet
|
|
# Only works if a usd derivation path is set
|
|
# MINT_BACKEND_BOLT11_SAT=FakeWallet
|
|
|
|
# for use with LNbitsWallet
|
|
MINT_LNBITS_ENDPOINT=https://legend.lnbits.com
|
|
MINT_LNBITS_KEY=yourkeyasdasdasd
|
|
|
|
# Use with LndRestWallet
|
|
MINT_LND_REST_ENDPOINT=https://127.0.0.1:8086
|
|
MINT_LND_REST_CERT="/home/lnd/.lnd/tls.cert"
|
|
MINT_LND_REST_MACAROON="/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon"
|
|
MINT_LND_REST_CERT_VERIFY=True
|
|
|
|
# Use with CLNRestWallet
|
|
MINT_CLNREST_URL=https://localhost:3010
|
|
MINT_CLNREST_CERT="./clightning-2/regtest/ca.pem"
|
|
MINT_CLNREST_RUNE="Base64string== or path to file containing the rune"
|
|
|
|
# Use with CoreLightningRestWallet
|
|
# Note: CoreLightningRestWallet is deprecated, use CLNRestWallet instead
|
|
MINT_CORELIGHTNING_REST_URL=https://localhost:3001
|
|
MINT_CORELIGHTNING_REST_MACAROON="./clightning-rest/access.macaroon"
|
|
MINT_CORELIGHTNING_REST_CERT="./clightning-2-rest/certificate.pem"
|
|
|
|
# Use with BlinkWallet
|
|
MINT_BLINK_KEY=blink_abcdefgh
|
|
|
|
# Use with StrikeWallet for BTC, USD, and EUR
|
|
MINT_STRIKE_KEY=ABC123
|
|
|
|
# fee to reserve in percent of the amount
|
|
LIGHTNING_FEE_PERCENT=1.0
|
|
# minimum fee to reserve
|
|
LIGHTNING_RESERVE_FEE_MIN=2000
|
|
|
|
# Limits
|
|
# Max mint balance in satoshis
|
|
# MINT_MAX_BALANCE=1000000
|
|
# Max peg-in amount in satoshis
|
|
# MINT_MAX_PEG_IN=100000
|
|
# Max peg-out amount in satoshis
|
|
# MINT_MAX_PEG_OUT=100000
|
|
# Use to allow only peg-out to LN
|
|
# MINT_PEG_OUT_ONLY=FALSE
|
|
|
|
# Rate limit requests to mint. Make sure that you can see request IPs in the logs.
|
|
# You may need to adjust your reverse proxy if you only see requests originating from 127.0.0.1
|
|
# MINT_RATE_LIMIT=TRUE
|
|
# Determines the number of all requests allowed per minute per IP
|
|
# MINT_GLOBAL_RATE_LIMIT_PER_MINUTE=60
|
|
# Determines the number of transactions (mint, melt, swap) allowed per minute per IP
|
|
# MINT_TRANSACTION_RATE_LIMIT_PER_MINUTE=20
|