Cleanup jsonrpc, refer to api-codec (#174)
* Cleanup jsonrpc, refer to api-codec * Move storagekey legacy into type-params (legacy) * Remove misplaced debug log * Remove header encoding, use api-codec/Header * Remove legacy types * Add metadat array (hack around json import) * Move json metadata to ts
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,13 +3,11 @@
|
||||
// of the ISC license. See the LICENSE file for details.
|
||||
|
||||
import Metadata from './Metadata';
|
||||
import rpcdata from './Metadata.rpc.json';
|
||||
import rpcdata from './Metadata.rpc';
|
||||
|
||||
describe('Metadata', () => {
|
||||
it('decodes properly', () => {
|
||||
const decoded = new Metadata().fromJSON(
|
||||
rpcdata.result
|
||||
);
|
||||
const decoded = new Metadata().fromJSON(rpcdata);
|
||||
|
||||
const str = JSON.stringify(decoded.toJSON());
|
||||
|
||||
|
||||
Vendored
+3
@@ -3,6 +3,7 @@
|
||||
// of the ISC license. See the LICENSE file for details.
|
||||
|
||||
import BN from 'bn.js';
|
||||
import * as Classes from './index';
|
||||
|
||||
import U8a from './codec/U8a';
|
||||
import UInt from './codec/UInt';
|
||||
@@ -10,3 +11,5 @@ import UInt from './codec/UInt';
|
||||
export type AnyNumber = UInt | BN | Uint8Array | number | string;
|
||||
|
||||
export type AnyU8a = U8a | Uint8Array | Array<number> | string;
|
||||
|
||||
export type CodecTypes = keyof typeof Classes;
|
||||
|
||||
Reference in New Issue
Block a user