static public QBitNinja.Client.Models.ExtendedBlockInformation Create(ExtendedBlockInformation block) { var extendedBlockInformation = new QBitNinja.Client.Models.ExtendedBlockInformation(); extendedBlockInformation.Size = block.size; extendedBlockInformation.StrippedSize = block.strippedSize; extendedBlockInformation.TransactionCount = block.transactionCount; extendedBlockInformation.BlockSubsidy = block.blockSubsidy; extendedBlockInformation.BlockReward = block.blockReward; return(extendedBlockInformation); }
public QBitNinja.Client.Models.GetBlockResponse Result() { //UnityEngine.Debug.Log(UnityEngine.JsonUtility.ToJson(this,true)); var result = new QBitNinja.Client.Models.GetBlockResponse(); result.AdditionalInformation = BlockInformation.Create(additionalInformation); result.ExtendedInformation = extendedInformation.Length == 0?null:ExtendedBlockInformation.Create(UnityEngine.JsonUtility.FromJson <ExtendedBlockInformation>(extendedInformation)); result.Block = block.Length == 0?null:new NBitcoin.Block(NBitcoin.DataEncoders.Encoders.Hex.DecodeData(block)); return(result); }