コード例 #1
0
        public JObject ToJObject()
        {
            var o = new JObject();

            o["txid"]       = TxId.ToString();
            o["systemFee"]  = SystemFee.ToString();
            o["networkFee"] = NetworkFee.ToString();
            o["fee"]        = TotalFee.ToString();
            return(o);
        }
コード例 #2
0
ファイル: Transaction.cs プロジェクト: BhpDevTeam/bhp
        public virtual JObject ToJson()
        {
            JObject json = new JObject();

            json["txid"]       = Hash.ToString();
            json["size"]       = Size;
            json["type"]       = Type;
            json["version"]    = Version;
            json["attributes"] = Attributes.Select(p => p.ToJson()).ToArray();
            json["vin"]        = Inputs.Select(p => p.ToJson()).ToArray();
            json["vout"]       = Outputs.Select((p, i) => p.ToJson((ushort)i)).ToArray();
            json["sys_fee"]    = SystemFee.ToString();
            json["net_fee"]    = NetworkFee.ToString();
            json["tx_fee"]     = TxFee.ToString();
            json["scripts"]    = Witnesses.Select(p => p.ToJson()).ToArray();
            return(json);
        }