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:
@@ -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 = {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user