aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/schemas/index_filter_values_schema.ts11
-rw-r--r--src/schemas/subscription_opts_schema.ts21
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',
+};