JSPM

@stfil/metalink-filecoin

1.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q73108F
  • License (Apache-2.0 AND MIT)

MetaLinkFilecoin(plugin) to enable MetaMask users interaction with filecoin dapps.

Package Exports

  • @stfil/metalink-filecoin
  • @stfil/metalink-filecoin/src/index.ts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stfil/metalink-filecoin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.