import { AptosConfig, AccountAddress } from '@aptos-labs/ts-sdk'; import { ShelbyClientConfig } from './ShelbyClientConfig.js'; import '../networks.js'; /** * Creates an AptosConfig from a ShelbyClientConfig. * * This function handles the translation between Shelby's configuration format * and the Aptos SDK's configuration format. * * ## Authoritative Settings (cannot be overridden by `config.aptos`) * * - `network` — always comes from `config.network` * - `faucet.authToken` — always maps to `faucetConfig.AUTH_TOKEN` * * ## Merged Settings (from `config.aptos`) * * When `config.aptos` is provided, the following are merged: * - `clientConfig` — `config.apiKey` provides the default `API_KEY`, * but `config.aptos.clientConfig` values (including `API_KEY`) take precedence * - `faucetConfig` — `config.aptos.faucetConfig` provides non-AUTH_TOKEN defaults * (e.g. HEADERS), but `config.faucet.authToken` always wins for AUTH_TOKEN * - All other `AptosSettings` fields (e.g. `fullnode`, `indexer`, `pluginSettings`) * are passed through from `config.aptos` * * @param config - The ShelbyClientConfig to convert * @returns An AptosConfig instance configured for the specified network * * @example * ```typescript * import { Network } from "@aptos-labs/ts-sdk"; * * // Simple usage - network and apiKey only * const aptosConfig = getAptosConfig({ * network: Network.SHELBYNET, * apiKey: "your-api-key", * }); * * // With faucet auth token * const aptosConfig = getAptosConfig({ * network: Network.SHELBYNET, * apiKey: "your-api-key", * faucet: { * authToken: "faucet-auth-token", * }, * }); * * // With custom aptos settings (advanced) * const aptosConfig = getAptosConfig({ * network: Network.SHELBYNET, * apiKey: "your-api-key", * aptos: { * fullnode: "https://custom-fullnode.example.com", * clientConfig: { HEADERS: { "X-Custom": "value" } }, * }, * }); * ``` */ declare const getAptosConfig: (config: ShelbyClientConfig) => AptosConfig; declare const getShelbyRPCBaseUrl: (config: ShelbyClientConfig) => string; declare const getShelbyDeployer: (config: ShelbyClientConfig) => AccountAddress; declare const getMicropaymentsDeployer: (config: ShelbyClientConfig) => AccountAddress; export { getAptosConfig, getMicropaymentsDeployer, getShelbyDeployer, getShelbyRPCBaseUrl };