signer

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewSignerClient

func NewSignerClient(endpoint string) (*Client, error)

func (*Client) SignTransaction

func (s *Client) SignTransaction(ctx context.Context, chainID *big.Int, from common.Address, tx *types.Transaction) (*types.Transaction, error)

type TransactionArgs

type TransactionArgs struct {
	From                 *common.Address `json:"from"`
	To                   *common.Address `json:"to"`
	Gas                  *hexutil.Uint64 `json:"gas"`
	GasPrice             *hexutil.Big    `json:"gasPrice"`
	MaxFeePerGas         *hexutil.Big    `json:"maxFeePerGas"`
	MaxPriorityFeePerGas *hexutil.Big    `json:"maxPriorityFeePerGas"`
	Value                *hexutil.Big    `json:"value"`
	Nonce                *hexutil.Uint64 `json:"nonce"`

	// We accept "data" and "input" for backwards-compatibility reasons.
	// "input" is the newer name and should be preferred by clients.
	// Issue detail: https://github.com/ethereum/go-ethereum/issues/15628
	Data  *hexutil.Bytes `json:"data"`
	Input *hexutil.Bytes `json:"input"`

	AccessList *types.AccessList `json:"accessList,omitempty"`
	ChainID    *hexutil.Big      `json:"chainId,omitempty"`
}

TransactionArgs represents the arguments to construct a new transaction or a message call.

func NewTransactionArgsFromTransaction

func NewTransactionArgsFromTransaction(chainID *big.Int, from common.Address, tx *types.Transaction) *TransactionArgs

NewTransactionArgsFromTransaction creates a TransactionArgs struct from an EIP-1559 transaction

func (*TransactionArgs) ToTransaction

func (args *TransactionArgs) ToTransaction() *types.Transaction

ToTransaction converts the arguments to a transaction.

Jump to

Keyboard shortcuts

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