1.1.0 • Published 6 months ago
@ultraos/ultra-api-lib v1.1.0
Ultra API Library
An API library for the Ultra Blockchain with focus on information for the Web and Applications.
Includes type safety for most commonly used endpoints and Ultra related tables and functionality.
Usage
import { UltraAPI, connect } from '@ultraos/ultra-api-lib';
let client: UltraAPI | undefined;
async function setup() {
client = await connect('some antelope blockchain endpoint');
if (!client) {
// could not connect
return;
}
const accountBalance = await client.account('eosio').getBalance();
console.log(accountBalance);
const info = await client.chain.getInfo();
console.log(info);
}
Development
- Install Node 18+
Install Library
To install dependencies:
npm i
Test
npm run test
Build Library
npm run build