Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Latest commit

 

History

History
96 lines (55 loc) · 2.27 KB

_rpc_validation_.md

File metadata and controls

96 lines (55 loc) · 2.27 KB

ethereumjs-client"rpc/validation"

Module: "rpc/validation"

Index

Functions

Object literals

Functions

middleware

middleware(method: any, requiredParamsCount: number, validators: any[]): any

Defined in lib/rpc/validation.ts:10

middleware for parameters validation

memberof module:rpc

Parameters:

Name Type Default Description
method any - function to add middleware
requiredParamsCount number - required parameters count
validators any[] [] array of validator

Returns: any

Object literals

Const validators

validators: object

Defined in lib/rpc/validation.ts:38

memberof module:rpc

blockHash

blockHash(params: any[], index: number): any

Defined in lib/rpc/validation.ts:68

hex validator to validate block hash

Parameters:

Name Type Description
params any[] parameters of method
index number index of parameter

Returns: any

bool

bool(params: any[], index: number): any

Defined in lib/rpc/validation.ts:95

bool validator to check if type is boolean

Parameters:

Name Type Description
params any[] parameters of method
index number index of parameter

Returns: any

hex

hex(params: any[], index: number): any

Defined in lib/rpc/validation.ts:44

hex validator to ensure has "0x" prefix

Parameters:

Name Type Description
params any[] parameters of method
index number index of parameter

Returns: any