import { AddressPrefix } from "./AddressPrefix"; import { Block } from "./Block"; import { Deployment } from "./Deployment"; import { Deployments } from "./Deployments"; import { Genesis } from "./Genesis"; import { KeyPrefix } from "./KeyPrefix"; import { Pow } from "./Pow"; export class NetworkConfiguration { type: string; seeds: string[]; magic: any; port: number; checkpointMap: any; lastCheckpoint: number; halvingInterval: string; genesis: Genesis; pow: Pow; block: Block; bip30: any; activationThreshold: number; minerWindow: number; deployments: Deployments; deploys: Deployment[]; unknownBits: string; keyPrefix: KeyPrefix; addressPrefix: AddressPrefix; requireStandard: boolean; rpcPort: number; minRelay: number; feeRate: number; maxFeeRate: number; selfConnect: boolean; requestMempool: boolean; static postProcess(networkConfig: NetworkConfiguration) { networkConfig.magic = parseInt(networkConfig.magic); Block.postProcess(networkConfig.block); Deployments.postProcess(networkConfig.deployments); KeyPrefix.postProcess(networkConfig.keyPrefix); AddressPrefix.postProcess(networkConfig.addressPrefix); Pow.postProcess(networkConfig.pow); } }