MetaMask / MetaMask/api-specs

Invalid `wallet_requestSnaps` and `wallet_invokeSnap` specs

Open
#204 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
39
Forks
16
PR merge metrics
No merged PRs in 30d

Description

`wallet_requestSnaps` and `wallet_invokeSnap` use an object as params, but on the docs, the params are currently being wrapped in an array.

The spec and examples should be updated to use this format:

### `wallet_requestSnaps`

```ts
type Request = {
method: 'wallet_requestSnaps';
params: Record;
}
```

### `wallet_invokeSnap`

```ts
type Request = {
method: 'wallet_invokeSnap',
params: {
snapId: SnapId;
request: {
method: string;
params: Json;
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository for the wallet_requestSnaps and wallet_invokeSnap specs and examples. Update each params definition and example so params is an object rather than an array, matching the TypeScript shapes in the issue. Done means both methods consistently use the corrected object format.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.