aboutsummaryrefslogblamecommitdiffstats
path: root/src/schemas/subscription_opts_schema.ts
blob: 0bb44fecfbb83b977cfddd48419e078f46d5dfcf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                    

                   
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',
};