I've setup a private Ethereum node, and I want to send a signed transaction to it. By reading the docs I know that there's an account
Manager type which can access a
Wallet type which has a
SignTx method that I want to use for this purpose. I'm having an issue setting up the account
Manager type to begin this process.
NewManager function requires a type which implements the
Backend interface. The problem here is that I can't find any docs describing (accurately) how to initialize an account
Manager with a
Backend. The only backend available in the account source is
SimulatedBackend meant for testing (source: https://github.com/ethereum/go-ethereum/tree/3fa0fa713bc1508835bdecd7dea78ff09803e327/accounts/abi/bind/backends).
What I've tried:
The docs (here: https://github.com/ethereum/go-ethereum/wiki/Native:-Account-management#keystores-from-go) say that one can be initialized this way:
am := accounts.NewManager("/path/to/keystore", accounts.StandardScryptN, accounts.StandardScryptP);
However, it does not compile as the
accounts.StandardScryptP do not exist, and when replaced with their integer equivilents (
1 respectively), the compile error states that the keystore path argument (
"/path/to/keystore") does not implement the
Backend interface, which makes sense. My guess is that the docs are not updated, and because of that the
NewManager function cannot compile with these arguments.
Docs for the
NewManager type for reference: https://godoc.org/github.com/ethereum/go-ethereum/accounts#NewManager
Does anyone know how to initialize the account manager correctly to begin signing transactions in Go?