types

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 1 Imported by: 59

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiResponse

type ApiResponse[Data any] struct {
	Data  *Data  `json:"data,omitempty"`
	Error string `json:"error,omitempty"`
}

type BatchTxInfoData

type BatchTxInfoData struct {
	TxInfos []*eth.TransactionInfo `json:"txInfos"`
}

type ClientManagerStatus

type ClientManagerStatus struct {
	PrimaryClientStatus  ClientStatus `json:"primaryEcStatus"`
	FallbackEnabled      bool         `json:"fallbackEnabled"`
	FallbackClientStatus ClientStatus `json:"fallbackEcStatus"`
}

This is a wrapper for the manager's overall status report

type ClientStatus

type ClientStatus struct {
	IsWorking    bool    `json:"isWorking"`
	IsSynced     bool    `json:"isSynced"`
	SyncProgress float64 `json:"syncProgress"`
	ChainId      uint    `json:"networkId"`
	Error        string  `json:"error"`
}

This is a wrapper for the EC / BN status report

type DataBatch

type DataBatch[DataType any] struct {
	Batch []DataType `json:"batch"`
}

type ResponseStatus added in v0.2.0

type ResponseStatus int

ResponseStatus is used to signify the status of an API request's result.

const (
	// Unknown (default value)
	ResponseStatus_Unknown ResponseStatus = iota

	// The request succeeded
	ResponseStatus_Success

	// The request failed because of an internal error within the daemon
	ResponseStatus_Error

	// The request failed because there was a problem with the provided arguments in the request
	ResponseStatus_InvalidArguments

	// The request failed because it requires a node address but one was not present
	ResponseStatus_AddressNotPresent

	// The request failed because it requires a node wallet but one wasn't ready for usage
	ResponseStatus_WalletNotReady

	// The request couldn't complete because it's trying to create a resource that already exists, or use a resource that conflicts with what's requested
	ResponseStatus_ResourceConflict

	// The request failed because it is attempting to access a resource on the server that can't be found
	ResponseStatus_ResourceNotFound

	// The request failed because the clients weren't synced yet, but synced clients were required for the request
	ResponseStatus_ClientsNotSynced

	// The request failed because the chain's state won't allow it to proceed. This is usually used for methods that
	// build transactions, but the preconditions for it aren't correct (and executing it will revert)
	ResponseStatus_InvalidChainState
)

type SuccessData

type SuccessData struct {
}

type TxInfoData

type TxInfoData struct {
	TxInfo *eth.TransactionInfo `json:"txInfo"`
}

Jump to

Keyboard shortcuts

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