Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePrivKey ¶ added in v1.9.3
func EncodePrivKey(priv *ecdsa.PrivateKey) hexutil.Bytes
EncodePrivKey encodes the given private key in 32 bytes
func EncodePrivKeyToString ¶ added in v1.9.3
func EncodePrivKeyToString(priv *ecdsa.PrivateKey) string
func PrivateKeySignerFn ¶
Types ¶
type SignerFactory ¶
SignerFactory creates a SignerFn that is bound to a specific ChainID
func SignerFactoryFromConfig ¶
func SignerFactoryFromConfig(l log.Logger, privateKey, mnemonic, hdPath string, signerConfig opsigner.CLIConfig) (SignerFactory, common.Address, error)
SignerFactoryFromConfig considers three ways that signers are created & then creates single factory from those config options. It can either take a remote signer (via opsigner.CLIConfig) or it can be provided either a mnemonic + derivation path or a private key. It prefers the remote signer, then the mnemonic or private key (only one of which can be provided).
type SignerFn ¶
type SignerFn func(context.Context, common.Address, *types.Transaction) (*types.Transaction, error)
SignerFn is a generic transaction signing function. It may be a remote signer so it takes a context. It also takes the address that should be used to sign the transaction with.