import type { DisclosedContract } from './types.ts'; /** * Configuration for the EDS-based disclosure provider. */ export interface EdsDisclosureConfig { /** Base URL of the global CCIP EDS instance, e.g. `http://eds-host:8090`. */ edsBaseUrl: string; /** * Optional mapping from a RawInstanceAddress owner party to the owner-hosted * external EDS base URL. If an owner is absent, `edsBaseUrl` is used. */ externalEdsUrlsByOwner?: Record; /** Optional request timeout in milliseconds (default: 10_000). */ timeoutMs?: number; } /** Canton instrument as represented in the EDS API. */ export interface EdsInstrumentId { admin: string; id: string; } /** Executor selector carried in an EDS CCIP message. */ export interface EdsExecutor { type: '' | 'noExecutor' | 'withAddress'; address?: string; } /** Optional token transfer carried in an EDS CCIP message. */ export interface EdsTokenTransfer { token: EdsInstrumentId; amount: string; } /** CCIP message shape accepted by the global and external EDS endpoints. */ export interface EdsMessage { destinationChainSelector: string; receiver: string; payload: string; tokenTransfer: EdsTokenTransfer | null; feeToken: EdsInstrumentId; executor: EdsExecutor; } /** Token input returned by external Token Pool EDS endpoints. */ export interface EdsTokenInput { transferFactory: string; extraArgs: { context: Record; metadata?: Record; }; tokenPoolHoldings: string[]; } /** Result of `POST /ccip/v1/global/message/send`. */ export interface EdsSendResult { contextData: Record; disclosedContracts: DisclosedContract[]; ccvs: string[]; executor?: string; } /** Result of `POST /ccip/v1/global/message/execute`. */ export interface EdsExecuteResult { contextData: Record; disclosedContracts: DisclosedContract[]; tokenPool?: string; } /** Result of external CCV and Executor disclosure endpoints. */ export interface EdsExternalDisclosureResult { contractId: string; instanceAddress: string; rawInstanceAddress: string; contextData: Record; disclosedContracts: DisclosedContract[]; } /** Result of external Token Pool send/execute disclosure endpoints. */ export interface EdsTokenPoolDisclosureResult extends EdsExternalDisclosureResult { requiredCCVs: string[]; tokenInput?: EdsTokenInput; } /** * Result of a `fetchPerPartyRouterFactoryDisclosures()` call. */ export interface EdsPerPartyRouterFactoryResult { /** The Contract ID of the PerPartyRouterFactory. */ contractId: string; /** Backward-compatible alias for `contractId`. */ perPartyRouterFactoryId: string; /** Hashed InstanceAddress of the factory. */ instanceAddress: string; /** Raw InstanceAddress of the factory. */ rawInstanceAddress: string; /** Disclosures for all contracts required to instantiate a PerPartyRouter. */ disclosedContracts: DisclosedContract[]; } /** * Disclosure provider that speaks the split CCIP EDS API: * global CCIP endpoints plus owner-hosted Token Pool, CCV, and Executor endpoints. */ export declare class EdsDisclosureProvider { private readonly edsBaseUrl; private readonly externalEdsUrlsByOwner; private readonly timeoutMs; /** * Create an EDS disclosure provider for global and external split APIs. */ constructor(config: EdsDisclosureConfig); /** * Resolve the EDS base URL for an external endpoint owner. * * Raw addresses (`instanceId@owner`) select `externalEdsUrlsByOwner[owner]` * when configured; hashed addresses and unmapped owners fall back to the * global EDS base URL. */ externalBaseUrlFor(address: string): string; /** Fetch the token pool registered for a hashed Canton instrument ID. */ lookupTokenPool(instrumentIdHash: string): Promise; /** Fetch global send disclosures for a CCIP message. */ fetchSendDisclosures(message: EdsMessage, senderRequiredCCVs?: readonly string[], tokenPoolRequiredCCVs?: readonly string[]): Promise; /** Fetch external Token Pool send disclosures. */ fetchTokenPoolSendDisclosure(address: string, message: EdsMessage): Promise; /** Fetch external CCV send disclosures. */ fetchCcvSendDisclosure(address: string, message: EdsMessage): Promise; /** Fetch external Executor send disclosures. */ fetchExecutorSendDisclosure(address: string, message: EdsMessage, ccvs: readonly string[]): Promise; /** Fetch global execute disclosures for an encoded CCIP message. */ fetchExecutionDisclosures(encodedMessage: string): Promise; /** Fetch external Token Pool execute disclosures. */ fetchTokenPoolExecuteDisclosure(address: string, encodedMessage: string): Promise; /** Fetch external CCV execute disclosures. */ fetchCcvExecuteDisclosure(address: string, encodedMessage: string): Promise; /** * Fetch the explicit disclosures required to instantiate a PerPartyRouter * using the PerPartyRouterFactory. */ fetchPerPartyRouterFactoryDisclosures(partyID: string): Promise; /** Convert a raw external endpoint response to the SDK shape. */ private rawExternalResult; /** Convert a raw token pool endpoint response to the SDK shape. */ private rawTokenPoolResult; } //# sourceMappingURL=eds.d.ts.map