@saturn-chain/dlt-rest-api

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

Usage no npm install needed!

<script type="module">
  import saturnChainDltRestApi from 'https://cdn.skypack.dev/@saturn-chain/dlt-rest-api';
</script>

README

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();