npm.io
1.0.14 • Published 11 months ago

@saturn-chain/dlt-rest-api

Licence
ISC
Version
1.0.14
Deps
2
Size
46 kB
Vulns
21
Weekly
0

dlt-rest-api: access the dlt-services via http api

Expose an object that encapsulates the web api exposed by the dlt-service process.

Usage:

npm i --save @saturn-chain/dlt-rest-api

Includes typescript types declaration

Documentation

import { DLTNodeApi } from "@saturn-chain/dlt-rest-api";
import { DLTProtocolEnum } from "@saturn-chain/dlt-rest-api/dist/domain/blockchain";
const node = new DLTNodeApi("http://localhost:8080", DLTProtocolEnum.Ethererum);

const walletAddress = "0x123...999";
const wallet = node.getWallet(walletAddress));
const balance: bigint = await wallet.getBalance();