dlt-function: implementation of EthProviderInterface
Implements the functions needed to interface the smart contract functions and events with the dlt services exposed via API. It communicates to the dlt services via the @saturn-chain/dlt-rest-api
library and expect transactions to be signed by the @saturn-chain/wallet-custody-rest-api
.
Usage:
npm i --save @saturn-chain/dlt-function
Includes typescript types declaration
Documentation
import { DLTNodeApi } from "@saturn-chain/dlt-rest-api";
import { DLTProtocolEnum } from "@saturn-chain/dlt-rest-api/dist/domain/blockchain";
import { DLTInterface } from "@saturn-chain/dlt-functions";
const node = new DLTNodeApi("http://localhost:8080", DLTProtocolEnum.Ethererum);
const walletAddress = "0x123...999";
const wallet = node.getWallet(walletAddress));
const intf = new DLTInterface(node, wallet);