aboutsummaryrefslogblamecommitdiffstats
path: root/src/schemas/subscription_opts_schema.ts
blob: a32ba8faeba09d3a6221707ce4190ff6d16e6577 (plain) (tree)




















                                                    
export const blockParamSchema = {
    id: '/blockParam',
    oneOf: [
        {
            type: 'number',
        },
        {
            enum: ['latest', 'earliest', 'pending'],
        },
    ],
};

export const subscriptionOptsSchema = {
    id: '/subscriptionOpts',
    properties: {
        fromBlock: {$ref: '/blockParam'},
        toBlock: {$ref: '/blockParam'},
    },
    required: ['fromBlock', 'toBlock'],
    type: 'object',
};