Getting started

Let's see some basic usage.

Welcome to the Vulcan API JS.

Installation

YARN

yarn add vulcan-api-js

NPM

npm install vulcan-api-js --save

TypeScript typings are included.

React Native is now supported, but you must install the react-native-get-random-values npm module and import it before the vulcan-api-js module.

Usage

First, you need to create a keystore, this is where your certificate is stored.

You will have to save it somewhere as that's what gets registered in Vulcan.

const {Keystore} = require('vulcan-api-js');
const fs = require('fs');

const main = async () => {
    const keystore = new Keystore();
    await keystore.init();
    
    fs.writeFileSync("keystore.json", keystore.dumpToJsonString(), { encoding: 'utf-8' });
};

main();

Then you will have to register the account.

When you have your keystore and account generated, you can load them and use the SDK.

All the methods in the Vulcan API JS are async.

Last updated

Was this helpful?