UNPKG

stellar-plus

Version:

beta version of stellar-plus, an all-in-one sdk for the Stellar blockchain

18 lines (17 loc) 682 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processSpecEntryStream = processSpecEntryStream; /* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/ban-ts-comment */ const stellar_sdk_1 = require("@stellar/stellar-sdk"); // extracted from stellar-sdk // https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/utils.ts function processSpecEntryStream(buffer) { const reader = new stellar_sdk_1.cereal.XdrReader(buffer); const res = []; while (!reader.eof) { // @ts-ignore res.push(stellar_sdk_1.xdr.ScSpecEntry.read(reader)); } return res; }