UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

41 lines 1.16 kB
import { type EnumToUnion } from "../../internals/index.mjs"; import type { ComponentOrElement } from "../interface.mjs"; /** * The types of notifications that can be displayed. * * - `InApp` - A notification that is displayed in by the MetaMask extension. * - `Native` - A notification that is displayed by the operating system. */ export declare enum NotificationType { InApp = "inApp", Native = "native" } /** * The request parameters for the `snap_notify` method. * * @property type - The type of notification to display. * @property message - The message to display in the notification. */ export type NotifyParams = { type: EnumToUnion<NotificationType.Native>; message: string; } | { type: EnumToUnion<NotificationType.InApp>; message: string; } | { type: EnumToUnion<NotificationType.InApp>; message: string; content: ComponentOrElement; title: string; footerLink?: { href: string; text: string; }; }; /** * The result returned by the `snap_notify` method. * * This method does not return anything. */ export type NotifyResult = null; //# sourceMappingURL=notify.d.mts.map