aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/order_schemas.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/json-schemas/schemas/order_schemas.ts')
-rw-r--r--packages/json-schemas/schemas/order_schemas.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/packages/json-schemas/schemas/order_schemas.ts b/packages/json-schemas/schemas/order_schemas.ts
new file mode 100644
index 000000000..3cce49351
--- /dev/null
+++ b/packages/json-schemas/schemas/order_schemas.ts
@@ -0,0 +1,35 @@
+export const orderSchema = {
+ id: '/Order',
+ properties: {
+ maker: {$ref: '/Address'},
+ taker: {$ref: '/Address'},
+ makerFee: {$ref: '/Number'},
+ takerFee: {$ref: '/Number'},
+ makerTokenAmount: {$ref: '/Number'},
+ takerTokenAmount: {$ref: '/Number'},
+ makerTokenAddress: {$ref: '/Address'},
+ takerTokenAddress: {$ref: '/Address'},
+ salt: {$ref: '/Number'},
+ feeRecipient: {$ref: '/Address'},
+ expirationUnixTimestampSec: {$ref: '/Number'},
+ exchangeContractAddress: {$ref: '/Address'},
+ },
+ required: [
+ 'maker', 'taker', 'makerFee', 'takerFee', 'makerTokenAmount', 'takerTokenAmount',
+ 'salt', 'feeRecipient', 'expirationUnixTimestampSec', 'exchangeContractAddress',
+ ],
+ type: 'object',
+};
+
+export const signedOrderSchema = {
+ id: '/SignedOrder',
+ allOf: [
+ { $ref: '/Order' },
+ {
+ properties: {
+ ecSignature: {$ref: '/ECSignature'},
+ },
+ required: ['ecSignature'],
+ },
+ ],
+};