@stfil/metalink-filecoin

1.0.6 • Public • Published

MetaLinkFilecoin

License: MIT License

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.

Package Sidebar

Install

npm i @stfil/metalink-filecoin

Weekly Downloads

1

Version

1.0.6

License

(Apache-2.0 AND MIT)

Unpacked Size

1.87 MB

Total Files

7

Last publish

Collaborators

  • stfil