@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
22 lines • 826 B
text/typescript
import type { Cronjob } from "../permissions.cjs";
/**
* The request parameters for the `snap_scheduleBackgroundEvent` method.
*
* Note: The date generated from a duration will be represented in UTC.
*
* @property date - The ISO 8601 date of when to fire the background event.
* @property duration - The ISO 8601 duration of when to fire the background event.
* @property request - The request to be called when the event fires.
*/
export type ScheduleBackgroundEventParams = {
date: string;
request: Cronjob['request'];
} | {
duration: string;
request: Cronjob['request'];
};
/**
* The result returned by the `snap_scheduleBackgroundEvent` method, which is the ID of the scheduled event.
*/
export type ScheduleBackgroundEventResult = string;
//# sourceMappingURL=schedule-background-event.d.cts.map