fullstack-development / pab-api-js

PAB API JavaScript wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pab-api-js

JavaScript wrapper for PAB (Plutus Application Backend) API. Works in both the browser and on Node.js. Includes TypeScript types definitions.

Installation

  npm install --save git+https://github.com/fullstack-development/pab-api-js.git

Usage

import { Pab } from 'pab-api-js';

const pab = new Pab('http://localhost:9080/');

const getReport = async () => {
  try {
    const result = await pab.getFullReport();
    console.log(result);
  } catch (error) {
    console.log(error);
  }
};

getReport();

Development

To bundle the result code, run

  npm run build

To format code (in folder src)

  npm run format

For tests, you first need to run PAB with any contract

  npm run test

About

PAB API JavaScript wrapper

License:Apache License 2.0


Languages

Language:TypeScript 99.5%Language:JavaScript 0.5%