@zondax/beryx
v2.0.2
Published
Beryx indexes and exposes via a public API Filecoin historical and real-time data. We provide historical transactions of every account, interactions with multisig accounts, fees details and many more.
Downloads
86
Readme
Beryx Client
Abstract
Beryx indexes and exposes via a public API Filecoin historical and real-time data. We provide historical transactions of every account, interactions with multisig accounts, fees details and many more.
How to use it
Get a valid token
Please, go through our auth flow to get a valid token. It will be required to consume the API. :link: Let's go to the auth flow
Add it to your project
Add the package to your project with these commands, depending on the package manager you prefer
yarn add @zondax/beryx
npm add --save @zondax/beryx
Instantiate new client
The only requirement the client needs is the token.
import Beryx from '@zondax/beryx'
const jwt = process.env.JWT_TOKEN
const client = new Beryx.Filecoin({ jwt })
Notes
- To access the API,
FilecoinAPI
was deprecated and replaced by justFilecoin
. It will be removed in future releases.
Support to multiple networks
It is possible to choose between multiple networks to interact with. In order to do it, you just need to pass the desired one on te client configuration.
import Beryx from '@zondax/beryx'
const jwt = process.env.JWT_TOKEN
const client = new Beryx.Filecoin({ jwt, network: 'wallaby' })
Use the client
These are just some examples on what you can do, and how you can do it. Please, check the typescript interface to find the whole set of methods.
const response1 = await client.data.getTipset(1)
const response2 = await client.tools.convertHash('bafy2bzacecktivolqszdw4m6p2l4xd46bypkaqfcuw354vo5emoplwupvhsl6', 'fil')
Documentation
Visit our documentation website to know more about other exciting projects. :link: Let's go to the website