@zondax/beryx
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Beryx Client

License npm version GithubActions

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. 🔗 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 just Filecoin. 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. 🔗 Let's go to the website

Package Sidebar

Install

npm i @zondax/beryx

Weekly Downloads

98

Version

2.0.2

License

Apache-2.0

Unpacked Size

70.1 kB

Total Files

55

Last publish

Collaborators

  • ftheirs
  • carlosala
  • jleni