types

package
v0.0.0-...-0b85bb3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

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

type LatestBlock struct {
	Number int         `json:"number"`
	Hash   common.Hash `json:"hash"`
}

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

func (o OrderInfo) MarshalJSON() ([]byte, error)

MarshalJSON is a custom Marshaler for OrderInfo

func (*OrderInfo) UnmarshalJSON

func (o *OrderInfo) UnmarshalJSON(data []byte) error

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.

Jump to

Keyboard shortcuts

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