diff --git a/packages/api/src/types/submittable.ts b/packages/api/src/types/submittable.ts index e17d6e8b66..3dc92f0be4 100644 --- a/packages/api/src/types/submittable.ts +++ b/packages/api/src/types/submittable.ts @@ -2,7 +2,7 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { AnyFunction, CallFunction } from '@polkadot/types/types'; +import { AnyFunction, CallBase } from '@polkadot/types/types'; import { SubmittableExtrinsic } from '../submittable/types'; import { ApiTypes } from './base'; @@ -10,9 +10,9 @@ import { ApiTypes } from './base'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface AugmentedSubmittables { } -export type AugmentedSubmittable = T & CallFunction; +export type AugmentedSubmittable = T & CallBase; -export interface SubmittableExtrinsicFunction extends CallFunction { +export interface SubmittableExtrinsicFunction extends CallBase { (...params: any[]): SubmittableExtrinsic; } diff --git a/packages/types/src/types.ts b/packages/types/src/types.ts index 903dbe867b..50216280e0 100644 --- a/packages/types/src/types.ts +++ b/packages/types/src/types.ts @@ -22,8 +22,7 @@ export type BareOpts = boolean | Record; export type InterfaceTypes = keyof InterfaceRegistry; -export interface CallFunction { - (...args: any[]): Call; +export interface CallBase { callIndex: Uint8Array; meta: FunctionMetadataLatest; method: string; @@ -31,6 +30,10 @@ export interface CallFunction { toJSON: () => any; } +export interface CallFunction extends CallBase { + (...args: any[]): Call; +} + export type Calls = Record; export type ModulesWithCalls = Record;