Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/workflows/regtest-mint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
# LndRestWallet
MINT_LND_REST_ENDPOINT: https://localhost:8081/
MINT_LND_REST_CERT: ./regtest/data/lnd-3/tls.cert
MINT_LND_REST_CERT_VERIFY: false
MINT_LND_REST_MACAROON: ./regtest/data/lnd-3/data/chain/bitcoin/regtest/admin.macaroon
# LndRPCWallet
MINT_LND_RPC_ENDPOINT: localhost:10009
Expand All @@ -70,10 +71,12 @@ jobs:
MINT_CORELIGHTNING_REST_URL: https://localhost:3001
MINT_CORELIGHTNING_REST_MACAROON: ./regtest/data/clightning-2-rest/access.macaroon
MINT_CORELIGHTNING_REST_CERT: ./regtest/data/clightning-2-rest/certificate.pem
MINT_CORELIGHTNING_REST_CERT_VERIFY: false
# CLNRestWallet
MINT_CLNREST_URL: https://localhost:3010
MINT_CLNREST_RUNE: ./regtest/data/clightning-2/rune
MINT_CLNREST_CERT: ./regtest/data/clightning-2/regtest/ca.pem
MINT_CLNREST_CERT_VERIFY: false
run: |
sudo chmod -R 777 .
make test-mint
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/regtest-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
# LndRestWallet
MINT_LND_REST_ENDPOINT: https://localhost:8081/
MINT_LND_REST_CERT: ./regtest/data/lnd-3/tls.cert
MINT_LND_REST_CERT_VERIFY: false
MINT_LND_REST_MACAROON: ./regtest/data/lnd-3/data/chain/bitcoin/regtest/admin.macaroon
# LndRPCWallet
MINT_LND_RPC_ENDPOINT: localhost:10009
Expand All @@ -70,10 +71,12 @@ jobs:
MINT_CORELIGHTNING_REST_URL: https://localhost:3001
MINT_CORELIGHTNING_REST_MACAROON: ./regtest/data/clightning-2-rest/access.macaroon
MINT_CORELIGHTNING_REST_CERT: ./regtest/data/clightning-2-rest/certificate.pem
MINT_CORELIGHTNING_REST_CERT_VERIFY: false
# CLNRestWallet
MINT_CLNREST_URL: https://localhost:3010
MINT_CLNREST_RUNE: ./regtest/data/clightning-2/rune
MINT_CLNREST_CERT: ./regtest/data/clightning-2/regtest/ca.pem
MINT_CLNREST_CERT_VERIFY: false
run: |
sudo chmod -R 777 .
make test-wallet
Expand Down
2 changes: 2 additions & 0 deletions cashu/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ class LndRPCFundingSource(MintSettings):
class CLNRestFundingSource(MintSettings):
mint_clnrest_url: Optional[str] = Field(default=None)
mint_clnrest_cert: Optional[str] = Field(default=None)
mint_clnrest_cert_verify: bool = Field(default=True)
mint_clnrest_rune: Optional[str] = Field(default=None)
mint_clnrest_enable_mpp: bool = Field(default=True)

Expand All @@ -323,6 +324,7 @@ class CoreLightningRestFundingSource(MintSettings):
mint_corelightning_rest_url: Optional[str] = Field(default=None)
mint_corelightning_rest_macaroon: Optional[str] = Field(default=None)
mint_corelightning_rest_cert: Optional[str] = Field(default=None)
mint_corelightning_rest_cert_verify: bool = Field(default=True)


class AuthSettings(MintSettings):
Expand Down
3 changes: 2 additions & 1 deletion cashu/lightning/clnrest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ def __init__(self, unit: Unit = Unit.sat, **kwargs):
}

self.cert = settings.mint_clnrest_cert or False
verify = self.cert if settings.mint_clnrest_cert_verify else False
self.client = httpx.AsyncClient(
base_url=self.url, verify=self.cert, headers=self.auth, timeout=None,
base_url=self.url, verify=verify, headers=self.auth, timeout=None,
)
self.last_pay_index = 0

Expand Down
3 changes: 2 additions & 1 deletion cashu/lightning/corelightningrest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def __init__(self, unit: Unit = Unit.sat, **kwargs):
}

self.cert = settings.mint_corelightning_rest_cert or False
verify = self.cert if settings.mint_corelightning_rest_cert_verify else False
self.client = httpx.AsyncClient(
base_url=self.url, verify=self.cert, headers=self.auth
base_url=self.url, verify=verify, headers=self.auth
)
self.last_pay_index = 0

Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def run(self, *args, **kwargs):
async def ledger():
async def start_mint_init(ledger: Ledger) -> Ledger:
await migrate_databases(ledger.db, migrations_mint)
await ledger.startup_ledger()
await ledger._startup_keysets()
await ledger._check_backends()
return ledger

if not settings.mint_database.startswith("postgres"):
Expand Down
Loading