Example #1
0
 void GetBlockResponse(QBitNinja.Client.Models.GetBlockResponse result, Network network)
 {
     UnityEngine.Debug.Log(result.AdditionalInformation.BlockId);
     UnityEngine.Debug.Log(result.AdditionalInformation.BlockHeader);
     UnityEngine.Debug.Log(result.AdditionalInformation.Height);
     UnityEngine.Debug.Log(result.AdditionalInformation.Confirmations);
     UnityEngine.Debug.Log(result.ExtendedInformation);
     UnityEngine.Debug.Log(NBitcoin.DataEncoders.Encoders.Hex.EncodeData(result.Block.ToBytes()));
     UnityEngine.Debug.Log(result.Block.GetHash());
 }
        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);
        }