@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
41 lines • 1.16 kB
text/typescript
import { type EnumToUnion } from "../../internals/index.cjs";
import type { ComponentOrElement } from "../interface.cjs";
/**
* 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.cts.map