Prerequisites
- Please ensure you have integrated Wallet SDK into your wallet.
- Please ensure that you have obtained and configured the project ID from the WalletConnect Dashboard.
Managing Smart Contract Access
Wallet SDK does not provide a built-in way to create and manage smart contract allowlists for access control. However, you can use the Wallet SDK to inspect thesession_proposal and session_request payloads and review it to approve or reject the proposal before a session is established and/or a transaction is signed respectively.
Inspecting Session Proposals
When a Web3 app is trying to establish a session or connect to your wallet, it will send asession_proposal payload to your wallet as shown below.
After this, as a wallet, you can do the following:
- Check
verifyContext.originandvalidationto confirm the dapp is trusted. - Approve or reject the proposal before the session is created.
Inspecting Session Requests
After a session is approved, Web3 apps may request to sign a transaction or a message. As a wallet, you will receive a JSON-RPC request from the Web3 app as shown below. Inside the request payload, you will find the contract address (to: 0xContractAddress) that is being interacted with and the function that is being called.