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