// Copyright 2017-2021 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { Bytes, Option, u32, Vec } from '@polkadot/types'; import type { CollatorId, ParaId, ParaInfo, Retriable, UpwardMessage } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; export type ParaInfoResult = Option; export type PendingSwap = Option; export type Active = Vec>]>>; export type RetryQueue = Vec>> export type SelectedThreads = Vec>> export type Code = Bytes; export type Heads = Bytes; export type RelayDispatchQueue = Vec export type RelayDispatchQueueSize = ITuple<[u32, u32]>; export type DidUpdate = Option>; export interface DeriveParachainActive { collatorId: CollatorId; isRetriable: boolean; retries: number; } export interface DeriveParachainInfo extends ParaInfo { id: ParaId; icon?: string; name?: string; owner?: string; } export interface DeriveParachain { didUpdate: boolean; pendingSwapId: ParaId | null; id: ParaId; info: DeriveParachainInfo | null; relayDispatchQueueSize?: number; } export interface DeriveParachainFull extends DeriveParachain { active: DeriveParachainActive | null; heads: Bytes | null; relayDispatchQueue: UpwardMessage[]; retryCollators: (CollatorId | null)[]; selectedCollators: (CollatorId | null)[]; }