ethereumjs-client › "rpc/validation"
▸ 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
Defined in lib/rpc/validation.ts:38
memberof
module:rpc
▸ 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(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(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