Split interface creation (#50)

* Split interface creation

* Lint fixes

* Update @polkadot dependencies
This commit is contained in:
Jaco Greeff
2018-01-25 15:19:56 +01:00
committed by GitHub
parent 20f120fccd
commit 263289a343
16 changed files with 208 additions and 283 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-jsonrpc",
"version": "0.6.12",
"version": "0.7.0",
"description": "Method definitions for the Polkadot RPC layer",
"main": "index.js",
"engines": {
+2 -2
View File
@@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { InterfaceDefinition } from './types';
import type { InterfaceDefinitions } from './types';
const chain = require('./chain');
const state = require('./state');
@@ -14,4 +14,4 @@ const state = require('./state');
module.exports = ({
chain,
state
}: { [string]: InterfaceDefinition });
}: InterfaceDefinitions);
+6
View File
@@ -22,8 +22,14 @@ export type InterfaceMethodDefinition = {
output: InterfaceOutputType
};
export type InterfaceTypes = 'chain' | 'state';
export type InterfaceDefinition = {
methods: {
[string]: InterfaceMethodDefinition
}
};
export type InterfaceDefinitions = {
[InterfaceTypes]: InterfaceDefinition
};