diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-04 09:23:35 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-04 09:23:35 +0800 |
commit | ca92502d34a28c6e9a638d299b0dccce40dc9675 (patch) | |
tree | d93192a2867ed129d4088cda2534f157d42d4126 | |
parent | 12b71b20f0f5c54ef48537c03ae89769b7853f9b (diff) | |
download | dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.tar dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.tar.gz dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.tar.bz2 dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.tar.lz dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.tar.xz dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.tar.zst dexon-sol-tools-ca92502d34a28c6e9a638d299b0dccce40dc9675.zip |
Add index_filter_values_schema.ts and subscription_opts_schema.ts
-rw-r--r-- | src/schemas/index_filter_values_schema.ts | 11 | ||||
-rw-r--r-- | src/schemas/subscription_opts_schema.ts | 21 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/schemas/index_filter_values_schema.ts b/src/schemas/index_filter_values_schema.ts new file mode 100644 index 000000000..7c8d3f943 --- /dev/null +++ b/src/schemas/index_filter_values_schema.ts @@ -0,0 +1,11 @@ +export const indexFilterValuesSchema = { + id: '/indexFilterValues', + additionalProperties: { + oneOf: [ + {$ref: '/numberSchema'}, + {$ref: '/addressSchema'}, + {$ref: '/orderHashSchema'}, + ], + }, + type: 'object', +}; diff --git a/src/schemas/subscription_opts_schema.ts b/src/schemas/subscription_opts_schema.ts new file mode 100644 index 000000000..a32ba8fae --- /dev/null +++ b/src/schemas/subscription_opts_schema.ts @@ -0,0 +1,21 @@ +export const blockParamSchema = { + id: '/blockParam', + oneOf: [ + { + type: 'number', + }, + { + enum: ['latest', 'earliest', 'pending'], + }, + ], +}; + +export const subscriptionOptsSchema = { + id: '/subscriptionOpts', + properties: { + fromBlock: {$ref: '/blockParam'}, + toBlock: {$ref: '/blockParam'}, + }, + required: ['fromBlock', 'toBlock'], + type: 'object', +}; |