Minimal local stack:
flowchart TD
fe["counter/frontend<br/>Counter dApp<br/>http://localhost:3012"]
wallet["carpincho-wallet<br/>Vault + signer<br/>http://localhost:3011"]
ws["canton-barebones/wallet-service<br/>Canton bridge<br/>http://localhost:3010"]
cb["canton-barebones<br/>Participant JSON API http://localhost:3013<br/>Ledger/Admin gRPC localhost:3014 / 3015"]
dar["counter/daml<br/>quickstart-counter DAR<br/>.daml/dist/*.dar"]
fe <-->|"WalletConnect / CIP-0103"| wallet
wallet -->|"JSON-RPC /rpc<br/>prepare, execute, read, onboard"| ws
ws -->|"Canton JSON API<br/>Bearer CANTON_BACKEND_TOKEN"| cb
dar -->|"deploy DAR package"| cb
The frontend knows the Counter DAML signature and talks to Carpincho through WalletConnect. Carpincho owns the local signing key and uses the wallet service to prepare, read, and execute against the Canton participant.
Run the packages in this order for the local Counter flow.
Configure envs:
cp canton-barebones/.env.example canton-barebones/.envStart Canton:
npm run canton:up
npm run canton:healthBuild:
npm run build-dar -- counter/damlMake sure Canton is running:
npm run canton:healthDeploy DAR:
npm run deploy-dar -- counter/daml/.daml/dist/quickstart-counter-0.0.1.darUse the same format for any other DAML project and DAR:
npm run build-dar -- <path/to/daml/project>
npm run deploy-dar -- <path/to/file.dar>canton:health must return OK before deploying; otherwise the DAR upload can fail.
Already started by npm run canton:up. Verify with:
npm run wallet-service:healthThe service self-mints its Canton JWT from CANTON_AUTH_AUDIENCE / CANTON_AUTH_SECRET / CANTON_ADMIN_USER_ID in canton-barebones/.env, so there is no token copy-paste step.
For host-side iteration (mock mode, no Docker required):
npm --prefix canton-barebones/wallet-service install
WALLET_SERVICE_MOCK=1 npm run wallet-service:devWIP. The extension is not deployed there yet.
Build the extension:
npm --prefix carpincho-wallet install
npm run carpincho:build:extensionThe build output is:
carpincho-wallet/dist-extension
Then load it in Chrome with the shared steps below.
WIP. Release artifacts are not available yet.
After downloading and unpacking a release artifact, load it in Chrome with the shared steps below.
- Open
chrome://extensions/. - Enable
Developer mode. - Click
Load unpacked. - Select the unpacked extension folder (
carpincho-wallet/dist-extensionfor a source build).
Install the local connect kit first so Vite can resolve its peer/dev dependencies.
npm --prefix canton-connect-kit install
npm --prefix counter/frontend install
npm run app:devOpen:
http://localhost:3012
In the frontend:
- Keep
canton:localin settings. - Click
Connect with Carpincho. - Approve the request in Carpincho.
The Carpincho extension path above works out of the box. The Connect with WalletConnect button is also available, but it requires a Reown project id. Without it, connecting via WalletConnect throws.
Get a project id from https://cloud.reown.com, then set VITE_WC_PROJECT_ID in both:
counter/frontend/.env.local
carpincho-wallet/.env.local
VITE_WC_PROJECT_ID=your_reown_project_idLocal ports are intentionally assigned in the 3010+ range:
| Component | URL / Port |
|---|---|
| Counter wallet service | http://localhost:3010 |
| Carpincho wallet | http://localhost:3011 |
| Counter frontend | http://localhost:3012 |
| Canton JSON API | http://localhost:3013 |
| Canton Ledger API | grpc://localhost:3014 |
| Canton Admin API | grpc://localhost:3015 |
| Canton health | http://localhost:3016 |
| Canton sequencer public API | localhost:3017 |
| Canton Postgres | localhost:3018 |