import type { CantonRpcProvider } from '@chainlink/ccip-sdk/src/canton/types.ts'; import type { CantonAuthConfig, CantonConfig, Logger } from '@chainlink/ccip-sdk/src/index.ts'; /** * A Canton config as loaded from the CLI's JSON file. * * Two groups of fields: * * - **CLI-only** — consumed by the CLI to build the SDK's * `CantonJsonRpcProvider` and resolve authentication: `apiUrl`, `apiType`, * `chainId`, `party`, and `jwt`/`auth`. The file may carry either a static * `jwt` string or an `auth` * block (OIDC: `static` / `clientCredentials` / `authorizationCode`); the CLI * resolves `auth` upfront (see {@link resolveCantonTokenGetter}) and hands * the provider the resulting token — the SDK never sees `auth`. * - **SDK passthrough** — every {@link CantonConfig} field except `provider` * (which is constructed by the CLI, not user-configurable), forwarded to the * SDK via {@link toSdkCantonConfig}. */ export type CantonCliConfig = { /** Provider type; only `json` (or empty) is supported. */ apiType: string; /** Canton Ledger JSON API URL. */ apiUrl: string; /** CAIP-2 chain ID, e.g. `canton:testnet` — handed to the CLI's provider. */ chainId: string; /** User ledger party for actAs, ACS queries, and transaction visibility. */ party: string; /** Static, pre-obtained JWT. Shorthand for `auth: { type: "static", jwt }`. */ jwt?: string; /** OIDC auth config (`static` / `clientCredentials` / `authorizationCode`), resolved upfront by the CLI. */ auth?: CantonAuthConfig; /** HTTP protocol version for Ledger API requests: `'2'` (default) or `'1'` for HTTP/1.1-only endpoints. */ httpVersion?: '1' | '2'; /** CCIP operator party; overrides the network's default CCIP owner party. */ ccipParty?: string; /** Throw instead of automatically creating missing contracts. Default: `false`. */ disableAutomaticContractCreation?: boolean; /** Owner party → EDS base URL overrides, merged over the SDK's per-network defaults. */ externalEdsUrlsByOwner?: Record; /** Instrument admin party → Token Standard API base URL overrides, merged over the SDK's per-network defaults. */ externalTokenStandardUrlsByOwner?: Record; /** Default CCV indexer base URL; CLI `--indexer` wins when provided. */ indexerUrl?: string; /** Default gas for Canton → destination sends when `extraArgs.gasLimit` is omitted. */ defaultSendGasLimit?: number; /** Default Canton CCV instance addresses for execute / send. */ ccvs?: string[]; }; /** * Build the SDK's {@link CantonConfig} from a loaded CLI config and the * {@link CantonRpcProvider} the CLI constructed from its own fields. * * Forwards every SDK-relevant field from the CLI config; the CLI-only fields * (`apiUrl`, `apiType`, `chainId`, `party`, `jwt`, `auth`) are deliberately * dropped — the SDK never sees them. */ export declare function toSdkCantonConfig(cli: CantonCliConfig, provider: CantonRpcProvider): CantonConfig; /** * Load and validate a Canton config JSON file. * * The config may carry either: * - a static `jwt` string, or * - an `auth` block (OIDC: `static` / `clientCredentials` / `authorizationCode`), * which the CLI resolves upfront into a `jwt` (string or getter) before handing * the config to the SDK. * * `jwt` (or `auth`) is required: one of them must be present. * * @param configPath - Path to JSON file, or undefined if not provided. * @param logger - Logger for debug output. * @returns Parsed {@link CantonCliConfig} (with `auth` preserved) or undefined. */ export declare function loadCantonConfig(configPath: string | undefined, logger?: Logger): CantonCliConfig | undefined; /** * CCIP v2 indexer URLs for verification lookups. * CLI `--indexer` wins when provided; otherwise uses canton-config `indexerUrl` * only when the lane involves Canton (EVM-only lanes keep default indexer behavior). * Prefer {@link resolveIndexer} from `../index.ts` in CLI commands. */ export declare function resolveCliIndexer(cliIndexer: readonly string[] | undefined, cantonConfig: Partial | undefined, laneInvolvesCanton: boolean): readonly string[] | undefined; //# sourceMappingURL=config.d.ts.map