Scorechain SDK
Introduction
The goal of the Scorechain SDK for JavaScript is to simplify the integration of the Scorechain API into JavaScript applications. By providing a set of convenient functions and methods, developers can easily interact with the Scorechain API and access its features. This SDK aims to streamline the process of integrating Scorechain's blockchain analytics capabilities into JavaScript projects, enabling developers to leverage the power of Scorechain's technology with ease.
Getting Started
How to install
npm install scorechain-sdk --save
Usage
- With Typescript
import { ScorechainConnector } from "scorechain-sdk";
const connector = new ScorechainConnector("MyScorechainApiKey");
- With Javascript
const { ScorechainConnector } = require("scorechain-sdk")
const connector = new ScorechainConnector("MyScorechainApiKey");
Proof of Authenticity
The ScorechainConnector includes built-in proof of authenticity checks, which validate message signatures to ensure secure communication. If you prefer to disable these checks, you can initialize the connector as follows:
const connector = new ScorechainConnector("MyScorechainApiKey", false);
Public Key
To ensure seamless updates in case our backend private keys change, we provide a function to refresh the embedded public keys automatically. You can invoke this function as shown:
const connector = new ScorechainConnector("MyScorechainApiKey");
await connector.updateScorechainPublicKey();
You can find more about the Proof Of Authenticity in the dedicated page
Examples
Please refer to the readme on NPM for more information.