protocol/packages/json-schemas/schemas/subscription_opts_schema.ts
2017-11-14 09:42:50 -05:00

21 lines
403 B
TypeScript

export const blockParamSchema = {
id: '/BlockParam',
oneOf: [
{
type: 'number',
},
{
enum: ['latest', 'earliest', 'pending'],
},
],
};
export const subscriptionOptsSchema = {
id: '/SubscriptionOpts',
properties: {
fromBlock: {$ref: '/BlockParam'},
toBlock: {$ref: '/BlockParam'},
},
type: 'object',
};