Skip to content

chore: Wallet Service usage for wallet_getCallsStatus #430

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 1 commit 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
13 changes: 13 additions & 0 deletions walletkit/android/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ Applications can specify that these onchain calls be executed taking advantage o

## 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)
```

### wallet_getCapabilities Example

The `wallet_getCapabilities` method is used to request information about the capabilities supported by a wallet. In accordance with EIP-5792, here’s how it should be implemented:
Expand Down
19 changes: 19 additions & 0 deletions walletkit/flutter/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ Applications can specify that these onchain calls be executed taking advantage o

## 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, specify the `scopedProperties` when approving a session:

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

### wallet_getCapabilities Example

The `wallet_getCapabilities` method is used to request information about what capabilities a wallet supports. Following EIP-5792, here's how it should be implemented:
Expand Down
19 changes: 19 additions & 0 deletions walletkit/ios/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ Applications can specify that these onchain calls be executed taking advantage o

The `wallet_getCapabilities` method is used to request information about what capabilities a wallet supports. Following EIP-5792, here's how it should be implemented:

### 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, specify the `scopedProperties` when approving a session:

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

### Request
```json
{
Expand Down
19 changes: 19 additions & 0 deletions walletkit/react-native/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ Applications can specify that these onchain calls be executed taking advantage o

## 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, specify the `scopedProperties` when approving a session:

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

### wallet_getCapabilities Example

The `wallet_getCapabilities` method is used to request information about what capabilities a wallet supports. Following EIP-5792, here's how it should be implemented:
Expand Down
19 changes: 19 additions & 0 deletions walletkit/web/eip5792.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ Applications can specify that these onchain calls be executed taking advantage o

## 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, specify the `scopedProperties` when approving a session:

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

### wallet_getCapabilities Example

The `wallet_getCapabilities` method is used to request information about what capabilities a wallet supports. Following EIP-5792, here's how it should be implemented:
Expand Down