0x-mesh: github.com/0xProject/0x-mesh/common/types Index | Files

package types

import "github.com/0xProject/0x-mesh/common/types"

Package types holds common types that are used across a variety of interfaces.


Package Files


type AddOrdersOpts Uses

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 Uses

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 Uses

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

LatestBlock is the latest block processed by the Mesh node.

type OrderInfo Uses

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 Uses

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

MarshalJSON is a custom Marshaler for OrderInfo

func (*OrderInfo) UnmarshalJSON Uses

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

UnmarshalJSON implements a custom JSON unmarshaller for the OrderEvent type

type Stats Uses

type Stats struct {
    Version                           string      `json:"version"`
    PubSubTopic                       string      `json:"pubSubTopic"`
    Rendezvous                        string      `json:"rendezvous"`
    PeerID                            string      `json:"peerID"`
    EthereumChainID                   int         `json:"ethereumChainID"`
    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"`
    EthRPCRequestsSentInCurrentUTCDay int         `json:"ethRPCRequestsSentInCurrentUTCDay"`
    EthRPCRateLimitExpiredRequests    int64       `json:"ethRPCRateLimitExpiredRequests"`

Stats is the return value for core.GetStats. Also used in the browser and RPC interface.

Package types imports 7 packages (graph) and is imported by 3 packages. Updated 2020-02-22. Refresh now. Tools for package owners.