Basic/configurable no-metadata state_call interfaces (#4987)

* Basic/configurable no-metadata state_call interfaces

* Decorate on a per-section/method basis

* Expose metadata

* Adjust

* s/calls/runtime/

* Adjust

* Adjust

* Adjust for AugmentedCall

* Adjust base type exports

* Basics for generation (not enabled)

* Non-exported basic generation test

* lint fixes

* yarn.lock

* Adjust with lookups

* Adjust

* Adjust

* api-base into tsconfig for typegen

* typegen with args

* manual test for args passing

* CHANGELOG

* Adjust with new call definitions

* Allow multiple historic versions

* Metadata_metadata
This commit is contained in:
Jaco
2022-06-29 13:12:21 +03:00
committed by GitHub
parent 0a9158befc
commit ac1837cdfe
37 changed files with 634 additions and 52 deletions
+8 -1
View File
@@ -7,7 +7,7 @@ import type { Text } from '@polkadot/types';
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
import type { Metadata } from '@polkadot/types/metadata';
import type { CallFunction, RegistryError } from '@polkadot/types/types';
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types';
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableCalls, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types';
import { assertReturn } from '@polkadot/util';
@@ -25,6 +25,13 @@ function assertResult<T> (value: T | undefined): T {
}
export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> implements ApiDecoration<ApiType> {
/**
* @description Runtime call interfaces (currently untyped, only decorated via API options)
*/
public get runtime (): QueryableCalls<ApiType> {
return assertResult(this._runtime);
}
/**
* @description Contains the parameter types (constants) of all modules.
*