This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert all schemas to json files, so it's easier for devs in other l…
…anguages to use it
- Loading branch information
1 parent
78e6063
commit 7d9009b
Showing
68 changed files
with
534 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "/addressSchema", | ||
"type": "string", | ||
"pattern": "^0x[0-9a-f]{40}$" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"id": "/blockParamSchema", | ||
"oneOf": [ | ||
{ | ||
"type": "number" | ||
}, | ||
{ | ||
"enum": ["latest", "earliest", "pending"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id": "/blockRangeSchema", | ||
"properties": { | ||
"fromBlock": { "$ref": "/blockParamSchema" }, | ||
"toBlock": { "$ref": "/blockParamSchema" } | ||
}, | ||
"type": "object" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"id": "/callDataSchema", | ||
"properties": { | ||
"from": { "$ref": "/addressSchema" }, | ||
"to": { "$ref": "/addressSchema" }, | ||
"value": { | ||
"oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumber" }] | ||
}, | ||
"gas": { | ||
"oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumber" }] | ||
}, | ||
"gasPrice": { | ||
"oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumber" }] | ||
}, | ||
"data": { | ||
"type": "string", | ||
"pattern": "^0x[0-9a-f]*$" | ||
}, | ||
"nonce": { | ||
"type": "number", | ||
"minimum": 0 | ||
} | ||
}, | ||
"required": [], | ||
"type": "object", | ||
"additionalProperties": false | ||
} |
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
packages/json-schemas/schemas/ec_signature_parameter_schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "/ecSignatureParameterSchema", | ||
"type": "string", | ||
"pattern": "^0[xX][0-9A-Fa-f]{64}$" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "/ECSignature", | ||
"properties": { | ||
"v": { | ||
"type": "number", | ||
"minimum": 27, | ||
"maximum": 28 | ||
}, | ||
"r": { "$ref": "/ecSignatureParameterSchema" }, | ||
"s": { "$ref": "/ecSignatureParameterSchema" } | ||
}, | ||
"required": ["v", "r", "s"], | ||
"type": "object" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
packages/json-schemas/schemas/eip712_typed_data_schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"id": "/eip712TypedDataSchema", | ||
"type": "object", | ||
"properties": { | ||
"types": { | ||
"type": "object", | ||
"properties": { | ||
"EIP712Domain": { "type": "array" } | ||
}, | ||
"additionalProperties": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { "type": "string" }, | ||
"type": { "type": "string" } | ||
}, | ||
"required": ["name", "type"] | ||
} | ||
}, | ||
"required": ["EIP712Domain"] | ||
}, | ||
"primaryType": { "type": "string" }, | ||
"domain": { "type": "object" }, | ||
"message": { "type": "object" } | ||
}, | ||
"required": ["types", "primaryType", "domain", "message"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "/hexSchema", | ||
"type": "string", | ||
"pattern": "^0x(([0-9a-f][0-9a-f])+)?$" | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/json-schemas/schemas/index_filter_values_schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"id": "/indexFilterValuesSchema", | ||
"additionalProperties": { | ||
"oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/addressSchema" }, { "$ref": "/orderHashSchema" }] | ||
}, | ||
"type": "object" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "/jsNumber", | ||
"type": "number", | ||
"minimum": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "/numberSchema", | ||
"type": "string", | ||
"pattern": "^\\d+(\\.\\d+)?$" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"id": "/orderCancellationRequestsSchema", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"order": { "$ref": "/orderSchema" }, | ||
"takerTokenCancelAmount": { "$ref": "/numberSchema" } | ||
}, | ||
"required": ["order", "takerTokenCancelAmount"], | ||
"type": "object" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"id": "/orderFillOrKillRequestsSchema", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"signedOrder": { "$ref": "/signedOrderSchema" }, | ||
"fillTakerAmount": { "$ref": "/numberSchema" } | ||
}, | ||
"required": ["signedOrder", "fillTakerAmount"], | ||
"type": "object" | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/json-schemas/schemas/order_fill_requests_schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"id": "/orderFillRequestsSchema", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"signedOrder": { "$ref": "/signedOrderSchema" }, | ||
"takerTokenFillAmount": { "$ref": "/numberSchema" } | ||
}, | ||
"required": ["signedOrder", "takerTokenFillAmount"], | ||
"type": "object" | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
packages/json-schemas/schemas/order_fill_requests_schema.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "/orderHashSchema", | ||
"type": "string", | ||
"pattern": "^0x[0-9a-fA-F]{64}$" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"id": "/orderSchema", | ||
"properties": { | ||
"makerAddress": { "$ref": "/addressSchema" }, | ||
"takerAddress": { "$ref": "/addressSchema" }, | ||
"makerFee": { "$ref": "/numberSchema" }, | ||
"takerFee": { "$ref": "/numberSchema" }, | ||
"senderAddress": { "$ref": "/addressSchema" }, | ||
"makerAssetAmount": { "$ref": "/numberSchema" }, | ||
"takerAssetAmount": { "$ref": "/numberSchema" }, | ||
"makerAssetData": { "$ref": "/hexSchema" }, | ||
"takerAssetData": { "$ref": "/hexSchema" }, | ||
"salt": { "$ref": "/numberSchema" }, | ||
"exchangeAddress": { "$ref": "/addressSchema" }, | ||
"feeRecipientAddress": { "$ref": "/addressSchema" }, | ||
"expirationTimeSeconds": { "$ref": "/numberSchema" } | ||
}, | ||
"required": [ | ||
"makerAddress", | ||
"takerAddress", | ||
"makerFee", | ||
"takerFee", | ||
"senderAddress", | ||
"makerAssetAmount", | ||
"takerAssetAmount", | ||
"makerAssetData", | ||
"takerAssetData", | ||
"salt", | ||
"exchangeAddress", | ||
"feeRecipientAddress", | ||
"expirationTimeSeconds" | ||
], | ||
"type": "object" | ||
} |
Oops, something went wrong.