protocol/packages/json-schemas/schemas/block_range_schema.ts
2017-12-19 12:10:43 +01:00

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