UNPKG

@siglesiasg/node-red-hyperledger-fabric-gateway

Version:

Hyperledger Fabric 2.x nodes for node-red with latest fabric-gateway library

16 lines 617 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildChannelInfoModel = exports.ChannelInfoModel = void 0; const common_1 = require("@hyperledger/fabric-protos/lib/common"); class ChannelInfoModel { } exports.ChannelInfoModel = ChannelInfoModel; function buildChannelInfoModel(chainInfoBin) { const info = common_1.BlockchainInfo.deserializeBinary(chainInfoBin); return { height: info.getHeight(), lastBlockHash: info.getCurrentblockhash_asB64() }; } exports.buildChannelInfoModel = buildChannelInfoModel; //# sourceMappingURL=channel-info.model.js.map