Skip to content

Commit 84e4763

Browse files
committed
adding buildWalletService to other frameworks
1 parent 99941ac commit 84e4763

File tree

4 files changed

+52
-4
lines changed

4 files changed

+52
-4
lines changed

walletkit/flutter/eip5792.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,19 @@ This capability is expressed per chain and is crucial for determining how `walle
214214

215215
When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler.
216216

217-
To implement this functionality, specify the `scopedProperties` when approving a session:
217+
To implement this functionality, use `WalletKit.buildWalletService(bundlerUrl, methods)` util method that specifies the wallet service URL and bundler URL for the supported methods:
218+
219+
```dart
220+
final Map<String, dynamic> scopedProperties = {
221+
'eip155': WalletKit.buildWalletService(
222+
'https://wallet-service-url.com',
223+
['wallet_getCallsStatus'],
224+
),
225+
};
226+
WalletKit.approveSession(..., scopedProperties);
227+
```
228+
229+
Specify the `scopedProperties` when approving a session:
218230

219231
```json
220232
"scopedProperties": {

walletkit/ios/eip5792.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,19 @@ This capability is expressed per chain and is crucial for determining how `walle
214214

215215
When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler.
216216

217-
To implement this functionality, specify the `scopedProperties` when approving a session:
217+
To implement this functionality, use `WalletKit.buildWalletService(bundlerUrl, methods)` util method that specifies the wallet service URL and bundler URL for the supported methods:
218+
219+
```swift
220+
let scopedProperties: [String: Any] = [
221+
"eip155": WalletKit.buildWalletService(
222+
"https://wallet-service-url.com",
223+
["wallet_getCallsStatus"]
224+
)
225+
]
226+
WalletKit.approveSession(..., scopedProperties)
227+
```
228+
229+
Specify the `scopedProperties` when approving a session:
218230

219231
```json
220232
"scopedProperties": {

walletkit/react-native/eip5792.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,19 @@ This capability is expressed per chain and is crucial for determining how `walle
214214

215215
When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler.
216216

217-
To implement this functionality, specify the `scopedProperties` when approving a session:
217+
To implement this functionality, use `WalletKit.buildWalletService(bundlerUrl, methods)` util method that specifies the wallet service URL and bundler URL for the supported methods:
218+
219+
```javascript
220+
const scopedProperties = {
221+
eip155: WalletKit.buildWalletService(
222+
"https://wallet-service-url.com",
223+
["wallet_getCallsStatus"]
224+
),
225+
};
226+
WalletKit.approveSession(..., scopedProperties);
227+
```
228+
229+
Specify the `scopedProperties` when approving a session:
218230

219231
```json
220232
"scopedProperties": {

walletkit/web/eip5792.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,20 @@ This capability is expressed per chain and is crucial for determining how `walle
213213
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.
214214

215215
When configured, the dApp will automatically route all subsequent `wallet_getCallsStatus` requests through the delegated wallet service to the designated bundler.
216+
217+
To implement this functionality, use `WalletKit.buildWalletService(bundlerUrl, methods)` util method that specifies the wallet service URL and bundler URL for the supported methods:
218+
219+
```javascript
220+
const scopedProperties = {
221+
eip155: WalletKit.buildWalletService(
222+
"https://wallet-service-url.com",
223+
["wallet_getCallsStatus"]
224+
),
225+
};
226+
WalletKit.approveSession(..., scopedProperties);
227+
```
216228

217-
To implement this functionality, specify the `scopedProperties` when approving a session:
229+
Specify the `scopedProperties` when approving a session:
218230

219231
```json
220232
"scopedProperties": {

0 commit comments

Comments
 (0)