Skip to content

Commit

Permalink
Merge pull request #18 from leapwallet/main
Browse files Browse the repository at this point in the history
Fixed lerna issue and added suggestChain Docs
  • Loading branch information
leapsamvel authored Aug 26, 2023
2 parents 98ab8ca + 2f17cbf commit 5ff122e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"packages": [
"packages/*"
],
"npmClient": "yarn",
"npmClientArgs": ["--ignore-engines"],
"version": "0.0.0"
Expand Down
55 changes: 55 additions & 0 deletions packages/snap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,59 @@ await window.ethereum.request({
},
});

```

### 2. **Sugest Chain**

Utilize the **`suggestChain`** method to suggest any chains of coinTypes in the list below

```javascript
[
118,
564,
494,
639,
483,
4444,
701,
990,
394,
852,
7777777,
459,
880,
931,
371,
505,
529,
234,
330,
5555,
370
];
```

**Usage:**

```javascript
await window.ethereum.request({
method: 'wallet_invokeSnap',
params: {
snapId: "local:http://localhost:8000",
request: {
method: 'suggestChain',
params: {
chainId: "canto_7700-1",
chainName: "canto",
bip44: {
coinType: 564,
},
bech32Config: {
bech32PrefixAccAddr: "canto",
},
},
},
},
})

```

0 comments on commit 5ff122e

Please sign in to comment.