export type BridgeInfo = { environment: Environment; routes: readonly TransferRoute[]; registry: AssetRegistry; chains: ChainMap; }; export type AccountType = "AccountId20" | "AccountId32"; export type XcmVersion = "v4" | "v5"; export type EthereumKind = "ethereum" | "ethereum_l2"; export type ParachainKind = "polkadot" | "kusama"; export type ChainKind = EthereumKind | ParachainKind; export type XC20TokenMap = Record; export type ERC20Metadata = { token: string; name: string; symbol: string; decimals: number; foreignId?: string; deliveryGas?: bigint; swapTokenAddress?: string; swapFee?: number; }; export type ERC20MetadataMap = Record; export type EthereumChain = ChainId & { kind: EthereumKind; key: `${EthereumKind}_${number}`; name?: string; evmParachainId?: number; assets: ERC20MetadataMap; precompile?: `0x${string}`; xcDOT?: string; xcTokenMap?: XC20TokenMap; baseVerificationGas?: bigint; baseDispatchGas?: bigint; twoPhaseSubmitGas?: bigint; submitFiatShamirGas?: bigint; }; export type ChainProperties = { tokenSymbols: string; tokenDecimals: number; ss58Format: number; isEthereum: boolean; accountType: AccountType; evmChainId?: number; name: string; specName: string; specVersion: number; }; export type Asset = { token: string; name: string; minimumBalance: bigint; symbol: string; decimals: number; isSufficient: boolean; xc20?: string; location?: any; locationOnAH?: any; locationOnEthereum?: any; assetId?: string; foreignId?: string; }; export type AssetMap = Record; export type Parachain = ChainId & { kind: ParachainKind; key: `${ParachainKind}_${number}`; info: ChainProperties; features: { hasPalletXcm: boolean; hasDryRunApi: boolean; hasTxPaymentApi: boolean; hasDryRunRpc: boolean; hasDotBalance: boolean; hasEthBalance: boolean; hasXcmPaymentApi: boolean; supportsAliasOrigin: boolean; xcmVersion: XcmVersion; /** @deprecated Remove once V2 is fully rolled out to all parachains */ supportsV2: boolean; }; assets: AssetMap; estimatedExecutionFeeDOT: bigint; estimatedDeliveryFeeDOT: bigint; xcDOT?: string; }; export type EthereumChainMap = Record, EthereumChain>; export type ParachainMap = Record, Parachain>; export type ChainRef = ChainId & { key: ChainKey; }; export type ChainMap = Record; export type KusamaConfig = { assetHubParaId: number; bridgeHubParaId: number; parachains: ParachainMap; }; export type Environment = { name: string; ethChainId: number; gatewayContract: string; beefyContract: string; beaconApiUrl: string; ethereumChains: Record; assetHubParaId: number; bridgeHubParaId: number; /** @deprecated Remove once V2 is fully rolled out to all parachains */ v2_parachains?: readonly number[]; relaychainUrl: string; parachains: { [paraId: string]: string; }; indexerGraphQlUrl: string; forkedProviderUrl?: string; forkedProviderApiKey?: string; kusama?: { assetHubParaId: number; bridgeHubParaId: number; parachains: Record; }; assetOverrides?: AssetOverrideMap; precompiles?: PrecompileMap; metadataOverrides?: ERC20MetadataOverrideMap; l2Bridge?: { acrossAPIUrl: string; l1AdapterAddress: string; l1HandlerAddress: string; l1FeeTokenAddress: string; l1SwapRouterAddress: string; l1SwapQuoterAddress: string; l2Chains: Record; }; }; export type ChainId = { kind: ChainKind; /** Ethereum chain id or polkadot parachain id. */ id: number; }; export type TransferRoute = { from: ChainId; to: ChainId; assets: readonly string[]; }; export type TransferKind = "polkadot->polkadot" | "kusama->polkadot" | "polkadot->kusama" | "polkadot->ethereum" | "ethereum->polkadot" | "ethereum->ethereum" | "polkadot->ethereum_l2" | "ethereum_l2->polkadot"; export type ChainKey = `${T}_${number}`; export type Source = ChainId & { key: ChainKey; destinations: Record, ChainId & { key: ChainKey; assets: string[]; }>; }; export type TransferLocation = ParachainLocation | EthereumLocation; export type ParachainLocation = ChainId & { kind: ParachainKind; key: ChainKey; parachain: Parachain; }; export type EthereumLocation = ChainId & { kind: EthereumKind; key: ChainKey; ethChain: EthereumChain; parachain?: Parachain; }; export type AssetOverrideMap = Record; export type ERC20MetadataOverrideMap = Record; export type PrecompileMap = Record; export type AssetRegistry = { timestamp: string; environment: string; gatewayAddress: string; ethChainId: number; assetHubParaId: number; bridgeHubParaId: number; relaychain: ChainProperties; bridgeHub: ChainProperties; ethereumChains: EthereumChainMap; parachains: ParachainMap; kusama?: KusamaConfig; }; export type { AcrossDepositMessageParams, EthereumProviderConnectionOptions, EthereumProvider, EthereumProviderTypes, FeeData, GatewayV1OutboundMessageAccepted, GatewayV2OutboundMessageAccepted, L1AdapterDepositParams, L1LegacySwapRouterExactOutputSingleParams, L1SwapRouterExactOutputSingleParams, L2MessageReceipt, MultiAddressStruct, } from "./provider"; export type ContractCall = { target: string; calldata: string; value: bigint; gas: bigint; }; export type SubstrateAccount = { nonce: bigint; consumers: bigint; providers: bigint; sufficients: bigint; data: { free: bigint; reserved: bigint; frozen: bigint; transferable: bigint; total: bigint; }; }; export type PNAMap = Record; export type AssetSwapRoute = { inputToken: string; outputToken: string; swapFee: number; }; export type L2ForwardMetadata = { adapterAddress: string; feeTokenAddress: string; swapRoutes: readonly AssetSwapRoute[]; }; export type FeeEstimateErrorCode = "AMOUNT_TOO_LOW" | "AMOUNT_TOO_HIGH" | "COULD_NOT_SWAP"; export type FeeEstimateErrorDetails = { type: string; code: FeeEstimateErrorCode | string; status: number; message: string; id: string; }; export declare class FeeEstimateError extends Error { readonly details: FeeEstimateErrorDetails; constructor(details: FeeEstimateErrorDetails); static couldNotSwap(asset1: unknown, asset2: unknown): FeeEstimateError; } export * from "./contracts"; //# sourceMappingURL=index.d.ts.map