//#region source/interfaces/difficulty.d.ts interface SharedDifficultyParameters { minimumDifficultyTarget: bigint; allowMinimumDifficultyBlocks: boolean; } /** * Original Bitcoin Difficult Adjustment * * NOTE: Not implemented. */ interface LegacyParameters extends SharedDifficultyParameters { difficultyAlgorithm: 'legacy'; } /** * Emergency Difficulty Adjustment. * * NOTE: Not implemented. */ interface EdaParameters extends SharedDifficultyParameters { difficultyAlgorithm: 'eda'; } /** * 144-block moving-window DAA (November 2017 – November 2020 on mainnet). * * NOTE: Not implemented. */ interface Cw144Parameters extends SharedDifficultyParameters { difficultyAlgorithm: 'cw144'; } /** * aserti3-2d, the DAA used on every current Bitcoin Cash network from its activation height onward. */ interface AsertParameters extends SharedDifficultyParameters { difficultyAlgorithm: 'aserti3-2d'; asertActivationHeight: number; asertAnchoredBlockHeight: number; asertAnchoredTarget: bigint; asertAnchoredParentTimestamp: number; asertHalfLifeInSeconds: number; asertIdealBlockTimeInSeconds: number; } /** * Parameters used by the chosen difficulty algorithm. */ type DifficultyParameters = LegacyParameters | EdaParameters | Cw144Parameters | AsertParameters; //#endregion //#region source/interfaces/checkpoint.d.ts /** * An electrum-style checkpoint that allows you identify a point in the blockchain and * validate if any previous header is part of the same chain. */ interface Checkpoint { height: number; blockHash: string; merkleRoot: string; chainWork?: bigint; } //#endregion //#region source/interfaces/network.d.ts /** * A set of checkpoints used to identify and validate blocks in a blockchain. */ interface BlockchainCheckpoints { genesis: Checkpoint; independence?: Checkpoint; checkpoint: Checkpoint; } /** * Network specific parameters used to validate consensus rules on the network. */ interface ConsensusParameters { difficultyParameters: DifficultyParameters; } /** * A set of checkpoints and consensus parameters used to identify and validate blocks on a blockchain. */ type Blockchain = BlockchainCheckpoints & ConsensusParameters; //#endregion //#region source/mainnet.d.ts /** * Bitcoin Cash mainnet (no flag, P2P 8333, magic 0xe3e1f3e8) * * The production BCH network. Shares Bitcoin's genesis and history through block 478558, * then diverges at the August 1, 2017 UAHF. Upgrades activate on May 15 each year. * Default and only network that carries real value. */ export declare const mainnet: Blockchain; export declare const electrumCheckpoint: Checkpoint; //#endregion //#region source/testnet.d.ts /** * Bitcoin Cash testnet3 (-testnet, P2P 18333, magic 0xf4e5f3f4) * * Historical BCH fork of Bitcoin's BTC testnet3 from 2017. * Same genesis as BTC testnet3. Still maintained and upgraded on the May 15 mainnet schedule. * It is large (tens of GB) because of old 32 MB scaling tests, so it is a poor default for new work. * After ABLA it stays capped at 32 MB. */ export declare const testnet3: Blockchain; /** * Bitcoin Cash testnet4 (-testnet4, P2P 28333, magic 0xe2b7daaf) * * Created in 2020 as the lightweight replacement for testnet3. Fresh BCH-specific genesis (not BTC's later BIP94 testnet4). * Default 2 MB blocks, 1-hour ASERT half-life, min-diff allowed so it can return to CPU mining after an ASIC burst. * Intended to stay small and sync quickly. Upgrades on the May 15 schedule with mainnet. */ export declare const testnet4: Blockchain; //#endregion //#region source/chipnet.d.ts /** * Bitcoin Cash chipnet (-chipnet, P2P 48333, magic 0xe2b7daaf) * * Permanent fork of testnet4, same genesis, same P2P magic, and same cashaddr prefix (bchtest:). * Stages the next CHIP upgrade on November 15, six months before mainnet. * After ABLA it has a dynamic blocksize with a 2 MB floor. */ export declare const chipnet: Blockchain; //#endregion //#region source/scalenet.d.ts /** * Bitcoin Cash scalenet (-scalenet, P2P 38333, magic 0xc3afe1a2) * * High-throughput testnet with its own genesis, created alongside testnet4. * Default 256 MB blocks and a 2-day ASERT half-life so ASIC scaling tests are viable. * Operators reorg the chain back to height 10,000 about twice a year so the history stays downloadable. */ export declare const scalenet: Blockchain; //#endregion //#region source/legacynet.d.ts /** * Bitcoin legacynet (no flag, P2P 8333, magic 0xf9beb4d9) * * The original Bitcoin network that BCH split from in 2017. * Same genesis as BCH mainnet. This snapshot is frozen at the last common block * and is not expected to be updated after the UAHF. */ export declare const legacynet: Blockchain; //#endregion export type { AsertParameters, Blockchain, BlockchainCheckpoints, Checkpoint, ConsensusParameters, Cw144Parameters, DifficultyParameters, EdaParameters, LegacyParameters, SharedDifficultyParameters }; //# sourceMappingURL=index.d.mts.map