The Fula Client Library
Fula client lets you connect your web application to the Box using libp2p. It helps DApp developers to use a Box as the back-end for their applications. You can use the File and Graph APIs to store and retrieve your data.
Installation
The Fula client is available in javascript, and it can be installed like any other NPM package:
npm i @functionland/fula
Alternatively, you can use the CDN version:
<script src="https://cdn.jsdelivr.net/npm/@functionland/fula/dist/index.js"></script>
Usage
Once you've imported the package in your project, in order to connect to your Box you should create a client:
import {createClient} from '@functionland/fula'
const fulaClient = await createClient();
Now that you have a Fula client instance, you can connect it to the Box server. You must have the base58 PeerID string provided by your Box server.
await fulaClient.connect(serverId)
Helper Libraries
In addition to the Fula client library you might also find one of our framework helpers useful.
We currently support:
What Next?
Now that you are up and running, head on over to the Fula Reference API to see everything you can do with Box.
WIP Alert
Please note: these instructions remain a work in progress as the Fula API evolves. Make sure to check back soon for more details!