Bright SDK

The Bright SDK is a set of javascript tools to interact with the Bright Union risk aggregator protocol on Ethereum, Binance Smart Chain, and Polygon blockchains.

Bright SDK is a javascript node Js module available on npm as @brightunion/sdk.

It will allow you to easily integrate the Bright Union risk aggregation engine into your app to start offering the best crypto coverage rates to your customers.

At the moment, the SDK supports the following three risk coverage providers:

You can find product-specific details in each provider's catalog if needed.

To start using the Bright module, you would only have to provide a Web3 Js instance to the BrightClient. The BrightClient instance will be the main class where you will call the core routines to get and compare crypto coverages from our distributors, as shown on the Bright Union App.

Simple Example:

const BrightClient = require('@Brightunion/SDK');

const brightClient= new BrightClient({ <web3_instance> });

await brightClient.initialize();

const catalogItemInsurace = { productId: <Insurace_product_id> };

const quote = await brightClient.getQuoteFrom( <distributorName>, <amount> , <currency>, <period>, <catalog_item>);

brightClient.buyQuote( <quote> ).then(data => {
  // transaction done

Last updated