The WalletConnect Pairing API is a lightweight API for establishing an encrypted, protocol-agnostic communications layer between peers. It exposes a common interface and allows for the sending and receiving of multi-protocol requests over a single pairing, allowing you to build custom protocols that consume our robust WalletConnect infrastructure and the lower-level peer-to-peer communications layer. This also significantly improves the end user experience, as you can receive requests from different protocols just by scanning one QR code.
To give you an example of leveraging it, let’s imagine that you want your dapp to issue verifiable credentials to wallets after they make a payment. This seems like a lot of work! You need a secure communications channel between the dapp and the wallet to be able to send credentials in a private manner, a mediator to relay the messages, and probably a lot more.
With the new WalletConnect Pairing API, which is a part of our Core Package, all you need to do is implement your own protocol engine and plug it into WalletConnect for an amazingly smooth user experience. The user will be able to scan the QR code, establish a WalletConnect Sign session for transactions, receive and sign the transaction request, and receive and accept a verifiable credential proposal — just by scanning a single QR code, through a single communications channel.
Let’s say we want to implement an `Issuer` client that will allow us to propose issuance and issue verifiable credentials. Your protocol engine will have to register its method next to the WalletConnect Sign and WalletConnect Auth engines.
But first, we need to define a name for our protocol RPC method. Let’s call it `issue_vc`.
Now, import WalletConnectPairing into your file and call: