aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/block_range_schema.ts
blob: b264cb66e3e2c4d49d2de2fa02ad0eb3c1ae17fd (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 blockRangeSchema = {
    id: '/BlockRange',
    properties: {
        fromBlock: {$ref: '/BlockParam'},
        toBlock: {$ref: '/BlockParam'},
    },
    type: 'object',
};