Bond JS SDK

The Bond JS SDK is designed for developers looking to connect with the Bond.network. It's built with TypeScript, making it simpler to interact with our APIs. With the SDK, you don't need to handle the GraphQL details. Instead, you can focus on building and integrating features, ensuring users can easily manage their social data and identities across platforms.

The SDK version is currently in beta, the namespace will probably change later

Installation

To install the package, simply run:

npm install @bondlab/client

Basic Usage

Initialise the client with the preferred environment and options.

import BondHub, { Env, Blockchain } from '@bondlab/client'

const bondHUb = new BondHub({
  appId: '1',
  apiKey: '3635df8e-419f-11ee-be56-0242ac120002',
  env: Env.Production,
  chain: Blockchain.POLYGON,
  provider: provider
})

Parameters

  • appId - the app id you obtained from bond project management platform after you create your project

  • apiKey- the api key you obtained from bond project management platform from after you create your project

  • env - (optional) Env chooses the endpoints. We have staging and production. (The default value is Env.Production).

  • chain - (optional) The blockchain you want to connect with. Now we support POLYGON

  • provider - The corresponding web3 provider of the given chain.

Last updated