public Task <string> SignTransactionAsync(IEthExternalSigner externalSigner, string to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit) { var transaction = new LegacyTransaction(to, amount, nonce, gasPrice, gasLimit); return(SignTransactionAsync(externalSigner, transaction)); }
protected async Task SignRLPTransactionAsync(LegacyTransaction transaction) { if (ExternalSignerTransactionFormat == ExternalSignerTransactionFormat.RLP) { var signature = await SignAsync(transaction.GetRLPEncodedRaw()).ConfigureAwait(false); transaction.SetSignature(signature); } }
protected async Task SignHashTransactionAsync(LegacyTransaction transaction) { if (ExternalSignerTransactionFormat == ExternalSignerTransactionFormat.Hash) { var signature = await SignAsync(transaction.RawHash).ConfigureAwait(false); transaction.SetSignature(signature); } }
public abstract Task SignAsync(LegacyTransaction transaction);
public string SignTransaction(byte[] privateKey, string to, BigInteger amount, BigInteger nonce, string data) { var transaction = new LegacyTransaction(to, amount, nonce, data); return(SignTransaction(privateKey, transaction)); }
private async Task <string> SignTransactionAsync(IEthExternalSigner externalSigner, LegacyTransaction transaction) { await transaction.SignExternallyAsync(externalSigner).ConfigureAwait(false); return(transaction.GetRLPEncoded().ToHex()); }
private string SignTransaction(byte[] privateKey, LegacyTransaction transaction) { transaction.Sign(new EthECKey(privateKey, true)); return(transaction.GetRLPEncoded().ToHex()); }