Skip to main content
  • Snap
  • Website

wallet_getSnaps

Description

Get permitted and installed Snaps for the requesting origin.

Returns

Record<SnapId, { error: JsonRpcError } | Snap>

A map of Snap IDs to either the Snap metadata or an error.

Example

const snaps = await snap.request({
method: "wallet_getSnaps",
});
console.log(snaps);
// {
// 'npm:example-snap': {
// id: 'npm:example-snap',
// version: '1.0.0',
// initialPermissions: { ... },
// blocked: false,
// enabled: true,
// },
// ...,
// }