protocol/packages/json-schemas/schemas/block_range_schema.ts
2018-01-03 11:37:38 +01:00

21 lines
395 B
TypeScript

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