@metamask/snaps-simulation
Version:
A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment
44 lines • 2.16 kB
text/typescript
import type { DefaultSnapInterface, DefaultSnapInterfaceWithFooter, DefaultSnapInterfaceWithoutFooter, DefaultSnapInterfaceWithPartialFooter, SnapAlertInterface, SnapConfirmationInterface, SnapInterface, SnapInterfaceActions, SnapPromptInterface } from "./types.cjs";
/**
* Ensure that the actual interface is an alert dialog.
*
* @param ui - The interface to verify.
*/
export declare function assertIsAlertDialog(ui: SnapInterface): asserts ui is SnapAlertInterface & SnapInterfaceActions;
/**
* Ensure that the actual interface is a confirmation dialog.
*
* @param ui - The interface to verify.
*/
export declare function assertIsConfirmationDialog(ui: SnapInterface): asserts ui is SnapConfirmationInterface & SnapInterfaceActions;
/**
* Ensure that the actual interface is a Prompt dialog.
*
* @param ui - The interface to verify.
*/
export declare function assertIsPromptDialog(ui: SnapInterface): asserts ui is SnapPromptInterface & SnapInterfaceActions;
/**
* Ensure that the actual interface is a custom dialog.
*
* @param ui - The interface to verify.
*/
export declare function assertIsCustomDialog(ui: SnapInterface): asserts ui is DefaultSnapInterface & SnapInterfaceActions;
/**
* Ensure that the actual interface is a custom dialog with a complete footer.
*
* @param ui - The interface to verify.
*/
export declare function assertCustomDialogHasFooter(ui: DefaultSnapInterface & SnapInterfaceActions): asserts ui is DefaultSnapInterfaceWithFooter & SnapInterfaceActions;
/**
* Ensure that the actual interface is a custom dialog with a partial footer.
*
* @param ui - The interface to verify.
*/
export declare function assertCustomDialogHasPartialFooter(ui: DefaultSnapInterface & SnapInterfaceActions): asserts ui is DefaultSnapInterfaceWithPartialFooter & SnapInterfaceActions;
/**
* Ensure that the actual interface is a custom dialog without a footer.
*
* @param ui - The interface to verify.
*/
export declare function assertCustomDialogHasNoFooter(ui: DefaultSnapInterface & SnapInterfaceActions): asserts ui is DefaultSnapInterfaceWithoutFooter & SnapInterfaceActions;
//# sourceMappingURL=validation.d.cts.map