@metamask/notification-example-snap

2.1.3 • Public • Published

@metamask/notifications-example-snap

This snap demonstrates how to use snap_notify to send in-app and desktop notifications to the user.

Snap manifest

Note: Using snap_notify requires the snap_notify permissions. Refer to the documentation for more information.

Along with other permissions, the manifest of this snap includes the snap_notify permission:

{
  "initialPermissions": {
    "snap_notify": {}
  }
}

This permission does not require any additional configuration.

Snap usage

This snap exposes an onRpcRequest handler, which supports the following JSON-RPC methods:

  • inApp - Send an in-app notification to the user.
  • native - Send a desktop notification to the user.

For more information, you can refer to the end-to-end tests.

Readme

Keywords

none

Package Sidebar

Install

npm i @metamask/notification-example-snap

Weekly Downloads

38,188

Version

2.1.3

License

(MIT-0 OR Apache-2.0)

Unpacked Size

65.6 kB

Total Files

7

Last publish

Collaborators

  • mcmire
  • nicholasellul
  • lgbot
  • naugtur
  • ritave
  • danfinlay
  • kumavis
  • rekmarks
  • metamaskbot
  • gudahtt
  • sethkfman