Files
common/packages/util/docs/jsonrpc.md
T
Jaco Greeff b5c5734c7c Add Blake2s & XXHash utility functions (#66)
* Initial split of util & util-crypto

* Add initial XXHash version

* Blake2s wit tests & documentation

* Add sha512 (from NaCl)

* Add randomBytes (from NaCl)

* Flow fixes

* Update documentation

* Update latest @polkadot/dev
2018-01-25 14:13:43 +01:00

752 B

jsonrpc

Convenience functions for values from @polkadot/api-jsonrpc

  • jsonrpcSignature Returns a string representation of the method with inputs and outputs.

jsonrpcSignature

Returns a string representation of the method with inputs and outputs.

jsonrpcSignature (name: string, _inputs: Array<InterfaceInputType>, _output: InterfaceOutputType): string

Formats the name, inputs and outputs into a human-readable string. This contains the input parameter names, input types and output type.

import { jsonrpcSignature } from '@polkadot/util';

console.log(jsonrpcSignature(
'test_method', [{ name: 'dest', type: 'Address' }], { type: 'Address' }
)); // => test_method (destination: Address): Address