UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

1 lines 1.13 kB
{"version":3,"file":"create-interface.mjs","sourceRoot":"","sources":["../../../src/types/methods/create-interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentOrElement, InterfaceContext } from '..';\n\n/**\n * An object containing the parameters for the `snap_createInterface` method.\n */\nexport type CreateInterfaceParams = {\n /**\n * The [custom UI](https://docs.metamask.io/snaps/features/custom-ui/) to\n * create.\n */\n ui: ComponentOrElement;\n\n /**\n * Optional context for the interface, which can be used to provide additional\n * information about the interface to the Snap, without being part of the UI\n * itself.\n */\n context?: InterfaceContext;\n};\n\n/**\n * The interface's ID to be used in subsequent calls to custom UI methods such\n * as [`snap_updateInterface`](https://docs.metamask.io/snaps/reference/snaps-api/snap_updateinterface),\n * or to display the interface using one of the interface display methods such\n * as [`snap_dialog`](https://docs.metamask.io/snaps/reference/snaps-api/snap_dialog).\n */\nexport type CreateInterfaceResult = string;\n"]}