Documentation
¶
Overview ¶
Package core contains everything needed to configure and run a 0x Mesh node.
Index ¶
- type App
- func (app *App) AddOrders(signedOrdersRaw []*json.RawMessage, pinned bool) (*ordervalidator.ValidationResults, error)
- func (app *App) AddPeer(peerInfo peerstore.PeerInfo) error
- func (app *App) GetMessagesToShare(max int) ([][]byte, error)
- func (app *App) GetOrders(page, perPage int, snapshotID string) (*rpc.GetOrdersResponse, error)
- func (app *App) GetOrdersByMakerAssetData(makerAssetDataPrefix []byte) ([]*zeroex.SignedOrder, error)
- func (app *App) GetStats() (*rpc.GetStatsResponse, error)
- func (app *App) HandleMessages(messages []*p2p.Message) error
- func (app *App) Start(ctx context.Context) error
- func (app *App) SubscribeToOrderEvents(sink chan<- []*zeroex.OrderEvent) event.Subscription
- type Config
- type ErrSnapshotNotFound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) AddOrders ¶
func (app *App) AddOrders(signedOrdersRaw []*json.RawMessage, pinned bool) (*ordervalidator.ValidationResults, error)
AddOrders can be used to add orders to Mesh. It validates the given orders and if they are valid, will store and eventually broadcast the orders to peers. If pinned is true, the orders will be marked as pinned, which means they will only be removed if they become unfillable and will not be removed due to having a high expiration time or any incentive mechanisms.