import { AuthClient } from './auth/vendor/auth.js'; import { AuthConfig } from './auth/vendor/types.js'; import { EnvironmentsDoc } from './environments.js'; import '@parity/product-sdk-terminal'; import 'polkadot-api'; import './auth/vendor/allocations.js'; import '@parity/product-sdk-terminal/host'; /** Scopes the SSO session files on disk and prefixes the per-env product ids. */ declare const DOT_DAPP_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. */ 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; /** * Deploy-specific variant of STALE_SESSION_MESSAGE. See src/deploy-actors.ts's * resolveDeployActors for the full rationale (issue #234) — in short, `deploy` * has a remedy `whoami` doesn't: an explicit `--mnemonic` / `MNEMONIC` signer, * which wins even when the persisted session can't be read. Naming it here * means the fail-fast error doesn't just point at re-pairing. */ declare const STALE_SESSION_DEPLOY_MESSAGE = "Stored login session could not be read \u2014 it may have been written by an older version. Run \"bulletin-deploy logout\", then \"bulletin-deploy login\" to pair again. Or pass --mnemonic explicitly to sign with a different key."; /** * 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, networkSuffix?: string | null): 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; /** * The People chain's `NetworkSuffix`, which the phone checks the product id * against. Null when the chain has none or the read fails. */ declare function readNetworkSuffix(peopleEndpoints: 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, STALE_SESSION_DEPLOY_MESSAGE, STALE_SESSION_MESSAGE, buildAuthConfig, getAuthClient, getPeopleChainEndpoints, hasPersistedSession, readNetworkSuffix, resolveBulletinEndpoints };