@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
1 lines • 868 B
Source Map (JSON)
{"version":3,"file":"home-page.cjs","sourceRoot":"","sources":["../../../src/types/handlers/home-page.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentOrElement } from '..';\n\n/**\n * The `onHomePage` handler. This is called when the user navigates to the\n * Snap's home page in the MetaMask UI.\n *\n * This function does not receive any arguments.\n *\n * @returns The content to display on the home page. See\n * {@link OnHomePageResponse}.\n */\nexport type OnHomePageHandler = () => Promise<OnHomePageResponse>;\n\n/**\n * The content to display on the home page.\n *\n * @property content - A custom UI component, that will be shown in MetaMask.\n * @property id - A custom UI interface ID, that will be shown in MetaMask.\n */\nexport type OnHomePageResponse =\n | {\n content: ComponentOrElement;\n }\n | { id: string };\n"]}