CantonWalletConnect
The wallet side of the WalletConnect transport for CIP-0103.
WalletConnect is not a new capability — it is a transport for the same CIP-0103 JSON-RPC the wallet already answers over the in-process and LAN transports. So this is the io.github.vsima.canton.dapp.lan.LanGrpcDappServer of WalletConnect: it wraps a DappRequestHandler (a DappSession satisfies it) and turns a session's traffic into handle calls.
It depends on no WalletConnect client library. A wallet's job here has exactly two touch-points, and both are pure:
sessionNamespaces — at proposal time, the CAIP-2 chain, CAIP-10 accounts, and CIP-0103 methods to approve a session with.
handle — at request time, route one
session_requestinto the engine and map its reply back.
A Reown WalletKit delegate in the app (or an Android add-on module) does the relay I/O: on onSessionProposal it approves with sessionNamespaces; on onSessionRequest it calls handle and responds with the result. Keeping the client out means this adapter is plain JVM and is unit-tested against a real DappSession, with no relay.
The approval, signing and prepare→sign→execute all happen inside the engine; this class adds no policy. Over a WalletConnect session the Canton ecosystem (the official @canton-network/dapp-sdk, PartyLayer) names CIP-0103 methods with a canton_ prefix — the convention EVM uses with eth_ — so this advertises the canton_ wire names and normalizes each inbound method back to the bare CIP-0103 name the engine answers. Bare names are still accepted, so a peer that speaks CIP-0103 verbatim (the reference dApp server) keeps working. See WcMethod.
Types
Functions
Routes one inbound session_request into the engine and maps the reply.
The namespaces to approve a session with, sharing accounts. Which accounts to share is the wallet's decision (its connect-approval UI); this only projects them into CAIP-10 form under the canton namespace.