Files
common/docs/jsonrpc.md
T
Jaco Greeff 5d0a7231dc Fix alias links (#34)
* Fix alias links

* Update alias links

* Update generated docs
2017-12-01 20:34:51 +01:00

24 lines
752 B
Markdown

# jsonrpc
Convenience functions for values from @polkadot/api-jsonrpc
- [jsonrpcSignature](#jsonrpcsignature) Returns a string representation of the method with inputs and outputs.
## jsonrpcSignature
Returns a string representation of the method with inputs and outputs.
```js
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.
```js
import { jsonrpcSignature } from '@polkadot/util';
console.log(jsonrpcSignature(
'test_method', [{ name: 'dest', type: 'Address' }], { type: 'Address' }
)); // => test_method (destination: Address): Address
```