aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/subscription_opts_schema.ts
blob: a476e6963bd068c791b949b5c72d427b0db375f8 (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',
};