Add api.extra.* (test) methods (#55)

This commit is contained in:
Jaco Greeff
2018-03-15 16:33:21 +01:00
committed by GitHub
parent 56ec979655
commit 74f14160bd
10 changed files with 101 additions and 29 deletions
+4 -1
View File
@@ -5,15 +5,18 @@
import type { InterfaceOutputType } from '@polkadot/api-jsonrpc/types';
const bnDecode = require('@polkadot/primitives-json/bn/decode');
const headerDecode = require('@polkadot/primitives-json/header/decode');
const echo = require('./echo');
const util = require('./util');
const formatters = {
'BlockNumber': bnDecode,
'Header': headerDecode,
'OutData': echo,
'StorageData': echo
'StorageData': echo,
'U64': bnDecode
};
module.exports = function formatOutput (output: InterfaceOutputType, value: mixed): mixed {