import type { DisclosedContract } from './types.ts'; import { type CantonClient } from '../client/index.ts'; /** * Configuration for the ACS-based disclosure provider. * Requires direct access to the Canton Ledger API and the full set of contract * instance addresses. */ export type AcsDisclosureConfig = { /** Canton party ID acting on behalf of the user */ party: string; }; /** * Same party disclosed contracts required to submit a `ccipExecute` command on Canton. */ export type AcsExecutionDisclosures = { perPartyRouter: DisclosedContract; ccipReceiver: DisclosedContract; }; /** * Same party disclosed contracts required to submit a `ccipSend` command on Canton. */ export type AcsSendDisclosures = { /** The sender's PerPartyRouter contract. */ perPartyRouter: DisclosedContract; /** The sender's CCIPSender contract. */ ccipSender: DisclosedContract; }; /** * Disclosure provider that fetches `createdEventBlob`s directly from the Canton * Ledger API Active Contract Set. * * Use this provider to access disclosures available in the same party */ export declare class AcsDisclosureProvider { private readonly client; private readonly config; /** * Create an `AcsDisclosureProvider` from a pre-built Canton Ledger API client. * * @param client - Authenticated Canton Ledger API client (JWT already embedded). * @param config - ACS provider configuration: party ID */ constructor(client: CantonClient, config: AcsDisclosureConfig); /** * Convenience factory: create a provider directly from a Ledger API URL. */ static fromUrl(ledgerApiUrl: string, jwt: string, config: AcsDisclosureConfig): AcsDisclosureProvider; /** * Fetch all contracts that must be disclosed for a `ccipExecute` command. * * @param receiverCid - When provided, the `CCIPReceiver` disclosure is resolved * by contract ID rather than by signatory, making the lookup independent of * the contract's template type. */ fetchExecutionDisclosures(receiverCid?: string): Promise; /** * Find the first `CCIPReceiver` in the party's ACS whose `receiverFinalityConfig` * variant is compatible with `finality`, or `null` if none exists. * * Mirrors Go's `encodeReceiverFinalityConfig` mapping: * 0 → WaitForFinality * 0x00010000→ WaitForSafe * N (other) → BlockDepth(N) */ findReceiverForFinality(finality: number): Promise; /** * Fetch all contracts that must be disclosed for a `ccipSend` command. * * Returns the sender's `PerPartyRouter` and `CCIPSender` contracts from the * Active Contract Set. Executor disclosures are supplied by the external EDS * API when the global EDS selects one for the message. */ fetchSendDisclosures(): Promise; } //# sourceMappingURL=acs.d.ts.map