aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/subscription_opts_schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/json-schemas/schemas/subscription_opts_schema.ts')
-rw-r--r--packages/json-schemas/schemas/subscription_opts_schema.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/json-schemas/schemas/subscription_opts_schema.ts b/packages/json-schemas/schemas/subscription_opts_schema.ts
new file mode 100644
index 000000000..a476e6963
--- /dev/null
+++ b/packages/json-schemas/schemas/subscription_opts_schema.ts
@@ -0,0 +1,20 @@
+export const blockParamSchema = {
+ id: '/BlockParam',
+ oneOf: [
+ {
+ type: 'number',
+ },
+ {
+ enum: ['latest', 'earliest', 'pending'],
+ },
+ ],
+};
+
+export const subscriptionOptsSchema = {
+ id: '/SubscriptionOpts',
+ properties: {
+ fromBlock: {$ref: '/BlockParam'},
+ toBlock: {$ref: '/BlockParam'},
+ },
+ type: 'object',
+};