You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filecoin Metamask snap is installed using filsnap-adapter. Usage flow is represented in the diagram below and described in more detail inside integration steps.
[Optional] Add types for the adapter to your project in case you will interact with snap specific API.
npm i @chainsafe/filsnap-types
Integration steps
Install snap by calling enableFilecoinSnap from @chainsafe/filsnap-adapter package.
This will prompt the user to:
accept the snap installation
accept all snap permissions
This function accepts the configuration object for defining network properties, the same as configure method from Filecoin Snap API.
After successful installation, it will return MetamaskFilecoinSnap object (see Architecture overview for details).
Invoke Filecoin Snap API
MetamaskFilecoinSnap object has an exposed method for obtaining API getFilecoinSnapApi. For more details about exposed API see API documentation.