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








                                                                

  
                                 





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