Round out metadata types (#169)

* Fake Origin for compatibility

* Add Gas

* Add Moment

* Cleanups

* NewAccountOutcome

* Permill & Perbill

* PrendingExtrinsics -> PendingExtrinsics

* Extrinsics & PendingExtrinsics

* Alias String -> Text (as found in jsonrpc, expose it)

* MetaDate -> Metadata (compat)

* Add StorageData, StorageKey & ChangeSet

* Cleanup comments

* Comment update

* Comment typo

* Add ParachainId

* Add Tuple type

* Tuple tests

* Clenaup Tuple generics

* Expand comment

* Expose keys/values on struct

* Array-like at -> get

* Cleanup & simplify EnumType

* Use setValue internally to fromU8a

* Add RuntimeVersion

* Expose RuntimeVersion
This commit is contained in:
Jaco Greeff
2018-09-27 12:42:20 +02:00
committed by GitHub
parent 79860b6b30
commit 773358195a
54 changed files with 825 additions and 142 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ import createSection from '@polkadot/params/section';
const pendingExtrinsics: CreateItemOptions = {
description: 'Returns all pending extrinsics, potentially grouped by sender',
params: [],
type: 'PrendingExtrinsics'
type: 'PendingExtrinsics'
};
const submitExtrinsic: CreateItemOptions = {
+15 -1
View File
@@ -30,6 +30,20 @@ const getHeader: CreateItemOptions = {
type: 'Header'
};
const getRuntimeVersion: CreateItemOptions = {
description: ' Get the runtime version',
params: [],
type: 'RuntimeVersion'
};
const getRuntimeVersionAt: CreateItemOptions = {
description: ' Get the runtime version at a specific block',
params: [
param('hash', 'Hash')
],
type: 'RuntimeVersion'
};
const newHead: CreateItemOptions = {
description: 'Retrieves the best header via subscription',
subscribe: [
@@ -43,7 +57,7 @@ const newHead: CreateItemOptions = {
const privateMethods: CreateItemOptionsMap = {};
const publicMethods: CreateItemOptionsMap = {
getBlock, getHead, getHeader, newHead
getBlock, getHead, getHeader, getRuntimeVersion, getRuntimeVersionAt, newHead
};
export type PublicMethods = typeof publicMethods;
+2 -2
View File
@@ -30,7 +30,7 @@ const callAt: CreateItemOptions = {
const getMetadata: CreateItemOptions = {
description: 'Returns the runtime metadata',
params: [],
type: 'MetaData'
type: 'Metadata'
};
const getMetadataAt: CreateItemOptions = {
@@ -38,7 +38,7 @@ const getMetadataAt: CreateItemOptions = {
params: [
param('block', 'Hash')
],
type: 'MetaData'
type: 'Metadata'
};
const getStorage: CreateItemOptions = {