Versions in this module Expand all Collapse all v1 v1.1.0 Aug 5, 2019 v1.0.0 Mar 18, 2019 Changes in this version + var ErrInvalidChainId = errors.New("invalid chain id for signer") + var ErrInvalidSig = errors.New("invalid transaction v, r, s values") + func ChainId(tx *types.Transaction) *big.Int + func CopyBytes(b []byte) (copiedBytes []byte) + func DefaultTestKey() (*ecdsa.PrivateKey, common.Address) + func EncodeRLP(tx *types.Transaction, w io.Writer) error + func EncodeToRLP(tx *types.Transaction) ([]byte, error) + func NewTransaction(nonce uint64, to common.Address, amount *big.Int, gasLimit uint64, ...) *types.Transaction + func Protected(tx *types.Transaction) bool + func Sender(signer Signer, tx *types.Transaction) (common.Address, error) + func SignTx(tx *types.Transaction, s Signer, prv *ecdsa.PrivateKey) (*types.Transaction, error) + func TypeConvert(a *common.Address) *types.Address + func WithSignature(tx *types.Transaction, signer Signer, sig []byte) (*types.Transaction, error) + type EIP155Signer struct + func NewEIP155Signer(chainId *big.Int) EIP155Signer + func (s EIP155Signer) Equal(s2 Signer) bool + func (s EIP155Signer) Hash(tx *types.Transaction) common.Hash + func (s EIP155Signer) Sender(tx *types.Transaction) (common.Address, error) + func (s EIP155Signer) SignatureValues(tx *types.Transaction, sig []byte) (R, S, V *big.Int, err error) + type FrontierSigner struct + func (fs FrontierSigner) Hash(tx *types.Transaction) common.Hash + func (fs FrontierSigner) Sender(tx *types.Transaction) (common.Address, error) + func (fs FrontierSigner) SignatureValues(tx *types.Transaction, sig []byte) (r, s, v *big.Int, err error) + func (s FrontierSigner) Equal(s2 Signer) bool + type HomesteadSigner struct + func (hs HomesteadSigner) Sender(tx *types.Transaction) (common.Address, error) + func (hs HomesteadSigner) SignatureValues(tx *types.Transaction, sig []byte) (r, s, v *big.Int, err error) + func (s HomesteadSigner) Equal(s2 Signer) bool + type Signer interface + Equal func(Signer) bool + Hash func(tx *types.Transaction) common.Hash + Sender func(tx *types.Transaction) (common.Address, error) + SignatureValues func(tx *types.Transaction, sig []byte) (r, s, v *big.Int, err error) + func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) Signer