crypto

package
v1.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 16 Imported by: 8

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

func PrivateKeySignerFn(key *ecdsa.PrivateKey, chainID *big.Int) bind.SignerFn

Types

type SignerFactory

type SignerFactory func(chainID *big.Int) SignerFn

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

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.

func SignerFnFromBind added in v1.9.3

func SignerFnFromBind(fn bind.SignerFn) SignerFn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL