aboutsummaryrefslogtreecommitdiffstats
path: root/src/schemas/subscription_opts_schema.ts
blob: 0bb44fecfbb83b977cfddd48419e078f46d5dfcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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',
};