A feature that will allow browser apps communicate with CKBull wallet by sending transaction signing requests

The following diagram shows how a dApp authenticates with a user and how it sends a transaction signature request that is then signed and broadcasted by the user.

_nervos-signing.drawio.png

Components

Sign in process

The first step that the dApp needs to do is to authenticate with the user. By doing so the dApp will have the information of the user wallet (address, balance, network, etc) as well as the ability to send transaction signature requests to this user. This process is very similar to the “sing in with metamask” well known web3 action.

  1. In the first place the dApp frontend will send an api request to its backend. The backend will ask the signing service using an authentication token (”dApp-secret”) to create a new sessionUid. This sessionUid will then be presented to the user through a QR code or an URI.
  2. The user will scan the sessionUid using CKBull wallet and it will be presented a verification screen containing the dApp information (name, description, image, etc). If the user accepts to sign in, it will make a request to the signing service with his wallet information (address, balance, network…). The dApp will then be able to retrieve this information and sign in the final user

Transaction signing process

Once the user is signed in with the dApp, this will have the ability to send transactions intents to the CKBull wallet. The final user then will be able to retrieve those transaction intents, sign them using the private keys stored in CKBull wallet and broadcast the transactions to the blockchain.