Пример #1
0
        public async void Send()
        {
            var gtxBytes = this.GtxObject.Serialize();

            await this.RestClient.PostTransaction(gtxBytes);

            this.GtxObject = null;
        }
Пример #2
0
        public string Serialize()
        {
            var gtxBody = new List <object>();

            gtxBody.Add(GetGtvTxBody());
            gtxBody.Add(this.Signatures.ToArray());

            return(Util.ByteArrayToString(Gtx.ArgToGTXValue(gtxBody.ToArray()).Encode()));
        }
Пример #3
0
        ///<summary>
        ///Create a new Transaction.
        ///</summary>
        ///<param name = "signers">Array of signers (can be null).</param>
        ///<returns>New Transaction object.</returns>
        public Transaction NewTransaction(byte[][] signers)
        {
            Gtx newGtx = new Gtx(this.BlockchainRID);

            foreach (byte[] signer in signers)
            {
                newGtx.AddSignerToGtx(signer);
            }

            Transaction req = new Transaction(newGtx, this.RestApiClient);

            return(req);
        }
Пример #4
0
 public Transaction(Gtx gtx, RESTClient restClient)
 {
     this.GtxObject  = gtx;
     this.RestClient = restClient;
 }