Documentation ¶
Overview ¶
Package types holds common types that are used across a variety of interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOrdersOpts ¶
type AddOrdersOpts struct { // Pinned determines whether or not the added orders should be pinned. Pinned // orders will not be affected by any DDoS prevention or incentive mechanisms // and will always stay in storage until they are no longer fillable. Defaults // to true. Pinned bool `json:"pinned"` }
AddOrdersOpts is a set of options for core.AddOrders. Also used in the browser and RPC interface.
type GetOrdersResponse ¶
type GetOrdersResponse struct { SnapshotID string `json:"snapshotID"` SnapshotTimestamp time.Time `json:"snapshotTimestamp"` OrdersInfos []*OrderInfo `json:"ordersInfos"` }
GetOrdersResponse is the return value for core.GetOrders. Also used in the browser and RPC interface.
type LatestBlock ¶
LatestBlock is the latest block processed by the Mesh node.
type OrderInfo ¶
type OrderInfo struct { OrderHash common.Hash `json:"orderHash"` SignedOrder *zeroex.SignedOrder `json:"signedOrder"` FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"` }
OrderInfo represents an fillable order and how much it could be filled for.
func (OrderInfo) MarshalJSON ¶
MarshalJSON is a custom Marshaler for OrderInfo
func (*OrderInfo) UnmarshalJSON ¶
UnmarshalJSON implements a custom JSON unmarshaller for the OrderEvent type
type Stats ¶
type Stats struct { Version string `json:"version"` PubSubTopic string `json:"pubSubTopic"` Rendezvous string `json:"rendezvous"` PeerID string `json:"peerID"` KlaytnChainID int `json:"klaytnChainID"` LatestBlock LatestBlock `json:"latestBlock"` NumPeers int `json:"numPeers"` NumOrders int `json:"numOrders"` NumOrdersIncludingRemoved int `json:"numOrdersIncludingRemoved"` NumPinnedOrders int `json:"numPinnedOrders"` MaxExpirationTime string `json:"maxExpirationTime"` StartOfCurrentUTCDay time.Time `json:"startOfCurrentUTCDay"` KlayRPCRequestsSentInCurrentUTCDay int `json:"klayRPCRequestsSentInCurrentUTCDay"` KlayRPCRateLimitExpiredRequests int64 `json:"klayRPCRateLimitExpiredRequests"` }
Stats is the return value for core.GetStats. Also used in the browser and RPC interface.