public override Task <byte[]> Handle(byte[] txData) { var tx = new NonceTx { Inner = ByteString.CopyFrom(txData), Sequence = int.MaxValue }; return(Task.FromResult(tx.ToByteArray())); }
public async Task <byte[]> Handle(byte[] txData) { var nonce = await this.Client.GetNonceAsync(publicKeyHex); var tx = new NonceTx { Inner = ByteString.CopyFrom(txData), Sequence = nonce + 1 }; return(tx.ToByteArray()); }
public virtual async Task <byte[]> Handle(byte[] txData) { var nextNonce = await GetNextNonceAsync(); this.Client.Logger.Log($"[NonceLog] Using nonce {this.NextNonce} for a TX"); var tx = new NonceTx { Inner = ByteString.CopyFrom(txData), Sequence = nextNonce }; return(tx.ToByteArray()); }
public async Task <byte[]> Handle(byte[] txData) { var key = CryptoUtils.BytesToHexString(this.PublicKey); var nonce = await this.Client.GetNonceAsync(key); var tx = new NonceTx { Inner = ByteString.CopyFrom(txData), Sequence = nonce + 1 }; return(tx.ToByteArray()); }