aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-12-19 23:17:46 +0800
committerFabio Berger <me@fabioberger.com>2018-12-19 23:17:46 +0800
commit94dc272335214edfefa2d926c7cf4e434ff02f5b (patch)
treeb61640be8301ffbf557c73ca3ba3ac082a34c77c /packages/json-schemas
parent7664f6a4fdb2ad31f56c5fb59e4bbc84454ec635 (diff)
parent040b402b6d558d13f2f4e032297b6723cdf2aafe (diff)
downloaddexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.tar
dexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.tar.gz
dexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.tar.bz2
dexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.tar.lz
dexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.tar.xz
dexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.tar.zst
dexon-sol-tools-94dc272335214edfefa2d926c7cf4e434ff02f5b.zip
Merge branch 'development' into addUnenforcedConventions
* development: (92 commits) Add missing CHANGELOG entry for OrderWatcher WS interface Bump up stale to close to 30 days Move onMessageAsync outside of tests and add comments Fix WS tests to remove race-condition and be more specific about the message expected Add temporary console.log to test failing on CI Make @0x/contracts-test-utils a dependency instead of a devDependency Fix test-publish failure in contracts packages Fixed solhint errors Added documentation to `LibAddressArray.append` and switched `if` to `require` smt Updated changelogs for new contracts Added `gas` field so tests pass on Geth; Added Changelog for new Extensions Updated comment `Execute fillOrder` -> `Execute exchange function` Explicit returns Prettier / Linter on contracts + TS Refactoring balance threshold filter Moved exchange calldata functions to separate mixin Less Assembly. More Solidity. Less Efficiency. More Readability. Run all tests for extensions Cleaned up tests for balance threshold filter ...
Diffstat (limited to 'packages/json-schemas')
-rw-r--r--packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json52
-rw-r--r--packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json10
-rw-r--r--packages/json-schemas/src/schemas.ts4
-rw-r--r--packages/json-schemas/tsconfig.json2
4 files changed, 68 insertions, 0 deletions
diff --git a/packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json b/packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json
new file mode 100644
index 000000000..b0c419f94
--- /dev/null
+++ b/packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json
@@ -0,0 +1,52 @@
+{
+ "id": "/orderWatcherWebSocketRequestSchema",
+ "type": "object",
+ "definitions": {
+ "signedOrderParam": {
+ "type": "object",
+ "properties": {
+ "signedOrder": { "$ref": "/signedOrderSchema" }
+ },
+ "required": ["signedOrder"]
+ },
+ "orderHashParam": {
+ "type": "object",
+ "properties": {
+ "orderHash": { "$ref": "/hexSchema" }
+ },
+ "required": ["orderHash"]
+ }
+ },
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "number" },
+ "jsonrpc": { "type": "string" },
+ "method": { "enum": ["ADD_ORDER"] },
+ "params": { "$ref": "#/definitions/signedOrderParam" }
+ },
+ "required": ["id", "jsonrpc", "method", "params"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "number" },
+ "jsonrpc": { "type": "string" },
+ "method": { "enum": ["REMOVE_ORDER"] },
+ "params": { "$ref": "#/definitions/orderHashParam" }
+ },
+ "required": ["id", "jsonrpc", "method", "params"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "number" },
+ "jsonrpc": { "type": "string" },
+ "method": { "enum": ["GET_STATS"] },
+ "params": {}
+ },
+ "required": ["id", "jsonrpc", "method"]
+ }
+ ]
+} \ No newline at end of file
diff --git a/packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json b/packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json
new file mode 100644
index 000000000..154d6d754
--- /dev/null
+++ b/packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json
@@ -0,0 +1,10 @@
+{
+ "id": "/orderWatcherWebSocketUtf8MessageSchema",
+ "properties": {
+ "utf8Data": { "type": "string" }
+ },
+ "required": [
+ "utf8Data"
+ ],
+ "type": "object"
+}
diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts
index 21a6f424c..050f4e625 100644
--- a/packages/json-schemas/src/schemas.ts
+++ b/packages/json-schemas/src/schemas.ts
@@ -16,6 +16,8 @@ import * as orderFillOrKillRequestsSchema from '../schemas/order_fill_or_kill_re
import * as orderFillRequestsSchema from '../schemas/order_fill_requests_schema.json';
import * as orderHashSchema from '../schemas/order_hash_schema.json';
import * as orderSchema from '../schemas/order_schema.json';
+import * as orderWatcherWebSocketRequestSchema from '../schemas/order_watcher_web_socket_request_schema.json';
+import * as orderWatcherWebSocketUtf8MessageSchema from '../schemas/order_watcher_web_socket_utf8_message_schema.json';
import * as orderBookRequestSchema from '../schemas/orderbook_request_schema.json';
import * as ordersRequestOptsSchema from '../schemas/orders_request_opts_schema.json';
import * as ordersSchema from '../schemas/orders_schema.json';
@@ -66,6 +68,8 @@ export const schemas = {
jsNumber,
requestOptsSchema,
pagedRequestOptsSchema,
+ orderWatcherWebSocketRequestSchema,
+ orderWatcherWebSocketUtf8MessageSchema,
ordersRequestOptsSchema,
orderBookRequestSchema,
orderConfigRequestSchema,
diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json
index a79d54385..ec573290c 100644
--- a/packages/json-schemas/tsconfig.json
+++ b/packages/json-schemas/tsconfig.json
@@ -23,6 +23,8 @@
"./schemas/order_schema.json",
"./schemas/signed_order_schema.json",
"./schemas/orders_schema.json",
+ "./schemas/order_watcher_web_socket_request_schema.json",
+ "./schemas/order_watcher_web_socket_utf8_message_schema.json",
"./schemas/paginated_collection_schema.json",
"./schemas/relayer_api_asset_data_pairs_response_schema.json",
"./schemas/relayer_api_asset_data_pairs_schema.json",