diff --git a/.drone.yml b/.drone.yml index 8d0f0e8c2..e0327d91b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,7 +30,7 @@ steps: from_secret: docker_username password: from_secret: docker_password - dockerfile: dockerfiles/mesh/Dockerfile + dockerfile: dockerfiles/mesh-bootstrap/Dockerfile node_selector: drone-builds: true --- @@ -74,7 +74,7 @@ steps: from_secret: docker_username password: from_secret: docker_password - dockerfile: dockerfiles/mesh/Dockerfile + dockerfile: dockerfiles/mesh-bootstrap/Dockerfile trigger: branch: - development diff --git a/CHANGELOG.md b/CHANGELOG.md index 227eca18b..a18006830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ This changelog is a work in progress and may contain notes for versions which have not actually been released. Check the [Releases](https://github.com/0xProject/0x-mesh/releases) page to see full release notes and more information about the latest released versions. +## v8.2.0 + +### Features ✅ + +- Added `getStatsAsync` to the `@0x/mesh-browser` package. ([#654](https://github.com/0xProject/0x-mesh/pull/654)). +- Added `getOrdersAsync` and `getOrdersForPageAsync` to the `@0x/mesh-browser` package. ([#655](https://github.com/0xProject/0x-mesh/pull/655)). + +### Bug fixes 🐞 + +- Update DevUtils contract address to fix intermittent revert issues. ([#671](https://github.com/0xProject/0x-mesh/pull/671)). + + ## v8.1.2 ### Bug fixes 🐞 diff --git a/README.md b/README.md index 2e9311b7c..0d50b4aaa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Version](https://img.shields.io/badge/version-8.1.2-orange.svg)](https://github.com/0xProject/0x-mesh/releases) +[![Version](https://img.shields.io/badge/version-8.2.0-orange.svg)](https://github.com/0xProject/0x-mesh/releases) [![Docs](https://img.shields.io/badge/docs-website-yellow.svg)](https://0x-org.gitbook.io/mesh) [![Chat with us on Discord](https://img.shields.io/badge/chat-Discord-blueViolet.svg)](https://discord.gg/HF7fHwk) [![Circle CI](https://img.shields.io/circleci/project/0xProject/0x-mesh/master.svg)](https://circleci.com/gh/0xProject/0x-mesh/tree/master) diff --git a/browser/go/main.go b/browser/go/main.go index c9e6045dd..abcf40497 100644 --- a/browser/go/main.go +++ b/browser/go/main.go @@ -225,6 +225,27 @@ func (cw *MeshWrapper) AddOrders(rawOrders js.Value, pinned bool) (js.Value, err return resultsJS, nil } +// GetStats calls core.GetStats, converts the result to a js.Value and returns +// it. +func (cw *MeshWrapper) GetStats() (js.Value, error) { + stats, err := cw.app.GetStats() + if err != nil { + return js.Undefined(), err + } + return js.ValueOf(stats), nil +} + +// GetOrders converts raw JavaScript parameters into the appropriate type, calls +// core.App.GetOrders, converts the result into basic JavaScript types (string, +// int, etc.) and returns it. +func (cw *MeshWrapper) GetOrders(page int, perPage int, snapshotID string) (js.Value, error) { + ordersResponse, err := cw.app.GetOrders(page, perPage, snapshotID) + if err != nil { + return js.Undefined(), err + } + return js.ValueOf(ordersResponse), nil +} + // JSValue satisfies the js.Wrapper interface. The return value is a JavaScript // object consisting of named functions. They act like methods by capturing the // MeshWrapper through a closure. @@ -248,6 +269,24 @@ func (cw *MeshWrapper) JSValue() js.Value { cw.orderEventsHandler = handler return nil }), + // getStatsAsync(): Promise + "getStatsAsync": js.FuncOf(func(this js.Value, args []js.Value) interface{} { + return wrapInPromise(func() (interface{}, error) { + return cw.GetStats() + }) + }), + // getOrdersForPageAsync(page: number, perPage: number, snapshotID?: string): Promise + "getOrdersForPageAsync": js.FuncOf(func(this js.Value, args []js.Value) interface{} { + return wrapInPromise(func() (interface{}, error) { + // snapshotID is optional in the JavaScript function. Check if it is + // null or undefined. + snapshotID := "" + if !isNullOrUndefined(args[2]) { + snapshotID = args[2].String() + } + return cw.GetOrders(args[0].Int(), args[1].Int(), snapshotID) + }) + }), // addOrdersAsync(orders: Array): Promise "addOrdersAsync": js.FuncOf(func(this js.Value, args []js.Value) interface{} { return wrapInPromise(func() (interface{}, error) { diff --git a/browser/package.json b/browser/package.json index 81833f75c..24b648b36 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@0x/mesh-browser", - "version": "8.1.2", + "version": "8.2.0", "description": "TypeScript and JavaScript bindings for running Mesh directly in the browser.", "main": "./lib/index.js", "license": "Apache-2.0", diff --git a/browser/ts/index.ts b/browser/ts/index.ts index cfa41e1b9..bddf2071c 100644 --- a/browser/ts/index.ts +++ b/browser/ts/index.ts @@ -140,6 +140,69 @@ export interface ContractAddresses { zrxToken?: string; } +export interface LatestBlock { + number: number; + hash: string; +} + +interface WrapperStats { + version: string; + pubSubTopic: string; + rendezvous: string; + peerID: string; + ethereumChainID: number; + latestBlock: LatestBlock; + numPeers: number; + numOrders: number; + numOrdersIncludingRemoved: number; + numPinnedOrders: number; + maxExpirationTime: string; // string instead of BigNumber + startOfCurrentUTCDay: string; // string instead of Date + ethRPCRequestsSentInCurrentUTCDay: number; + ethRPCRateLimitExpiredRequests: number; +} + +export interface Stats { + version: string; + pubSubTopic: string; + rendezvous: string; + peerID: string; + ethereumChainID: number; + latestBlock: LatestBlock; + numPeers: number; + numOrders: number; + numOrdersIncludingRemoved: number; + numPinnedOrders: number; + maxExpirationTime: BigNumber; + startOfCurrentUTCDay: Date; + ethRPCRequestsSentInCurrentUTCDay: number; + ethRPCRateLimitExpiredRequests: number; +} + +interface WrapperOrderInfo { + orderHash: string; + signedOrder: WrapperSignedOrder; + fillableTakerAssetAmount: string; +} + +export interface OrderInfo { + orderHash: string; + signedOrder: SignedOrder; + fillableTakerAssetAmount: BigNumber; +} + +interface WrapperGetOrdersResponse { + snapshotID: string; + snapshotTimestamp: number; + ordersInfos: WrapperOrderInfo[]; +} + +export interface GetOrdersResponse { + snapshotID: string; + snapshotTimestamp: number; + ordersInfos: OrderInfo[]; +} + export enum Verbosity { Panic = 0, Fatal = 1, @@ -162,6 +225,8 @@ interface MeshWrapper { startAsync(): Promise; onError(handler: (err: Error) => void): void; onOrderEvents(handler: (events: WrapperOrderEvent[]) => void): void; + getStatsAsync(): Promise; + getOrdersForPageAsync(page: number, perPage: number, snapshotID?: string): Promise; addOrdersAsync(orders: WrapperSignedOrder[], pinned: boolean): Promise; } @@ -631,6 +696,82 @@ export class Mesh { return this._wrapper.startAsync(); } + /** + * Returns various stats about Mesh, including the total number of orders + * and the number of peers Mesh is connected to. + */ + public async getStatsAsync(): Promise { + await waitForLoadAsync(); + if (this._wrapper === undefined) { + // If this is called after startAsync, this._wrapper is always + // defined. This check is here just in case and satisfies the + // compiler. + return Promise.reject(new Error('Mesh is still loading. Try again soon.')); + } + const wrapperStats = await this._wrapper.getStatsAsync(); + return wrapperStatsToStats(wrapperStats); + } + + /** + * Get all 0x signed orders currently stored in the Mesh node + * @param perPage number of signedOrders to fetch per paginated request + * @returns the snapshotID, snapshotTimestamp and all orders, their hashes and fillableTakerAssetAmounts + */ + public async getOrdersAsync(perPage: number = 200): Promise { + await waitForLoadAsync(); + if (this._wrapper === undefined) { + // If this is called after startAsync, this._wrapper is always + // defined. This check is here just in case and satisfies the + // compiler. + return Promise.reject(new Error('Mesh is still loading. Try again soon.')); + } + + let snapshotID = ''; // New snapshot + + // TODO(albrow): De-dupe this code with the method by the same name + // in the TypeScript RPC client. + let page = 0; + let getOrdersResponse = await this.getOrdersForPageAsync(page, perPage, snapshotID); + snapshotID = getOrdersResponse.snapshotID; + let ordersInfos = getOrdersResponse.ordersInfos; + + let allOrderInfos: OrderInfo[] = []; + + do { + allOrderInfos = [...allOrderInfos, ...ordersInfos]; + page++; + getOrdersResponse = await this.getOrdersForPageAsync(page, perPage, snapshotID); + ordersInfos = getOrdersResponse.ordersInfos; + } while (ordersInfos.length > 0); + + getOrdersResponse = { + snapshotID, + snapshotTimestamp: getOrdersResponse.snapshotTimestamp, + ordersInfos: allOrderInfos, + }; + return getOrdersResponse; + } + + /** + * Get page of 0x signed orders stored on the Mesh node at the specified snapshot + * @param page Page index at which to retrieve orders + * @param perPage Number of signedOrders to fetch per paginated request + * @param snapshotID The DB snapshot at which to fetch orders. If omitted, a new snapshot is created + * @returns the snapshotID, snapshotTimestamp and all orders, their hashes and fillableTakerAssetAmounts + */ + public async getOrdersForPageAsync(page: number, perPage: number, snapshotID?: string): Promise { + await waitForLoadAsync(); + if (this._wrapper === undefined) { + // If this is called after startAsync, this._wrapper is always + // defined. This check is here just in case and satisfies the + // compiler. + return Promise.reject(new Error('Mesh is still loading. Try again soon.')); + } + + const wrapperOrderResponse = await this._wrapper.getOrdersForPageAsync(page, perPage, snapshotID); + return wrapperGetOrdersResponseToGetOrdersResponse(wrapperOrderResponse); + } + /** * Validates and adds the given orders to Mesh. If an order is successfully * added, Mesh will share it with any peers in the network and start @@ -863,6 +1004,31 @@ function orderEventsHandlerToWrapperOrderEventsHandler( }; } +function wrapperStatsToStats(wrapperStats: WrapperStats): Stats { + return { + ...wrapperStats, + startOfCurrentUTCDay: new Date(wrapperStats.startOfCurrentUTCDay), + maxExpirationTime: new BigNumber(wrapperStats.maxExpirationTime), + }; +} + +function wrapperGetOrdersResponseToGetOrdersResponse( + wrapperGetOrdersResponse: WrapperGetOrdersResponse, +): GetOrdersResponse { + return { + ...wrapperGetOrdersResponse, + ordersInfos: wrapperGetOrdersResponse.ordersInfos.map(wrapperOrderInfoToOrderInfo), + }; +} + +function wrapperOrderInfoToOrderInfo(wrapperOrderInfo: WrapperOrderInfo): OrderInfo { + return { + ...wrapperOrderInfo, + fillableTakerAssetAmount: new BigNumber(wrapperOrderInfo.fillableTakerAssetAmount), + signedOrder: wrapperSignedOrderToSignedOrder(wrapperOrderInfo.signedOrder), + }; +} + function wrapperValidationResultsToValidationResults( wrapperValidationResults: WrapperValidationResults, ): ValidationResults { diff --git a/cmd/mesh/rpc_handler.go b/cmd/mesh/rpc_handler.go index 5cefb31d0..d49e51eb1 100644 --- a/cmd/mesh/rpc_handler.go +++ b/cmd/mesh/rpc_handler.go @@ -12,6 +12,7 @@ import ( "strings" "time" + "github.com/0xProject/0x-mesh/common/types" "github.com/0xProject/0x-mesh/constants" "github.com/0xProject/0x-mesh/core" "github.com/0xProject/0x-mesh/rpc" @@ -60,7 +61,7 @@ func listenRPC(ctx context.Context, app *core.App, config standaloneConfig) erro } // GetOrders is called when an RPC client calls GetOrders. -func (handler *rpcHandler) GetOrders(page, perPage int, snapshotID string) (result *rpc.GetOrdersResponse, err error) { +func (handler *rpcHandler) GetOrders(page, perPage int, snapshotID string) (result *types.GetOrdersResponse, err error) { log.WithFields(map[string]interface{}{ "page": page, "perPage": perPage, @@ -98,7 +99,7 @@ func (handler *rpcHandler) GetOrders(page, perPage int, snapshotID string) (resu } // AddOrders is called when an RPC client calls AddOrders. -func (handler *rpcHandler) AddOrders(signedOrdersRaw []*json.RawMessage, opts rpc.AddOrdersOpts) (results *ordervalidator.ValidationResults, err error) { +func (handler *rpcHandler) AddOrders(signedOrdersRaw []*json.RawMessage, opts types.AddOrdersOpts) (results *ordervalidator.ValidationResults, err error) { log.WithFields(log.Fields{ "count": len(signedOrdersRaw), "pinned": opts.Pinned, @@ -155,7 +156,7 @@ func (handler *rpcHandler) AddPeer(peerInfo peerstore.PeerInfo) (err error) { } // GetStats is called when an RPC client calls GetStats, -func (handler *rpcHandler) GetStats() (result *rpc.GetStatsResponse, err error) { +func (handler *rpcHandler) GetStats() (result *types.Stats, err error) { log.Debug("received GetStats request via RPC") // Catch panics, log stack trace and return RPC error message defer func() { diff --git a/common/types/types.go b/common/types/types.go new file mode 100644 index 000000000..01af9f335 --- /dev/null +++ b/common/types/types.go @@ -0,0 +1,97 @@ +// Package types holds common types that are used across a variety of +// interfaces. +package types + +import ( + "encoding/json" + "errors" + "math/big" + "time" + + "github.com/0xProject/0x-mesh/zeroex" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" +) + +// Stats is the return value for core.GetStats. Also used in the browser and RPC +// interface. +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"` +} + +// LatestBlock is the latest block processed by the Mesh node. +type LatestBlock struct { + Number int `json:"number"` + Hash common.Hash `json:"hash"` +} + +// GetOrdersResponse is the return value for core.GetOrders. Also used in the +// browser and RPC interface. +type GetOrdersResponse struct { + SnapshotID string `json:"snapshotID"` + SnapshotTimestamp time.Time `json:"snapshotTimestamp"` + OrdersInfos []*OrderInfo `json:"ordersInfos"` +} + +// AddOrdersOpts is a set of options for core.AddOrders. Also used in the +// browser and RPC interface. +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"` +} + +// OrderInfo represents an fillable order and how much it could be filled for. +type OrderInfo struct { + OrderHash common.Hash `json:"orderHash"` + SignedOrder *zeroex.SignedOrder `json:"signedOrder"` + FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"` +} + +type orderInfoJSON struct { + OrderHash string `json:"orderHash"` + SignedOrder *zeroex.SignedOrder `json:"signedOrder"` + FillableTakerAssetAmount string `json:"fillableTakerAssetAmount"` +} + +// MarshalJSON is a custom Marshaler for OrderInfo +func (o OrderInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(map[string]interface{}{ + "orderHash": o.OrderHash.Hex(), + "signedOrder": o.SignedOrder, + "fillableTakerAssetAmount": o.FillableTakerAssetAmount.String(), + }) +} + +// UnmarshalJSON implements a custom JSON unmarshaller for the OrderEvent type +func (o *OrderInfo) UnmarshalJSON(data []byte) error { + var orderInfoJSON orderInfoJSON + err := json.Unmarshal(data, &orderInfoJSON) + if err != nil { + return err + } + + o.OrderHash = common.HexToHash(orderInfoJSON.OrderHash) + o.SignedOrder = orderInfoJSON.SignedOrder + var ok bool + o.FillableTakerAssetAmount, ok = math.ParseBig256(orderInfoJSON.FillableTakerAssetAmount) + if !ok { + return errors.New("Invalid uint256 number encountered for FillableTakerAssetAmount") + } + return nil +} diff --git a/common/types/types_js.go b/common/types/types_js.go new file mode 100644 index 000000000..d9918bac1 --- /dev/null +++ b/common/types/types_js.go @@ -0,0 +1,30 @@ +// +build js,wasm + +package types + +import ( + "encoding/json" + "syscall/js" +) + +func (s *Stats) JSValue() js.Value { + // TODO(albrow): Optimize this. Remove other uses of the JSON + // encoding/decoding hack. + encodedStats, err := json.Marshal(s) + if err != nil { + panic(err) + } + statsJS := js.Global().Get("JSON").Call("parse", string(encodedStats)) + return statsJS +} + +func (r *GetOrdersResponse) JSValue() js.Value { + // TODO(albrow): Optimize this. Remove other uses of the JSON + // encoding/decoding hack. + encodedResponse, err := json.Marshal(r) + if err != nil { + panic(err) + } + responseJS := js.Global().Get("JSON").Call("parse", string(encodedResponse)) + return responseJS +} diff --git a/core/core.go b/core/core.go index b79cded1a..ef7e83662 100644 --- a/core/core.go +++ b/core/core.go @@ -12,6 +12,7 @@ import ( "sync" "time" + "github.com/0xProject/0x-mesh/common/types" "github.com/0xProject/0x-mesh/constants" "github.com/0xProject/0x-mesh/db" "github.com/0xProject/0x-mesh/encoding" @@ -25,7 +26,6 @@ import ( "github.com/0xProject/0x-mesh/loghooks" "github.com/0xProject/0x-mesh/meshdb" "github.com/0xProject/0x-mesh/p2p" - "github.com/0xProject/0x-mesh/rpc" "github.com/0xProject/0x-mesh/zeroex" "github.com/0xProject/0x-mesh/zeroex/ordervalidator" "github.com/0xProject/0x-mesh/zeroex/orderwatch" @@ -57,7 +57,7 @@ const ( estimatedNonPollingEthereumRPCRequestsPer24Hrs = 50000 // logStatsInterval is how often to log stats for this node. logStatsInterval = 5 * time.Minute - version = "8.1.2" + version = "8.2.0" ) // Note(albrow): The Config type is currently copied to browser/ts/index.ts. We @@ -625,14 +625,14 @@ func (e ErrPerPageZero) Error() string { // string as `snapshotID` creates a new snapshot and returns the first set of results. To fetch all orders, // continue to make requests supplying the `snapshotID` returned from the first request. After 1 minute of not // received further requests referencing a specific snapshot, the snapshot expires and can no longer be used. -func (app *App) GetOrders(page, perPage int, snapshotID string) (*rpc.GetOrdersResponse, error) { +func (app *App) GetOrders(page, perPage int, snapshotID string) (*types.GetOrdersResponse, error) { <-app.started if perPage <= 0 { return nil, ErrPerPageZero{} } - ordersInfos := []*rpc.OrderInfo{} + ordersInfos := []*types.OrderInfo{} var snapshot *db.Snapshot var createdAt time.Time if snapshotID == "" { @@ -682,14 +682,14 @@ func (app *App) GetOrders(page, perPage int, snapshotID string) (*rpc.GetOrdersR return nil, err } for _, order := range selectedOrders { - ordersInfos = append(ordersInfos, &rpc.OrderInfo{ + ordersInfos = append(ordersInfos, &types.OrderInfo{ OrderHash: order.Hash, SignedOrder: order.SignedOrder, FillableTakerAssetAmount: order.FillableTakerAssetAmount, }) } - getOrdersResponse := &rpc.GetOrdersResponse{ + getOrdersResponse := &types.GetOrdersResponse{ SnapshotID: snapshotID, SnapshotTimestamp: createdAt, OrdersInfos: ordersInfos, @@ -819,14 +819,14 @@ func (app *App) AddPeer(peerInfo peerstore.PeerInfo) error { } // GetStats retrieves stats about the Mesh node -func (app *App) GetStats() (*rpc.GetStatsResponse, error) { +func (app *App) GetStats() (*types.Stats, error) { <-app.started latestBlockHeader, err := app.db.FindLatestMiniHeader() if err != nil { return nil, err } - latestBlock := rpc.LatestBlock{ + latestBlock := types.LatestBlock{ Number: int(latestBlockHeader.Number.Int64()), Hash: latestBlockHeader.Hash, } @@ -848,7 +848,7 @@ func (app *App) GetStats() (*rpc.GetStatsResponse, error) { return nil, err } - response := &rpc.GetStatsResponse{ + response := &types.Stats{ Version: version, PubSubTopic: getPubSubTopic(app.config.EthereumChainID), Rendezvous: getRendezvous(app.config.EthereumChainID), diff --git a/docs/browser/reference.md b/docs/browser/reference.md index 9cfa7661e..87aaf1347 100644 --- a/docs/browser/reference.md +++ b/docs/browser/reference.md @@ -1,33 +1,185 @@ -# Interface: ERC721ApprovalForAllEvent +# Class: Mesh + +The main class for this package. Has methods for receiving order events and +sending orders through the 0x Mesh network. ### Hierarchy -* **ERC721ApprovalForAllEvent** +* **Mesh** -### Properties +### Constructors -## approved +## constructer -• **approved**: *boolean* +\+ **new Mesh**(`config`: [Config](#interface-config)): *[Mesh](#class-mesh)* + +*Defined in [index.ts:641](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L641)* + +Instantiates a new Mesh instance. + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`config` | [Config](#interface-config) | Configuration options for Mesh | + +**Returns:** *[Mesh](#class-mesh)* + +An instance of Mesh -*Defined in [index.ts:258](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L258)* +### Methods + +## addOrdersAsync + +▸ **addOrdersAsync**(`orders`: SignedOrder[], `pinned`: boolean): *Promise‹[ValidationResults](#interface-validationresults)›* + +*Defined in [index.ts:791](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L791)* + +Validates and adds the given orders to Mesh. If an order is successfully +added, Mesh will share it with any peers in the network and start +watching it for changes (e.g. filled, canceled, expired). The returned +promise will only be rejected if there was an error validating or adding +the order; it will not be rejected for any invalid orders (check +results.rejected instead). + +**Parameters:** + +Name | Type | Default | Description | +------ | ------ | ------ | ------ | +`orders` | SignedOrder[] | - | An array of orders to add. | +`pinned` | boolean | true | Whether or not the 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. | + +**Returns:** *Promise‹[ValidationResults](#interface-validationresults)›* + +Validation results for the given orders, indicating which orders +were accepted and which were rejected. ___ -## operator +## getOrdersAsync -• **operator**: *string* +▸ **getOrdersAsync**(`perPage`: number): *Promise‹[GetOrdersResponse](#interface-getordersresponse)›* + +*Defined in [index.ts:720](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L720)* -*Defined in [index.ts:257](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L257)* +Get all 0x signed orders currently stored in the Mesh node + +**Parameters:** + +Name | Type | Default | Description | +------ | ------ | ------ | ------ | +`perPage` | number | 200 | number of signedOrders to fetch per paginated request | + +**Returns:** *Promise‹[GetOrdersResponse](#interface-getordersresponse)›* + +the snapshotID, snapshotTimestamp and all orders, their hashes and fillableTakerAssetAmounts ___ -## owner +## getOrdersForPageAsync -• **owner**: *string* +▸ **getOrdersForPageAsync**(`page`: number, `perPage`: number, `snapshotID?`: undefined | string): *Promise‹[GetOrdersResponse](#interface-getordersresponse)›* + +*Defined in [index.ts:762](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L762)* + +Get page of 0x signed orders stored on the Mesh node at the specified snapshot + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`page` | number | Page index at which to retrieve orders | +`perPage` | number | Number of signedOrders to fetch per paginated request | +`snapshotID?` | undefined | string | The DB snapshot at which to fetch orders. If omitted, a new snapshot is created | + +**Returns:** *Promise‹[GetOrdersResponse](#interface-getordersresponse)›* + +the snapshotID, snapshotTimestamp and all orders, their hashes and fillableTakerAssetAmounts + +___ + +## getStatsAsync + +▸ **getStatsAsync**(): *Promise‹[Stats](#interface-stats)›* + +*Defined in [index.ts:703](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L703)* + +Returns various stats about Mesh, including the total number of orders +and the number of peers Mesh is connected to. -*Defined in [index.ts:256](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L256)* +**Returns:** *Promise‹[Stats](#interface-stats)›* + +___ + +## onError + +▸ **onError**(`handler`: function): *void* + +*Defined in [index.ts:661](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L661)* + +Registers a handler which will be called in the event of a critical +error. Note that the handler will not be called for non-critical errors. +In order to ensure no errors are missed, this should be called before +startAsync. + +**Parameters:** + +▪ **handler**: *function* + +The handler to be called. + +▸ (`err`: Error): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`err` | Error | + +**Returns:** *void* + +___ + +## onOrderEvents + +▸ **onOrderEvents**(`handler`: function): *void* + +*Defined in [index.ts:676](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L676)* + +Registers a handler which will be called for any incoming order events. +Order events are fired whenver an order is added, canceled, expired, or +filled. In order to ensure no events are missed, this should be called +before startAsync. + +**Parameters:** + +▪ **handler**: *function* + +The handler to be called. + +▸ (`events`: [OrderEvent](#interface-orderevent)[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`events` | [OrderEvent](#interface-orderevent)[] | + +**Returns:** *void* + +___ + +## startAsync + +▸ **startAsync**(): *Promise‹void›* + +*Defined in [index.ts:687](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L687)* + +Starts the Mesh node in the background. Mesh will automatically find +peers in the network and begin receiving orders from them. + +**Returns:** *Promise‹void›*
@@ -41,7 +193,7 @@ ___ • **Added**: = "ADDED" -*Defined in [index.ts:439](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L439)* +*Defined in [index.ts:504](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L504)* ___ @@ -49,7 +201,7 @@ ___ • **Cancelled**: = "CANCELLED" -*Defined in [index.ts:442](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L442)* +*Defined in [index.ts:507](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L507)* ___ @@ -57,7 +209,7 @@ ___ • **Expired**: = "EXPIRED" -*Defined in [index.ts:443](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L443)* +*Defined in [index.ts:508](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L508)* ___ @@ -65,7 +217,7 @@ ___ • **FillabilityIncreased**: = "FILLABILITY_INCREASED" -*Defined in [index.ts:446](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L446)* +*Defined in [index.ts:511](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L511)* ___ @@ -73,7 +225,7 @@ ___ • **Filled**: = "FILLED" -*Defined in [index.ts:440](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L440)* +*Defined in [index.ts:505](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L505)* ___ @@ -81,7 +233,7 @@ ___ • **FullyFilled**: = "FULLY_FILLED" -*Defined in [index.ts:441](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L441)* +*Defined in [index.ts:506](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L506)* ___ @@ -89,7 +241,7 @@ ___ • **Invalid**: = "INVALID" -*Defined in [index.ts:438](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L438)* +*Defined in [index.ts:503](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L503)* ___ @@ -97,7 +249,7 @@ ___ • **StoppedWatching**: = "STOPPED_WATCHING" -*Defined in [index.ts:447](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L447)* +*Defined in [index.ts:512](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L512)* ___ @@ -105,7 +257,7 @@ ___ • **Unexpired**: = "UNEXPIRED" -*Defined in [index.ts:444](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L444)* +*Defined in [index.ts:509](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L509)* ___ @@ -113,7 +265,7 @@ ___ • **Unfunded**: = "UNFUNDED" -*Defined in [index.ts:445](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L445)* +*Defined in [index.ts:510](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L510)*
@@ -129,7 +281,7 @@ A set of categories for rejected orders. • **CoordinatorError**: = "COORDINATOR_ERROR" -*Defined in [index.ts:530](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L530)* +*Defined in [index.ts:595](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L595)* ___ @@ -137,7 +289,7 @@ ___ • **MeshError**: = "MESH_ERROR" -*Defined in [index.ts:528](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L528)* +*Defined in [index.ts:593](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L593)* ___ @@ -145,7 +297,7 @@ ___ • **MeshValidation**: = "MESH_VALIDATION" -*Defined in [index.ts:529](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L529)* +*Defined in [index.ts:594](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L594)* ___ @@ -153,7 +305,7 @@ ___ • **ZeroExValidation**: = "ZEROEX_VALIDATION" -*Defined in [index.ts:527](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L527)* +*Defined in [index.ts:592](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L592)*
@@ -167,7 +319,7 @@ ___ • **Debug**: = 5 -*Defined in [index.ts:149](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L149)* +*Defined in [index.ts:212](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L212)* ___ @@ -175,7 +327,7 @@ ___ • **Error**: = 2 -*Defined in [index.ts:146](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L146)* +*Defined in [index.ts:209](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L209)* ___ @@ -183,7 +335,7 @@ ___ • **Fatal**: = 1 -*Defined in [index.ts:145](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L145)* +*Defined in [index.ts:208](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L208)* ___ @@ -191,7 +343,7 @@ ___ • **Info**: = 4 -*Defined in [index.ts:148](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L148)* +*Defined in [index.ts:211](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L211)* ___ @@ -199,7 +351,7 @@ ___ • **Panic**: = 0 -*Defined in [index.ts:144](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L144)* +*Defined in [index.ts:207](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L207)* ___ @@ -207,7 +359,7 @@ ___ • **Trace**: = 6 -*Defined in [index.ts:150](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L150)* +*Defined in [index.ts:213](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L213)* ___ @@ -215,7 +367,7 @@ ___ • **Warn**: = 3 -*Defined in [index.ts:147](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L147)* +*Defined in [index.ts:210](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L210)*
@@ -235,7 +387,7 @@ Info for any orders that were accepted. • **fillableTakerAssetAmount**: *BigNumber* -*Defined in [index.ts:508](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L508)* +*Defined in [index.ts:573](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L573)* ___ @@ -243,7 +395,7 @@ ___ • **isNew**: *boolean* -*Defined in [index.ts:509](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L509)* +*Defined in [index.ts:574](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L574)* ___ @@ -251,7 +403,7 @@ ___ • **orderHash**: *string* -*Defined in [index.ts:506](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L506)* +*Defined in [index.ts:571](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L571)* ___ @@ -259,7 +411,7 @@ ___ • **signedOrder**: *SignedOrder* -*Defined in [index.ts:507](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L507)* +*Defined in [index.ts:572](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L572)*
@@ -279,7 +431,7 @@ A set of configuration options for Mesh. • **blockPollingIntervalSeconds**? : *undefined | number* -*Defined in [index.ts:79](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L79)* +*Defined in [index.ts:79](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L79)* ___ @@ -287,7 +439,7 @@ ___ • **bootstrapList**? : *string[]* -*Defined in [index.ts:72](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L72)* +*Defined in [index.ts:72](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L72)* ___ @@ -295,7 +447,7 @@ ___ • **customContractAddresses**? : *[ContractAddresses](#class-contractaddresses)* -*Defined in [index.ts:123](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L123)* +*Defined in [index.ts:123](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L123)* ___ @@ -303,7 +455,7 @@ ___ • **enableEthereumRPCRateLimiting**? : *undefined | false | true* -*Defined in [index.ts:96](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L96)* +*Defined in [index.ts:96](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L96)* ___ @@ -311,7 +463,7 @@ ___ • **ethereumChainID**: *number* -*Defined in [index.ts:64](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L64)* +*Defined in [index.ts:64](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L64)* ___ @@ -319,7 +471,7 @@ ___ • **ethereumRPCMaxContentLength**? : *undefined | number* -*Defined in [index.ts:88](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L88)* +*Defined in [index.ts:88](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L88)* ___ @@ -327,7 +479,7 @@ ___ • **ethereumRPCMaxRequestsPer24HrUTC**? : *undefined | number* -*Defined in [index.ts:101](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L101)* +*Defined in [index.ts:101](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L101)* ___ @@ -335,7 +487,7 @@ ___ • **ethereumRPCMaxRequestsPerSecond**? : *undefined | number* -*Defined in [index.ts:107](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L107)* +*Defined in [index.ts:107](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L107)* ___ @@ -343,7 +495,7 @@ ___ • **ethereumRPCURL**: *string* -*Defined in [index.ts:61](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L61)* +*Defined in [index.ts:61](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L61)* ___ @@ -351,7 +503,7 @@ ___ • **maxOrdersInStorage**? : *undefined | number* -*Defined in [index.ts:128](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L128)* +*Defined in [index.ts:128](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L128)* ___ @@ -359,7 +511,7 @@ ___ • **useBootstrapList**? : *undefined | false | true* -*Defined in [index.ts:67](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L67)* +*Defined in [index.ts:67](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L67)* ___ @@ -367,7 +519,7 @@ ___ • **verbosity**? : *[Verbosity](#enumeration-verbosity)* -*Defined in [index.ts:58](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L58)* +*Defined in [index.ts:58](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L58)*
@@ -385,7 +537,7 @@ ___ • **coordinator**? : *undefined | string* -*Defined in [index.ts:137](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L137)* +*Defined in [index.ts:137](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L137)* ___ @@ -393,7 +545,7 @@ ___ • **coordinatorRegistry**? : *undefined | string* -*Defined in [index.ts:138](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L138)* +*Defined in [index.ts:138](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L138)* ___ @@ -401,7 +553,7 @@ ___ • **devUtils**: *string* -*Defined in [index.ts:133](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L133)* +*Defined in [index.ts:133](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L133)* ___ @@ -409,7 +561,7 @@ ___ • **erc1155Proxy**: *string* -*Defined in [index.ts:136](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L136)* +*Defined in [index.ts:136](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L136)* ___ @@ -417,7 +569,7 @@ ___ • **erc20Proxy**: *string* -*Defined in [index.ts:134](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L134)* +*Defined in [index.ts:134](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L134)* ___ @@ -425,7 +577,7 @@ ___ • **erc721Proxy**: *string* -*Defined in [index.ts:135](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L135)* +*Defined in [index.ts:135](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L135)* ___ @@ -433,7 +585,7 @@ ___ • **exchange**: *string* -*Defined in [index.ts:132](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L132)* +*Defined in [index.ts:132](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L132)* ___ @@ -441,7 +593,7 @@ ___ • **weth9**? : *undefined | string* -*Defined in [index.ts:139](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L139)* +*Defined in [index.ts:139](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L139)* ___ @@ -449,7 +601,7 @@ ___ • **zrxToken**? : *undefined | string* -*Defined in [index.ts:140](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L140)* +*Defined in [index.ts:140](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L140)*
@@ -467,7 +619,7 @@ ___ • **address**: *string* -*Defined in [index.ts:420](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L420)* +*Defined in [index.ts:485](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L485)* ___ @@ -475,7 +627,7 @@ ___ • **blockHash**: *string* -*Defined in [index.ts:415](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L415)* +*Defined in [index.ts:480](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L480)* ___ @@ -483,7 +635,7 @@ ___ • **isRemoved**: *string* -*Defined in [index.ts:419](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L419)* +*Defined in [index.ts:484](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L484)* ___ @@ -491,7 +643,7 @@ ___ • **kind**: *ContractEventKind* -*Defined in [index.ts:421](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L421)* +*Defined in [index.ts:486](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L486)* ___ @@ -499,7 +651,7 @@ ___ • **logIndex**: *number* -*Defined in [index.ts:418](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L418)* +*Defined in [index.ts:483](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L483)* ___ @@ -507,7 +659,7 @@ ___ • **parameters**: *ContractEventParameters* -*Defined in [index.ts:422](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L422)* +*Defined in [index.ts:487](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L487)* ___ @@ -515,7 +667,7 @@ ___ • **txHash**: *string* -*Defined in [index.ts:416](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L416)* +*Defined in [index.ts:481](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L481)* ___ @@ -523,7 +675,7 @@ ___ • **txIndex**: *number* -*Defined in [index.ts:417](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L417)* +*Defined in [index.ts:482](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L482)*
@@ -541,7 +693,7 @@ ___ • **approved**: *boolean* -*Defined in [index.ts:296](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L296)* +*Defined in [index.ts:361](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L361)* ___ @@ -549,7 +701,7 @@ ___ • **operator**: *string* -*Defined in [index.ts:295](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L295)* +*Defined in [index.ts:360](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L360)* ___ @@ -557,7 +709,7 @@ ___ • **owner**: *string* -*Defined in [index.ts:294](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L294)* +*Defined in [index.ts:359](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L359)*
@@ -575,7 +727,7 @@ ___ • **from**: *string* -*Defined in [index.ts:279](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L279)* +*Defined in [index.ts:344](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L344)* ___ @@ -583,7 +735,7 @@ ___ • **ids**: *BigNumber[]* -*Defined in [index.ts:281](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L281)* +*Defined in [index.ts:346](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L346)* ___ @@ -591,7 +743,7 @@ ___ • **operator**: *string* -*Defined in [index.ts:278](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L278)* +*Defined in [index.ts:343](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L343)* ___ @@ -599,7 +751,7 @@ ___ • **to**: *string* -*Defined in [index.ts:280](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L280)* +*Defined in [index.ts:345](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L345)* ___ @@ -607,7 +759,7 @@ ___ • **values**: *BigNumber[]* -*Defined in [index.ts:282](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L282)* +*Defined in [index.ts:347](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L347)*
@@ -625,7 +777,7 @@ ___ • **from**: *string* -*Defined in [index.ts:263](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L263)* +*Defined in [index.ts:328](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L328)* ___ @@ -633,7 +785,7 @@ ___ • **id**: *BigNumber* -*Defined in [index.ts:265](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L265)* +*Defined in [index.ts:330](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L330)* ___ @@ -641,7 +793,7 @@ ___ • **operator**: *string* -*Defined in [index.ts:262](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L262)* +*Defined in [index.ts:327](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L327)* ___ @@ -649,7 +801,7 @@ ___ • **to**: *string* -*Defined in [index.ts:264](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L264)* +*Defined in [index.ts:329](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L329)* ___ @@ -657,7 +809,7 @@ ___ • **value**: *BigNumber* -*Defined in [index.ts:266](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L266)* +*Defined in [index.ts:331](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L331)*
@@ -675,7 +827,7 @@ ___ • **owner**: *string* -*Defined in [index.ts:220](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L220)* +*Defined in [index.ts:285](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L285)* ___ @@ -683,7 +835,7 @@ ___ • **spender**: *string* -*Defined in [index.ts:221](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L221)* +*Defined in [index.ts:286](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L286)* ___ @@ -691,7 +843,7 @@ ___ • **value**: *BigNumber* -*Defined in [index.ts:222](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L222)* +*Defined in [index.ts:287](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L287)*
@@ -709,7 +861,7 @@ ___ • **from**: *string* -*Defined in [index.ts:208](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L208)* +*Defined in [index.ts:273](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L273)* ___ @@ -717,7 +869,7 @@ ___ • **to**: *string* -*Defined in [index.ts:209](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L209)* +*Defined in [index.ts:274](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L274)* ___ @@ -725,7 +877,7 @@ ___ • **value**: *BigNumber* -*Defined in [index.ts:210](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L210)* +*Defined in [index.ts:275](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L275)*
@@ -743,7 +895,7 @@ ___ • **approved**: *string* -*Defined in [index.ts:245](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L245)* +*Defined in [index.ts:310](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L310)* ___ @@ -751,7 +903,7 @@ ___ • **owner**: *string* -*Defined in [index.ts:244](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L244)* +*Defined in [index.ts:309](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L309)* ___ @@ -759,138 +911,41 @@ ___ • **tokenId**: *BigNumber* -*Defined in [index.ts:246](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L246)* +*Defined in [index.ts:311](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L311)*
-# Class: Mesh - -The main class for this package. Has methods for receiving order events and -sending orders through the 0x Mesh network. +# Interface: ERC721ApprovalForAllEvent ### Hierarchy -* **Mesh** - - -### Constructors - -## constructer - -\+ **new Mesh**(`config`: [Config](#interface-config)): *[Mesh](#class-mesh)* - -*Defined in [index.ts:576](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L576)* - -Instantiates a new Mesh instance. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`config` | [Config](#interface-config) | Configuration options for Mesh | - -**Returns:** *[Mesh](#class-mesh)* - -An instance of Mesh - -### Methods - -## addOrdersAsync - -▸ **addOrdersAsync**(`orders`: SignedOrder[], `pinned`: boolean): *Promise‹[ValidationResults](#interface-validationresults)›* - -*Defined in [index.ts:650](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L650)* - -Validates and adds the given orders to Mesh. If an order is successfully -added, Mesh will share it with any peers in the network and start -watching it for changes (e.g. filled, canceled, expired). The returned -promise will only be rejected if there was an error validating or adding -the order; it will not be rejected for any invalid orders (check -results.rejected instead). - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`orders` | SignedOrder[] | - | An array of orders to add. | -`pinned` | boolean | true | Whether or not the 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. | - -**Returns:** *Promise‹[ValidationResults](#interface-validationresults)›* - -Validation results for the given orders, indicating which orders -were accepted and which were rejected. - -___ - -## onError - -▸ **onError**(`handler`: function): *void* - -*Defined in [index.ts:596](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L596)* - -Registers a handler which will be called in the event of a critical -error. Note that the handler will not be called for non-critical errors. -In order to ensure no errors are missed, this should be called before -startAsync. - -**Parameters:** - -▪ **handler**: *function* +* **ERC721ApprovalForAllEvent** -The handler to be called. -▸ (`err`: Error): *void* +### Properties -**Parameters:** +## approved -Name | Type | ------- | ------ | -`err` | Error | +• **approved**: *boolean* -**Returns:** *void* +*Defined in [index.ts:323](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L323)* ___ -## onOrderEvents - -▸ **onOrderEvents**(`handler`: function): *void* - -*Defined in [index.ts:611](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L611)* - -Registers a handler which will be called for any incoming order events. -Order events are fired whenver an order is added, canceled, expired, or -filled. In order to ensure no events are missed, this should be called -before startAsync. - -**Parameters:** - -▪ **handler**: *function* - -The handler to be called. - -▸ (`events`: [OrderEvent](#interface-orderevent)[]): *void* - -**Parameters:** +## operator -Name | Type | ------- | ------ | -`events` | [OrderEvent](#interface-orderevent)[] | +• **operator**: *string* -**Returns:** *void* +*Defined in [index.ts:322](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L322)* ___ -## startAsync - -▸ **startAsync**(): *Promise‹void›* - -*Defined in [index.ts:622](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L622)* +## owner -Starts the Mesh node in the background. Mesh will automatically find -peers in the network and begin receiving orders from them. +• **owner**: *string* -**Returns:** *Promise‹void›* +*Defined in [index.ts:321](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L321)*
@@ -908,7 +963,7 @@ peers in the network and begin receiving orders from them. • **from**: *string* -*Defined in [index.ts:232](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L232)* +*Defined in [index.ts:297](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L297)* ___ @@ -916,7 +971,7 @@ ___ • **to**: *string* -*Defined in [index.ts:233](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L233)* +*Defined in [index.ts:298](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L298)* ___ @@ -924,7 +979,7 @@ ___ • **tokenId**: *BigNumber* -*Defined in [index.ts:234](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L234)* +*Defined in [index.ts:299](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L299)*
@@ -942,7 +997,7 @@ ___ • **feeRecipientAddress**: *string* -*Defined in [index.ts:330](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L330)* +*Defined in [index.ts:395](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L395)* ___ @@ -950,7 +1005,7 @@ ___ • **makerAddress**: *string* -*Defined in [index.ts:328](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L328)* +*Defined in [index.ts:393](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L393)* ___ @@ -958,7 +1013,7 @@ ___ • **makerAssetData**: *string* -*Defined in [index.ts:332](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L332)* +*Defined in [index.ts:397](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L397)* ___ @@ -966,7 +1021,7 @@ ___ • **orderHash**: *string* -*Defined in [index.ts:331](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L331)* +*Defined in [index.ts:396](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L396)* ___ @@ -974,7 +1029,7 @@ ___ • **senderAddress**: *string* -*Defined in [index.ts:329](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L329)* +*Defined in [index.ts:394](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L394)* ___ @@ -982,7 +1037,7 @@ ___ • **takerAssetData**: *string* -*Defined in [index.ts:333](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L333)* +*Defined in [index.ts:398](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L398)*
@@ -1000,7 +1055,7 @@ ___ • **makerAddress**: *string* -*Defined in [index.ts:337](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L337)* +*Defined in [index.ts:402](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L402)* ___ @@ -1008,7 +1063,7 @@ ___ • **orderEpoch**: *BigNumber* -*Defined in [index.ts:339](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L339)* +*Defined in [index.ts:404](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L404)* ___ @@ -1016,7 +1071,7 @@ ___ • **senderAddress**: *string* -*Defined in [index.ts:338](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L338)* +*Defined in [index.ts:403](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L403)*
@@ -1034,7 +1089,7 @@ ___ • **feeRecipientAddress**: *string* -*Defined in [index.ts:303](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L303)* +*Defined in [index.ts:368](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L368)* ___ @@ -1042,7 +1097,7 @@ ___ • **makerAddress**: *string* -*Defined in [index.ts:300](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L300)* +*Defined in [index.ts:365](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L365)* ___ @@ -1050,7 +1105,7 @@ ___ • **makerAssetData**: *string* -*Defined in [index.ts:309](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L309)* +*Defined in [index.ts:374](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L374)* ___ @@ -1058,7 +1113,7 @@ ___ • **makerAssetFilledAmount**: *BigNumber* -*Defined in [index.ts:304](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L304)* +*Defined in [index.ts:369](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L369)* ___ @@ -1066,7 +1121,7 @@ ___ • **makerFeePaid**: *BigNumber* -*Defined in [index.ts:306](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L306)* +*Defined in [index.ts:371](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L371)* ___ @@ -1074,7 +1129,7 @@ ___ • **orderHash**: *string* -*Defined in [index.ts:308](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L308)* +*Defined in [index.ts:373](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L373)* ___ @@ -1082,7 +1137,7 @@ ___ • **senderAddress**: *string* -*Defined in [index.ts:302](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L302)* +*Defined in [index.ts:367](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L367)* ___ @@ -1090,7 +1145,7 @@ ___ • **takerAddress**: *string* -*Defined in [index.ts:301](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L301)* +*Defined in [index.ts:366](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L366)* ___ @@ -1098,7 +1153,7 @@ ___ • **takerAssetData**: *string* -*Defined in [index.ts:310](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L310)* +*Defined in [index.ts:375](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L375)* ___ @@ -1106,7 +1161,7 @@ ___ • **takerAssetFilledAmount**: *BigNumber* -*Defined in [index.ts:305](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L305)* +*Defined in [index.ts:370](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L370)* ___ @@ -1114,7 +1169,67 @@ ___ • **takerFeePaid**: *BigNumber* -*Defined in [index.ts:307](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L307)* +*Defined in [index.ts:372](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L372)* + + +
+ +# Interface: GetOrdersResponse + +### Hierarchy + +* **GetOrdersResponse** + + +### Properties + +## ordersInfos + +• **ordersInfos**: *[OrderInfo](#class-orderinfo)[]* + +*Defined in [index.ts:203](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L203)* + +___ + +## snapshotID + +• **snapshotID**: *string* + +*Defined in [index.ts:201](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L201)* + +___ + +## snapshotTimestamp + +• **snapshotTimestamp**: *number* + +*Defined in [index.ts:202](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L202)* + + +
+ +# Interface: LatestBlock + +### Hierarchy + +* **LatestBlock** + + +### Properties + +## hash + +• **hash**: *string* + +*Defined in [index.ts:145](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L145)* + +___ + +## number + +• **number**: *number* + +*Defined in [index.ts:144](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L144)*
@@ -1135,7 +1250,7 @@ or filled. • **contractEvents**: *[ContractEvent](#class-contractevent)[]* -*Defined in [index.ts:469](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L469)* +*Defined in [index.ts:534](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L534)* ___ @@ -1143,7 +1258,7 @@ ___ • **endState**: *[OrderEventEndState](#enumeration-ordereventendstate)* -*Defined in [index.ts:467](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L467)* +*Defined in [index.ts:532](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L532)* ___ @@ -1151,7 +1266,7 @@ ___ • **fillableTakerAssetAmount**: *BigNumber* -*Defined in [index.ts:468](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L468)* +*Defined in [index.ts:533](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L533)* ___ @@ -1159,7 +1274,7 @@ ___ • **orderHash**: *string* -*Defined in [index.ts:465](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L465)* +*Defined in [index.ts:530](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L530)* ___ @@ -1167,7 +1282,7 @@ ___ • **signedOrder**: *SignedOrder* -*Defined in [index.ts:466](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L466)* +*Defined in [index.ts:531](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L531)* ___ @@ -1175,7 +1290,41 @@ ___ • **timestampMs**: *number* -*Defined in [index.ts:464](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L464)* +*Defined in [index.ts:529](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L529)* + + +
+ +# Interface: OrderInfo + +### Hierarchy + +* **OrderInfo** + + +### Properties + +## fillableTakerAssetAmount + +• **fillableTakerAssetAmount**: *BigNumber* + +*Defined in [index.ts:191](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L191)* + +___ + +## orderHash + +• **orderHash**: *string* + +*Defined in [index.ts:189](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L189)* + +___ + +## signedOrder + +• **signedOrder**: *SignedOrder* + +*Defined in [index.ts:190](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L190)*
@@ -1196,7 +1345,7 @@ rejected. • **kind**: *[RejectedOrderKind](#enumeration-rejectedorderkind)* -*Defined in [index.ts:519](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L519)* +*Defined in [index.ts:584](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L584)* ___ @@ -1204,7 +1353,7 @@ ___ • **orderHash**: *string* -*Defined in [index.ts:517](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L517)* +*Defined in [index.ts:582](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L582)* ___ @@ -1212,7 +1361,7 @@ ___ • **signedOrder**: *SignedOrder* -*Defined in [index.ts:518](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L518)* +*Defined in [index.ts:583](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L583)* ___ @@ -1220,7 +1369,7 @@ ___ • **status**: *[RejectedOrderStatus](#class-rejectedorderstatus)* -*Defined in [index.ts:520](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L520)* +*Defined in [index.ts:585](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L585)*
@@ -1240,7 +1389,7 @@ Provides more information about why an order was rejected. • **code**: *string* -*Defined in [index.ts:537](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L537)* +*Defined in [index.ts:602](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L602)* ___ @@ -1248,7 +1397,129 @@ ___ • **message**: *string* -*Defined in [index.ts:538](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L538)* +*Defined in [index.ts:603](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L603)* + + +
+ +# Interface: Stats + +### Hierarchy + +* **Stats** + + +### Properties + +## ethRPCRateLimitExpiredRequests + +• **ethRPCRateLimitExpiredRequests**: *number* + +*Defined in [index.ts:179](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L179)* + +___ + +## ethRPCRequestsSentInCurrentUTCDay + +• **ethRPCRequestsSentInCurrentUTCDay**: *number* + +*Defined in [index.ts:178](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L178)* + +___ + +## ethereumChainID + +• **ethereumChainID**: *number* + +*Defined in [index.ts:170](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L170)* + +___ + +## latestBlock + +• **latestBlock**: *[LatestBlock](#class-latestblock)* + +*Defined in [index.ts:171](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L171)* + +___ + +## maxExpirationTime + +• **maxExpirationTime**: *BigNumber* + +*Defined in [index.ts:176](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L176)* + +___ + +## numOrders + +• **numOrders**: *number* + +*Defined in [index.ts:173](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L173)* + +___ + +## numOrdersIncludingRemoved + +• **numOrdersIncludingRemoved**: *number* + +*Defined in [index.ts:174](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L174)* + +___ + +## numPeers + +• **numPeers**: *number* + +*Defined in [index.ts:172](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L172)* + +___ + +## numPinnedOrders + +• **numPinnedOrders**: *number* + +*Defined in [index.ts:175](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L175)* + +___ + +## peerID + +• **peerID**: *string* + +*Defined in [index.ts:169](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L169)* + +___ + +## pubSubTopic + +• **pubSubTopic**: *string* + +*Defined in [index.ts:167](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L167)* + +___ + +## rendezvous + +• **rendezvous**: *string* + +*Defined in [index.ts:168](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L168)* + +___ + +## startOfCurrentUTCDay + +• **startOfCurrentUTCDay**: *Date* + +*Defined in [index.ts:177](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L177)* + +___ + +## version + +• **version**: *string* + +*Defined in [index.ts:166](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L166)*
@@ -1268,7 +1539,7 @@ Indicates which orders where accepted, which were rejected, and why. • **accepted**: *[AcceptedOrderInfo](#class-acceptedorderinfo)[]* -*Defined in [index.ts:498](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L498)* +*Defined in [index.ts:563](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L563)* ___ @@ -1276,7 +1547,7 @@ ___ • **rejected**: *[RejectedOrderInfo](#class-rejectedorderinfo)[]* -*Defined in [index.ts:499](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L499)* +*Defined in [index.ts:564](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L564)*
@@ -1294,7 +1565,7 @@ ___ • **owner**: *string* -*Defined in [index.ts:359](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L359)* +*Defined in [index.ts:424](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L424)* ___ @@ -1302,7 +1573,7 @@ ___ • **value**: *BigNumber* -*Defined in [index.ts:360](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L360)* +*Defined in [index.ts:425](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L425)*
@@ -1320,7 +1591,7 @@ ___ • **owner**: *string* -*Defined in [index.ts:349](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L349)* +*Defined in [index.ts:414](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L414)* ___ @@ -1328,7 +1599,7 @@ ___ • **value**: *BigNumber* -*Defined in [index.ts:350](https://github.com/0xProject/0x-mesh/blob/9ff988b/browser/ts/index.ts#L350)* +*Defined in [index.ts:415](https://github.com/0xProject/0x-mesh/blob/ae6de374/browser/ts/index.ts#L415)*
diff --git a/docs/deployment.md b/docs/deployment.md index 0b3636c50..e27b41b4f 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,4 +1,4 @@ -[![Version](https://img.shields.io/badge/version-8.1.2-orange.svg)](https://github.com/0xProject/0x-mesh/releases) +[![Version](https://img.shields.io/badge/version-8.2.0-orange.svg)](https://github.com/0xProject/0x-mesh/releases) # 0x Mesh Deployment Guide diff --git a/docs/deployment_with_telemetry.md b/docs/deployment_with_telemetry.md index 007b7027d..30d01acb0 100644 --- a/docs/deployment_with_telemetry.md +++ b/docs/deployment_with_telemetry.md @@ -1,4 +1,4 @@ -[![Version](https://img.shields.io/badge/version-8.1.2-orange.svg)](https://github.com/0xProject/0x-mesh/releases) +[![Version](https://img.shields.io/badge/version-8.2.0-orange.svg)](https://github.com/0xProject/0x-mesh/releases) ## Deploying a Telemetry-Enabled Mesh Node diff --git a/docs/json_rpc_clients/typescript/reference.md b/docs/json_rpc_clients/typescript/reference.md index 33880e8b7..d7bf24658 100644 --- a/docs/json_rpc_clients/typescript/reference.md +++ b/docs/json_rpc_clients/typescript/reference.md @@ -1,49 +1,201 @@ -> # Interface: RawAcceptedOrderInfo +> # Class: WSClient + +This class includes all the functionality related to interacting with a Mesh JSON RPC +websocket endpoint. ## Hierarchy -* **RawAcceptedOrderInfo** +* **WSClient** ## Index -### Properties +### Constructors -* [fillableTakerAssetAmount](#fillabletakerassetamount) -* [isNew](#isnew) -* [orderHash](#orderhash) -* [signedOrder](#signedorder) +* [constructor](#constructor) -## Properties +### Methods -### fillableTakerAssetAmount +* [addOrdersAsync](#addordersasync) +* [destroy](#destroy) +* [getOrdersAsync](#getordersasync) +* [getStatsAsync](#getstatsasync) +* [onClose](#onclose) +* [onReconnected](#onreconnected) +* [subscribeToOrdersAsync](#subscribetoordersasync) +* [unsubscribeAsync](#unsubscribeasync) -• **fillableTakerAssetAmount**: *string* +## Constructors + +### constructor + +\+ **new WSClient**(`url`: string, `wsOpts?`: [WSOpts](#interface-wsopts)): *[WSClient](#class-wsclient)* + +*Defined in [ws_client.ts:252](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L252)* + +Instantiates a new WSClient instance + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`url` | string | WS server endpoint | +`wsOpts?` | [WSOpts](#interface-wsopts) | WebSocket options | + +**Returns:** *[WSClient](#class-wsclient)* + +An instance of WSClient -*Defined in [types.ts:328](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L328)* +## Methods + +### addOrdersAsync + +▸ **addOrdersAsync**(`signedOrders`: `SignedOrder`[], `pinned`: boolean): *`Promise`* + +*Defined in [ws_client.ts:281](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L281)* + +Adds an array of 0x signed orders to the Mesh node. + +**Parameters:** + +Name | Type | Default | Description | +------ | ------ | ------ | ------ | +`signedOrders` | `SignedOrder`[] | - | signedOrders to add | +`pinned` | boolean | true | Whether or not the 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. | + +**Returns:** *`Promise`* + +validation results ___ -### isNew +### destroy -• **isNew**: *boolean* +▸ **destroy**(): *void* -*Defined in [types.ts:329](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L329)* +*Defined in [ws_client.ts:403](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L403)* + +destroy unsubscribes all active subscriptions, closes the websocket connection +and stops the internal heartbeat connection liveness check. + +**Returns:** *void* ___ -### orderHash +### getOrdersAsync -• **orderHash**: *string* +▸ **getOrdersAsync**(`perPage`: number): *`Promise`* + +*Defined in [ws_client.ts:311](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L311)* + +Get all 0x signed orders currently stored in the Mesh node + +**Parameters:** -*Defined in [types.ts:326](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L326)* +Name | Type | Default | Description | +------ | ------ | ------ | ------ | +`perPage` | number | 200 | number of signedOrders to fetch per paginated request | + +**Returns:** *`Promise`* + +all orders, their hash and their fillableTakerAssetAmount ___ -### signedOrder +### getStatsAsync -• **signedOrder**: *[StringifiedSignedOrder](#interface-stringifiedsignedorder)* +▸ **getStatsAsync**(): *`Promise`* + +*Defined in [ws_client.ts:302](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L302)* + +**Returns:** *`Promise`* + +___ + +### onClose + +▸ **onClose**(`cb`: function): *void* + +*Defined in [ws_client.ts:385](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L385)* + +Get notified when the underlying WS connection closes normally. If it closes with an +error, WSClient automatically attempts to re-connect without emitting a `close` event. + +**Parameters:** + +▪ **cb**: *function* + +callback to call when WS connection closes + +▸ (): *void* + +**Returns:** *void* + +___ + +### onReconnected + +▸ **onReconnected**(`cb`: function): *void* + +*Defined in [ws_client.ts:394](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L394)* + +Get notified when a connection to the underlying WS connection is re-established + +**Parameters:** + +▪ **cb**: *function* + +callback to call with the error when it occurs + +▸ (): *void* + +**Returns:** *void* -*Defined in [types.ts:327](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L327)* +___ + +### subscribeToOrdersAsync + +▸ **subscribeToOrdersAsync**(`cb`: function): *`Promise`* + +*Defined in [ws_client.ts:345](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L345)* + +Subscribe to the 'orders' topic and receive order events from Mesh. This method returns a +subscriptionId that can be used to `unsubscribe()` from this subscription. + +**Parameters:** + +▪ **cb**: *function* + +callback function where you'd like to get notified about order events + +▸ (`orderEvents`: [OrderEvent](#interface-orderevent)[]): *void* + +**Parameters:** + +Name | Type | +------ | ------ | +`orderEvents` | [OrderEvent](#interface-orderevent)[] | + +**Returns:** *`Promise`* + +subscriptionId + +___ + +### unsubscribeAsync + +▸ **unsubscribeAsync**(`subscriptionId`: string): *`Promise`* + +*Defined in [ws_client.ts:375](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/ws_client.ts#L375)* + +Unsubscribe from a subscription + +**Parameters:** + +Name | Type | Description | +------ | ------ | ------ | +`subscriptionId` | string | identifier of the subscription to cancel | + +**Returns:** *`Promise`*
@@ -73,7 +225,7 @@ ___ • **ERC1155ApprovalForAllEvent**: = "ERC1155ApprovalForAllEvent" -*Defined in [types.ts:222](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L222)* +*Defined in [types.ts:222](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L222)* ___ @@ -81,7 +233,7 @@ ___ • **ERC1155TransferBatchEvent**: = "ERC1155TransferBatchEvent" -*Defined in [types.ts:224](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L224)* +*Defined in [types.ts:224](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L224)* ___ @@ -89,7 +241,7 @@ ___ • **ERC1155TransferSingleEvent**: = "ERC1155TransferSingleEvent" -*Defined in [types.ts:223](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L223)* +*Defined in [types.ts:223](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L223)* ___ @@ -97,7 +249,7 @@ ___ • **ERC20ApprovalEvent**: = "ERC20ApprovalEvent" -*Defined in [types.ts:218](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L218)* +*Defined in [types.ts:218](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L218)* ___ @@ -105,7 +257,7 @@ ___ • **ERC20TransferEvent**: = "ERC20TransferEvent" -*Defined in [types.ts:217](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L217)* +*Defined in [types.ts:217](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L217)* ___ @@ -113,7 +265,7 @@ ___ • **ERC721ApprovalEvent**: = "ERC721ApprovalEvent" -*Defined in [types.ts:220](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L220)* +*Defined in [types.ts:220](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L220)* ___ @@ -121,7 +273,7 @@ ___ • **ERC721ApprovalForAllEvent**: = "ERC721ApprovalForAllEvent" -*Defined in [types.ts:221](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L221)* +*Defined in [types.ts:221](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L221)* ___ @@ -129,7 +281,7 @@ ___ • **ERC721TransferEvent**: = "ERC721TransferEvent" -*Defined in [types.ts:219](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L219)* +*Defined in [types.ts:219](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L219)* ___ @@ -137,7 +289,7 @@ ___ • **ExchangeCancelEvent**: = "ExchangeCancelEvent" -*Defined in [types.ts:226](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L226)* +*Defined in [types.ts:226](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L226)* ___ @@ -145,7 +297,7 @@ ___ • **ExchangeCancelUpToEvent**: = "ExchangeCancelUpToEvent" -*Defined in [types.ts:227](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L227)* +*Defined in [types.ts:227](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L227)* ___ @@ -153,7 +305,7 @@ ___ • **ExchangeFillEvent**: = "ExchangeFillEvent" -*Defined in [types.ts:225](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L225)* +*Defined in [types.ts:225](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L225)* ___ @@ -161,7 +313,7 @@ ___ • **WethDepositEvent**: = "WethDepositEvent" -*Defined in [types.ts:228](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L228)* +*Defined in [types.ts:228](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L228)* ___ @@ -169,7 +321,7 @@ ___ • **WethWithdrawalEvent**: = "WethWithdrawalEvent" -*Defined in [types.ts:229](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L229)* +*Defined in [types.ts:229](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L229)*
@@ -196,7 +348,7 @@ ___ • **Added**: = "ADDED" -*Defined in [types.ts:286](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L286)* +*Defined in [types.ts:286](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L286)* ___ @@ -204,7 +356,7 @@ ___ • **Cancelled**: = "CANCELLED" -*Defined in [types.ts:289](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L289)* +*Defined in [types.ts:289](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L289)* ___ @@ -212,7 +364,7 @@ ___ • **Expired**: = "EXPIRED" -*Defined in [types.ts:290](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L290)* +*Defined in [types.ts:290](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L290)* ___ @@ -220,7 +372,7 @@ ___ • **FillabilityIncreased**: = "FILLABILITY_INCREASED" -*Defined in [types.ts:294](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L294)* +*Defined in [types.ts:294](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L294)* ___ @@ -228,7 +380,7 @@ ___ • **Filled**: = "FILLED" -*Defined in [types.ts:287](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L287)* +*Defined in [types.ts:287](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L287)* ___ @@ -236,7 +388,7 @@ ___ • **FullyFilled**: = "FULLY_FILLED" -*Defined in [types.ts:288](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L288)* +*Defined in [types.ts:288](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L288)* ___ @@ -244,7 +396,7 @@ ___ • **Invalid**: = "INVALID" -*Defined in [types.ts:285](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L285)* +*Defined in [types.ts:285](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L285)* ___ @@ -252,7 +404,7 @@ ___ • **StoppedWatching**: = "STOPPED_WATCHING" -*Defined in [types.ts:292](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L292)* +*Defined in [types.ts:292](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L292)* ___ @@ -260,7 +412,7 @@ ___ • **Unexpired**: = "UNEXPIRED" -*Defined in [types.ts:291](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L291)* +*Defined in [types.ts:291](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L291)* ___ @@ -268,7 +420,7 @@ ___ • **Unfunded**: = "UNFUNDED" -*Defined in [types.ts:293](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L293)* +*Defined in [types.ts:293](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L293)*
@@ -299,7 +451,7 @@ ___ • **InternalError**: = "InternalError" -*Defined in [types.ts:358](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L358)* +*Defined in [types.ts:358](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L358)* ___ @@ -307,7 +459,7 @@ ___ • **MaxOrderSizeExceeded**: = "MaxOrderSizeExceeded" -*Defined in [types.ts:359](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L359)* +*Defined in [types.ts:359](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L359)* ___ @@ -315,7 +467,7 @@ ___ • **NetworkRequestFailed**: = "NetworkRequestFailed" -*Defined in [types.ts:362](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L362)* +*Defined in [types.ts:362](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L362)* ___ @@ -323,7 +475,7 @@ ___ • **OrderAlreadyStored**: = "OrderAlreadyStored" -*Defined in [types.ts:360](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L360)* +*Defined in [types.ts:360](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L360)* ___ @@ -331,7 +483,7 @@ ___ • **OrderCancelled**: = "OrderCancelled" -*Defined in [types.ts:367](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L367)* +*Defined in [types.ts:367](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L367)* ___ @@ -339,7 +491,7 @@ ___ • **OrderExpired**: = "OrderExpired" -*Defined in [types.ts:365](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L365)* +*Defined in [types.ts:365](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L365)* ___ @@ -347,7 +499,7 @@ ___ • **OrderForIncorrectChain**: = "OrderForIncorrectChain" -*Defined in [types.ts:361](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L361)* +*Defined in [types.ts:361](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L361)* ___ @@ -355,7 +507,7 @@ ___ • **OrderFullyFilled**: = "OrderFullyFilled" -*Defined in [types.ts:366](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L366)* +*Defined in [types.ts:366](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L366)* ___ @@ -363,7 +515,7 @@ ___ • **OrderHasInvalidMakerAssetAmount**: = "OrderHasInvalidMakerAssetAmount" -*Defined in [types.ts:363](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L363)* +*Defined in [types.ts:363](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L363)* ___ @@ -371,7 +523,7 @@ ___ • **OrderHasInvalidMakerAssetData**: = "OrderHasInvalidMakerAssetData" -*Defined in [types.ts:369](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L369)* +*Defined in [types.ts:369](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L369)* ___ @@ -379,7 +531,7 @@ ___ • **OrderHasInvalidSignature**: = "OrderHasInvalidSignature" -*Defined in [types.ts:371](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L371)* +*Defined in [types.ts:371](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L371)* ___ @@ -387,7 +539,7 @@ ___ • **OrderHasInvalidTakerAssetAmount**: = "OrderHasInvalidTakerAssetAmount" -*Defined in [types.ts:364](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L364)* +*Defined in [types.ts:364](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L364)* ___ @@ -395,7 +547,7 @@ ___ • **OrderHasInvalidTakerAssetData**: = "OrderHasInvalidTakerAssetData" -*Defined in [types.ts:370](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L370)* +*Defined in [types.ts:370](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L370)* ___ @@ -403,7 +555,7 @@ ___ • **OrderUnfunded**: = "OrderUnfunded" -*Defined in [types.ts:368](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L368)* +*Defined in [types.ts:368](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L368)*
@@ -423,7 +575,7 @@ ___ • **MeshError**: = "MESH_ERROR" -*Defined in [types.ts:353](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L353)* +*Defined in [types.ts:353](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L353)* ___ @@ -431,7 +583,7 @@ ___ • **MeshValidation**: = "MESH_VALIDATION" -*Defined in [types.ts:354](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L354)* +*Defined in [types.ts:354](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L354)* ___ @@ -439,7 +591,7 @@ ___ • **ZeroexValidation**: = "ZEROEX_VALIDATION" -*Defined in [types.ts:352](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L352)* +*Defined in [types.ts:352](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L352)*
@@ -464,7 +616,7 @@ ___ • **fillableTakerAssetAmount**: *`BigNumber`* -*Defined in [types.ts:335](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L335)* +*Defined in [types.ts:335](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L335)* ___ @@ -472,7 +624,7 @@ ___ • **isNew**: *boolean* -*Defined in [types.ts:336](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L336)* +*Defined in [types.ts:336](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L336)* ___ @@ -480,7 +632,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:333](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L333)* +*Defined in [types.ts:333](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L333)* ___ @@ -488,7 +640,7 @@ ___ • **signedOrder**: *`SignedOrder`* -*Defined in [types.ts:334](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L334)* +*Defined in [types.ts:334](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L334)*
@@ -520,7 +672,7 @@ Source: https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocket • **assembleFragments**? : *undefined | false | true* -*Defined in [types.ts:16](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L16)* +*Defined in [types.ts:16](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L16)* ___ @@ -528,7 +680,7 @@ ___ • **closeTimeout**? : *undefined | number* -*Defined in [types.ts:17](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L17)* +*Defined in [types.ts:17](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L17)* ___ @@ -536,7 +688,7 @@ ___ • **fragmentOutgoingMessages**? : *undefined | false | true* -*Defined in [types.ts:14](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L14)* +*Defined in [types.ts:14](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L14)* ___ @@ -544,7 +696,7 @@ ___ • **fragmentationThreshold**? : *undefined | number* -*Defined in [types.ts:15](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L15)* +*Defined in [types.ts:15](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L15)* ___ @@ -552,7 +704,7 @@ ___ • **maxReceivedFrameSize**? : *undefined | number* -*Defined in [types.ts:12](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L12)* +*Defined in [types.ts:12](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L12)* ___ @@ -560,7 +712,7 @@ ___ • **maxReceivedMessageSize**? : *undefined | number* -*Defined in [types.ts:13](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L13)* +*Defined in [types.ts:13](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L13)* ___ @@ -568,7 +720,7 @@ ___ • **tlsOptions**? : *any* -*Defined in [types.ts:18](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L18)* +*Defined in [types.ts:18](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L18)* ___ @@ -576,7 +728,7 @@ ___ • **webSocketVersion**? : *undefined | number* -*Defined in [types.ts:11](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L11)* +*Defined in [types.ts:11](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L11)*
@@ -605,7 +757,7 @@ ___ • **address**: *string* -*Defined in [types.ts:279](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L279)* +*Defined in [types.ts:279](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L279)* ___ @@ -613,7 +765,7 @@ ___ • **blockHash**: *string* -*Defined in [types.ts:274](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L274)* +*Defined in [types.ts:274](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L274)* ___ @@ -621,7 +773,7 @@ ___ • **isRemoved**: *string* -*Defined in [types.ts:278](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L278)* +*Defined in [types.ts:278](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L278)* ___ @@ -629,7 +781,7 @@ ___ • **kind**: *[ContractEventKind](#enumeration-contracteventkind)* -*Defined in [types.ts:280](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L280)* +*Defined in [types.ts:280](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L280)* ___ @@ -637,7 +789,7 @@ ___ • **logIndex**: *number* -*Defined in [types.ts:277](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L277)* +*Defined in [types.ts:277](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L277)* ___ @@ -645,7 +797,7 @@ ___ • **parameters**: *[ContractEventParameters](#contracteventparameters)* -*Defined in [types.ts:281](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L281)* +*Defined in [types.ts:281](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L281)* ___ @@ -653,7 +805,7 @@ ___ • **txHash**: *string* -*Defined in [types.ts:275](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L275)* +*Defined in [types.ts:275](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L275)* ___ @@ -661,7 +813,7 @@ ___ • **txIndex**: *number* -*Defined in [types.ts:276](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L276)* +*Defined in [types.ts:276](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L276)*
@@ -685,7 +837,7 @@ ___ • **approved**: *boolean* -*Defined in [types.ts:144](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L144)* +*Defined in [types.ts:144](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L144)* ___ @@ -693,7 +845,7 @@ ___ • **operator**: *string* -*Defined in [types.ts:143](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L143)* +*Defined in [types.ts:143](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L143)* ___ @@ -701,7 +853,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:142](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L142)* +*Defined in [types.ts:142](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L142)*
@@ -727,7 +879,7 @@ ___ • **from**: *string* -*Defined in [types.ts:127](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L127)* +*Defined in [types.ts:127](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L127)* ___ @@ -735,7 +887,7 @@ ___ • **ids**: *`BigNumber`[]* -*Defined in [types.ts:129](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L129)* +*Defined in [types.ts:129](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L129)* ___ @@ -743,7 +895,7 @@ ___ • **operator**: *string* -*Defined in [types.ts:126](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L126)* +*Defined in [types.ts:126](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L126)* ___ @@ -751,7 +903,7 @@ ___ • **to**: *string* -*Defined in [types.ts:128](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L128)* +*Defined in [types.ts:128](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L128)* ___ @@ -759,7 +911,7 @@ ___ • **values**: *`BigNumber`[]* -*Defined in [types.ts:130](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L130)* +*Defined in [types.ts:130](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L130)*
@@ -785,7 +937,7 @@ ___ • **from**: *string* -*Defined in [types.ts:111](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L111)* +*Defined in [types.ts:111](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L111)* ___ @@ -793,7 +945,7 @@ ___ • **id**: *`BigNumber`* -*Defined in [types.ts:113](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L113)* +*Defined in [types.ts:113](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L113)* ___ @@ -801,7 +953,7 @@ ___ • **operator**: *string* -*Defined in [types.ts:110](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L110)* +*Defined in [types.ts:110](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L110)* ___ @@ -809,7 +961,7 @@ ___ • **to**: *string* -*Defined in [types.ts:112](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L112)* +*Defined in [types.ts:112](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L112)* ___ @@ -817,7 +969,7 @@ ___ • **value**: *`BigNumber`* -*Defined in [types.ts:114](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L114)* +*Defined in [types.ts:114](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L114)*
@@ -841,7 +993,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:68](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L68)* +*Defined in [types.ts:68](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L68)* ___ @@ -849,7 +1001,7 @@ ___ • **spender**: *string* -*Defined in [types.ts:69](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L69)* +*Defined in [types.ts:69](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L69)* ___ @@ -857,7 +1009,7 @@ ___ • **value**: *`BigNumber`* -*Defined in [types.ts:70](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L70)* +*Defined in [types.ts:70](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L70)*
@@ -881,7 +1033,7 @@ ___ • **from**: *string* -*Defined in [types.ts:56](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L56)* +*Defined in [types.ts:56](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L56)* ___ @@ -889,7 +1041,7 @@ ___ • **to**: *string* -*Defined in [types.ts:57](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L57)* +*Defined in [types.ts:57](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L57)* ___ @@ -897,7 +1049,7 @@ ___ • **value**: *`BigNumber`* -*Defined in [types.ts:58](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L58)* +*Defined in [types.ts:58](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L58)*
@@ -921,7 +1073,7 @@ ___ • **approved**: *string* -*Defined in [types.ts:93](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L93)* +*Defined in [types.ts:93](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L93)* ___ @@ -929,7 +1081,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:92](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L92)* +*Defined in [types.ts:92](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L92)* ___ @@ -937,7 +1089,7 @@ ___ • **tokenId**: *`BigNumber`* -*Defined in [types.ts:94](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L94)* +*Defined in [types.ts:94](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L94)*
@@ -961,7 +1113,7 @@ ___ • **approved**: *boolean* -*Defined in [types.ts:106](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L106)* +*Defined in [types.ts:106](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L106)* ___ @@ -969,7 +1121,7 @@ ___ • **operator**: *string* -*Defined in [types.ts:105](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L105)* +*Defined in [types.ts:105](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L105)* ___ @@ -977,7 +1129,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:104](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L104)* +*Defined in [types.ts:104](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L104)*
@@ -1001,7 +1153,7 @@ ___ • **from**: *string* -*Defined in [types.ts:80](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L80)* +*Defined in [types.ts:80](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L80)* ___ @@ -1009,7 +1161,7 @@ ___ • **to**: *string* -*Defined in [types.ts:81](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L81)* +*Defined in [types.ts:81](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L81)* ___ @@ -1017,7 +1169,7 @@ ___ • **tokenId**: *`BigNumber`* -*Defined in [types.ts:82](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L82)* +*Defined in [types.ts:82](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L82)*
@@ -1044,7 +1196,7 @@ ___ • **feeRecipientAddress**: *string* -*Defined in [types.ts:178](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L178)* +*Defined in [types.ts:178](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L178)* ___ @@ -1052,7 +1204,7 @@ ___ • **makerAddress**: *string* -*Defined in [types.ts:176](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L176)* +*Defined in [types.ts:176](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L176)* ___ @@ -1060,7 +1212,7 @@ ___ • **makerAssetData**: *string* -*Defined in [types.ts:180](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L180)* +*Defined in [types.ts:180](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L180)* ___ @@ -1068,7 +1220,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:179](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L179)* +*Defined in [types.ts:179](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L179)* ___ @@ -1076,7 +1228,7 @@ ___ • **senderAddress**: *string* -*Defined in [types.ts:177](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L177)* +*Defined in [types.ts:177](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L177)* ___ @@ -1084,7 +1236,7 @@ ___ • **takerAssetData**: *string* -*Defined in [types.ts:181](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L181)* +*Defined in [types.ts:181](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L181)*
@@ -1108,7 +1260,7 @@ ___ • **makerAddress**: *string* -*Defined in [types.ts:185](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L185)* +*Defined in [types.ts:185](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L185)* ___ @@ -1116,7 +1268,7 @@ ___ • **orderEpoch**: *`BigNumber`* -*Defined in [types.ts:187](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L187)* +*Defined in [types.ts:187](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L187)* ___ @@ -1124,7 +1276,7 @@ ___ • **senderAddress**: *string* -*Defined in [types.ts:186](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L186)* +*Defined in [types.ts:186](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L186)*
@@ -1156,7 +1308,7 @@ ___ • **feeRecipientAddress**: *string* -*Defined in [types.ts:151](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L151)* +*Defined in [types.ts:151](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L151)* ___ @@ -1164,7 +1316,7 @@ ___ • **makerAddress**: *string* -*Defined in [types.ts:148](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L148)* +*Defined in [types.ts:148](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L148)* ___ @@ -1172,7 +1324,7 @@ ___ • **makerAssetData**: *string* -*Defined in [types.ts:157](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L157)* +*Defined in [types.ts:157](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L157)* ___ @@ -1180,7 +1332,7 @@ ___ • **makerAssetFilledAmount**: *`BigNumber`* -*Defined in [types.ts:152](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L152)* +*Defined in [types.ts:152](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L152)* ___ @@ -1188,7 +1340,7 @@ ___ • **makerFeePaid**: *`BigNumber`* -*Defined in [types.ts:154](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L154)* +*Defined in [types.ts:154](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L154)* ___ @@ -1196,7 +1348,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:156](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L156)* +*Defined in [types.ts:156](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L156)* ___ @@ -1204,7 +1356,7 @@ ___ • **senderAddress**: *string* -*Defined in [types.ts:150](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L150)* +*Defined in [types.ts:150](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L150)* ___ @@ -1212,7 +1364,7 @@ ___ • **takerAddress**: *string* -*Defined in [types.ts:149](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L149)* +*Defined in [types.ts:149](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L149)* ___ @@ -1220,7 +1372,7 @@ ___ • **takerAssetData**: *string* -*Defined in [types.ts:158](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L158)* +*Defined in [types.ts:158](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L158)* ___ @@ -1228,7 +1380,7 @@ ___ • **takerAssetFilledAmount**: *`BigNumber`* -*Defined in [types.ts:153](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L153)* +*Defined in [types.ts:153](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L153)* ___ @@ -1236,7 +1388,7 @@ ___ • **takerFeePaid**: *`BigNumber`* -*Defined in [types.ts:155](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L155)* +*Defined in [types.ts:155](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L155)*
@@ -1260,7 +1412,7 @@ ___ • **ordersInfos**: *[OrderInfo](#interface-orderinfo)[]* -*Defined in [types.ts:415](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L415)* +*Defined in [types.ts:415](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L415)* ___ @@ -1268,7 +1420,7 @@ ___ • **snapshotID**: *string* -*Defined in [types.ts:413](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L413)* +*Defined in [types.ts:413](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L413)* ___ @@ -1276,7 +1428,7 @@ ___ • **snapshotTimestamp**: *number* -*Defined in [types.ts:414](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L414)* +*Defined in [types.ts:414](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L414)*
@@ -1311,7 +1463,7 @@ ___ • **ethRPCRateLimitExpiredRequests**: *number* -*Defined in [types.ts:442](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L442)* +*Defined in [types.ts:442](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L442)* ___ @@ -1319,7 +1471,7 @@ ___ • **ethRPCRequestsSentInCurrentUTCDay**: *number* -*Defined in [types.ts:441](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L441)* +*Defined in [types.ts:441](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L441)* ___ @@ -1327,7 +1479,7 @@ ___ • **ethereumChainID**: *number* -*Defined in [types.ts:433](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L433)* +*Defined in [types.ts:433](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L433)* ___ @@ -1335,7 +1487,7 @@ ___ • **latestBlock**: *[LatestBlock](#interface-latestblock)* -*Defined in [types.ts:434](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L434)* +*Defined in [types.ts:434](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L434)* ___ @@ -1343,7 +1495,7 @@ ___ • **maxExpirationTime**: *string* -*Defined in [types.ts:439](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L439)* +*Defined in [types.ts:439](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L439)* ___ @@ -1351,7 +1503,7 @@ ___ • **numOrders**: *number* -*Defined in [types.ts:436](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L436)* +*Defined in [types.ts:436](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L436)* ___ @@ -1359,7 +1511,7 @@ ___ • **numOrdersIncludingRemoved**: *number* -*Defined in [types.ts:437](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L437)* +*Defined in [types.ts:437](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L437)* ___ @@ -1367,7 +1519,7 @@ ___ • **numPeers**: *number* -*Defined in [types.ts:435](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L435)* +*Defined in [types.ts:435](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L435)* ___ @@ -1375,7 +1527,7 @@ ___ • **numPinnedOrders**: *number* -*Defined in [types.ts:438](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L438)* +*Defined in [types.ts:438](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L438)* ___ @@ -1383,7 +1535,7 @@ ___ • **peerID**: *string* -*Defined in [types.ts:432](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L432)* +*Defined in [types.ts:432](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L432)* ___ @@ -1391,7 +1543,7 @@ ___ • **pubSubTopic**: *string* -*Defined in [types.ts:430](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L430)* +*Defined in [types.ts:430](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L430)* ___ @@ -1399,7 +1551,7 @@ ___ • **rendezvous**: *string* -*Defined in [types.ts:431](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L431)* +*Defined in [types.ts:431](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L431)* ___ @@ -1407,7 +1559,7 @@ ___ • **startOfCurrentUTCDay**: *string* -*Defined in [types.ts:440](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L440)* +*Defined in [types.ts:440](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L440)* ___ @@ -1415,7 +1567,7 @@ ___ • **version**: *string* -*Defined in [types.ts:429](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L429)* +*Defined in [types.ts:429](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L429)*
@@ -1438,7 +1590,7 @@ ___ • **result**: *string* -*Defined in [types.ts:304](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L304)* +*Defined in [types.ts:304](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L304)* ___ @@ -1446,7 +1598,7 @@ ___ • **subscription**: *string* -*Defined in [types.ts:303](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L303)* +*Defined in [types.ts:303](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L303)*
@@ -1469,7 +1621,7 @@ ___ • **hash**: *string* -*Defined in [types.ts:425](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L425)* +*Defined in [types.ts:425](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L425)* ___ @@ -1477,7 +1629,7 @@ ___ • **number**: *number* -*Defined in [types.ts:424](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L424)* +*Defined in [types.ts:424](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L424)*
@@ -1504,7 +1656,7 @@ ___ • **contractEvents**: *[ContractEvent](#interface-contractevent)[]* -*Defined in [types.ts:322](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L322)* +*Defined in [types.ts:322](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L322)* ___ @@ -1512,7 +1664,7 @@ ___ • **endState**: *[OrderEventEndState](#enumeration-ordereventendstate)* -*Defined in [types.ts:320](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L320)* +*Defined in [types.ts:320](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L320)* ___ @@ -1520,7 +1672,7 @@ ___ • **fillableTakerAssetAmount**: *`BigNumber`* -*Defined in [types.ts:321](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L321)* +*Defined in [types.ts:321](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L321)* ___ @@ -1528,7 +1680,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:318](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L318)* +*Defined in [types.ts:318](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L318)* ___ @@ -1536,7 +1688,7 @@ ___ • **signedOrder**: *`SignedOrder`* -*Defined in [types.ts:319](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L319)* +*Defined in [types.ts:319](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L319)* ___ @@ -1544,7 +1696,7 @@ ___ • **timestampMs**: *number* -*Defined in [types.ts:317](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L317)* +*Defined in [types.ts:317](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L317)*
@@ -1567,7 +1719,7 @@ ___ • **result**: *[RawOrderEvent](#interface-raworderevent)[]* -*Defined in [types.ts:299](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L299)* +*Defined in [types.ts:299](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L299)* ___ @@ -1575,7 +1727,7 @@ ___ • **subscription**: *string* -*Defined in [types.ts:298](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L298)* +*Defined in [types.ts:298](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L298)*
@@ -1599,7 +1751,7 @@ ___ • **fillableTakerAssetAmount**: *`BigNumber`* -*Defined in [types.ts:348](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L348)* +*Defined in [types.ts:348](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L348)* ___ @@ -1607,7 +1759,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:346](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L346)* +*Defined in [types.ts:346](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L346)* ___ @@ -1615,208 +1767,56 @@ ___ • **signedOrder**: *`SignedOrder`* -*Defined in [types.ts:347](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L347)* +*Defined in [types.ts:347](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L347)*
-> # Class: WSClient - -This class includes all the functionality related to interacting with a Mesh JSON RPC -websocket endpoint. +> # Interface: RawAcceptedOrderInfo ## Hierarchy -* **WSClient** +* **RawAcceptedOrderInfo** ## Index -### Constructors - -* [constructor](#constructor) - -### Methods - -* [addOrdersAsync](#addordersasync) -* [destroy](#destroy) -* [getOrdersAsync](#getordersasync) -* [getStatsAsync](#getstatsasync) -* [onClose](#onclose) -* [onReconnected](#onreconnected) -* [subscribeToOrdersAsync](#subscribetoordersasync) -* [unsubscribeAsync](#unsubscribeasync) - -## Constructors - -### constructor - -\+ **new WSClient**(`url`: string, `wsOpts?`: [WSOpts](#interface-wsopts)): *[WSClient](#class-wsclient)* - -*Defined in [ws_client.ts:252](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L252)* - -Instantiates a new WSClient instance - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`url` | string | WS server endpoint | -`wsOpts?` | [WSOpts](#interface-wsopts) | WebSocket options | - -**Returns:** *[WSClient](#class-wsclient)* - -An instance of WSClient - -## Methods - -### addOrdersAsync - -▸ **addOrdersAsync**(`signedOrders`: `SignedOrder`[], `pinned`: boolean): *`Promise`* - -*Defined in [ws_client.ts:281](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L281)* - -Adds an array of 0x signed orders to the Mesh node. - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`signedOrders` | `SignedOrder`[] | - | signedOrders to add | -`pinned` | boolean | true | Whether or not the 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. | - -**Returns:** *`Promise`* - -validation results - -___ - -### destroy - -▸ **destroy**(): *void* - -*Defined in [ws_client.ts:403](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L403)* - -destroy unsubscribes all active subscriptions, closes the websocket connection -and stops the internal heartbeat connection liveness check. - -**Returns:** *void* - -___ - -### getOrdersAsync - -▸ **getOrdersAsync**(`perPage`: number): *`Promise`* - -*Defined in [ws_client.ts:311](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L311)* - -Get all 0x signed orders currently stored in the Mesh node - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`perPage` | number | 200 | number of signedOrders to fetch per paginated request | - -**Returns:** *`Promise`* - -all orders, their hash and their fillableTakerAssetAmount - -___ - -### getStatsAsync - -▸ **getStatsAsync**(): *`Promise`* - -*Defined in [ws_client.ts:302](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L302)* - -**Returns:** *`Promise`* - -___ - -### onClose - -▸ **onClose**(`cb`: function): *void* - -*Defined in [ws_client.ts:385](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L385)* - -Get notified when the underlying WS connection closes normally. If it closes with an -error, WSClient automatically attempts to re-connect without emitting a `close` event. +### Properties -**Parameters:** +* [fillableTakerAssetAmount](#fillabletakerassetamount) +* [isNew](#isnew) +* [orderHash](#orderhash) +* [signedOrder](#signedorder) -▪ **cb**: *function* +## Properties -callback to call when WS connection closes +### fillableTakerAssetAmount -▸ (): *void* +• **fillableTakerAssetAmount**: *string* -**Returns:** *void* +*Defined in [types.ts:328](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L328)* ___ -### onReconnected - -▸ **onReconnected**(`cb`: function): *void* - -*Defined in [ws_client.ts:394](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L394)* - -Get notified when a connection to the underlying WS connection is re-established - -**Parameters:** - -▪ **cb**: *function* - -callback to call with the error when it occurs +### isNew -▸ (): *void* +• **isNew**: *boolean* -**Returns:** *void* +*Defined in [types.ts:329](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L329)* ___ -### subscribeToOrdersAsync - -▸ **subscribeToOrdersAsync**(`cb`: function): *`Promise`* - -*Defined in [ws_client.ts:345](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L345)* - -Subscribe to the 'orders' topic and receive order events from Mesh. This method returns a -subscriptionId that can be used to `unsubscribe()` from this subscription. - -**Parameters:** - -▪ **cb**: *function* - -callback function where you'd like to get notified about order events - -▸ (`orderEvents`: [OrderEvent](#interface-orderevent)[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`orderEvents` | [OrderEvent](#interface-orderevent)[] | +### orderHash -**Returns:** *`Promise`* +• **orderHash**: *string* -subscriptionId +*Defined in [types.ts:326](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L326)* ___ -### unsubscribeAsync - -▸ **unsubscribeAsync**(`subscriptionId`: string): *`Promise`* - -*Defined in [ws_client.ts:375](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/ws_client.ts#L375)* - -Unsubscribe from a subscription - -**Parameters:** +### signedOrder -Name | Type | Description | ------- | ------ | ------ | -`subscriptionId` | string | identifier of the subscription to cancel | +• **signedOrder**: *[StringifiedSignedOrder](#interface-stringifiedsignedorder)* -**Returns:** *`Promise`* +*Defined in [types.ts:327](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L327)*
@@ -1840,7 +1840,7 @@ Name | Type | Description | • **ordersInfos**: *[RawAcceptedOrderInfo](#interface-rawacceptedorderinfo)[]* -*Defined in [types.ts:406](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L406)* +*Defined in [types.ts:406](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L406)* ___ @@ -1848,7 +1848,7 @@ ___ • **snapshotID**: *string* -*Defined in [types.ts:404](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L404)* +*Defined in [types.ts:404](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L404)* ___ @@ -1856,7 +1856,7 @@ ___ • **snapshotTimestamp**: *string* -*Defined in [types.ts:405](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L405)* +*Defined in [types.ts:405](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L405)*
@@ -1883,7 +1883,7 @@ ___ • **contractEvents**: *[StringifiedContractEvent](#interface-stringifiedcontractevent)[]* -*Defined in [types.ts:313](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L313)* +*Defined in [types.ts:313](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L313)* ___ @@ -1891,7 +1891,7 @@ ___ • **endState**: *[OrderEventEndState](#enumeration-ordereventendstate)* -*Defined in [types.ts:311](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L311)* +*Defined in [types.ts:311](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L311)* ___ @@ -1899,7 +1899,7 @@ ___ • **fillableTakerAssetAmount**: *string* -*Defined in [types.ts:312](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L312)* +*Defined in [types.ts:312](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L312)* ___ @@ -1907,7 +1907,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:309](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L309)* +*Defined in [types.ts:309](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L309)* ___ @@ -1915,7 +1915,7 @@ ___ • **signedOrder**: *[StringifiedSignedOrder](#interface-stringifiedsignedorder)* -*Defined in [types.ts:310](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L310)* +*Defined in [types.ts:310](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L310)* ___ @@ -1923,7 +1923,7 @@ ___ • **timestamp**: *string* -*Defined in [types.ts:308](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L308)* +*Defined in [types.ts:308](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L308)*
@@ -1947,7 +1947,7 @@ ___ • **fillableTakerAssetAmount**: *string* -*Defined in [types.ts:342](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L342)* +*Defined in [types.ts:342](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L342)* ___ @@ -1955,7 +1955,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:340](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L340)* +*Defined in [types.ts:340](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L340)* ___ @@ -1963,7 +1963,7 @@ ___ • **signedOrder**: *[StringifiedSignedOrder](#interface-stringifiedsignedorder)* -*Defined in [types.ts:341](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L341)* +*Defined in [types.ts:341](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L341)*
@@ -1988,7 +1988,7 @@ ___ • **kind**: *[RejectedKind](#enumeration-rejectedkind)* -*Defined in [types.ts:382](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L382)* +*Defined in [types.ts:382](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L382)* ___ @@ -1996,7 +1996,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:380](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L380)* +*Defined in [types.ts:380](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L380)* ___ @@ -2004,7 +2004,7 @@ ___ • **signedOrder**: *[StringifiedSignedOrder](#interface-stringifiedsignedorder)* -*Defined in [types.ts:381](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L381)* +*Defined in [types.ts:381](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L381)* ___ @@ -2012,7 +2012,7 @@ ___ • **status**: *[RejectedStatus](#interface-rejectedstatus)* -*Defined in [types.ts:383](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L383)* +*Defined in [types.ts:383](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L383)*
@@ -2035,7 +2035,7 @@ ___ • **accepted**: *[RawAcceptedOrderInfo](#interface-rawacceptedorderinfo)[]* -*Defined in [types.ts:394](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L394)* +*Defined in [types.ts:394](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L394)* ___ @@ -2043,7 +2043,7 @@ ___ • **rejected**: *[RawRejectedOrderInfo](#interface-rawrejectedorderinfo)[]* -*Defined in [types.ts:395](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L395)* +*Defined in [types.ts:395](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L395)*
@@ -2068,7 +2068,7 @@ ___ • **kind**: *[RejectedKind](#enumeration-rejectedkind)* -*Defined in [types.ts:389](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L389)* +*Defined in [types.ts:389](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L389)* ___ @@ -2076,7 +2076,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:387](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L387)* +*Defined in [types.ts:387](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L387)* ___ @@ -2084,7 +2084,7 @@ ___ • **signedOrder**: *`SignedOrder`* -*Defined in [types.ts:388](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L388)* +*Defined in [types.ts:388](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L388)* ___ @@ -2092,7 +2092,7 @@ ___ • **status**: *[RejectedStatus](#interface-rejectedstatus)* -*Defined in [types.ts:390](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L390)* +*Defined in [types.ts:390](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L390)*
@@ -2115,7 +2115,7 @@ ___ • **code**: *[RejectedCode](#enumeration-rejectedcode)* -*Defined in [types.ts:375](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L375)* +*Defined in [types.ts:375](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L375)* ___ @@ -2123,7 +2123,7 @@ ___ • **message**: *string* -*Defined in [types.ts:376](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L376)* +*Defined in [types.ts:376](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L376)*
@@ -2152,7 +2152,7 @@ ___ • **address**: *string* -*Defined in [types.ts:253](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L253)* +*Defined in [types.ts:253](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L253)* ___ @@ -2160,7 +2160,7 @@ ___ • **blockHash**: *string* -*Defined in [types.ts:248](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L248)* +*Defined in [types.ts:248](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L248)* ___ @@ -2168,7 +2168,7 @@ ___ • **isRemoved**: *string* -*Defined in [types.ts:252](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L252)* +*Defined in [types.ts:252](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L252)* ___ @@ -2176,7 +2176,7 @@ ___ • **kind**: *string* -*Defined in [types.ts:254](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L254)* +*Defined in [types.ts:254](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L254)* ___ @@ -2184,7 +2184,7 @@ ___ • **logIndex**: *number* -*Defined in [types.ts:251](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L251)* +*Defined in [types.ts:251](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L251)* ___ @@ -2192,7 +2192,7 @@ ___ • **parameters**: *[StringifiedContractEventParameters](#stringifiedcontracteventparameters)* -*Defined in [types.ts:255](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L255)* +*Defined in [types.ts:255](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L255)* ___ @@ -2200,7 +2200,7 @@ ___ • **txHash**: *string* -*Defined in [types.ts:249](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L249)* +*Defined in [types.ts:249](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L249)* ___ @@ -2208,7 +2208,7 @@ ___ • **txIndex**: *number* -*Defined in [types.ts:250](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L250)* +*Defined in [types.ts:250](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L250)*
@@ -2234,7 +2234,7 @@ ___ • **from**: *string* -*Defined in [types.ts:135](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L135)* +*Defined in [types.ts:135](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L135)* ___ @@ -2242,7 +2242,7 @@ ___ • **ids**: *string[]* -*Defined in [types.ts:137](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L137)* +*Defined in [types.ts:137](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L137)* ___ @@ -2250,7 +2250,7 @@ ___ • **operator**: *string* -*Defined in [types.ts:134](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L134)* +*Defined in [types.ts:134](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L134)* ___ @@ -2258,7 +2258,7 @@ ___ • **to**: *string* -*Defined in [types.ts:136](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L136)* +*Defined in [types.ts:136](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L136)* ___ @@ -2266,7 +2266,7 @@ ___ • **values**: *string[]* -*Defined in [types.ts:138](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L138)* +*Defined in [types.ts:138](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L138)*
@@ -2292,7 +2292,7 @@ ___ • **from**: *string* -*Defined in [types.ts:119](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L119)* +*Defined in [types.ts:119](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L119)* ___ @@ -2300,7 +2300,7 @@ ___ • **id**: *string* -*Defined in [types.ts:121](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L121)* +*Defined in [types.ts:121](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L121)* ___ @@ -2308,7 +2308,7 @@ ___ • **operator**: *string* -*Defined in [types.ts:118](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L118)* +*Defined in [types.ts:118](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L118)* ___ @@ -2316,7 +2316,7 @@ ___ • **to**: *string* -*Defined in [types.ts:120](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L120)* +*Defined in [types.ts:120](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L120)* ___ @@ -2324,7 +2324,7 @@ ___ • **value**: *string* -*Defined in [types.ts:122](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L122)* +*Defined in [types.ts:122](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L122)*
@@ -2348,7 +2348,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:74](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L74)* +*Defined in [types.ts:74](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L74)* ___ @@ -2356,7 +2356,7 @@ ___ • **spender**: *string* -*Defined in [types.ts:75](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L75)* +*Defined in [types.ts:75](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L75)* ___ @@ -2364,7 +2364,7 @@ ___ • **value**: *string* -*Defined in [types.ts:76](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L76)* +*Defined in [types.ts:76](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L76)*
@@ -2388,7 +2388,7 @@ ___ • **from**: *string* -*Defined in [types.ts:62](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L62)* +*Defined in [types.ts:62](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L62)* ___ @@ -2396,7 +2396,7 @@ ___ • **to**: *string* -*Defined in [types.ts:63](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L63)* +*Defined in [types.ts:63](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L63)* ___ @@ -2404,7 +2404,7 @@ ___ • **value**: *string* -*Defined in [types.ts:64](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L64)* +*Defined in [types.ts:64](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L64)*
@@ -2428,7 +2428,7 @@ ___ • **approved**: *string* -*Defined in [types.ts:99](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L99)* +*Defined in [types.ts:99](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L99)* ___ @@ -2436,7 +2436,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:98](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L98)* +*Defined in [types.ts:98](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L98)* ___ @@ -2444,7 +2444,7 @@ ___ • **tokenId**: *string* -*Defined in [types.ts:100](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L100)* +*Defined in [types.ts:100](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L100)*
@@ -2468,7 +2468,7 @@ ___ • **from**: *string* -*Defined in [types.ts:86](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L86)* +*Defined in [types.ts:86](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L86)* ___ @@ -2476,7 +2476,7 @@ ___ • **to**: *string* -*Defined in [types.ts:87](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L87)* +*Defined in [types.ts:87](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L87)* ___ @@ -2484,7 +2484,7 @@ ___ • **tokenId**: *string* -*Defined in [types.ts:88](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L88)* +*Defined in [types.ts:88](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L88)*
@@ -2508,7 +2508,7 @@ ___ • **makerAddress**: *string* -*Defined in [types.ts:191](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L191)* +*Defined in [types.ts:191](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L191)* ___ @@ -2516,7 +2516,7 @@ ___ • **orderEpoch**: *string* -*Defined in [types.ts:193](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L193)* +*Defined in [types.ts:193](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L193)* ___ @@ -2524,7 +2524,7 @@ ___ • **senderAddress**: *string* -*Defined in [types.ts:192](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L192)* +*Defined in [types.ts:192](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L192)*
@@ -2556,7 +2556,7 @@ ___ • **feeRecipientAddress**: *string* -*Defined in [types.ts:165](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L165)* +*Defined in [types.ts:165](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L165)* ___ @@ -2564,7 +2564,7 @@ ___ • **makerAddress**: *string* -*Defined in [types.ts:162](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L162)* +*Defined in [types.ts:162](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L162)* ___ @@ -2572,7 +2572,7 @@ ___ • **makerAssetData**: *string* -*Defined in [types.ts:171](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L171)* +*Defined in [types.ts:171](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L171)* ___ @@ -2580,7 +2580,7 @@ ___ • **makerAssetFilledAmount**: *string* -*Defined in [types.ts:166](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L166)* +*Defined in [types.ts:166](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L166)* ___ @@ -2588,7 +2588,7 @@ ___ • **makerFeePaid**: *string* -*Defined in [types.ts:168](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L168)* +*Defined in [types.ts:168](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L168)* ___ @@ -2596,7 +2596,7 @@ ___ • **orderHash**: *string* -*Defined in [types.ts:170](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L170)* +*Defined in [types.ts:170](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L170)* ___ @@ -2604,7 +2604,7 @@ ___ • **senderAddress**: *string* -*Defined in [types.ts:164](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L164)* +*Defined in [types.ts:164](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L164)* ___ @@ -2612,7 +2612,7 @@ ___ • **takerAddress**: *string* -*Defined in [types.ts:163](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L163)* +*Defined in [types.ts:163](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L163)* ___ @@ -2620,7 +2620,7 @@ ___ • **takerAssetData**: *string* -*Defined in [types.ts:172](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L172)* +*Defined in [types.ts:172](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L172)* ___ @@ -2628,7 +2628,7 @@ ___ • **takerAssetFilledAmount**: *string* -*Defined in [types.ts:167](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L167)* +*Defined in [types.ts:167](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L167)* ___ @@ -2636,7 +2636,7 @@ ___ • **takerFeePaid**: *string* -*Defined in [types.ts:169](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L169)* +*Defined in [types.ts:169](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L169)*
@@ -2671,7 +2671,7 @@ ___ • **exchangeAddress**: *string* -*Defined in [types.ts:49](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L49)* +*Defined in [types.ts:49](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L49)* ___ @@ -2679,7 +2679,7 @@ ___ • **expirationTimeSeconds**: *string* -*Defined in [types.ts:51](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L51)* +*Defined in [types.ts:51](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L51)* ___ @@ -2687,7 +2687,7 @@ ___ • **feeRecipientAddress**: *string* -*Defined in [types.ts:50](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L50)* +*Defined in [types.ts:50](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L50)* ___ @@ -2695,7 +2695,7 @@ ___ • **makerAddress**: *string* -*Defined in [types.ts:40](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L40)* +*Defined in [types.ts:40](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L40)* ___ @@ -2703,7 +2703,7 @@ ___ • **makerAssetAmount**: *string* -*Defined in [types.ts:44](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L44)* +*Defined in [types.ts:44](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L44)* ___ @@ -2711,7 +2711,7 @@ ___ • **makerAssetData**: *string* -*Defined in [types.ts:46](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L46)* +*Defined in [types.ts:46](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L46)* ___ @@ -2719,7 +2719,7 @@ ___ • **makerFee**: *string* -*Defined in [types.ts:42](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L42)* +*Defined in [types.ts:42](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L42)* ___ @@ -2727,7 +2727,7 @@ ___ • **salt**: *string* -*Defined in [types.ts:48](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L48)* +*Defined in [types.ts:48](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L48)* ___ @@ -2735,7 +2735,7 @@ ___ • **senderAddress**: *string* -*Defined in [types.ts:39](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L39)* +*Defined in [types.ts:39](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L39)* ___ @@ -2743,7 +2743,7 @@ ___ • **signature**: *string* -*Defined in [types.ts:52](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L52)* +*Defined in [types.ts:52](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L52)* ___ @@ -2751,7 +2751,7 @@ ___ • **takerAddress**: *string* -*Defined in [types.ts:41](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L41)* +*Defined in [types.ts:41](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L41)* ___ @@ -2759,7 +2759,7 @@ ___ • **takerAssetAmount**: *string* -*Defined in [types.ts:45](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L45)* +*Defined in [types.ts:45](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L45)* ___ @@ -2767,7 +2767,7 @@ ___ • **takerAssetData**: *string* -*Defined in [types.ts:47](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L47)* +*Defined in [types.ts:47](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L47)* ___ @@ -2775,7 +2775,7 @@ ___ • **takerFee**: *string* -*Defined in [types.ts:43](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L43)* +*Defined in [types.ts:43](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L43)*
@@ -2798,7 +2798,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:212](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L212)* +*Defined in [types.ts:212](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L212)* ___ @@ -2806,7 +2806,7 @@ ___ • **value**: *string* -*Defined in [types.ts:213](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L213)* +*Defined in [types.ts:213](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L213)*
@@ -2829,7 +2829,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:202](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L202)* +*Defined in [types.ts:202](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L202)* ___ @@ -2837,7 +2837,7 @@ ___ • **value**: *string* -*Defined in [types.ts:203](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L203)* +*Defined in [types.ts:203](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L203)*
@@ -2860,7 +2860,7 @@ ___ • **accepted**: *[AcceptedOrderInfo](#interface-acceptedorderinfo)[]* -*Defined in [types.ts:399](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L399)* +*Defined in [types.ts:399](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L399)* ___ @@ -2868,7 +2868,7 @@ ___ • **rejected**: *[RejectedOrderInfo](#interface-rejectedorderinfo)[]* -*Defined in [types.ts:400](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L400)* +*Defined in [types.ts:400](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L400)*
@@ -2891,7 +2891,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:207](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L207)* +*Defined in [types.ts:207](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L207)* ___ @@ -2899,7 +2899,7 @@ ___ • **value**: *`BigNumber`* -*Defined in [types.ts:208](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L208)* +*Defined in [types.ts:208](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L208)*
@@ -2922,7 +2922,7 @@ ___ • **owner**: *string* -*Defined in [types.ts:197](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L197)* +*Defined in [types.ts:197](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L197)* ___ @@ -2930,7 +2930,7 @@ ___ • **value**: *`BigNumber`* -*Defined in [types.ts:198](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L198)* +*Defined in [types.ts:198](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L198)*
@@ -2953,7 +2953,7 @@ ___ • **type**: *string* -*Defined in [types.ts:419](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L419)* +*Defined in [types.ts:419](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L419)* ___ @@ -2961,7 +2961,7 @@ ___ • **utf8Data**: *string* -*Defined in [types.ts:420](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L420)* +*Defined in [types.ts:420](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L420)*
@@ -2995,7 +2995,7 @@ reconnectDelay: time in milliseconds after which to attempt to reconnect to WS s • **clientConfig**? : *[ClientConfig](#interface-clientconfig)* -*Defined in [types.ts:34](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L34)* +*Defined in [types.ts:34](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L34)* ___ @@ -3003,7 +3003,7 @@ ___ • **headers**? : *undefined | `__type`* -*Defined in [types.ts:32](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L32)* +*Defined in [types.ts:32](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L32)* ___ @@ -3011,7 +3011,7 @@ ___ • **protocol**? : *undefined | string* -*Defined in [types.ts:33](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L33)* +*Defined in [types.ts:33](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L33)* ___ @@ -3019,7 +3019,7 @@ ___ • **reconnectDelay**? : *undefined | number* -*Defined in [types.ts:35](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L35)* +*Defined in [types.ts:35](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L35)* ___ @@ -3027,7 +3027,7 @@ ___ • **timeout**? : *undefined | number* -*Defined in [types.ts:31](https://github.com/0xProject/0x-mesh/blob/9ff988b/rpc/clients/typescript/src/types.ts#L31)* +*Defined in [types.ts:31](https://github.com/0xProject/0x-mesh/blob/ae6de374/rpc/clients/typescript/src/types.ts#L31)*
diff --git a/docs/rpc_api.md b/docs/rpc_api.md index 5f3e651f6..8e575b788 100644 --- a/docs/rpc_api.md +++ b/docs/rpc_api.md @@ -1,4 +1,4 @@ -[![Version](https://img.shields.io/badge/version-8.1.2-orange.svg)](https://github.com/0xProject/0x-mesh/releases) +[![Version](https://img.shields.io/badge/version-8.2.0-orange.svg)](https://github.com/0xProject/0x-mesh/releases) # 0x Mesh JSON-RPC API Documentation diff --git a/ethereum/contract_addresses.go b/ethereum/contract_addresses.go index a56068d71..b637371e7 100644 --- a/ethereum/contract_addresses.go +++ b/ethereum/contract_addresses.go @@ -67,7 +67,7 @@ var ChainIDToContractAddresses = map[int]ContractAddresses{ ERC1155Proxy: common.HexToAddress("0x7eefbd48fd63d441ec7435d024ec7c5131019add"), Coordinator: common.HexToAddress("0x38a795580d0f687e399913a00ddef6a17612c722"), CoordinatorRegistry: common.HexToAddress("0x45797531b873fd5e519477a070a955764c1a5b07"), - DevUtils: common.HexToAddress("0x8771a1b8bd39787c80b5dee7793ed9ccf90c20ab"), + DevUtils: common.HexToAddress("0xb1a3d901bad1df7d710fc8d008db7cdd6bbbffe6"), WETH9: common.HexToAddress("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"), ZRXToken: common.HexToAddress("0xe41d2489571d322189246dafa5ebde1f4699f498"), }, @@ -79,7 +79,7 @@ var ChainIDToContractAddresses = map[int]ContractAddresses{ ERC1155Proxy: common.HexToAddress("0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d"), Coordinator: common.HexToAddress("0x6ff734d96104965c9c1b0108f83abc46e6e501df"), CoordinatorRegistry: common.HexToAddress("0x403cc23e88c17c4652fb904784d1af640a6722d9"), - DevUtils: common.HexToAddress("0x8771a1b8bd39787c80b5dee7793ed9ccf90c20ab"), + DevUtils: common.HexToAddress("0xb1a3d901bad1df7d710fc8d008db7cdd6bbbffe6"), WETH9: common.HexToAddress("0xc778417e063141139fce010982780140aa0cd5ab"), ZRXToken: common.HexToAddress("0xff67881f8d12f372d91baae9752eb3631ff0ed00"), }, @@ -91,7 +91,7 @@ var ChainIDToContractAddresses = map[int]ContractAddresses{ Exchange: common.HexToAddress("0x198805e9682fceec29413059b68550f92868c129"), Coordinator: common.HexToAddress("0x70c5385ee5ee4629ef72abd169e888c8b4a12238"), CoordinatorRegistry: common.HexToAddress("0x1084b6a398e47907bae43fec3ff4b677db6e4fee"), - DevUtils: common.HexToAddress("0x8771a1b8bd39787c80b5dee7793ed9ccf90c20ab"), + DevUtils: common.HexToAddress("0xb1a3d901bad1df7d710fc8d008db7cdd6bbbffe6"), WETH9: common.HexToAddress("0xc778417e063141139fce010982780140aa0cd5ab"), ZRXToken: common.HexToAddress("0x8080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa"), }, @@ -103,7 +103,7 @@ var ChainIDToContractAddresses = map[int]ContractAddresses{ ERC1155Proxy: common.HexToAddress("0x64517fa2b480ba3678a2a3c0cf08ef7fd4fad36f"), Coordinator: common.HexToAddress("0xd29e59e51e8ab5f94121efaeebd935ca4214e257"), CoordinatorRegistry: common.HexToAddress("0x09fb99968c016a3ff537bf58fb3d9fe55a7975d5"), - DevUtils: common.HexToAddress("0x8771a1b8bd39787c80b5dee7793ed9ccf90c20ab"), + DevUtils: common.HexToAddress("0xb1a3d901bad1df7d710fc8d008db7cdd6bbbffe6"), WETH9: common.HexToAddress("0xd0a1e359811322d97991e03f863a0c30c2cf029c"), ZRXToken: common.HexToAddress("0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa"), }, diff --git a/integration-tests/browser/src/index.ts b/integration-tests/browser/src/index.ts index d59c01298..09a09c8c4 100644 --- a/integration-tests/browser/src/index.ts +++ b/integration-tests/browser/src/index.ts @@ -60,9 +60,24 @@ provider.start(); // canceled, or filled. We will check for certain events to be logged in the // integration tests. mesh.onOrderEvents((events: Array) => { - for (let event of events) { - console.log(JSON.stringify(event)); - } + (async () => { + for (let event of events) { + // Check the happy path for getOrdersForPageAsync. There should + // be two orders. (just make sure it doesn't throw/reject). + const firstOrdersResponse = await mesh.getOrdersForPageAsync(0, 1, ''); + console.log(JSON.stringify(firstOrdersResponse)); + const secondOrdersResponse = await mesh.getOrdersForPageAsync(1, 1, firstOrdersResponse.snapshotID); + console.log(JSON.stringify(secondOrdersResponse)); + + // Check the happy path for getOrders (just make sure it + // doesn't throw/reject). + await mesh.getOrdersAsync(); + + // Log the event. The Go code will be watching the logs for + // this. + console.log(JSON.stringify(event)); + } + })().catch(err => console.error(err)); }); // Start Mesh *after* we set up the handlers. @@ -80,6 +95,10 @@ provider.start(); throw new Error('Expected no orders to be rejected but got: ' + result.rejected.length); } + // Call getStatsAsync and make sure it works. + const stats = await mesh.getStatsAsync(); + console.log(JSON.stringify(stats)); + // This special #jsFinished div is used to signal the headless Chrome driver // that the JavaScript code is done running. const finishedDiv = document.createElement('div'); diff --git a/integration-tests/browser_integration_test.go b/integration-tests/browser_integration_test.go index 36882f120..61395ca94 100644 --- a/integration-tests/browser_integration_test.go +++ b/integration-tests/browser_integration_test.go @@ -1,3 +1,5 @@ +// +build !js + // Package integrationtests contains broad integration tests that // include a bootstrap node, a standalone node, and a browser node. package integrationtests diff --git a/integration-tests/rpc_integration_test.go b/integration-tests/rpc_integration_test.go index 7d920ccbe..716c2148b 100644 --- a/integration-tests/rpc_integration_test.go +++ b/integration-tests/rpc_integration_test.go @@ -12,6 +12,8 @@ import ( "testing" "time" + "github.com/0xProject/0x-mesh/common/types" + "github.com/0xProject/0x-mesh/constants" "github.com/0xProject/0x-mesh/ethereum/ratelimit" "github.com/0xProject/0x-mesh/rpc" @@ -173,7 +175,7 @@ func TestGetOrders(t *testing.T) { // Iterate through enough pages to get all of the orders in the mesh nodes database. Compare the // responses to the orders that we expect to be in the database. - var responseOrders []*rpc.OrderInfo + var responseOrders []*types.OrderInfo for pageNumber := 0; pageNumber < highestPageNumber; pageNumber++ { expectedTimestamp := time.Now().UTC() getOrdersResponse, err := client.GetOrders(pageNumber, testCase.ordersPerPage, snapshotID) @@ -233,14 +235,14 @@ func TestGetStats(t *testing.T) { // NOTE(jalextowle): Since this test uses an actual mesh node, we can't know in advance which block // should be the latest block. - getStatsResponse.LatestBlock = rpc.LatestBlock{} + getStatsResponse.LatestBlock = types.LatestBlock{} // Ensure that the correct response was logged by "GetStats" require.Equal(t, "/0x-orders/network/1337/version/2", getStatsResponse.PubSubTopic) require.Equal(t, "/0x-mesh/network/1337/version/2", getStatsResponse.Rendezvous) require.Equal(t, jsonLog.PeerID, getStatsResponse.PeerID) require.Equal(t, 1337, getStatsResponse.EthereumChainID) - require.Equal(t, rpc.LatestBlock{}, getStatsResponse.LatestBlock) + require.Equal(t, types.LatestBlock{}, getStatsResponse.LatestBlock) require.Equal(t, 0, getStatsResponse.NumOrders) require.Equal(t, 0, getStatsResponse.NumPeers) require.Equal(t, constants.UnlimitedExpirationTime.String(), getStatsResponse.MaxExpirationTime) diff --git a/integration-tests/utils.go b/integration-tests/utils.go index 29f4495a8..c29f626ba 100644 --- a/integration-tests/utils.go +++ b/integration-tests/utils.go @@ -14,9 +14,10 @@ import ( "sync" "testing" + "github.com/0xProject/0x-mesh/common/types" + "github.com/0xProject/0x-mesh/constants" "github.com/0xProject/0x-mesh/ethereum" - "github.com/0xProject/0x-mesh/rpc" "github.com/0xProject/0x-mesh/zeroex" "github.com/chromedp/cdproto/runtime" "github.com/chromedp/chromedp" @@ -303,7 +304,7 @@ func waitForReceivedOrderLog(ctx context.Context, logMessages <-chan string, exp // Ensure that all of the orders in given list of signed orders are included in a list of order info. The list // of order info can contain more orders than the first list and still pass this assertion. -func assertSignedOrdersMatch(t *testing.T, expectedSignedOrders []*zeroex.SignedOrder, actualOrderInfo []*rpc.OrderInfo) { +func assertSignedOrdersMatch(t *testing.T, expectedSignedOrders []*zeroex.SignedOrder, actualOrderInfo []*types.OrderInfo) { for _, expectedOrder := range expectedSignedOrders { foundMatchingOrder := false diff --git a/rpc/client.go b/rpc/client.go index b7dccaf3b..d9d924d6b 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -1,13 +1,14 @@ +// +build !js + package rpc import ( "context" "errors" - "time" + "github.com/0xProject/0x-mesh/common/types" "github.com/0xProject/0x-mesh/zeroex" "github.com/0xProject/0x-mesh/zeroex/ordervalidator" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc" peer "github.com/libp2p/go-libp2p-peer" peerstore "github.com/libp2p/go-libp2p-peerstore" @@ -31,18 +32,9 @@ func NewClient(addr string) (*Client, error) { }, nil } -// AddOrdersOpts is a set of options for the AddOrders RPC method. -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"` -} - // AddOrders adds orders to the 0x Mesh node and broadcasts them throughout the // 0x Mesh network. -func (c *Client) AddOrders(orders []*zeroex.SignedOrder, opts ...AddOrdersOpts) (*ordervalidator.ValidationResults, error) { +func (c *Client) AddOrders(orders []*zeroex.SignedOrder, opts ...types.AddOrdersOpts) (*ordervalidator.ValidationResults, error) { var validationResults ordervalidator.ValidationResults if len(opts) > 1 { return nil, errors.New("invalid number of add orders opts") @@ -58,16 +50,9 @@ func (c *Client) AddOrders(orders []*zeroex.SignedOrder, opts ...AddOrdersOpts) return &validationResults, nil } -// GetOrdersResponse is the response returned for an RPC request to mesh_getOrders -type GetOrdersResponse struct { - SnapshotID string `json:"snapshotID"` - SnapshotTimestamp time.Time `json:"snapshotTimestamp"` - OrdersInfos []*OrderInfo `json:"ordersInfos"` -} - // GetOrders gets all orders stored on the Mesh node at a particular point in time in a paginated fashion -func (c *Client) GetOrders(page, perPage int, snapshotID string) (*GetOrdersResponse, error) { - var getOrdersResponse GetOrdersResponse +func (c *Client) GetOrders(page, perPage int, snapshotID string) (*types.GetOrdersResponse, error) { + var getOrdersResponse types.GetOrdersResponse if err := c.rpcClient.Call(&getOrdersResponse, "mesh_getOrders", page, perPage, snapshotID); err != nil { return nil, err } @@ -88,33 +73,9 @@ func (c *Client) AddPeer(peerInfo peerstore.PeerInfo) error { return nil } -// LatestBlock is the latest block processed by the Mesh node -type LatestBlock struct { - Number int `json:"number"` - Hash common.Hash `json:"hash"` -} - -// GetStatsResponse is the response returned for an RPC request to mesh_getStats -type GetStatsResponse 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"` -} - // GetStats retrieves stats about the Mesh node -func (c *Client) GetStats() (*GetStatsResponse, error) { - var getStatsResponse *GetStatsResponse +func (c *Client) GetStats() (*types.Stats, error) { + var getStatsResponse *types.Stats if err := c.rpcClient.Call(&getStatsResponse, "mesh_getStats"); err != nil { return nil, err } diff --git a/rpc/clients/typescript/package.json b/rpc/clients/typescript/package.json index 84903a465..928e2c886 100644 --- a/rpc/clients/typescript/package.json +++ b/rpc/clients/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@0x/mesh-rpc-client", - "version": "8.1.2", + "version": "8.2.0", "engines": { "node": ">=6.12" }, diff --git a/rpc/service.go b/rpc/service.go index c4864bb11..8dd9e6bd1 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -1,3 +1,5 @@ +// +build !js + package rpc import ( @@ -7,6 +9,7 @@ import ( "strings" "time" + "github.com/0xProject/0x-mesh/common/types" "github.com/0xProject/0x-mesh/constants" "github.com/0xProject/0x-mesh/zeroex/ordervalidator" "github.com/ethereum/go-ethereum/rpc" @@ -28,13 +31,13 @@ type rpcService struct { // RPCHandler is used to respond to incoming requests from the client. type RPCHandler interface { // AddOrders is called when the client sends an AddOrders request. - AddOrders(signedOrdersRaw []*json.RawMessage, opts AddOrdersOpts) (*ordervalidator.ValidationResults, error) + AddOrders(signedOrdersRaw []*json.RawMessage, opts types.AddOrdersOpts) (*ordervalidator.ValidationResults, error) // GetOrders is called when the clients sends a GetOrders request - GetOrders(page, perPage int, snapshotID string) (*GetOrdersResponse, error) + GetOrders(page, perPage int, snapshotID string) (*types.GetOrdersResponse, error) // AddPeer is called when the client sends an AddPeer request. AddPeer(peerInfo peerstore.PeerInfo) error // GetStats is called when the client sends an GetStats request. - GetStats() (*GetStatsResponse, error) + GetStats() (*types.Stats, error) // SubscribeToOrders is called when a client sends a Subscribe to `orders` request SubscribeToOrders(ctx context.Context) (*rpc.Subscription, error) } @@ -120,12 +123,12 @@ func SetupHeartbeat(ctx context.Context) (*ethrpc.Subscription, error) { return rpcSub, nil } -var defaultAddOrdersOpts = AddOrdersOpts{ +var defaultAddOrdersOpts = types.AddOrdersOpts{ Pinned: true, } // AddOrders calls rpcHandler.AddOrders and returns the validation results. -func (s *rpcService) AddOrders(signedOrdersRaw []*json.RawMessage, opts *AddOrdersOpts) (*ordervalidator.ValidationResults, error) { +func (s *rpcService) AddOrders(signedOrdersRaw []*json.RawMessage, opts *types.AddOrdersOpts) (*ordervalidator.ValidationResults, error) { if opts == nil { opts = &defaultAddOrdersOpts } @@ -133,7 +136,7 @@ func (s *rpcService) AddOrders(signedOrdersRaw []*json.RawMessage, opts *AddOrde } // GetOrders calls rpcHandler.GetOrders and returns the validation results. -func (s *rpcService) GetOrders(page, perPage int, snapshotID string) (*GetOrdersResponse, error) { +func (s *rpcService) GetOrders(page, perPage int, snapshotID string) (*types.GetOrdersResponse, error) { return s.rpcHandler.GetOrders(page, perPage, snapshotID) } @@ -164,6 +167,6 @@ func (s *rpcService) AddPeer(peerID string, multiaddrs []string) error { } // GetStats calls rpcHandler.GetStats. If there is an error, it returns it. -func (s *rpcService) GetStats() (*GetStatsResponse, error) { +func (s *rpcService) GetStats() (*types.Stats, error) { return s.rpcHandler.GetStats() } diff --git a/rpc/types.go b/rpc/types.go deleted file mode 100644 index 19c1c0bf4..000000000 --- a/rpc/types.go +++ /dev/null @@ -1,51 +0,0 @@ -package rpc - -import ( - "encoding/json" - "errors" - "math/big" - - "github.com/0xProject/0x-mesh/zeroex" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" -) - -// OrderInfo represents an fillable order and how much it could be filled for -type OrderInfo struct { - OrderHash common.Hash `json:"orderHash"` - SignedOrder *zeroex.SignedOrder `json:"signedOrder"` - FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"` -} - -type orderInfoJSON struct { - OrderHash string `json:"orderHash"` - SignedOrder *zeroex.SignedOrder `json:"signedOrder"` - FillableTakerAssetAmount string `json:"fillableTakerAssetAmount"` -} - -// MarshalJSON is a custom Marshaler for OrderInfo -func (o OrderInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ - "orderHash": o.OrderHash.Hex(), - "signedOrder": o.SignedOrder, - "fillableTakerAssetAmount": o.FillableTakerAssetAmount.String(), - }) -} - -// UnmarshalJSON implements a custom JSON unmarshaller for the OrderEvent type -func (o *OrderInfo) UnmarshalJSON(data []byte) error { - var orderInfoJSON orderInfoJSON - err := json.Unmarshal(data, &orderInfoJSON) - if err != nil { - return err - } - - o.OrderHash = common.HexToHash(orderInfoJSON.OrderHash) - o.SignedOrder = orderInfoJSON.SignedOrder - var ok bool - o.FillableTakerAssetAmount, ok = math.ParseBig256(orderInfoJSON.FillableTakerAssetAmount) - if !ok { - return errors.New("Invalid uint256 number encountered for FillableTakerAssetAmount") - } - return nil -} diff --git a/zeroex/ordervalidator/order_validator.go b/zeroex/ordervalidator/order_validator.go index f33cf08e8..327ce1bb4 100644 --- a/zeroex/ordervalidator/order_validator.go +++ b/zeroex/ordervalidator/order_validator.go @@ -9,6 +9,7 @@ import ( "io/ioutil" "math/big" "net/http" + "regexp" "strings" "sync" "time" @@ -354,10 +355,24 @@ func (o *OrderValidator) BatchValidate(ctx context.Context, rawSignedOrders []*z d := b.Duration() if d == maxDuration { <-semaphoreChan - log.WithFields(log.Fields{ - "error": err.Error(), - "numOrders": len(trimmedOrders), - }).Warning("Gave up on GetOrderRelevantStates request after backoff limit reached") + var fields log.Fields + match, regexpErr := regexp.MatchString("abi: improperly formatted output", err.Error()) + if regexpErr != nil { + log.WithField("error", regexpErr).Error("Unexpectedly failed to test regexp on error") + } + if err.Error() == "VM execution error." || match { + fields = log.Fields{ + "error": err.Error(), + "numOrders": len(trimmedOrders), + "orders": trimmedOrders, + } + } else { + fields = log.Fields{ + "error": err.Error(), + "numOrders": len(trimmedOrders), + } + } + log.WithFields(fields).Warning("Gave up on GetOrderRelevantStates request after backoff limit reached") for _, signedOrder := range signedOrders { orderHash, err := signedOrder.ComputeOrderHash() if err != nil { @@ -691,7 +706,7 @@ func (o *OrderValidator) BatchOffchainValidation(signedOrders []*zeroex.SignedOr Status: ROInvalidMakerFeeAssetData, }) continue - } + } } if len(signedOrder.TakerFeeAssetData) != 0 { isTakerFeeAssetDataSupported := o.isSupportedAssetData(signedOrder.TakerFeeAssetData) @@ -703,7 +718,7 @@ func (o *OrderValidator) BatchOffchainValidation(signedOrders []*zeroex.SignedOr Status: ROInvalidTakerFeeAssetData, }) continue - } + } } isSupportedSignature := isSupportedSignature(signedOrder.Signature, orderHash)