@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
1 lines • 727 B
Source Map (JSON)
{"version":3,"file":"provider.mjs","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":"","sourcesContent":["import type { BaseProvider } from '@metamask/providers';\n\nimport type { RequestFunction } from './methods';\n\ntype BaseProviderInstance = InstanceType<typeof BaseProvider>;\n\n/**\n * The `window.ethereum` provider for Snaps.\n */\nexport type SnapsEthereumProvider = Pick<\n BaseProviderInstance,\n // Snaps have access to a limited set of methods. This is enforced by the\n // `proxyStreamProvider` function in `@metamask/snaps-execution-environments`.\n 'request'\n>;\n\n/**\n * The `window.snap` provider.\n */\nexport type SnapsProvider = {\n request: RequestFunction;\n};\n"]}