@stfil/metalink-filecoin v1.0.6
MetaLinkFilecoin
MetaLinkFilecoin snap (plugin) enables Filecoin network inside Metamask and by doing this provides DAPPs easy integration.
Architecture
MetaLinkFilecoin snap is installed using metalink-filecoin-adapter. Usage flow is represented in the diagram below.
How to integrate into the project
Prerequisites
Add metalink-filecoin-adapter and metalink-filecoin-types package to your project
npm i @stfil/metalink-filecoin-adapter
npm i @stfil/metalink-filecoin-types
Steps for usage
Install snap
Install snap by calling enableMetaLinkFilecoinSnap
from @stfil/metalink-filecoin-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 MetaLinkFilecoin Snap API
. After successful installation, it will return MetaLinkFilecoinSnap
object.
Invoke MetaLinkFilecoin Snap API
MetaLinkFilecoinSnap
object has an exposed method for obtaining API getApi
.
For more details about exposed API see API documentation.