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