RAILGUN Reloaded
    Preparing search index...

    Options for constructing a RailgunClient.

    type RailgunClientOptions = {
        dataDir?: string;
        walletDB?: WalletDB;
        chainDBs?: Partial<Record<number, ChainDB>>;
        poiNodeUrls?: Partial<Record<number, string[]>>;
        fetch?: FetchLike;
        poiTimeoutMs?: number;
        prover?: Groth16Prover;
    }
    Index
    dataDir?: string

    Base directory for data files. Defaults to './.railgun'. Chain DBs live under <dataDir>/chains/<chainID>-<railgunVersion>/, wallet DB at <dataDir>/wallets.db.

    walletDB?: WalletDB

    Pre-constructed wallet DB. When provided, dataDir is ignored for the wallet DB (the engine's chain DB still uses dataDir). Primarily for tests — pass a createWalletDB({ path: ':memory:', runMigrations: true }).

    chainDBs?: Partial<Record<number, ChainDB>>

    Pre-constructed chain DBs by chain ID. A chain with an entry scans into that DB instead of opening one under dataDir. Primarily for tests — pass { [chainId]: await createChainDB({ path: ':memory:', runMigrations: true }) }.

    poiNodeUrls?: Partial<Record<number, string[]>>

    PPOI node URLs by network. Defaults to POI_NODE_URLS. Presence is validated only when a PPOI-aware operation runs on a network that requires PPOI.

    fetch?: FetchLike

    Transport for every indexer and PPOI node request the client makes, for example a mixnet fetch. Defaults to the global fetch.

    poiTimeoutMs?: number

    Timeout in milliseconds for each PPOI node request.

    prover?: Groth16Prover

    Groth16 backend for proof-bearing operations. Optional so consumers that only shield never install a proving library; createGroth16ForEngine(mopro) from @railgun-reloaded/prover satisfies it.