Files
api/docs/rpc-provider/classes/_coder_index_.rpccoder.md
T
2019-01-29 18:53:13 +00:00

74 lines
1.5 KiB
Markdown

# Hierarchy
**RpcCoder**
# Methods
<a id="decoderesponse"></a>
## decodeResponse
▸ **decodeResponse**(response: *[JsonRpcResponse](../modules/_types_.md#jsonrpcresponse)*): `any`
*Defined in [coder/index.ts:12](https://github.com/polkadot-js/api/blob/4fa8ee0/packages/rpc-provider/src/coder/index.ts#L12)*
**Parameters:**
| Name | Type |
| ------ | ------ |
| response | [JsonRpcResponse](../modules/_types_.md#jsonrpcresponse) |
**Returns:** `any`
___
<a id="encodejson"></a>
## encodeJson
▸ **encodeJson**(method: *`string`*, params: *`any` | `Array`<`any`>*): `string`
*Defined in [coder/index.ts:33](https://github.com/polkadot-js/api/blob/4fa8ee0/packages/rpc-provider/src/coder/index.ts#L33)*
**Parameters:**
| Name | Type |
| ------ | ------ |
| method | `string` |
| params | `any` | `Array`<`any`> |
**Returns:** `string`
___
<a id="encodeobject"></a>
## encodeObject
▸ **encodeObject**(method: *`string`*, params: *`any` | `Array`<`any`>*): [JsonRpcRequest](../modules/_types_.md#jsonrpcrequest)
*Defined in [coder/index.ts:39](https://github.com/polkadot-js/api/blob/4fa8ee0/packages/rpc-provider/src/coder/index.ts#L39)*
**Parameters:**
| Name | Type |
| ------ | ------ |
| method | `string` |
| params | `any` | `Array`<`any`> |
**Returns:** [JsonRpcRequest](../modules/_types_.md#jsonrpcrequest)
___
<a id="getid"></a>
## getId
▸ **getId**(): `number`
*Defined in [coder/index.ts:48](https://github.com/polkadot-js/api/blob/4fa8ee0/packages/rpc-provider/src/coder/index.ts#L48)*
**Returns:** `number`
___