import { a as AuthConfig, A as AuthClient } from './auth-CA_YKtM2.js'; import { EnvironmentsDoc } from './environments.js'; import '@parity/product-sdk-terminal'; import 'polkadot-api'; import './allocations-CEPeZr6T.js'; /** dApp identity: scopes the SSO session namespace + terminal allowance cache on disk * and the wallet pairing product. Aligned to the app's dedicated id "polkadot-app-deploy". */ declare const DOT_DAPP_ID = "polkadot-app-deploy"; /** Product id used for product-account derivation (`/product/{productId}/{index}`). * UNIFIED with DOT_DAPP_ID (#885): the wallet funds PGAS to product/{appId}/{index}, * so deriving the signer/owner under the same id lands the account where PGAS sits — * one account is owner + AH signer + PGAS-funded. Requires a fresh re-pairing so the * Bulletin/statement allowance is also claimed under this id (verify the wallet serves * "polkadot-app-deploy"; that's the open mobile-side question). */ declare const DOT_PRODUCT_ID = "polkadot-app-deploy"; /** Derivation index (0 = default product account). */ declare const DOT_DERIVATION_INDEX = 0; /** Wallet-facing app name shown on the Sign-In screen. Aligned to the unified identity. */ declare const DOT_HOST_NAME = "polkadot-app-deploy"; /** * Shown when a persisted session file exists but the V2 codec cannot decode it — * typically a v0.7 SCALE blob that is structurally incompatible with the V2 wire format. * The adapter silently returns [] in this case; we surface the cause and recovery steps. */ declare const STALE_SESSION_MESSAGE: string; /** * Returns true if there is a persisted SSO session file on disk. * Does NOT load the SSO stack — uses only node fs/os/path. * Safe to call from headless/pool paths. */ declare function hasPersistedSession(): boolean; /** * Build an `AuthConfig` from the bundled environments document. * * Reads the People-parachain endpoint for `envId` and assembles the config that * `createAuthClient` needs. Throws with a clear message if the people chain or * its endpoint for `envId` is absent. */ declare function buildAuthConfig(doc: EnvironmentsDoc, envId: string): AuthConfig; /** * Resolve the Bulletin chain WS endpoint(s) for an environment from the * environments doc. Mirrors buildAuthConfig's people-chain resolution. * * Login needs this because src/deploy.ts only reassigns its module-level * BULLETIN_ENDPOINTS (initialized to DEFAULT_BULLETIN_RPC = the paseo-next * chain) to the selected env's endpoint inside the deploy flow. The login path * never runs that, so without resolving here it would poll the default chain * instead of the selected env's (e.g. paseo-next-v2 on paseo-bulletin-next-rpc) * and never observe an authorization that lives on the selected chain. * * Returns null if the bulletin chain or its endpoint for envId is absent. */ declare function resolveBulletinEndpoints(doc: EnvironmentsDoc, envId: string): string[] | null; /** * Return the People chain WSS endpoints for the given environment. * Used by the SSS allowance preflight check — no SSO deps loaded. */ declare function getPeopleChainEndpoints(envId: string): Promise; /** * Lazily create an auth client for the given environment. Imports the facade * only when called so the SSO deps don't load in headless/mnemonic paths. */ declare function getAuthClient(envId: string): Promise; export { DOT_DAPP_ID, DOT_DERIVATION_INDEX, DOT_HOST_NAME, DOT_PRODUCT_ID, STALE_SESSION_MESSAGE, buildAuthConfig, getAuthClient, getPeopleChainEndpoints, hasPersistedSession, resolveBulletinEndpoints };