eip155

package
v0.0.0-...-ad1a03f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 6 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 {
	R, S, V *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
	Signature
}

func NewTransaction

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

Jump to

Keyboard shortcuts

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