wallet_getSnaps
Returns the IDs of the dapp's permitted Snaps and some relevant metadata.
Params
(0)Result
(GetSnapsResult)An object mapping the IDs of permitted Snaps to their metadata.
id
objectid
stringThe ID of the Snap.
initialPermissions
objectThe initial permissions of the Snap, which will be requested when the Snap is installed.
version
stringThe version of the Snap.
enabled
booleanIndicates whether the Snap is enabled.
blocked
booleanIndicates whether the Snap is blocked.
Example
Request
await window.ethereum.request({
"method": "wallet_getSnaps",
"params": []
});
Result
{
"npm:@metamask/example-snap": {
"version": "1.0.0",
"id": "npm:@metamask/example-snap",
"enabled": true,
"blocked": false
}
}