import { _AssetRef, _AssetType, _ChainAsset, _ChainInfo, _CrowdloanFund } from '@soul-wallet/chain-list/types'; import { _CHAIN_VALIDATION_ERROR } from '../../services/chain-service/handler/types'; import { BehaviorSubject } from 'rxjs'; import Web3 from 'web3'; import { ApiPromise } from '@polkadot/api'; import { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; import { ChainProperties, ChainType } from '@polkadot/types/interfaces'; import { Registry } from '@polkadot/types/types'; export interface _DataMap { chainInfoMap: Record; chainStateMap: Record; assetRegistry: Record; assetRefMap: Record; } export declare enum _ChainConnectionStatus { CONNECTED = "CONNECTED", DISCONNECTED = "DISCONNECTED", UNSTABLE = "UNSTABLE", CONNECTING = "CONNECTING" } export interface _ChainState { slug: string; active: boolean; currentProvider: string; connectionStatus: _ChainConnectionStatus; } export interface _SubstrateDefaultFormatBalance { decimals?: number[] | number; unit?: string[] | string; } export interface _ChainBaseApi { chainSlug: string; apiUrl: string; providerName?: string; apiError?: string; apiRetry?: number; isApiReady: boolean; isApiConnectedSubject: BehaviorSubject; isApiReadyOnce: boolean; isApiConnected: boolean; connectionStatus: _ChainConnectionStatus; updateApiUrl: (apiUrl: string) => Promise; connect: () => void; disconnect: () => Promise; recoverConnect: () => Promise; destroy: () => Promise; isReady: Promise<_ChainBaseApi>; } export interface _SubstrateChainMetadata { properties: ChainProperties; systemChain: string; systemChainType: ChainType; systemName: string; systemVersion: string; } export interface _SubstrateApiState { apiDefaultTx?: SubmittableExtrinsicFunction; apiDefaultTxSudo?: SubmittableExtrinsicFunction; defaultFormatBalance?: _SubstrateDefaultFormatBalance; } export interface _SubstrateApi extends _SubstrateApiState, _ChainBaseApi { api: ApiPromise; isReady: Promise<_SubstrateApi>; specName: string; specVersion: string; systemChain: string; systemName: string; systemVersion: string; registry: Registry; } export interface _EvmApi extends _ChainBaseApi { api: Web3; isReady: Promise<_EvmApi>; } export declare type _NetworkUpsertParams = { mode: 'update' | 'insert'; chainEditInfo: { chainType?: string; currentProvider: string; name?: string; providers: Record; slug: string; symbol?: string; blockExplorer?: string; crowdloanUrl?: string; priceId?: string; }; chainSpec?: { genesisHash: string; paraId: number | null; addressPrefix: number; crowdloanFunds?: _CrowdloanFund[] | null; crowdloanParaId?: number | null; evmChainId: number | null; existentialDeposit: string; decimals: number; }; unconfirmed?: boolean; providerError?: _CHAIN_VALIDATION_ERROR; }; export declare const _CUSTOM_PREFIX = "custom-"; export interface EnableChainParams { chainSlug: string; enableTokens?: boolean; } export interface EnableMultiChainParams { chainSlugs: string[]; enableTokens?: boolean; } export interface _ValidateCustomAssetRequest { contractAddress: string; originChain: string; type: _AssetType; contractCaller?: string; } export interface _SmartContractTokenInfo { name: string; symbol: string; decimals: number; contractError: boolean; } export interface _ValidateCustomAssetResponse extends _SmartContractTokenInfo { isExist: boolean; existedSlug?: string; } export declare const _FUNGIBLE_CONTRACT_STANDARDS: _AssetType[]; export declare const _NFT_CONTRACT_STANDARDS: _AssetType[]; export declare const _SMART_CONTRACT_STANDARDS: _AssetType[];