1 | // Copyright 2017-2018 @polkadot/api-provider authors & contributors
|
2 | // This software may be modified and distributed under the terms
|
3 | // of the ISC license. See the LICENSE file for details.
|
4 |
|
5 | import { JsonRpcRequest, JsonRpcResponse } from '../../types';
|
6 |
|
7 | export type RpcCoder = {
|
8 | decodeResponse: (response: JsonRpcResponse) => any,
|
9 | encodeObject: (method: string, params: Array<any>) => JsonRpcRequest,
|
10 | encodeJson: (method: string, params: Array<any>) => string,
|
11 | getId: () => number
|
12 | };
|
13 |
|
14 | export type RpcCoderState = {
|
15 | id: number
|
16 | };
|