UNPKG

@metamask/snaps-utils

Version:
110 lines 3.3 kB
import { HandlerType } from "./types.mjs"; export const SNAP_EXPORTS = { [HandlerType.OnRpcRequest]: { type: HandlerType.OnRpcRequest, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnTransaction]: { type: HandlerType.OnTransaction, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnCronjob]: { type: HandlerType.OnCronjob, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnNameLookup]: { type: HandlerType.OnNameLookup, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnInstall]: { type: HandlerType.OnInstall, required: false, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnUpdate]: { type: HandlerType.OnUpdate, required: false, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnKeyringRequest]: { type: HandlerType.OnKeyringRequest, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnHomePage]: { type: HandlerType.OnHomePage, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnSettingsPage]: { type: HandlerType.OnSettingsPage, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnSignature]: { type: HandlerType.OnSignature, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnUserInput]: { type: HandlerType.OnUserInput, required: false, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnAssetHistoricalPrice]: { type: HandlerType.OnAssetHistoricalPrice, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnAssetsLookup]: { type: HandlerType.OnAssetsLookup, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnAssetsConversion]: { type: HandlerType.OnAssetsConversion, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, [HandlerType.OnProtocolRequest]: { type: HandlerType.OnProtocolRequest, required: true, validator: (snapExport) => { return typeof snapExport === 'function'; }, }, }; export const SNAP_EXPORT_NAMES = Object.values(HandlerType); //# sourceMappingURL=exports.mjs.map