Documentation
¶
Index ¶
Constants ¶
const ( EndpointFlagName = "signer.endpoint" AddressFlagName = "signer.address" HeadersFlagName = "signer.header" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockPayloadArgs ¶ added in v1.11.0
type BlockPayloadArgs struct { Domain [32]byte `json:"domain"` ChainID *big.Int `json:"chainId"` PayloadHash []byte `json:"payloadHash"` PayloadBytes []byte SenderAddress *common.Address `json:"senderAddress"` }
BlockPayloadArgs represents the arguments to sign a new block payload from the sequencer.
func NewBlockPayloadArgs ¶ added in v1.11.0
func NewBlockPayloadArgs(domain [32]byte, chainId *big.Int, payloadBytes []byte, senderAddress *common.Address) *BlockPayloadArgs
NewBlockPayloadArgs creates a BlockPayloadArgs struct
func (*BlockPayloadArgs) Check ¶ added in v1.11.0
func (args *BlockPayloadArgs) Check() error
func (*BlockPayloadArgs) ToSigningHash ¶ added in v1.11.0
func (args *BlockPayloadArgs) ToSigningHash() (common.Hash, error)
ToSigningHash creates a signingHash from the block payload args. Uses the hashing scheme from https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/rollup-node-p2p.md#block-signatures
type CLIConfig ¶
type CLIConfig struct { Endpoint string Address string Headers http.Header TLSConfig optls.CLIConfig }
func NewCLIConfig ¶
func NewCLIConfig() CLIConfig
func ReadCLIConfig ¶
func ReadCLIConfig(ctx *cli.Context) CLIConfig
type SignerClient ¶
type SignerClient struct {
// contains filtered or unexported fields
}
func NewSignerClient ¶
func NewSignerClientFromConfig ¶
func NewSignerClientFromConfig(logger log.Logger, config CLIConfig) (*SignerClient, error)
func (*SignerClient) SignBlockPayload ¶ added in v1.11.0
func (s *SignerClient) SignBlockPayload(ctx context.Context, args *BlockPayloadArgs) ([65]byte, error)
func (*SignerClient) SignTransaction ¶
func (s *SignerClient) 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"` // Custom extension for EIP-4844 support BlobVersionedHashes []common.Hash `json:"blobVersionedHashes,omitempty"` BlobFeeCap *hexutil.Big `json:"maxFeePerBlobGas,omitempty"` }
TransactionArgs represents the arguments to construct a new transaction or a message call. Geth has an internal version of this, but this is not exported, and only supported in v1.13.11 and forward. This signing API format is based on the legacy personal-account signing RPC of ethereum.
func NewTransactionArgsFromTransaction ¶
func NewTransactionArgsFromTransaction(chainId *big.Int, from *common.Address, tx *types.Transaction) *TransactionArgs
NewTransactionArgsFromTransaction creates a TransactionArgs struct from an EIP-1559 or EIP-4844 transaction
func (*TransactionArgs) Check ¶ added in v1.5.0
func (args *TransactionArgs) Check() error
func (*TransactionArgs) ToTransactionData ¶ added in v1.5.0
func (args *TransactionArgs) ToTransactionData() (types.TxData, error)
ToTransactionData converts the arguments to transaction content-data. Warning: this excludes blob data.