ethereum

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSigner

func NewSigner(privateKeyInHex string, chainID *big.Int) (imx.L1Signer, error)

NewSigner creates a new Signer object with the given user's privateKey and chainID.

Types

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

Signer implements L1Signer interface.

func (*Signer) GetAddress

func (b *Signer) GetAddress() string

GetAddress gets the address which is the public key associated with this signer.

func (*Signer) SignMessage

func (b *Signer) SignMessage(message string) ([]byte, error)

SignMessage signs the given message using the private key and returns the signature.

func (*Signer) SignTx

func (b *Signer) SignTx(tx *types.Transaction) (*types.Transaction, error)

SignTx signs the given transaction using this signer and private key. Returns the signed transaction.

Jump to

Keyboard shortcuts

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