PoC for one browser-generated Ed25519 key doing both of these jobs:
- authenticate to idOS
- sign for a Canton external party
The intended path for this repo is:
- idOS web app:
https://app.staging.idos.network - idOS node:
https://nodes.staging.idos.network - Canton: local LocalNet plus a local bridge process
The demo is intentionally narrow:
One Ed25519 key can authenticate to idOS and sign for a Canton external party.
This repo does not try to explain every environment or every Canton flow. It is built to get that one statement working end to end.
Working today:
- generate and persist one browser-local Ed25519 keypair
- derive a
NEARwallet view for idOS from that keypair - link that generated signer to an existing idOS profile
- authenticate to idOS using the generated signer after linking
- derive a Canton signing key view from that same keypair
- prepare Canton external-party topology for the shared signer from the UI
- sign the returned Canton
multiHashin the browser and send it back for allocation - allocate a real Canton external party on LocalNet
- prepare, sign, and execute a real Canton self-ping after allocation
Follow these steps in order.
pnpm installOpen https://app.staging.idos.network.
If you do not already have an idOS profile there:
- Create a profile with FaceSign.
- Connect an EVM wallet.
- Keep using that same EVM wallet for the bootstrap step in this demo.
The browser app in this repo talks to https://nodes.staging.idos.network by default.
pnpm canton:localnet:doctor
pnpm canton:localnet:download
pnpm canton:localnet:upNotes:
- the wrapper prefers
podman-compose - it falls back to
podman composeand thendocker compose - Podman must have a healthy machine connection; installed binaries alone are not enough. On non-Linux hosts, you may also need a working Podman machine.
- LocalNet artifacts are cached under
.local/canton-localnet - the bundle version is resolved from the latest Digital Asset
decentralized-canton-syncrelease unlessCANTON_LOCALNET_VERSIONis set
In a second terminal:
pnpm canton:bridge:localnetIn a third terminal:
pnpm devOpen the local Vite URL.
The app will create or load a browser-local Ed25519 key automatically.
If that key is not linked to idOS yet:
- Expand
Bootstrap idOS link. - Click
Connect existing EVM wallet. - Connect the same staging idOS wallet you used at
app.staging.idos.network. - Click
Link generated key to idOS.
Then click Run crypto demo.
Expected result:
- the summary header shows
idOS authenticated - the summary header shows
Canton ping executed - the app shows the idOS user id reached by the shared key
- the app shows the Canton party id and ping update id reached by that same key
The generated signer is linked to idOS as:
wallet_type: "NEAR"address: NEAR implicit address derived from the Ed25519 public keypublic_key:ed25519:<base58>
The proof used for idOS is a browser-generated NEP-413 signature. This kept the integration simpler than trying to force the key through FaceSign-specific flows.
The browser app does not talk to the Canton SDK directly for the real network path. Instead it talks to a small local bridge process:
GET /healthzReturns bridge config status for the UIPOST /v1/external-party/topologyReturns prepared external-party topology plus themultiHashthe browser signer must signPOST /v1/external-party/allocateSubmits the browser-produced signature and allocates the external partyPOST /v1/ping/preparePrepares a Ping create transaction and returns the transaction hash to signPOST /v1/ping/executeSubmits the signed Ping transaction
For the intended demo path, use:
- browser app ->
http://127.0.0.1:8787 - bridge network ->
localnet - idOS node ->
https://nodes.staging.idos.network
There is an .env.example file with the main browser and bridge variables,
including VITE_IDOS_NODE_URL and VITE_CANTON_BRIDGE_URL.
pnpm buildpnpm canton:localnet:doctorpnpm canton:localnet:downloadCANTON_LOCALNET_DRY_RUN=1 pnpm canton:localnet:uppnpm canton:bridge:localnetplusGET /healthzpnpm canton:bridge:smokeagainst a running LocalNet bridge, including self-ping execution- direct reachability checks against
https://nodes.staging.idos.network - local NEP-413 packing and verification sanity checks
- browser validation with a real staging idOS profile
- src/lib/sharedSigner.ts Shared Ed25519 key lifecycle plus Canton and idOS views of the same key
- src/lib/idos/client.ts idOS profile inspection and wallet-linking logic
- src/lib/near.ts NEP-413 message construction and signing
- server/canton-bridge.mjs Local bridge for Canton external-party topology preparation and ping execution
- scripts/canton-localnet.sh Repo-local LocalNet download and compose wrapper
- scripts/canton-bridge-smoke.mjs CLI smoke test for the prepare-sign-allocate bridge roundtrip
- src/App.tsx Demo UI and browser flow
- No Daml code
- idOS scope here is wallet linking and authentication only
- The generated key is stored in browser
localStorage - Bundle size is large because the current app pulls the Canton SDK into the browser bundle
- The README is intentionally biased toward staging idOS plus LocalNet; other environments require adjusting the config and validation path
- capture and export a concise proof bundle from the demo run
- decide how AG-oriented flows should consume this shared signer proof
- reduce bundle size by moving more Canton-specific code out of the browser path