Parse Stellar Thresholds

node v10.24.1
version: 1.0.1
endpointsharetweet
const StellarBase = require('stellar-base') const jsxdr = require('js-xdr') const _ = require('lodash') let thresholds = {} let thresholds_buf = StellarBase.xdr.Thresholds .fromXDR('AAEDBA==', 'base64') console.log(thresholds_buf); _.each([...thresholds_buf], (weight, i) => { let threshold = StellarBase.xdr.ThresholdIndices.fromXDR([0,0,0,i]) thresholds[threshold.name] = weight }) console.log(thresholds)
Loading…

no comments

    sign in to comment