UNPKG

@hiero-ledger/sdk

Version:
3 lines (2 loc) 1.17 kB
import t from"./client/WebClient.js";import e from"./account/AccountBalanceQuery.js";import n from"./account/AccountInfoQuery.js";import c from"./account/AccountRecordsQuery.js";import r from"./transaction/TransactionReceiptQuery.js";class i{constructor(e={}){null==e||null==e.client?this._client=t.forName(e.networkName||"local-node"):this._client=e.client}static fromClient(t){return new i({client:t})}getLedgerId(){return this._client.ledgerId}getNetwork(){return this._client.network}getMirrorNetwork(){return this._client.mirrorNetwork}getAccountBalance(t){return(new e).setAccountId(t).execute(this._client)}getAccountInfo(t){return(new n).setAccountId(t).execute(this._client)}getAccountRecords(t){return(new c).setAccountId(t).execute(this._client)}getTransactionReceipt(t){return(new r).setTransactionId(t).execute(this._client)}async sendTransaction(t){return await t.execute(this._client)}async sendQuery(t){return await t.execute(this._client)}async waitForReceipt(t){return await t.getReceipt(this._client)}async call(t){return await t.execute(this._client)}close(){this._client.close()}}export{i as default}; //# sourceMappingURL=LocalProviderWeb.js.map