diff --git a/walletkit/android/eip5792.mdx b/walletkit/android/eip5792.mdx index 1af8964a3..c5ee393c8 100644 --- a/walletkit/android/eip5792.mdx +++ b/walletkit/android/eip5792.mdx @@ -9,3 +9,18 @@ Applications can specify that these onchain calls be executed taking advantage o - `wallet_getCallsStatus`: Returns the status of a call batch that was sent via wallet_sendCalls. - `wallet_showCallsStatus`: Requests that a wallet shows information about a given call bundle that was sent with wallet_sendCalls. - `wallet_getCapabilities`: This RPC allows an application to request capabilities from a wallet (e.g. batch transactions, paymaster communication). + +## Usage + +### wallet_getCallsStatus Example + +To enhance the user experience and eliminate the need for app switching, wallets can delegate the Wallet Service to query call status from a bundler. This delegation is configured during session approval by specifying the Wallet Service URL in the scoped properties. + +When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler. + +To implement this functionality, use `WalletKit.buildWalletService(methods)` util method that specifies the wallet service URL withing the supported methods: + +```kotlin +val scopedProperties = mapOf("eip155" to WalletKit.buildWalletService(listOf("wallet_getCallsStatus"))) +WalletKit.approveSession(..., scopedProperties) +``` diff --git a/walletkit/flutter/eip5792.mdx b/walletkit/flutter/eip5792.mdx index 1af8964a3..ab5f19cdf 100644 --- a/walletkit/flutter/eip5792.mdx +++ b/walletkit/flutter/eip5792.mdx @@ -9,3 +9,22 @@ Applications can specify that these onchain calls be executed taking advantage o - `wallet_getCallsStatus`: Returns the status of a call batch that was sent via wallet_sendCalls. - `wallet_showCallsStatus`: Requests that a wallet shows information about a given call bundle that was sent with wallet_sendCalls. - `wallet_getCapabilities`: This RPC allows an application to request capabilities from a wallet (e.g. batch transactions, paymaster communication). + +## Usage + +To enhance the user experience and eliminate the need for app switching, wallets can delegate the Wallet Service to query call status from a bundler. This delegation is configured during session approval by specifying the Wallet Service URL in the scoped properties. + +When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler. + +To implement this functionality, specify the `scopedProperties` when approving a session: + +```json +"scopedProperties": { + "eip155": { + "walletService": [{ + "url": "", + "methods": ["wallet_getCallsStatus"] + }] + } +} +``` diff --git a/walletkit/ios/eip5792.mdx b/walletkit/ios/eip5792.mdx index 1af8964a3..ab5f19cdf 100644 --- a/walletkit/ios/eip5792.mdx +++ b/walletkit/ios/eip5792.mdx @@ -9,3 +9,22 @@ Applications can specify that these onchain calls be executed taking advantage o - `wallet_getCallsStatus`: Returns the status of a call batch that was sent via wallet_sendCalls. - `wallet_showCallsStatus`: Requests that a wallet shows information about a given call bundle that was sent with wallet_sendCalls. - `wallet_getCapabilities`: This RPC allows an application to request capabilities from a wallet (e.g. batch transactions, paymaster communication). + +## Usage + +To enhance the user experience and eliminate the need for app switching, wallets can delegate the Wallet Service to query call status from a bundler. This delegation is configured during session approval by specifying the Wallet Service URL in the scoped properties. + +When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler. + +To implement this functionality, specify the `scopedProperties` when approving a session: + +```json +"scopedProperties": { + "eip155": { + "walletService": [{ + "url": "", + "methods": ["wallet_getCallsStatus"] + }] + } +} +``` diff --git a/walletkit/react-native/eip5792.mdx b/walletkit/react-native/eip5792.mdx index 1af8964a3..f67381252 100644 --- a/walletkit/react-native/eip5792.mdx +++ b/walletkit/react-native/eip5792.mdx @@ -5,7 +5,30 @@ title: Wallet Call API WalletConnect supports [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792#atomicbatch-capability), which defines new JSON-RPC methods that enable apps to ask a wallet to process a batch of onchain write calls and to check on the status of those calls. Applications can specify that these onchain calls be executed taking advantage of specific capabilities previously expressed by the wallet; an additional, a novel wallet RPC is defined to enable apps to query the wallet for those capabilities. +## Methods + - `wallet_sendCalls`: Requests that a wallet submits a batch of calls. - `wallet_getCallsStatus`: Returns the status of a call batch that was sent via wallet_sendCalls. - `wallet_showCallsStatus`: Requests that a wallet shows information about a given call bundle that was sent with wallet_sendCalls. - `wallet_getCapabilities`: This RPC allows an application to request capabilities from a wallet (e.g. batch transactions, paymaster communication). + +## Usage + +To enhance the user experience and eliminate the need for app switching, wallets can delegate the Wallet Service to query call status from a bundler. This delegation is configured during session approval by specifying the Wallet Service URL in the scoped properties. + +When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler. + +To implement this functionality, specify the `scopedProperties` when approving a session: + +```json +"scopedProperties": { + "eip155": { + "walletService": [{ + "url": "", + "methods": ["wallet_getCallsStatus"] + }] + } +} +``` + + diff --git a/walletkit/web/eip5792.mdx b/walletkit/web/eip5792.mdx index 1af8964a3..ab5f19cdf 100644 --- a/walletkit/web/eip5792.mdx +++ b/walletkit/web/eip5792.mdx @@ -9,3 +9,22 @@ Applications can specify that these onchain calls be executed taking advantage o - `wallet_getCallsStatus`: Returns the status of a call batch that was sent via wallet_sendCalls. - `wallet_showCallsStatus`: Requests that a wallet shows information about a given call bundle that was sent with wallet_sendCalls. - `wallet_getCapabilities`: This RPC allows an application to request capabilities from a wallet (e.g. batch transactions, paymaster communication). + +## Usage + +To enhance the user experience and eliminate the need for app switching, wallets can delegate the Wallet Service to query call status from a bundler. This delegation is configured during session approval by specifying the Wallet Service URL in the scoped properties. + +When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler. + +To implement this functionality, specify the `scopedProperties` when approving a session: + +```json +"scopedProperties": { + "eip155": { + "walletService": [{ + "url": "", + "methods": ["wallet_getCallsStatus"] + }] + } +} +```