Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECSignature ¶
ECSignature contains the parameters of an elliptic curve signature
type EthRPCSigner ¶
type EthRPCSigner struct {
// contains filtered or unexported fields
}
EthRPCSigner is a signer that uses a call to Ethereum JSON-RPC method `eth_call` to produce a signature
func (*EthRPCSigner) EthSign ¶
func (e *EthRPCSigner) EthSign(message []byte, signerAddress common.Address) (*ECSignature, error)
EthSign signs a message via the `eth_sign` Ethereum JSON-RPC call
type LocalSigner ¶
type LocalSigner struct {
// contains filtered or unexported fields
}
LocalSigner is a signer that produces an `eth_sign`-compatible signature locally using a private key
func (*LocalSigner) EthSign ¶
func (l *LocalSigner) EthSign(message []byte, signerAddress common.Address) (*ECSignature, error)
EthSign mimicks the signing of `eth_sign` locally its supplied private key
func (*LocalSigner) GetSignerAddress ¶
func (l *LocalSigner) GetSignerAddress() common.Address
GetSignerAddress returns the signerAddress corresponding to LocalSigner's private key
type Signer ¶
type Signer interface {
EthSign(message []byte, signerAddress common.Address) (*ECSignature, error)
}
Signer defines the methods needed to act as a elliptic curve signer
func NewEthRPCSigner ¶
NewEthRPCSigner instantiates a new EthRPCSigner
func NewLocalSigner ¶
func NewLocalSigner(privateKey *ecdsa.PrivateKey) Signer
NewLocalSigner instantiates a new LocalSigner
type TestSigner ¶
type TestSigner struct{}
TestSigner generates `eth_sign` signatures for test accounts available on the test Ethereum node Ganache
func (*TestSigner) EthSign ¶
func (t *TestSigner) EthSign(message []byte, signerAddress common.Address) (*ECSignature, error)
EthSign generates an `eth_sign` equivalent signature using an public/private key pair hard-coded in the constants package.