eip155

package
v0.0.0-...-575f8db Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EIP155

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

func NewEIP155

func NewEIP155(cID int64) EIP155

func (*EIP155) Hash

func (s *EIP155) Hash(tx *types.Transaction) common.Hash

func (*EIP155) HashExt

func (s *EIP155) HashExt(tx *Transaction) common.Hash

func (*EIP155) IV

func (s *EIP155) IV(v *big.Int) int64

func (*EIP155) NewEIP155Signer

func (e155 *EIP155) NewEIP155Signer(ec *ecc.ECC, key string) *EIP155Signer

func (*EIP155) V

func (s *EIP155) V(iv int64) *big.Int

type EIP155Signer

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

func (*EIP155Signer) BuildKey

func (s *EIP155Signer) BuildKey()

func (*EIP155Signer) Sign

func (s *EIP155Signer) Sign(hash []byte) *Signature

func (*EIP155Signer) Verify

func (s *EIP155Signer) Verify(si *Signature, hash []byte) (bool, string)

type Signature

type Signature struct {
	V *big.Int
	R *big.Int
	S *big.Int
}

type Signer

type Signer interface {
	Sign(hash []byte) *Signature
	Verify(si *Signature, hash []byte) (bool, string)
}

type Transaction

type Transaction struct {
	AccountNonce uint64
	Price        *big.Int
	GasLimit     uint64
	Recipient    *common.Address
	Amount       *big.Int
	Payload      []byte

	// Signature values
	V *big.Int
	R *big.Int
	S *big.Int
}

func NewTransaction

func NewTransaction(nonce uint64, to *common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *Transaction

func (*Transaction) SetData

func (tx *Transaction) SetData(d []byte)

func (*Transaction) SetTo

func (tx *Transaction) SetTo(to common.Address)

func (*Transaction) ToCallArg

func (tx *Transaction) ToCallArg(From common.Address) interface{}

func (*Transaction) ToMsg

func (tx *Transaction) ToMsg(From common.Address) ethereum.CallMsg

Jump to

Keyboard shortcuts

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