aboutsummaryrefslogblamecommitdiffstats
path: root/packages/json-schemas/schemas/block_range_schema.ts
blob: 1f6a631512f732150cb853516f0de324dca8434f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                    

                                 
                 

                                           


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