Open GiovanniBraconi opened 22 hours ago
why don't use this method to sign the tnx?
// SignTx signs the transaction using the given signer and private key.
func SignTx(tx *Transaction, s Signer, prv *ecdsa.PrivateKey) (*Transaction, error) {
h := s.Hash(tx)
sig, err := crypto.Sign(h[:], prv)
if err != nil {
return nil, err
}
return tx.WithSignature(s, sig)
}
Hi @hadv 😃, thanks for the help!
In my setup, I'm creating private keys directly within AWS KMS. Due to security restrictions in KMS, I can't access the private keys directly; I can only obtain the associated public keys.
I've been following this approach: https://jonathanokz.medium.com/secure-an-ethereum-wallet-with-a-kms-provider-2914bd1e4341
As a sanity check, can you recover the address from the signed tx and verify that it matches an account with funds?
I'm encountering an issue where
BalanceAt()
correctly shows a balance of 5 * 10^16 wei for a wallet on the Sepolia testnet. However, when callingSendTransaction()
to send 1 wei to a second wallet , I get an error indicating the balance is 0:Output
Code (main.go)