public async void Send() { var gtxBytes = this.GtxObject.Serialize(); await this.RestClient.PostTransaction(gtxBytes); this.GtxObject = null; }
public string Serialize() { var gtxBody = new List <object>(); gtxBody.Add(GetGtvTxBody()); gtxBody.Add(this.Signatures.ToArray()); return(Util.ByteArrayToString(Gtx.ArgToGTXValue(gtxBody.ToArray()).Encode())); }
///<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); }
public Transaction(Gtx gtx, RESTClient restClient) { this.GtxObject = gtx; this.RestClient = restClient; }