Type Alias: CantonRpcProvider
CantonRpcProvider =
Provider<DappRpcTypes>
Defined in: canton/types.ts:35
Canton connectivity provider, as defined by the Canton dApp SDK
(@canton-network/dapp-sdk):
a Provider over the dApp wallet RPC methods
(@canton-network/core-wallet-dapp-rpc-client).
The SDK never dials a Canton Ledger API itself — all Canton connectivity and
authentication flows through provider.request(...):
getActiveNetwork/getPrimaryAccount— network + party detection (used by CantonChain.fromProvider)ledgerApi/prepareExecuteAndWait— Ledger API requests and interactive submissions (prepare → sign → execute)accountsChanged/txChangedevents — wallet state changes
Construct it with the environment that matches your runtime:
- Browser (dApp SDK) — connect to the user's Canton wallet and take the
provider from it:
new DappSDK(config)/getConnectedProvider(). This provider proxiesledgerApirequests through the validator wallet. - Node.js — use the SDK's
CantonJsonRpcProvider(canton/provider.ts), which talks to the Canton JSON Ledger API directly (JWT-authenticated wire-format pass-through, optional external signer e.g. Ledger). Hand it to CantonChain.fromProvider. - Bring your own — implement the
Providerinterface overDappRpcTypesand pass it to CantonChain.fromProvider.