0.1.5 • Published 1 year ago

@interplanetary-lab/smartcontract-supervisor-js v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Smartcontract Supervisor JS

Axios interaction with Smartcontract Supervisor's APIs.

Table of Contents

Overview

Installation

$ npm install @interplanetary-lab/smartcontract-supervisor-js

Usage

Once installed, you can use the contracts in the library by importing them:

import SmartContractSupervisor from '@interplanetary-lab/smartcontract-supervisor-js';

//...

try {
    const supervisor = new SmartContractSupervisor(
        process.env.SUPERVISOR_API_URL
        process.env.SUPERVISOR_API_KEY
    );

    const response = await supervisor.validatorSign(validator, wallet);
    // Do something
} catch (e) {
    console.error(`${e.status} - ${e.message}`)
}