UNPKG

@bandprotocol/bandchain.js

Version:

TypeScript library for Cosmos SDK and BandChain

19 lines (18 loc) 638 B
export class LCDQueryClient { req; constructor({ requestClient }) { this.req = requestClient; this.chainID = this.chainID.bind(this); this.eVMValidators = this.eVMValidators.bind(this); } /* ChainID queries the chain ID of this node */ async chainID(_params = {}) { const endpoint = `bandchain/v1/chain_id`; return await this.req.get(endpoint); } /* EVMValidators queries current list of validator's address and power */ async eVMValidators(_params = {}) { const endpoint = `bandchain/v1/evm-validators`; return await this.req.get(endpoint); } }