canton-network-docs/SDKsWallet SDKGuides
Signing Transactions from Third
A normal flow on blockchain applications is to have dApps that interact with the blockchain on the clients behalf, these flows usually require the user to sign transactions that the dApp prepares and submit it. To faciliate this in Canton it is required that the prepared transaction is sent to the wallet for signing. An easy way of supporting this is to expose a dApp API (OpenRPC spec can be found here: https://github.com/canton-network/wallet/blob/main/api-specs/openrpc-dapp-api.json ).
The specs are in OpenRPC to conform with traditional standards like for ethereum.
A client can provide access to a Wallet Providers dApp API by either embedding a wallet provider in the dApp or by connecting to an external wallet provider via a browser extension or other means. Then the dApp is able to funnel transactions through to the wallet provider for signing.
Receiving a Transaction
A dApp would usually call theprepareExecute endpoint or the prepareExecuteAndWait endpoint. In both cases the Wallet Provider would prepare, sign and submit the transaction to the ledger.
You can prepare the incoming transaction using the Wallet SDK: