UNPKG

@ton3/liteclient

Version:
26 lines 929 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MulticastClient = void 0; const blockchain_1 = require("../blockchain"); class MulticastClient extends blockchain_1.BlockchainClient { constructor(clients) { super(null); this.clients = clients; const exclude = [ 'constructor', 'shardIdent', 'globalVersion', 'extBlkRef', 'blkMasterInfo', 'blkPrevInfo', 'blkInfo' ]; const props = Object.getOwnPropertyNames(blockchain_1.BlockchainClient.prototype) .filter(prop => !exclude.includes(prop)); props.forEach((prop) => { this[prop] = (...args) => Promise.any(this.clients.map(client => client[prop](...args))).catch(err => console.log(err)); }); } } exports.MulticastClient = MulticastClient; //# sourceMappingURL=index.js.map