Documentation
¶
Index ¶
- Constants
- type BundleResponse
- type GetBundleStatusByTransactionHashResponse
- type HealthResponse
- type JsonRpcError
- type JsonRpcRequest
- type JsonRpcResponse
- type PrivateTxApiResponse
- type PrivateTxPreferences
- type PrivateTxStatus
- type RefundConfig
- type RelayErrorResponse
- type SendPrivateTxRequestWithPreferences
- type TransactionReceipt
- type TxPrivacyPreferences
- type TxValidityPreferences
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 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 JsonRpcError ¶
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 {
Privacy TxPrivacyPreferences `json:"privacy"`
Validity TxValidityPreferences `json:"validity"`
Fast bool `json:"fast"`
CanRevert bool `json:"canRevert"`
}
type PrivateTxStatus ¶
type PrivateTxStatus string
var TxStatusFailed PrivateTxStatus = "FAILED"
var TxStatusIncluded PrivateTxStatus = "INCLUDED"
var TxStatusPending PrivateTxStatus = "PENDING"
var TxStatusUnknown PrivateTxStatus = "UNKNOWN"
type RefundConfig ¶ added in v1.6.0
type RelayErrorResponse ¶
type RelayErrorResponse struct {
Error string `json:"error"`
}
type SendPrivateTxRequestWithPreferences ¶ added in v1.5.1
type SendPrivateTxRequestWithPreferences struct {
Tx string `json:"tx"`
Preferences *PrivateTxPreferences `json:"preferences,omitempty"`
MaxBlockNumber uint64 `json:"maxBlockNumber"`
}
type TransactionReceipt ¶
type TxPrivacyPreferences ¶ added in v1.6.0
type TxValidityPreferences ¶ added in v1.6.0
type TxValidityPreferences struct {
Refund []RefundConfig `json:"refund,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.