public string SignTransaction(byte[] privateKey, BigInteger chainId, string to, BigInteger amount, string feeCurrency, string gatewayFeeRecipient, BigInteger gatewayFee, BigInteger nonce, string data) { var transaction = new CeloTransactionChainId(to, amount, nonce, feeCurrency, gatewayFeeRecipient, gatewayFee, data, chainId); return(SignTransaction(privateKey, transaction)); }
public Task <string> SignTransactionAsync(ICeloEthExternalSigner externalSigner, BigInteger chainId, string to, BigInteger amount, string feeCurrency, string gatewayFeeRecipient, BigInteger gatewayFee, BigInteger nonce, string data) { var transaction = new CeloTransactionChainId(to, amount, nonce, feeCurrency, gatewayFeeRecipient, gatewayFee, data, chainId); return(SignTransactionAsync(externalSigner, transaction)); }
public Task <string> SignTransactionAsync(ICeloEthExternalSigner externalSigner, BigInteger chainId, string to, BigInteger amount, BigInteger nonce, string data) { var transaction = new CeloTransactionChainId(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 CeloTransactionChainId(to, amount, nonce, data, chainId); return(SignTransaction(privateKey, transaction)); }
protected async Task SignRLPTransactionAsync(CeloTransactionChainId transaction) { if (ExternalSignerTransactionFormat == ExternalSignerTransactionFormat.RLP) { var signature = await SignAsync(transaction.RawHash, transaction.GetChainIdAsBigInteger()); transaction.SetSignature(signature); } }
public bool VerifyTransaction(string rlp, BigInteger chainId) { var transaction = new CeloTransactionChainId(rlp.HexToByteArray(), chainId); return(transaction.Key.VerifyAllowingOnlyLowS(transaction.RawHash, transaction.Signature)); }
public string GetSenderAddress(string rlp, BigInteger chainId) { var transaction = new CeloTransactionChainId(rlp.HexToByteArray(), chainId); return(transaction.Key.GetPublicAddress()); }
public byte[] GetPublicKey(string rlp, BigInteger chainId) { var transaction = new CeloTransactionChainId(rlp.HexToByteArray(), chainId); return(transaction.Key.GetPubKey()); }
private async Task <string> SignTransactionAsync(ICeloEthExternalSigner externalSigner, CeloTransactionChainId transaction) { await transaction.SignExternallyAsync(externalSigner).ConfigureAwait(false); return(transaction.GetRLPEncoded().ToHex()); }
private string SignTransaction(byte[] privateKey, CeloTransactionChainId transaction) { transaction.Sign(new EthECKey(privateKey, true)); return(transaction.GetRLPEncoded().ToHex()); }
public abstract Task SignAsync(CeloTransactionChainId transaction);