Adding Filecoin.js
In this section, we will show how to add Filecoin.js library to your web application.
NodeJS
Step 1: Install Filecoin.js using yarn
// or
$ yarn add filecoin.js
or npm
$ npm install filecoin.js
Step 2: Import module using node.js require or ES6 synthax
const { } = require("filecoin.js");
// or
import { } from "filecoin.js";
Browser
For using Filecoin.js library in broswer, include the core library in your HTML file and you're ready to go!
<script type="text/javascript" src="https://unpkg.com/filecoin.js"></script>