Content
Links to sections on this page. Some sections are platform specific and are only visible when the platform is selected. To view a summary of useful platform specific topics, check out Extra (Platform Specific) under this section. Initialization: Creating a new WalletKit instance and initializing it with a projectId from Reown Dashboard. Session: Connection between a dapp and a wallet.- Namespace Builder: Namespace Builder is a helper utility that greatly reduces the complexity of parsing the required and optional namespaces. It accepts as parameters a session proposal along with your user’s chains/methods/events/accounts and returns a ready-to-use object
- Session Approval: Approving a session sent from a dapp
- Session Rejection: Rejecting a session sent from a dapp
- Responding to Session Requests: Responding to session requests sent from a dapp
- Updating a Session: Updating a session sent between a dapp and wallet
- Extending a Session: Extending a session between a dapp and wallet
- Session Disconnect: Disconnecting a session between a dapp and wallet
- Register Device Token Enabling Wallet Push Notifications by registering a device token.
- WalletKit.WalletDelegate Setting and overriding functions through WalletKit delegate. Also includes instructions about VerifyContext.
- Format Message Receiving formatted SIWE message
Initialization
Wallet.Params.Init
object in the Android Application class with the Core Client. The Wallet.Params.Init
object will then be passed to the WalletKit
initialize function.
The telemetry feature aims to improve the reliability and observability of connection flows between decentralized applications (dapps) and wallets.
It focuses solely on collecting data about code execution and error codes, without tracking any sensitive user information like amounts, accounts etc.
It provides a comprehensive tracing system for three key use cases:
- Subscribing to a Pairing Topic
- Approving a Session
- Approving an Authenticated Session
- Trace Events: Collected to verify the proper execution of code.
- Error Events: Captured when errors occur during the trace, halting the execution trace.
- The SDK stores events and sends them to the server.
- The SDK stops storing new events and deletes all unsent events from local storage upon the next initialization.
Session
A session is a connection between a dapp and a wallet. It is established when a user approves a session proposal from a dapp. A session is active until the user disconnects from the dapp or the session expires.Namespace Builder
With WalletKit 1.7.0 we’ve published a helper utility that greatly reduces the complexity of parsing the required and optional namespaces. It accepts as parameters a session proposal along with your wallet’s chains, methods, events, and accounts (supported namespaces) and returns ready-to-use namespaces object that has to be passed intoWallet.Params.SessionApprove
when approving a session.
EVM methods & events
In @walletconnect/ethereum-provider, (our abstracted EVM SDK for apps) we support by default the following Ethereum methods and events:Session Approval
Addresses provided in
accounts
array should follow CAIP-10
semantics.WalletKit.approveSession
function.
Session Rejection
WalletKit.rejectSession
function.
Responding to Session requests
Wallet.Params.SessionRequestResponse
with the session’s topic and request
ID along with the respond data to the WalletKit.respondSessionRequest
function.
Updating a Session
NOTE: addresses provided inaccounts
array should follow CAIP10
semantics.
Wallet.Params.SessionUpdate
object with the session’s topic and namespaces to update session with
to WalletKit.updateSession
.
Extending a Session
Wallet.Params.SessionExtend
object with the session’s topic to update the session with to WalletKit.extendSession
. Session is
extended by 7 days.
Emitting a Session
To emit an event, call emitSessionEvent() as follows:Session Disconnect
WalletKit.disconnectSession
function.
Extra (Platform Specific)
WalletKit.WalletDelegate
Wallet.Event.VerifyContext
provides a domain verification information about SessionProposal, SessionRequest and AuthRequest. It consists of origin of a Dapp from where the request has been sent, validation Enum that says whether origin is VALID, INVALID or UNKNOWN and verify url server.
WalletKit.WalletDelegate
passed to it for it to be able to expose asynchronous updates sent from the Dapp.
Format message
To receive formatted SIWE message, call formatMessage method with following parameters:Register Device Token
This method enables wallets to receive push notifications from WalletConnect’s Push Server via Firebase Cloud Messaging. This means you will have to setup your project with Firebase before being able to call registerDeviceToken method. Make sure that a service extending the FirebaseMessagingService is added to your manifest as per the Firebase FCM documentation as well as any other setup Firebase requires Firebase setup documentation. To register a wallet to receive WalletConnect push notifications, callWalletKit.registerDeviceToken
and pass the Firebase Access Token.