UNPKG

locklift

Version:

Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.

34 lines (33 loc) 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TracingTransport = void 0; const gql_1 = require("./gql"); const proxy_1 = require("./proxy"); const jrpc_1 = require("./jrpc"); class TracingTransport { provider; connection; constructor(provider, connection) { this.provider = provider; this.connection = connection; } static fromGqlConnection(endpoint, provider) { const connection = new gql_1.TracingGqlConnection(provider, endpoint); return new TracingTransport(provider, connection); } static fromProxyConnection(provider) { const connection = new proxy_1.TracingProxyConnection(provider); return new TracingTransport(provider, connection); } static fromJrpcConnection(provider) { const connection = new jrpc_1.TracingJrpcConnection(provider); return new TracingTransport(provider, connection); } async getAccountData(address) { return this.connection.getAccountData(address); } async getAccountsData(accounts) { return this.connection.getAccountsData(accounts); } } exports.TracingTransport = TracingTransport;