Skip to content

added scopedProperties #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions walletkit/android/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
19 changes: 19 additions & 0 deletions walletkit/flutter/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quetool to add Flutter example for WalletKit.buildWalletService

```json
"scopedProperties": {
"eip155": {
"walletService": [{
"url": "<wallet service URL>",
"methods": ["wallet_getCallsStatus"]
}]
}
}
```
19 changes: 19 additions & 0 deletions walletkit/ios/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Copy link
Collaborator

@jakubuid jakubuid May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llbartekll to add Swift example for WalletKit.buildWalletService

```json
"scopedProperties": {
"eip155": {
"walletService": [{
"url": "<wallet service URL>",
"methods": ["wallet_getCallsStatus"]
}]
}
}
```
23 changes: 23 additions & 0 deletions walletkit/react-native/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Copy link
Collaborator

@jakubuid jakubuid May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ganchoradkov to add RN example for WalletKit.buildWalletService

```json
"scopedProperties": {
"eip155": {
"walletService": [{
"url": "<wallet service URL>",
"methods": ["wallet_getCallsStatus"]
}]
}
}
```


19 changes: 19 additions & 0 deletions walletkit/web/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ganchoradkov to add JS example for WalletKit.buildWalletService

```json
"scopedProperties": {
"eip155": {
"walletService": [{
"url": "<wallet service URL>",
"methods": ["wallet_getCallsStatus"]
}]
}
}
```