From 6ffd9bf2452f48b853e3e36427c73638dbe0d604 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Wed, 7 Oct 2026 13:34:22 +0200 Subject: [PATCH] refactor: publish every host port at 1024 or above, in 23000-23999 for the services bitkit does not dial by a fixed number --- CHANGELOG.md | 3 +- CLAUDE.md | 2 +- README.md | 155 ++++++++++++++++++++-------------- docker-compose.yml | 63 +++++++------- docs/pubky-marketplace.md | 6 +- docs/trezor-emulator.md | 11 ++- lnurl-server/pay-fixture.js | 2 +- marketplace/driver/driver.mjs | 2 +- payment-requests/prepare | 46 +++++----- payment-requests/src/main.rs | 2 +- pubky-marketplace | 2 +- scripts/trezor-emulator | 2 +- vss-test/src/vss_jwt_test.rs | 2 +- 13 files changed, 166 insertions(+), 132 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 326300a..b7b0dfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Rebuild the Paykit fixtures on the paykit-rs version a Bitkit pull request pins with `scripts/follow-app-paykit` - Withhold and restore the payment request issuer's endpoints with `POST /endpoints`, so a journey can make the app's request resolution fail and recover -- Route the apps' homeserver traffic through `homeserver-proxy`, whose control port (6298) delays or fails one identity's homeserver requests by path +- Route the apps' homeserver traffic through `homeserver-proxy`, whose control port (23298) delays or fails one identity's homeserver requests by path - Hold LNURL-pay fixture callbacks with a `delay` mode, issue real invoices of the project's LND, and give a wallet a funded channel to it through LNURL-channel - Issue payment requests payable through an LNURL-pay endpoint, with a separate proposal expiry ### Changed +- Publish every host port at 1024 or above, in the 23000-23999 range for the services Bitkit does not dial by a fixed number (README "Ports" lists them) - Move the payment request fixture peers to paykit-rs rc65 on Pubky 0.14.0, the SDK current Bitkit builds pin (the `fixture-issuer` and `rc56-peer` service names stay) - Move the marketplace fixture to the Pubky 0.14.0 homeserver, which grants the `LOCK` write locks current Bitkit builds take, with Paykit Server `0ffd4da` (pubky/paykit-server#46, paykit-rs rc65, locks-core rc8) and the driver on `@synonymdev/pubky` 0.14.0 - Show ready-to-copy settle and cancel commands in `holdinvoice` output diff --git a/CLAUDE.md b/CLAUDE.md index 26a7349..994c0fe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,7 +135,7 @@ bitkit-docker/ This is a development/testing environment. Test manually using: - `curl` commands for API endpoints -- Browser for UI pages at `http://localhost:3000` +- Browser for UI pages at `http://localhost:23000` - Bitkit app for end-to-end testing (see README.md) ### Key Endpoints to Test diff --git a/README.md b/README.md index bfb0459..ff707e9 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ A complete Docker-based development environment for Bitcoin and Lightning Networ 3. **Check health:** ```bash - curl http://localhost:3000/health + curl http://localhost:23000/health curl http://localhost:6288/ ``` @@ -44,15 +44,15 @@ A complete Docker-based development environment for Bitcoin and Lightning Networ ### LND (Lightning Network Daemon) -- **REST API**: `http://localhost:8080` -- **P2P**: `localhost:9735` -- **RPC**: `localhost:10009` +- **REST API**: `http://localhost:23180` +- **P2P**: `localhost:23735` +- **RPC**: `localhost:23009` - **Network**: Regtest - **Features**: Zero-conf, SCID alias, AMP support ### LNURL Server -- **Port**: 3000 +- **Port**: 23000 - **Features**: - LNURL-withdraw - LNURL-pay @@ -72,53 +72,53 @@ A complete Docker-based development environment for Bitcoin and Lightning Networ ### LNURL-pay callback fixture -The optional `lnurl-pay` profile serves LNURL-pay metadata and controlled invoice callback responses on port `3010`. Each Compose project has its own in-memory mode, which starts as `error` and stays there until explicitly changed. Restarting the container resets it to `error`. +The optional `lnurl-pay` profile serves LNURL-pay metadata and controlled invoice callback responses on port `23010`. Each Compose project has its own in-memory mode, which starts as `error` and stays there until explicitly changed. Restarting the container resets it to `error`. ```bash docker compose --profile lnurl-pay up -d --build --wait lnurl-server-fixture -curl -fsS http://localhost:3010/health +curl -fsS http://localhost:23010/health # Read the encoded LNURL and QR image for the fixed payment endpoint. -curl -fsS http://localhost:3010/generate/pay -curl -fsS http://localhost:3010/pay/fixture +curl -fsS http://localhost:23010/generate/pay +curl -fsS http://localhost:23010/pay/fixture # Initially returns HTTP 200 with LNURL status ERROR and a reason, on every request. -curl -fsS 'http://localhost:3010/pay/fixture/callback?amount=100001' +curl -fsS 'http://localhost:23010/pay/fixture/callback?amount=100001' # Change the same callback to return a fresh signed regtest invoice. -curl -fsS -X POST http://localhost:3010/fixture \ +curl -fsS -X POST http://localhost:23010/fixture \ -H 'Content-Type: application/json' -d '{"mode":"healthy"}' -curl -fsS 'http://localhost:3010/pay/fixture/callback?amount=100001' +curl -fsS 'http://localhost:23010/pay/fixture/callback?amount=100001' # Reset before another journey; GET /fixture reads the current mode. -curl -fsS -X POST http://localhost:3010/fixture \ +curl -fsS -X POST http://localhost:23010/fixture \ -H 'Content-Type: application/json' -d '{"mode":"error"}' # Verify the fixture's HTTP contract and signed invoice properties. docker compose --profile lnurl-pay exec -T lnurl-server-fixture node --test pay-fixture.test.js ``` -Use the address and forwarded port reachable by the wallet when requesting `/generate/pay` or `/pay/fixture`: the response derives its URLs from the request's host, including any remapped port. Set `LNURL_FIXTURE_DOMAIN` before starting the service if the wallet must use a different origin (for example `http://10.0.2.2:3010` for an Android emulator). +Use the address and forwarded port reachable by the wallet when requesting `/generate/pay` or `/pay/fixture`: the response derives its URLs from the request's host, including any remapped port. Set `LNURL_FIXTURE_DOMAIN` before starting the service if the wallet must use a different origin (for example `http://10.0.2.2:23010` for an Android emulator). `{"mode":"delay","ms":N}` holds every callback for `N` milliseconds and then answers with an invoice; without `ms` a callback waits until the next `POST /fixture`, which releases it with that request's mode (`healthy` for an invoice, `error` for an error). A callback is held for 15 minutes at most. `GET /fixture` lists the callbacks with how long each was held and what it answered, and `GET /fixture/invoices` lists the issued invoices with `settled` from LND, so a journey can check that a wallet did not pay after its deadline. -The profile starts the project's LND beside the fixture, and invoices are real invoices of that LND. To make them payable from a wallet, give it a channel: `GET /generate/channel` returns an LNURL-channel; when the wallet accepts it, LND (funded on the project's bitcoind first when it holds too little) opens a 1,000,000 sat static-remote-key channel that pushes 500,000 sat to the wallet, and mines six blocks to confirm it (`CHANNEL_SATS` and `PUSH_SATS` change the amounts). Ask `/generate/pay` and `/generate/channel` with a `Host` header naming the address the wallet dials (`-H 'Host: 127.0.0.1:3010'` for an Android emulator mapped with `adb reverse`) when you reach the fixture on another port: the encoded LNURL takes its origin from that header. The wallet dials LND at `LND_P2P_ADDRESS` (default `127.0.0.1:9735`, which an Android emulator reaches through `adb reverse tcp:9735 tcp:`). `GET /fixture/channels` shows LND's open and pending channels, and `POST /fixture/mine` with `{"blocks":N}` mines more blocks. +The profile starts the project's LND beside the fixture, and invoices are real invoices of that LND. To make them payable from a wallet, give it a channel: `GET /generate/channel` returns an LNURL-channel; when the wallet accepts it, LND (funded on the project's bitcoind first when it holds too little) opens a 1,000,000 sat static-remote-key channel that pushes 500,000 sat to the wallet, and mines six blocks to confirm it (`CHANNEL_SATS` and `PUSH_SATS` change the amounts). Ask `/generate/pay` and `/generate/channel` with a `Host` header naming the address the wallet dials (`-H 'Host: 127.0.0.1:23010'` for an Android emulator mapped with `adb reverse`) when you reach the fixture on another port: the encoded LNURL takes its origin from that header. The wallet dials LND at `LND_P2P_ADDRESS` (default `127.0.0.1:23735`, which an Android emulator reaches through `adb reverse tcp:23735 tcp:`). `GET /fixture/channels` shows LND's open and pending channels, and `POST /fixture/mine` with `{"blocks":N}` mines more blocks. ```bash -curl -fsS http://localhost:3010/generate/channel | jq -r .lnurl # paste or scan in the wallet, then accept the connection -curl -fsS http://localhost:3010/fixture/channels | jq '.open[] | {remote_pubkey, capacity, local_balance, remote_balance, active}' -curl -fsS -X POST http://localhost:3010/fixture -H 'Content-Type: application/json' -d '{"mode":"delay"}' # hold the next callbacks -curl -fsS -X POST http://localhost:3010/fixture -H 'Content-Type: application/json' -d '{"mode":"healthy"}' # release them with invoices -curl -fsS http://localhost:3010/fixture/invoices | jq +curl -fsS http://localhost:23010/generate/channel | jq -r .lnurl # paste or scan in the wallet, then accept the connection +curl -fsS http://localhost:23010/fixture/channels | jq '.open[] | {remote_pubkey, capacity, local_balance, remote_balance, active}' +curl -fsS -X POST http://localhost:23010/fixture -H 'Content-Type: application/json' -d '{"mode":"delay"}' # hold the next callbacks +curl -fsS -X POST http://localhost:23010/fixture -H 'Content-Type: application/json' -d '{"mode":"healthy"}' # release them with invoices +curl -fsS http://localhost:23010/fixture/invoices | jq ``` Healthy invoices use the requested amount in millisatoshis and bind the exact metadata with a SHA-256 description hash. They are signed, freshly generated `lnbcrt` invoices with a one-hour expiry and payment secret. This fixture supports invoice fetching, decoding and callback retry journeys; it has no Lightning node or channels and cannot settle payments. Use the regular LNURL server with LND for actual payments. Its controls are unauthenticated and intended only for disposable local test environments. ### VSS Server -- **Port**: 5050 (`127.0.0.1:5050` from the `vss` profile) +- **Port**: 23050 (`127.0.0.1:23050` from the `vss` profile) - **Features**: RS256 JWT authentication - **Profile**: `docker compose --profile vss up -d vss-postgres vss` starts the server and its own database without the rest of the stack or the LNURL auth server. The server checks tokens with `lnurl-server/keys/public.pem`. The default `vss-server` service is unchanged. ### Homegate - **Port**: 6288 -- **Database**: Dedicated `homegate-postgres` service, exposed on host port 5433 by default +- **Database**: Dedicated `homegate-postgres` service, exposed on host port 23433 by default - **Admin mock**: `homegate-admin-mock`, available only inside the Compose network and password-protected by default - **Features**: - Pubky Homeserver signup-code gatekeeping @@ -127,7 +127,7 @@ Healthy invoices use the requested amount in millisatoshis and bind the exact me ### LNURL-Auth Server -- **Port**: 5005 +- **Port**: 23005 - **Features**: Issuing RS256 JWT via LNURL-Auth protocol expected by VSS - **Endpoints**: - `/health` - Service health check @@ -139,25 +139,50 @@ Healthy invoices use the requested amount in millisatoshis and bind the exact me - **Network**: Regtest - **Features**: Full blockchain indexing +## Ports + +Every host port is 1024 or above. The ports Bitkit, the Pubky SDK or Bitkit's UI tests dial by a fixed number keep it; every other service publishes in `23000`-`23999`, mostly at `23000` plus the last three digits of its container port. Services reach each other on their container ports (`lnd:8080`, `darkhttpd:80`). + +| Service | Host port | Container port | +| --- | --- | --- | +| bitcoind RPC, P2P | 43782, 39388 | same | +| electrs | 60001 | same | +| darkhttpd (fee estimates) | 23080 | 80 | +| LND REST, P2P, gRPC | 23180, 23735, 23009 | 8080, 9735, 10009 | +| LDK backup server | 23003 | 3003 | +| LNURL server | 23000 | 3000 | +| LNURL-pay fixture (`lnurl-pay`) | 23010 | 3010 | +| PostgreSQL | 23432 | 5432 | +| LNURL-auth server | 23005 | 5005 | +| VSS server | 23050 | 5050 | +| Homegate, its PostgreSQL | 6288 (`HOMEGATE_PORT`), 23433 (`HOMEGATE_POSTGRES_PORT`) | 6288, 5432 | +| Trezor Bridge (both Trezor services) | 21325, 21328 | same | +| Trezor User Env controller, dashboard, MCP, VNC, noVNC | 9001, 23902, 23903, 23590, 23680 | 9001, 9002, 9003, 5900, 6080 | +| Trezor emulator fixture controller, dashboard, noVNC (`trezor-emulator`) | 23901, 23902, 23680 | 9001, 9002, 6080 | +| Pubky testnet DHT, PKARR relay, HTTP relay, homeserver HTTP, Pubky TLS (`marketplace`) | 6881, 15411, 15412, 6286, 6287 | 6881, 15411, 15412, 6286, 6297 (homeserver-proxy) | +| homeserver-proxy control, homeserver admin (`marketplace`) | 23298, 23288 (`MARKETPLACE_HOMESERVER_ADMIN_PORT`) | 6298, 6288 | +| Paykit Server (`marketplace`) | 23101 (`MARKETPLACE_PAYKIT_PORT`) | 3001 | +| `fixture-issuer`, `rc56-peer` (`payment-requests`) | 23012, 23013 | 3012, 3013 | + ## API Examples ```bash # Health Check -curl http://localhost:3000/health | jq +curl http://localhost:23000/health | jq # Generate LNURL-withdraw -curl -s http://localhost:3000/generate/withdraw | jq +curl -s http://localhost:23000/generate/withdraw | jq # Generate LNURL-pay -curl -s http://localhost:3000/generate/pay | jq +curl -s http://localhost:23000/generate/pay | jq # Lightning Address -curl -s http://localhost:3000/.well-known/lnurlp/alice | jq +curl -s http://localhost:23000/.well-known/lnurlp/alice | jq # VSS Health Check -curl -v http://localhost:5050/vss/getObject +curl -v http://localhost:23050/vss/getObject # Homegate service check curl http://localhost:6288/ @@ -265,7 +290,7 @@ cancel and pay requests through the shared regtest Bitcoin node. Plain ./pubky-marketplace seed docker compose --profile marketplace --profile payment-requests build fixture-issuer docker compose --profile marketplace --profile payment-requests up -d --no-build fixture-issuer rc56-peer -for port in 3012 3013; do +for port in 23012 23013; do until health=$(curl -fsS "http://127.0.0.1:$port/health"); do sleep 2; done jq <<<"$health" done @@ -314,7 +339,7 @@ Example one-time issuance to a linked app after both sides report `Linked`: ```bash APP_PUBKY=pubky... # replace with the disposable app identity -curl -fsS -X POST http://127.0.0.1:3012/request -H 'content-type: application/json' \ +curl -fsS -X POST http://127.0.0.1:23012/request -H 'content-type: application/json' \ -d "$(jq -nc --arg pubky "$APP_PUBKY" '{peer_pubky:$pubky,peer_path:"bitkit/wallet",amount_sats:15000,reference:"rc56-app-history"}')" | jq ``` @@ -338,14 +363,14 @@ before it sends the request, then restores them: ```bash TO_APP=$(jq -nc --arg pubky "$APP_PUBKY" '{peer_pubky:$pubky,peer_path:"bitkit/wallet"}') -curl -fsS -X POST http://127.0.0.1:3012/endpoints -H 'content-type: application/json' \ +curl -fsS -X POST http://127.0.0.1:23012/endpoints -H 'content-type: application/json' \ -d "$(jq -c '. + {action:"withhold"}' <<<"$TO_APP")" | jq -curl -fsS -X POST http://127.0.0.1:3012/request -H 'content-type: application/json' \ +curl -fsS -X POST http://127.0.0.1:23012/request -H 'content-type: application/json' \ -d "$(jq -c '. + {amount_sats:15000,reference:"unresolvable"}' <<<"$TO_APP")" | jq # ... the app retries and shows "The payment request is no longer available." ... -curl -fsS -X POST http://127.0.0.1:3012/endpoints -H 'content-type: application/json' \ +curl -fsS -X POST http://127.0.0.1:23012/endpoints -H 'content-type: application/json' \ -d "$(jq -c '. + {action:"restore"}' <<<"$TO_APP")" | jq -curl -fsS http://127.0.0.1:3012/endpoints | jq # {"withheld": false, ...} +curl -fsS http://127.0.0.1:23012/endpoints | jq # {"withheld": false, ...} ``` `withhold` removes the issuer's public `btc-regtest-p2wpkh` endpoint and sends @@ -383,17 +408,17 @@ forwards every request to the homeserver's plain HTTP on 6286. Clients inside the testnet's namespace (Paykit Server, the payment request peers) still reach the homeserver on 6287 directly. Without rules the proxy only forwards. -Its control port, 6298, delays or fails the requests of one identity whose +Its control port, published on 23298 (6298 in the container), delays or fails the requests of one identity whose owner-relative path starts with `path` (empty matches every path): ```bash # hold one identity's own-profile reads for 20 s -curl -fsS -X POST http://127.0.0.1:6298/rules -H 'content-type: application/json' \ +curl -fsS -X POST http://127.0.0.1:23298/rules -H 'content-type: application/json' \ -d "$(jq -nc --arg pubky "$APP_PUBKY" '{pubky:$pubky,path:"/pub/pubky.app/profile.json",delay_ms:20000}')" | jq # fail them instead (after an optional delay): add "status": 503 -curl -fsS http://127.0.0.1:6298/rules | jq -curl -fsS http://127.0.0.1:6298/requests | jq '.requests[-20:]' # owner, path, status, delayed_ms of recent requests -curl -fsS -X DELETE http://127.0.0.1:6298/rules | jq # remove every rule +curl -fsS http://127.0.0.1:23298/rules | jq +curl -fsS http://127.0.0.1:23298/requests | jq '.requests[-20:]' # owner, path, status, delayed_ms of recent requests +curl -fsS -X DELETE http://127.0.0.1:23298/rules | jq # remove every rule ``` A rule with the same `pubky` and `path` replaces the earlier one. `pubky` @@ -418,8 +443,8 @@ docker compose --profile trezor-emulator exec -T trezor-emulator \ ``` Point the simulator's Bridge URL at `http://127.0.0.1:21325`. The dashboard is at -`http://127.0.0.1:9005`, the controller at `ws://127.0.0.1:9004`, and noVNC at -`http://127.0.0.1:6080`. For projects that remap ports, use their published Bridge +`http://127.0.0.1:23902`, the controller at `ws://127.0.0.1:23901`, and noVNC at +`http://127.0.0.1:23680`. For projects that remap ports, use their published Bridge port (or the simulator seat's forwarded address). The device uses the `all all ...` seed, no PIN or passphrase, and the label `Bitkit Test Trezor`. Each project's volumes are separate, and each startup wipes and initializes its own emulator. @@ -485,7 +510,7 @@ Open the dashboard at `Settings -> Advanced -> Dev Settings -> Trezor`, then che Run the relevant Trezor branch from Xcode. The User Env dashboard and Bridge are available on the host at: -- User Env dashboard: `http://localhost:9002` +- User Env dashboard: `http://localhost:23902` - Trezor Bridge: `http://localhost:21325` Open the dashboard at `Settings -> Advanced -> Trezor Hardware Wallet`, then check: @@ -534,7 +559,7 @@ For Bitkit wallets, build each simulator or emulator against this fixture before --extra-args "E2E_HOMESERVER_PUBKY=$(./pubky-marketplace info | jq -r .homeserver_z32)" ``` -- Android: build the local E2E backend with the same `E2E_HOMESERVER_PUBKY` in the environment. On each emulator run `adb reverse tcp: tcp:` for 6286, 6287, 15411 and 15412 (the homeserver admin port is published on 16288 and no app uses it); the Android journey README covers the emulator's `10.0.2.2` host address. +- Android: build the local E2E backend with the same `E2E_HOMESERVER_PUBKY` in the environment. On each emulator run `adb reverse tcp: tcp:` for 6286, 6287, 15411 and 15412 (the homeserver admin port is published on 23288 and no app uses it); the Android journey README covers the emulator's `10.0.2.2` host address. - In each wallet create a Bitkit-generated Pubky identity (not a Pubky Ring import) and enable contact payments. Then, with the buyer wallet: @@ -571,26 +596,26 @@ Remove the fixture with `./pubky-marketplace down`, or start over with `./pubky- #### Bech32 LNURL Pay - in `Env.{kt,swift}`, use for REGTEST electrum server: `"tcp://localhost:60001"` -- `adb reverse tcp:60001 tcp:60001 && adb reverse tcp:9735 tcp:9735` +- `adb reverse tcp:60001 tcp:60001 && adb reverse tcp:23735 tcp:23735` - in app, wipe current wallet data and create fresh one - run `docker compose up --build -d` - fund onchain wallet: `./bitcoin-cli fund` - send funds to in-app wallet address: `./bitcoin-cli send 0.25 -m` - get local LND URI and open channel: - - `curl -s http://localhost:3000/health | jq -r '.lnd.uris[0]' | pbcopy` + - `curl -s http://localhost:23000/health | jq -r '.lnd.uris[0]' | pbcopy` - in app: send > paste > complete the flow - `./bitcoin-cli mine 3` -- generate LNURL pay: `http://localhost:3000/generate/pay` +- generate LNURL pay: `http://localhost:23000/generate/pay` - paste lnurl into app -- generate fixed amount LNURL pay (QuickPay): `curl -s 'http://localhost:3000/generate/pay?minSendable=10000&maxSendable=10000' | jq -r .lnurl | pbcopy` +- generate fixed amount LNURL pay (QuickPay): `curl -s 'http://localhost:23000/generate/pay?minSendable=10000&maxSendable=10000' | jq -r .lnurl | pbcopy` #### Lightning Address -- `ngrok http 3000` +- `ngrok http 23000` - change `DOMAIN` in `docker-compose.yml` to `__NGROK_URL__` - `docker compose down` if running - `docker compose up --build -d` -- `http://localhost:3000/.well-known/lnurlp/alice` +- `http://localhost:23000/.well-known/lnurlp/alice` - copy the email-like lightning address and paste into app #### LNURL-Channel @@ -600,34 +625,34 @@ Remove the fixture with `./pubky-marketplace down`, or start over with `./pubky- - `docker compose down -v` - `rm -rf ./lnd ./lnurl-server/data` - `docker compose up --build -d` -- `adb reverse tcp:60001 tcp:60001 && adb reverse tcp:9735 tcp:9735` +- `adb reverse tcp:60001 tcp:60001 && adb reverse tcp:23735 tcp:23735` - fund onchain wallet: `./bitcoin-cli fund` - fund LND wallet: - - `./bitcoin-cli send 0.2 "$(curl -s http://localhost:3000/health | jq -r '.lnd.address')" -m` - - check balance: `curl -s http://localhost:3000/health | jq '.lnd.balance'` -- generate LNURL channel: `http://localhost:3000/generate/channel` + - `./bitcoin-cli send 0.2 "$(curl -s http://localhost:23000/health | jq -r '.lnd.address')" -m` + - check balance: `curl -s http://localhost:23000/health | jq '.lnd.balance'` +- generate LNURL channel: `http://localhost:23000/generate/channel` - paste lnurl into app and complete the flow - mine blocks: `./bitcoin-cli mine 6` #### LNURL-Withdraw - setup a channel (see above) -- generate LNURL: `curl -s http://localhost:3000/generate/withdraw | jq -r .lnurl | pbcopy` +- generate LNURL: `curl -s http://localhost:23000/generate/withdraw | jq -r .lnurl | pbcopy` - set an amount of at least ₿5000 & complete the flow -- generate LNURL with limits: `curl -s "http://localhost:3000/generate/withdraw?minWithdrawable=100000&maxWithdrawable=200000" | jq -r .lnurl | pbcopy` +- generate LNURL with limits: `curl -s "http://localhost:23000/generate/withdraw?minWithdrawable=100000&maxWithdrawable=200000" | jq -r .lnurl | pbcopy` - `minWithdrawable` (optional): min msats (default: 1000 = 1 sat) - `maxWithdrawable` (optional): max msats (default: 100000000 = 100k sats) #### LNURL-Auth -- set DOMAIN in `docker-compose.yml` to `http://__YOUR_NETWORK_IP__:3000` +- set DOMAIN in `docker-compose.yml` to `http://__YOUR_NETWORK_IP__:23000` - run `docker compose down` - run `docker compose up --build -d` -- generate LNURL auth: `http://localhost:3000/generate/auth` +- generate LNURL auth: `http://localhost:23000/generate/auth` - paste lnurl into app and complete the flow #### LDK-NODE with JWT auth to VSS -- `adb reverse tcp:3000 tcp:3000 && adb reverse tcp:5050 tcp:5050` +- `adb reverse tcp:23000 tcp:23000 && adb reverse tcp:23050 tcp:23050` - cd to root dir - `git submodule update --init --recursive` - `docker compose up --build -d` @@ -645,13 +670,13 @@ Remove the fixture with `./pubky-marketplace down`, or start over with `./pubky- - `rm -rf ./lnd ./lnurl-server/data` - `docker compose up --build -d` - in `Env.kt`, change `ElectrumServers.REGTEST` to `"tcp://127.0.0.1:60001"` -- `adb reverse tcp:60001 tcp:60001 && adb reverse tcp:9735 tcp:9735` +- `adb reverse tcp:60001 tcp:60001 && adb reverse tcp:23735 tcp:23735` - fund onchain wallet: `./bitcoin-cli fund` - fund LND wallet: - - `./bitcoin-cli send 0.2 "$(curl -s http://localhost:3000/health | jq -r '.lnd.address')" -m` - - check balance: `curl -s http://localhost:3000/health | jq '.lnd.balance'` + - `./bitcoin-cli send 0.2 "$(curl -s http://localhost:23000/health | jq -r '.lnd.address')" -m` + - check balance: `curl -s http://localhost:23000/health | jq '.lnd.balance'` - fund app wallet: `./bitcoin-cli send 0.002 -m` -- `curl -s http://localhost:3000/health | jq -r '.lnd.uris[0]' | pbcopy` +- `curl -s http://localhost:23000/health | jq -r '.lnd.uris[0]' | pbcopy` - in app: send > paste > complete flow for 100_000 sats > return to home screen - mine blocks: `./bitcoin-cli mine 6` - await channel ready notice @@ -665,9 +690,9 @@ Key environment variables in `docker-compose.yml`: - `BITCOIN_RPC_HOST`: Bitcoin RPC host (default: `bitcoind`) - `BITCOIN_RPC_PORT`: Bitcoin RPC port (default: `43782`) - `LND_REST_HOST`: LND REST API host (default: `lnd`) -- `LND_REST_PORT`: LND REST API port (default: `8080`) +- `LND_REST_PORT`: LND REST API port inside the compose network (default: `8080`; the host reaches it on `23180`) - `HOMEGATE_PORT`: Host port for Homegate (default: `6288`) -- `HOMEGATE_POSTGRES_PORT`: Host port for Homegate PostgreSQL (default: `5433`) +- `HOMEGATE_POSTGRES_PORT`: Host port for Homegate PostgreSQL (default: `23433`) - `HOMEGATE_ADMIN_MOCK_PASSWORD`: Admin password expected by the local Homegate admin API mock (default: `admin`; keep this in sync with [homegate-config.toml](homegate-config.toml)) - `HOMEGATE_ADMIN_MOCK_PUBKY`: Homeserver public key returned by the local Homegate admin API mock @@ -762,7 +787,7 @@ docker compose up --build -d 3. Check LND wallet balance: ```sh -curl -s http://localhost:3000/health | jq '.lnd.balance' +curl -s http://localhost:23000/health | jq '.lnd.balance' ``` ## Security Notes diff --git a/docker-compose.yml b/docker-compose.yml index bbf3f57..3be982e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,8 @@ +# Host ports: every published port is 1024 or above. A port that Bitkit or the Pubky SDK dials by a fixed number keeps it +# (bitcoind 43782 and 39388, electrs 60001, homegate 6288, the Pubky testnet's 6881, 15411, 15412, 6286 and 6287, the +# Trezor Bridge's 21325 and 21328, Trezor User Env's controller 9001). Every other service publishes in 23000-23999, +# mostly at 23000 plus the last three digits of its container port. Services reach each other on their container +# ports. README "Ports" lists the map. x-trezor-user-env-image: &trezor_user_env_image ghcr.io/trezor/trezor-user-env@sha256:15871ebb234bf7c0197cfcd31ddc2edbe90173cd6386fc0283fafe05bf888c06 services: @@ -77,7 +82,7 @@ services: expose: - '80' ports: - - '80:80' + - '23080:80' volumes: - './btc-fee-estimates.json:/www/btc-fee-estimates.json' command: @@ -94,15 +99,15 @@ services: - '9735' # P2P - '10009' # RPC ports: - - '8080:8080' - - '9735:9735' - - '10009:10009' + - '23180:8080' # REST + - '23735:9735' # P2P + - '23009:10009' # RPC volumes: - './lnd:/home/lnd/.lnd/' command: - '--noseedbackup' - '--alias=lnd' - - '--externalip=127.0.0.1' + - '--externalip=127.0.0.1:23735' # the host port, so the node URI a wallet reads dials the published P2P port - '--bitcoin.active' - '--bitcoin.regtest' - '--bitcoin.node=bitcoind' @@ -125,7 +130,7 @@ services: expose: - '3003' ports: - - '3003:3003' + - '23003:3003' environment: HOST: '0.0.0.0' PORT: '3003' @@ -138,7 +143,7 @@ services: environment: - NODE_ENV=production - PORT=3000 - - DOMAIN=http://localhost:3000 + - DOMAIN=http://localhost:23000 - DATABASE_URL=sqlite:///data/lnurl.db # Bitcoin node connection - BITCOIN_RPC_HOST=bitcoind @@ -154,7 +159,7 @@ services: - ./lnurl-server/data:/data - ./lnd:/lnd-certs:ro ports: - - "3000:3000" + - "23000:3000" lnurl-server-fixture: profiles: [lnurl-pay] @@ -171,12 +176,12 @@ services: LNURL_FIXTURE_DOMAIN: ${LNURL_FIXTURE_DOMAIN:-} LND_REST_URL: https://lnd:8080 LND_DIR: /lnd - LND_P2P_ADDRESS: 127.0.0.1:9735 + LND_P2P_ADDRESS: 127.0.0.1:23735 BITCOIN_RPC_URL: http://polaruser:polarpass@bitcoind:43782 volumes: - ./lnd:/lnd:ro ports: - - '3010:3010' + - '23010:3010' healthcheck: test: ['CMD', 'node', '-e', "fetch('http://127.0.0.1:3010/health').then(r => { if (!r.ok) process.exit(1); }).catch(() => process.exit(1))"] interval: 5s @@ -195,7 +200,7 @@ services: - postgres_data:/var/lib/postgresql/data - ./sql/v0_create_vss_db.sql:/docker-entrypoint-initdb.d/init.sql ports: - - "5432:5432" + - "23432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"] interval: 10s @@ -213,7 +218,7 @@ services: volumes: - homegate_postgres_data:/var/lib/postgresql/data ports: - - "${HOMEGATE_POSTGRES_PORT:-5433}:5432" + - "${HOMEGATE_POSTGRES_PORT:-23433}:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d pubky_homegate"] interval: 10s @@ -251,7 +256,7 @@ services: environment: - SERVER_HOST=0.0.0.0 - SERVER_PORT=5005 - - SERVER_DOMAIN=${DOMAIN:-http://localhost:5005} + - SERVER_DOMAIN=${DOMAIN:-http://localhost:23005} - JWT_PRIVATE_KEY_PATH=/app/keys/private.pem - JWT_PUBLIC_KEY_PATH=/app/keys/public.pem - JWT_EXPIRES_IN=24h @@ -265,7 +270,7 @@ services: - ./lnurl-server/keys:/app/keys:ro - lnurl_auth_data:/app/data ports: - - "5005:5005" + - "23005:5005" healthcheck: test: ["CMD", "curl", "--fail", "--silent", "http://localhost:5005/health"] interval: 30s @@ -305,11 +310,11 @@ services: volumes: - ./vss-server-config.toml:/app/vss-server-config.toml:ro ports: - - "5050:5050" + - "23050:5050" # Wallet-backup VSS for a host that already runs other services. `vss-server` # above stays the default stack's service (it also starts lnurl-auth-server). - # This profile starts only the server and its database, on 127.0.0.1:5050, + # This profile starts only the server and its database, on 127.0.0.1:23050, # and checks RS256 JWTs with lnurl-server/keys/public.pem. vss-postgres: profiles: [vss] @@ -350,7 +355,7 @@ services: - ./vss-server-config.toml:/app/vss-server-config.toml:ro - ./lnurl-server/keys/public.pem:/app/jwt-public.pem:ro ports: - - "127.0.0.1:5050:5050" + - "127.0.0.1:23050:5050" homegate: container_name: homegate @@ -390,9 +395,9 @@ services: ports: - "127.0.0.1:21325:21325" # Bridge legacy API used by Bitkit - "127.0.0.1:21328:21328" # Bridge current API - - "127.0.0.1:9004:9001" # controller; avoids marketplace port 3001 seat blocks - - "127.0.0.1:9005:9002" # dashboard - - "127.0.0.1:6080:6080" # emulator screen / noVNC + - "127.0.0.1:23901:9001" # controller + - "127.0.0.1:23902:9002" # dashboard + - "127.0.0.1:23680:6080" # emulator screen / noVNC volumes: - trezor_emulator_state:/var/tmp - trezor_emulator_logs:/trezor-user-env/logs @@ -408,12 +413,12 @@ services: image: *trezor_user_env_image ports: - "9001:9001" # User Env controller websocket - - "9002:9002" # User Env dashboard + - "23902:9002" # User Env dashboard - "21325:21325" # Trezor Bridge legacy port used by Bitkit - "21328:21328" # Trezor Bridge current port - - "15900:5900" # VNC port, offset to avoid local VNC conflicts - - "6080:6080" # noVNC web viewer - - "9003:9003" # MCP server SSE transport + - "23590:5900" # VNC + - "23680:6080" # noVNC web viewer + - "23903:9003" # MCP server SSE transport environment: - MACOS=1 - REGTEST_RPC_URL=http://host.docker.internal:43782 @@ -486,11 +491,11 @@ services: - "127.0.0.1:15412:15412" # HTTP relay - "127.0.0.1:6286:6286" # homeserver ICANN HTTP - "127.0.0.1:6287:6297" # homeserver Pubky TLS, through homeserver-proxy (in-namespace clients reach the homeserver on 6287 directly) - - "127.0.0.1:6298:6298" # homeserver-proxy control: delay or fail one identity's requests - - "127.0.0.1:${MARKETPLACE_HOMESERVER_ADMIN_PORT:-16288}:6288" # homeserver admin (6288 is homegate's) - - "127.0.0.1:${MARKETPLACE_PAYKIT_PORT:-3001}:3001" # paykit-server, shares this namespace - - "127.0.0.1:3012:3012" # opt-in fixture-issuer, shares this namespace - - "127.0.0.1:3013:3013" # opt-in rc56-peer, shares this namespace + - "127.0.0.1:23298:6298" # homeserver-proxy control: delay or fail one identity's requests + - "127.0.0.1:${MARKETPLACE_HOMESERVER_ADMIN_PORT:-23288}:6288" # homeserver admin (6288 is homegate's) + - "127.0.0.1:${MARKETPLACE_PAYKIT_PORT:-23101}:3001" # paykit-server, shares this namespace + - "127.0.0.1:23012:3012" # opt-in fixture-issuer, shares this namespace + - "127.0.0.1:23013:3013" # opt-in rc56-peer, shares this namespace # Paykit Server 0ffd4da, the head of pubky/paykit-server#46 (paykit-rs rc65, the version both apps pin; Pubky 0.14.0; move to its merge or # release once #46 lands), built from source with the upstream diff --git a/docs/pubky-marketplace.md b/docs/pubky-marketplace.md index 61e97dd..647ea3a 100644 --- a/docs/pubky-marketplace.md +++ b/docs/pubky-marketplace.md @@ -55,9 +55,9 @@ these fixed ports: | 6286, 6287 | homeserver (ICANN HTTP, Pubky TLS) | | 15411, 15412 | PKARR relay, HTTP relay | | 6881 (tcp and udp) | DHT bootstrap | -| 3001 | Paykit Server (`MARKETPLACE_PAYKIT_PORT`) | -| 3012, 3013 | `fixture-issuer` and `rc56-peer` of the opt-in `payment-requests` profile (see the README); nothing listens until they run | -| 16288 | homeserver admin (`MARKETPLACE_HOMESERVER_ADMIN_PORT`; the in-container 6288 is Homegate's host port) | +| 23101 | Paykit Server (`MARKETPLACE_PAYKIT_PORT`; 3001 in the container) | +| 23012, 23013 | `fixture-issuer` and `rc56-peer` of the opt-in `payment-requests` profile (see the README); nothing listens until they run | +| 23288 | homeserver admin (`MARKETPLACE_HOMESERVER_ADMIN_PORT`; the in-container 6288 is Homegate's host port) | | 60001 | Electrum, from the base stack | `paykit-server` and `marketplace-driver` share the `pubky-testnet` network namespace, as the upstream diff --git a/docs/trezor-emulator.md b/docs/trezor-emulator.md index 2063aa2..68e0877 100644 --- a/docs/trezor-emulator.md +++ b/docs/trezor-emulator.md @@ -19,10 +19,9 @@ docker compose --profile trezor-emulator exec -T trezor-emulator \ /trezor-user-env/.venv/bin/python3 /opt/bitkit-trezor/trezor-fixture-check.py ``` -Ports: Bridge legacy `21325`, Bridge current `21328`, controller `9004`, dashboard -`9005`, and noVNC `6080`. The controller and dashboard are published on different -ports from the manual User Env to avoid collisions with the regtest services when -several projects use blocks of 1000 ports. Docker-backed simulator seats remap +Ports: Bridge legacy `21325`, Bridge current `21328`, controller `23901`, dashboard +`23902`, and noVNC `23680`. The controller is published on a different port from +the manual User Env's `9001`, which Bitkit's UI tests dial. Docker-backed simulator seats remap these base ports and forward them to their seat's loopback address. Declare this profile as an on-demand offer; run no global shared device instance. @@ -105,7 +104,7 @@ Run Bitkit from Xcode on the relevant Trezor branch, then open `Settings -> Adva The User Env dashboard and Bridge remain available at the same localhost endpoints: -- User Env dashboard: +- User Env dashboard: - Trezor Bridge: ## Smoke Checklist @@ -128,7 +127,7 @@ Use this checklist when reviewing any Bitkit app PR that needs the Trezor emulat ./scripts/trezor-emulator stop ``` -Open the User Env dashboard at . Trezor Bridge listens at . +Open the User Env dashboard at . Trezor Bridge listens at . ## Troubleshooting diff --git a/lnurl-server/pay-fixture.js b/lnurl-server/pay-fixture.js index 2de92bb..3f37982 100644 --- a/lnurl-server/pay-fixture.js +++ b/lnurl-server/pay-fixture.js @@ -219,7 +219,7 @@ function createApp(env = process.env) { const info = await lnd('GET', '/v1/getinfo'); const k1 = randomBytes(32).toString('hex'); channels.set(k1, { created_at: new Date().toISOString() }); - res.json({ tag: 'channelRequest', uri: `${info.identity_pubkey}@${env.LND_P2P_ADDRESS || '127.0.0.1:9735'}`, callback: `${origin(req)}/channel/fixture/callback`, k1 }); + res.json({ tag: 'channelRequest', uri: `${info.identity_pubkey}@${env.LND_P2P_ADDRESS || '127.0.0.1:23735'}`, callback: `${origin(req)}/channel/fixture/callback`, k1 }); } catch (err) { next(err); } diff --git a/marketplace/driver/driver.mjs b/marketplace/driver/driver.mjs index 1104add..d49460f 100644 --- a/marketplace/driver/driver.mjs +++ b/marketplace/driver/driver.mjs @@ -555,7 +555,7 @@ async function publicInfo() { http_relay: 'http://localhost:15412', dht: 'localhost:6881', }, - paykit_server: { url: 'http://localhost:3001', receiver_path: SERVER_PATH, network: 'regtest' }, + paykit_server: { url: 'http://localhost:23101', receiver_path: SERVER_PATH, network: 'regtest' }, electrum: 'tcp://127.0.0.1:60001', chain, seller: fixture.seller diff --git a/payment-requests/prepare b/payment-requests/prepare index 90943e2..3e3ad6d 100755 --- a/payment-requests/prepare +++ b/payment-requests/prepare @@ -3,6 +3,10 @@ set -euo pipefail cd "$(dirname "$0")/.." +# The host ports compose publishes the two peers on; a project that remaps them sets these. +issuer_port="${FIXTURE_ISSUER_PORT:-23012}" +peer_port="${RC56_PEER_PORT:-23013}" + fail() { echo "prepare: $*" >&2 exit 1 @@ -29,26 +33,26 @@ wait_health() { done } deadline=$((SECONDS + 150)) -wait_health 3012 -wait_health 3013 +wait_health "$issuer_port" +wait_health "$peer_port" -issuer=$(curl --fail-with-body -sS http://127.0.0.1:3012/info) -peer=$(curl --fail-with-body -sS http://127.0.0.1:3013/info) +issuer=$(curl --fail-with-body -sS http://127.0.0.1:$issuer_port/info) +peer=$(curl --fail-with-body -sS http://127.0.0.1:$peer_port/info) to_peer=$(jq -nc --arg pubky "$(jq -r .pubky <<<"$peer")" --arg path "$(jq -r .receiver_path <<<"$peer")" '{peer_pubky:$pubky,peer_path:$path}') to_issuer=$(jq -nc --arg pubky "$(jq -r .pubky <<<"$issuer")" --arg path "$(jq -r .receiver_path <<<"$issuer")" '{peer_pubky:$pubky,peer_path:$path}') -issuer_link=$(post 3012 /sync "$to_peer" 2>/dev/null || true) -peer_link=$(post 3013 /sync "$to_issuer" 2>/dev/null || true) +issuer_link=$(post "$issuer_port" /sync "$to_peer" 2>/dev/null || true) +peer_link=$(post "$peer_port" /sync "$to_issuer" 2>/dev/null || true) if ! jq -e '.link == "linked"' <<<"$issuer_link" >/dev/null 2>&1; then - post 3012 /link "$(jq -c '. + {mode:"initiate"}' <<<"$to_peer")" >/dev/null || fail 'issuer link initiate failed' + post "$issuer_port" /link "$(jq -c '. + {mode:"initiate"}' <<<"$to_peer")" >/dev/null || fail 'issuer link initiate failed' fi if ! jq -e '.link == "linked"' <<<"$peer_link" >/dev/null 2>&1; then - post 3013 /link "$(jq -c '. + {mode:"accept"}' <<<"$to_issuer")" >/dev/null || fail 'peer link accept failed' + post "$peer_port" /link "$(jq -c '. + {mode:"accept"}' <<<"$to_issuer")" >/dev/null || fail 'peer link accept failed' fi linked=false for _ in {1..20}; do - issuer_link=$(post 3012 /sync "$to_peer") - peer_link=$(post 3013 /sync "$to_issuer") + issuer_link=$(post "$issuer_port" /sync "$to_peer") + peer_link=$(post "$peer_port" /sync "$to_issuer") if jq -e '.link == "linked"' <<<"$issuer_link" >/dev/null && jq -e '.link == "linked"' <<<"$peer_link" >/dev/null; then linked=true @@ -64,7 +68,7 @@ fi issue() { local reference="$1" amount="$2" extra="${3:-}" response if [ -z "$extra" ]; then extra='{}'; fi - response=$(post 3012 /request "$(jq -nc --argjson peer "$to_peer" --argjson extra "$extra" --arg ref "$reference" --argjson sats "$amount" '$peer + $extra + {reference:$ref,amount_sats:$sats}')") || return 1 + response=$(post "$issuer_port" /request "$(jq -nc --argjson peer "$to_peer" --argjson extra "$extra" --arg ref "$reference" --argjson sats "$amount" '$peer + $extra + {reference:$ref,amount_sats:$sats}')") || return 1 jq -er .payment_request_id <<<"$response" || { echo "prepare: no payment_request_id issuing $reference: $response" >&2 return 1 @@ -75,32 +79,32 @@ record() { jq -nc --argjson peer "$to_issuer" --arg id "$1" '$peer + {payment_request_id:$id}' } -receive() { post 3013 /sync "$to_issuer" >/dev/null; } -sync_issuer() { post 3012 /sync "$to_peer" >/dev/null; } +receive() { post "$peer_port" /sync "$to_issuer" >/dev/null; } +sync_issuer() { post "$issuer_port" /sync "$to_peer" >/dev/null; } proposed=$(issue rc56-proposed 10000) receive accepted=$(issue rc56-accepted 11000) receive -post 3013 /accept "$(record "$accepted")" >/dev/null +post "$peer_port" /accept "$(record "$accepted")" >/dev/null sync_issuer rejected=$(issue rc56-rejected 12000) receive -post 3013 /reject "$(record "$rejected")" >/dev/null +post "$peer_port" /reject "$(record "$rejected")" >/dev/null sync_issuer canceled=$(issue rc56-canceled 13000) receive -post 3013 /cancel "$(record "$canceled")" >/dev/null +post "$peer_port" /cancel "$(record "$canceled")" >/dev/null sync_issuer completed=$(issue rc56-completed 14000) receive -post 3013 /accept "$(record "$completed")" >/dev/null +post "$peer_port" /accept "$(record "$completed")" >/dev/null sync_issuer -paid=$(post 3013 /pay "$(jq -nc --argjson record "$(record "$completed")" --arg address "$(jq -r .address <<<"$issuer")" '$record + {address:$address,amount_sats:14000}')") +paid=$(post "$peer_port" /pay "$(jq -nc --argjson record "$(record "$completed")" --arg address "$(jq -r .address <<<"$issuer")" '$record + {address:$address,amount_sats:14000}')") jq -e '.proof_sent == true' <<<"$paid" >/dev/null || fail "request $completed: /pay did not deliver the proof: $paid" sync_issuer @@ -122,9 +126,9 @@ PY monthly_extra=$(jq -nc --arg start "$(jq -r .start <<<"$period")" '{monthly_starts_at:$start,period_start_deadline_seconds:3456000}') monthly_accepted=$(issue rc56-monthly-accepted 15000 "$monthly_extra") receive -post 3013 /accept "$(record "$monthly_accepted")" >/dev/null +post "$peer_port" /accept "$(record "$monthly_accepted")" >/dev/null sync_issuer -monthly_paid=$(post 3013 /pay "$(jq -nc --argjson record "$(record "$monthly_accepted")" --arg address "$(jq -r .address <<<"$issuer")" --arg start "$(jq -r .start <<<"$period")" --arg end "$(jq -r .end <<<"$period")" '$record + {address:$address,amount_sats:15000,billing_period_start:$start,billing_period_end:$end}')") +monthly_paid=$(post "$peer_port" /pay "$(jq -nc --argjson record "$(record "$monthly_accepted")" --arg address "$(jq -r .address <<<"$issuer")" --arg start "$(jq -r .start <<<"$period")" --arg end "$(jq -r .end <<<"$period")" '$record + {address:$address,amount_sats:15000,billing_period_start:$start,billing_period_end:$end}')") jq -e '.proof_sent == true' <<<"$monthly_paid" >/dev/null || fail "request $monthly_accepted: /pay did not deliver the proof: $monthly_paid" sync_issuer monthly_proposed=$(issue rc56-monthly-proposed 16000 "$monthly_extra") @@ -136,7 +140,7 @@ for txid in "$(jq -r .txid <<<"$paid")" "$(jq -r .txid <<<"$monthly_paid")"; do jq -e '.confirmations >= 1' >/dev/null || fail "transaction $txid is not confirmed after mining one block" done -records=$(post 3013 /records "$to_issuer") +records=$(post "$peer_port" /records "$to_issuer") check() { local id="$1" expected="$2" actual jq -e --arg id "$id" --arg expected "$expected" '.records[] | select(.payment_request_id == $id and .state == $expected)' <<<"$records" >/dev/null && return 0 diff --git a/payment-requests/src/main.rs b/payment-requests/src/main.rs index 7503382..b4e4dbc 100644 --- a/payment-requests/src/main.rs +++ b/payment-requests/src/main.rs @@ -131,7 +131,7 @@ struct RequestInput { deadline_at: Option, monthly_starts_at: Option, period_start_deadline_seconds: Option, - // an LNURL-pay string (`GET :3010/generate/pay` of the lane's LNURL fixture): the request then accepts only `btc-lightning-lnurl`, + // an LNURL-pay string (`GET :23010/generate/pay` of the lane's LNURL fixture): the request then accepts only `btc-lightning-lnurl`, // which the private payment list sent with it offers (bitkit-android#1401 J19, 7 Oct) lnurl: Option, // when the proposal itself expires (the acceptance deadline), apart from the payment deadline diff --git a/pubky-marketplace b/pubky-marketplace index 5c595f4..1e47eff 100755 --- a/pubky-marketplace +++ b/pubky-marketplace @@ -24,7 +24,7 @@ PAYKIT_SERVER_PATCHES=$(cd marketplace/patches 2>/dev/null && ls paykit-server-* export PAYKIT_SERVER_PATCHES PAYKIT_SERVER_IMAGE=bitkit-docker/paykit-server:$PAYKIT_SERVER_TAG DRIVER_IMAGE=bitkit-docker/marketplace-driver:$PAYKIT_SERVER_TAG -PAYKIT_PORT="${MARKETPLACE_PAYKIT_PORT:-3001}" +PAYKIT_PORT="${MARKETPLACE_PAYKIT_PORT:-23101}" COMPOSE=(docker compose --profile marketplace) CHAIN_SERVICES=(bitcoind bitcoinsetup electrs) FIXTURE_SERVICES=(marketplace-postgres pubky-testnet homeserver-proxy paykit-server) diff --git a/scripts/trezor-emulator b/scripts/trezor-emulator index 362a9d7..910673d 100755 --- a/scripts/trezor-emulator +++ b/scripts/trezor-emulator @@ -5,7 +5,7 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" COMPOSE_FILE="$ROOT_DIR/docker-compose.yml" CONTROLLER_SCRIPT="$ROOT_DIR/scripts/trezor-controller.py" -DASHBOARD_URL="${TREZOR_DASHBOARD_URL:-http://localhost:9002}" +DASHBOARD_URL="${TREZOR_DASHBOARD_URL:-http://localhost:23902}" BRIDGE_URL="${TREZOR_BRIDGE_URL:-http://localhost:21325}" BRIDGE_PORT="${TREZOR_BRIDGE_PORT:-21325}" diff --git a/vss-test/src/vss_jwt_test.rs b/vss-test/src/vss_jwt_test.rs index 372962f..d75fc69 100644 --- a/vss-test/src/vss_jwt_test.rs +++ b/vss-test/src/vss_jwt_test.rs @@ -18,7 +18,7 @@ struct TestClaims { exp: i64, } -const VSS_URL: &str = "http://localhost:5050"; +const VSS_URL: &str = "http://localhost:23050"; // Path to private key used by lnurl-server for JWT const VALID_PRIVATE_KEY_PATH: &str = "../lnurl-server/keys/private.pem";