types

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonRpcParseError     = -32700
	JsonRpcInvalidRequest = -32600
	JsonRpcMethodNotFound = -32601
	JsonRpcInvalidParams  = -32602
	JsonRpcInternalError  = -32603
)

As per JSON-RPC 2.0 Specification https://www.jsonrpc.org/specification#error_object

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleResponse added in v1.4.3

type BundleResponse struct {
	BundleId string   `json:"bundleId"`
	RawTxs   []string `json:"rawTxs"`
}

type GetBundleStatusByTransactionHashResponse

type GetBundleStatusByTransactionHashResponse struct {
	TxHash            string `json:"txHash"`            // "0x0aeb9c61b342f7fc94a10d41c5d30a049a9cfa9ab764c6dd02204a19960ee567"
	Status            string `json:"status"`            // "FAILED_BUNDLE"
	Message           string `json:"message"`           // "Expired - The base fee was to low to execute this transaction, please try again"
	Error             string `json:"error"`             // "max fee per gas less than block base fee"
	BlocksCount       int    `json:"blocksCount"`       // 2
	ReceivedTimestamp int    `json:"receivedTimestamp"` // 1634568851003
	StatusTimestamp   int    `json:"statusTimestamp"`   // 1634568873862
}

type HealthResponse

type HealthResponse struct {
	Now       time.Time `json:"time"`
	StartTime time.Time `json:"startTime"`
	Version   string    `json:"version"`
}

type JsonRpcError

type JsonRpcError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

RpcError: https://www.jsonrpc.org/specification#error_object

func (JsonRpcError) Error

func (err JsonRpcError) Error() string

type JsonRpcRequest

type JsonRpcRequest struct {
	Id      interface{}   `json:"id"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	Version string        `json:"jsonrpc,omitempty"`
}

func NewJsonRpcRequest

func NewJsonRpcRequest(id interface{}, method string, params []interface{}) *JsonRpcRequest

func NewJsonRpcRequest1

func NewJsonRpcRequest1(id interface{}, method string, param interface{}) *JsonRpcRequest

type JsonRpcResponse

type JsonRpcResponse struct {
	Id      interface{}     `json:"id"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *JsonRpcError   `json:"error,omitempty"`
	Version string          `json:"jsonrpc"`
}

func NewJsonRpcResponse

func NewJsonRpcResponse(id interface{}, result json.RawMessage) *JsonRpcResponse

type PrivateTxApiResponse

type PrivateTxApiResponse struct {
	Status         PrivateTxStatus `json:"status"`
	Hash           string          `json:"hash"`
	MaxBlockNumber int             `json:"maxBlockNumber"`
}

type PrivateTxPreferences added in v1.5.1

type PrivateTxPreferences struct {
	// If set do not include tx to bundle, directly send tx to miners
	Fast bool `json:"fast"`
}

type PrivateTxStatus

type PrivateTxStatus string
var TxStatusFailed PrivateTxStatus = "FAILED"
var TxStatusIncluded PrivateTxStatus = "INCLUDED"
var TxStatusPending PrivateTxStatus = "PENDING"
var TxStatusUnknown PrivateTxStatus = "UNKNOWN"

type RelayErrorResponse

type RelayErrorResponse struct {
	Error string `json:"error"`
}

type SendPrivateTxRequestWithPreferences added in v1.5.1

type SendPrivateTxRequestWithPreferences struct {
	flashbotsrpc.FlashbotsSendPrivateTransactionRequest
	Preferences *PrivateTxPreferences `json:"preferences,omitempty"`
}

type TransactionReceipt

type TransactionReceipt struct {
	TransactionHash string
	Status          string
}

Jump to

Keyboard shortcuts

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