@metamask/snaps-simulation
Version:
A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment
19 lines • 868 B
JavaScript
/**
* Get the implementation of the `createInterface` hook.
*
* @param controllerMessenger - The controller messenger used to call actions.
* @returns The implementation of the `createInterface` hook.
*/
export function getCreateInterfaceImplementation(controllerMessenger) {
return async (snapId, content, context, contentType) => controllerMessenger.call('SnapInterfaceController:createInterface', snapId, content, context, contentType);
}
/**
* Get the implementation of the `getInterface` hook.
*
* @param controllerMessenger - The controller messenger used to call actions.
* @returns The implementation of the `getInterface` hook.
*/
export function getGetInterfaceImplementation(controllerMessenger) {
return (snapId, id) => controllerMessenger.call('SnapInterfaceController:getInterface', snapId, id);
}
//# sourceMappingURL=interface.mjs.map