@metamask/interactive-ui-example-snap

1.0.2 • Public • Published

@metamask/interactive-ui-example-snap

This snap demonstrates how to use interactive UI to build reactive custom UI interfaces across all the available APIs.

Snap usage

onRpcRequest

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

  • dialog: Create a snap_dialog with an interactive interface. This demonstrates that a snap can show an interactive snap_dialog that the user can interact with.

  • getState: Get the state of a given interface. This demonstrates that a snap can retrieve an interface state.

onTransaction

This snap exposes an onTransaction handler, which is called when a transaction
is sent by the user. It shows a user interface with details about the transaction.

onHomePage

The snap exposes an onHomePage handler, which shows a user interface.

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

Readme

Keywords

none

Package Sidebar

Install

npm i @metamask/interactive-ui-example-snap

Weekly Downloads

1

Version

1.0.2

License

(MIT-0 OR Apache-2.0)

Unpacked Size

66 kB

Total Files

7

Last publish

Collaborators

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