Exemplo n.º 1
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            var hex = (string)reader.Value;
            var op  = new OutPoint();

            op.FromBytes(Encoders.Hex.DecodeData(hex));

            return(op);
        }
Exemplo n.º 2
0
            internal static Coin FromJsonCoin(JToken obj)
            {
                OutPoint outpoint = new OutPoint();

                outpoint.FromBytes(Encoders.Hex.DecodeData((string)obj["Outpoint"]));
                TxOut txout = new TxOut();

                txout.FromBytes(Encoders.Hex.DecodeData((string)obj["TxOut"]));
                return(new Coin(outpoint, txout));
            }
Exemplo n.º 3
0
			internal static Coin FromJsonCoin(JToken obj)
			{
				OutPoint outpoint = new OutPoint();
				outpoint.FromBytes(Encoders.Hex.DecodeData((string)obj["Outpoint"]));
				TxOut txout = new TxOut();
				txout.FromBytes(Encoders.Hex.DecodeData((string)obj["TxOut"]));
				return new Coin(outpoint, txout);
			}
 /// <inheritdoc />
 public void Confirm()
 {
     base.Confirm(o => { var x = new OutPoint(); x.FromBytes(o); return(this.Exists(x, out _)); });
 }