UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

23 lines 731 B
import type { ComponentOrElement } from "../index.cjs"; /** * The `onHomePage` handler. This is called when the user navigates to the * Snap's home page in the MetaMask UI. * * This function does not receive any arguments. * * @returns The content to display on the home page. See * {@link OnHomePageResponse}. */ export type OnHomePageHandler = () => Promise<OnHomePageResponse>; /** * The content to display on the home page. * * @property content - A custom UI component, that will be shown in MetaMask. * @property id - A custom UI interface ID, that will be shown in MetaMask. */ export type OnHomePageResponse = { content: ComponentOrElement; } | { id: string; }; //# sourceMappingURL=home-page.d.cts.map