bitburner-src/temp/bitburner.api.md
Olivier Gagnon 43fc5dfd48 work on doc
2021-10-30 12:34:14 -04:00

37 KiB

API Report File for "bitburner"

Do not edit this file. It is a report generated by API Extractor.


// @public (undocumented)
export interface AugmentationStats {
    agility_exp_mult?: number;
    agility_mult?: number;
    bladeburner_analysis_mult?: number;
    bladeburner_max_stamina_mult?: number;
    bladeburner_stamina_gain_mult?: number;
    bladeburner_success_chance_mult?: number;
    charisma_exp_mult?: number;
    charisma_mult?: number;
    company_rep_mult?: number;
    crime_money_mult?: number;
    crime_success_mult?: number;
    defense_exp_mult?: number;
    defense_mult?: number;
    dexterity_exp_mult?: number;
    dexterity_mult?: number;
    faction_rep_mult?: number;
    hacking_chance_mult?: number;
    hacking_exp_mult?: number;
    hacking_grow_mult?: number;
    hacking_money_mult?: number;
    hacking_mult?: number;
    hacking_speed_mult?: number;
    hacknet_node_core_cost_mult?: number;
    hacknet_node_level_cost_mult?: number;
    hacknet_node_money_mult?: number;
    hacknet_node_purchase_cost_mult?: number;
    hacknet_node_ram_cost_mult?: number;
    strength_exp_mult?: number;
    strength_mult?: number;
    work_money_mult?: number;
}

// @public (undocumented)
export type AugmentName =
| "Augmented Targeting I"
| "Augmented Targeting II"
| "Augmented Targeting III"
| "Synthetic Heart"
| "Synfibril Muscle"
| "Combat Rib I"
| "Combat Rib II"
| "Combat Rib III"
| "Nanofiber Weave"
| "NEMEAN Subdermal Weave"
| "Wired Reflexes"
| "Graphene Bone Lacings"
| "Bionic Spine"
| "Graphene Bionic Spine Upgrade"
| "Bionic Legs"
| "Graphene Bionic Legs Upgrade"
| "Speech Processor Implant"
| "TITN-41 Gene-Modification Injection"
| "Enhanced Social Interaction Implant"
| "BitWire"
| "Artificial Bio-neural Network Implant"
| "Artificial Synaptic Potentiation"
| "Enhanced Myelin Sheathing"
| "Synaptic Enhancement Implant"
| "Neural-Retention Enhancement"
| "DataJack"
| "Embedded Netburner Module"
| "Embedded Netburner Module Core Implant"
| "Embedded Netburner Module Core V2 Upgrade"
| "Embedded Netburner Module Core V3 Upgrade"
| "Embedded Netburner Module Analyze Engine"
| "Embedded Netburner Module Direct Memory Access Upgrade"
| "Neuralstimulator"
| "Neural Accelerator"
| "Cranial Signal Processors - Gen I"
| "Cranial Signal Processors - Gen II"
| "Cranial Signal Processors - Gen III"
| "Cranial Signal Processors - Gen IV"
| "Cranial Signal Processors - Gen V"
| "Neuronal Densification"
| "Nuoptimal Nootropic Injector Implant"
| "Speech Enhancement"
| "FocusWire"
| "PC Direct-Neural Interface"
| "PC Direct-Neural Interface Optimization Submodule"
| "PC Direct-Neural Interface NeuroNet Injector"
| "ADR-V1 Pheromone Gene"
| "ADR-V2 Pheromone Gene"
| "The Shadow's Simulacrum"
| "Hacknet Node CPU Architecture Neural-Upload"
| "Hacknet Node Cache Architecture Neural-Upload"
| "Hacknet Node NIC Architecture Neural-Upload"
| "Hacknet Node Kernel Direct-Neural Interface"
| "Hacknet Node Core Direct-Neural Interface"
| "NeuroFlux Governor"
| "Neurotrainer I"
| "Neurotrainer II"
| "Neurotrainer III"
| "HyperSight Corneal Implant"
| "LuminCloaking-V1 Skin Implant"
| "LuminCloaking-V2 Skin Implant"
| "HemoRecirculator"
| "SmartSonar Implant"
| "Power Recirculation Core"
| "QLink"
| "The Red Pill"
| "SPTN-97 Gene Modification"
| "ECorp HVMind Implant"
| "CordiARC Fusion Reactor"
| "SmartJaw"
| "Neotra"
| "Xanipher"
| "nextSENS Gene Modification"
| "OmniTek InfoLoad"
| "Photosynthetic Cells"
| "BitRunners Neurolink"
| "The Black Hand"
| "CRTX42-AA Gene Modification"
| "Neuregen Gene Modification"
| "CashRoot Starter Kit"
| "NutriGen Implant"
| "INFRARET Enhancement"
| "DermaForce Particle Barrier"
| "Graphene BranchiBlades Upgrade"
| "Graphene Bionic Arms Upgrade"
| "BrachiBlades"
| "Bionic Arms"
| "Social Negotiation Assistant (S.N.A)"
| "EsperTech Bladeburner Eyewear"
| "EMS-4 Recombination"
| "ORION-MKIV Shoulder"
| "Hyperion Plasma Cannon V1"
| "Hyperion Plasma Cannon V2"
| "GOLEM Serum"
| "Vangelis Virus"
| "Vangelis Virus 3.0"
| "I.N.T.E.R.L.I.N.K.E.D"
| "Blade's Runners"
| "BLADE-51b Tesla Armor"
| "BLADE-51b Tesla Armor: Power Cells Upgrade"
| "BLADE-51b Tesla Armor: Energy Shielding Upgrade"
| "BLADE-51b Tesla Armor: Unibeam Upgrade"
| "BLADE-51b Tesla Armor: Omnibeam Upgrade"
| "BLADE-51b Tesla Armor: IPU Upgrade"
| "The Blade's Simulacrum";

// @public (undocumented)
export interface AugmentPair {
    cost: number;
    name: AugmentName;
}

// @public (undocumented)
export interface BasicHGWOptions {
    threads: number;
}

// @public (undocumented)
export interface BitNodeMultipliers {
    AgilityLevelMultiplier: number;
    AugmentationMoneyCost: number;
    AugmentationRepCost: number;
    BladeburnerRank: number;
    BladeburnerSkillCost: number;
    CharismaLevelMultiplier: number;
    ClassGymExpGain: number;
    CodingContractMoney: number;
    CompanyWorkExpGain: number;
    CompanyWorkMoney: number;
    CorporationValuation: number;
    CrimeExpGain: number;
    CrimeMoney: number;
    DaedalusAugsRequirement: number;
    DefenseLevelMultiplier: number;
    DexterityLevelMultiplier: number;
    FactionPassiveRepGain: number;
    FactionWorkExpGain: number;
    FactionWorkRepGain: number;
    FourSigmaMarketDataApiCost: number;
    FourSigmaMarketDataCost: number;
    HackExpGain: number;
    HackingLevelMultiplier: number;
    HacknetNodeMoney: number;
    HomeComputerRamCost: number;
    InfiltrationMoney: number;
    InfiltrationRep: number;
    ManualHackMoney: number;
    PurchasedServerCost: number;
    PurchasedServerLimit: number;
    PurchasedServerMaxRam: number;
    RepToDonateToFaction: number;
    ScriptHackMoney: number;
    ServerGrowthRate: number;
    ServerMaxMoney: number;
    ServerStartingMoney: number;
    ServerStartingSecurity: number;
    ServerWeakenRate: number;
    StrengthLevelMultiplier: number;
}

// @public (undocumented)
export interface Bladeburner {
    getActionAutolevel(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): boolean;

    getActionCountRemaining(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): number;

    getActionCurrentLevel(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): number;

    getActionEstimatedSuccessChance(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): number;

    getActionMaxLevel(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): number;

    getActionRepGain(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    level: number,
    ): number;

    getActionTime(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): number;

    getBlackOpNames(): BladeburnerBlackOps[];

    getBlackOpRank(name: BladeburnerBlackOps): number;

    getBonusTime(): number;

    getCity(): City;

    getCityChaos(name: City): number;

    getCityCommunities(name: City): number;

    getCityEstimatedPopulation(name: City): number;

    getContractNames(): BladeburnerContracts[];

    getCurrentAction(): BladeburnerCurAction;

    getGeneralActionNames(): BladeburnerGenActions[];

    getOperationNames(): BladeburnerOperations[];

    getRank(): number;

    getSkillLevel(name: BladeburnerSkills): number;

    getSkillNames(): BladeburnerSkills[];

    getSkillPoints(): number;

    getSkillUpgradeCost(name: BladeburnerSkills): number;

    getStamina(): [number, number];

    getTeamSize(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): number;

    joinBladeburnerDivision(): boolean;

    joinBladeburnerFaction(): boolean;

    setActionAutolevel(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    autoLevel: boolean,
    ): void;

    setActionLevel(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    level: number,
    ): void;

    setTeamSize(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    size: number,
    ): number;

    startAction(
    type: BladeburnerActTypes,
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps,
    ): boolean;

    stopBladeburnerAction(): void;

    switchCity(name: City): boolean;

    upgradeSkill(name: BladeburnerSkills): boolean;
}

// @public (undocumented)
export type BladeburnerActTypes = "contracts" | "operations" | "black ops" | "general";

// @public (undocumented)
export type BladeburnerBlackOps =
| "Operation Typhoon"
| "Operation Zero"
| "Operation X"
| "Operation Titan"
| "Operation Ares"
| "Operation Archangel"
| "Operation Juggernaut"
| "Operation Red Dragon"
| "Operation K"
| "Operation Deckard"
| "Operation Tyrell"
| "Operation Wallace"
| "Operation Shoulder of Orion"
| "Operation Hyron"
| "Operation Morpheus"
| "Operation Ion Storm"
| "Operation Annihilus"
| "Operation Ultron"
| "Operation Centurion"
| "Operation Vindictus"
| "Operation Daedalus";

// @public (undocumented)
export type BladeburnerContracts = "Tracking" | "Bounty Hunter" | "Retirement";

// @public (undocumented)
export interface BladeburnerCurAction {
    name: BladeburnerGenActions | BladeburnerContracts | BladeburnerOperations | BladeburnerBlackOps;
    type: BladeburnerActTypes | "Idle";
}

// @public (undocumented)
export type BladeburnerGenActions =
| "Training"
| "Field Analysis"
| "Recruitment"
| "Diplomacy"
| "Hyperbolic Regeneration Chamber";

// @public (undocumented)
export type BladeburnerOperations =
| "Investigation"
| "Undercover Operation"
| "Sting Operation"
| "Raid"
| "Stealth Retirement Operation"
| "Assassination";

// @public (undocumented)
export type BladeburnerSkills =
| "Blade's Intuition"
| "Cloak"
| "Marksman"
| "Weapon Proficiency"
| "Short-Circuit"
| "Digital Observer"
| "Tracer"
| "Overclock"
| "Reaper"
| "Evasive System"
| "Datamancer"
| "Cyber's Edge"
| "Hands of Midas"
| "Hyperdrive";

// @public (undocumented)
export interface CharacterInfo {
    bitnode: number;
    city: City;
    company: CompanyName[];
    factions: FactionName[];
    hp: number;
    jobTitle: CompanyField[];
    maxHp: number;
    mult: CharacterMult;
    timeWorked: number;
    tor: boolean;
    workAgiExpGain: number;
    workChaExpGain: number;
    workDefExpGain: number;
    workDexExpGain: number;
    workHackExpGain: number;
    workMoneyGain: number;
    workRepGain: number;
    workStrExpGain: number;
}

// @public (undocumented)
export interface CharacterMult {
    agility: number;
    agilityExp: number;
    companyRep: number;
    crimeMoney: number;
    crimeSuccess: number;
    defense: number;
    defenseExp: number;
    dexterity: number;
    dexterityExp: number;
    factionRep: number;
    hacking: number;
    hackingExp: number;
    strength: number;
    strengthExp: number;
    workMoney: number;
}

// @public (undocumented)
export type City = "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven";

// @public (undocumented)
export interface CodingAttemptOptions {
    returnReward: boolean;
}

// @public (undocumented)
export interface CodingContract {
    attempt(answer: string | string[] | number, fn: string, host?: Host): boolean;

    attempt(answer: string | string[] | number, fn: string, host?: Host, opts?: CodingAttemptOptions): boolean | string;

    getContractType(fn: string, host?: Host): CodingContractTypes;

    getData(fn: string, host?: Host): string;

    getDescription(fn: string, host?: Host): string;

    getNumTriesRemaining(fn: string, host?: Host): number;
}

// @public (undocumented)
export type CodingContractTypes =
| "Find Largest Prime Factor"
| "Subarray with Maximum Sum"
| "Total Ways to Sum"
| "Spiralize Matrix"
| "Array Jumping Game"
| "Merge Overlapping Intervals"
| "Generate IP Addresses"
| "Algorithmic Stock Trader I"
| "Algorithmic Stock Trader II"
| "Algorithmic Stock Trader III"
| "Algorithmic Stock Trader IV"
| "Minimum Path Sum in a Triangle"
| "Unique Paths in a Grid I"
| "Unique Paths in a Grid II"
| "Sanitize Parentheses in Expression"
| "Find All Valid Math Expressions";

// @public (undocumented)
export type CompanyField =
| "software"
| "software consultant"
| "it"
| "security engineer"
| "network engineer"
| "business"
| "business consultant"
| "security"
| "agent"
| "employee"
| "part-time employee"
| "waiter"
| "part-time waiter";

// @public (undocumented)
export type CompanyName =
// Sector-12
| "MegaCorp"
| "BladeIndustries"
| "FourSigma"
| "IcarusMicrosystems"
| "UniversalEnergy"
| "DeltaOne"
| "CIA"
| "NSA"
| "AlphaEnterprises"
| "CarmichaelSecurity"
| "FoodNStuff"
| "JoesGuns"

// Aevum
| "ECorp"
| "BachmanAndAssociates"
| "ClarkeIncorporated"
| "OmniTekIncorporated"
| "FulcrumTechnologies"
| "GalacticCybersystems"
| "AeroCorp"
| "WatchdogSecurity"
| "RhoConstruction"
| "AevumPolice"
| "NetLinkTechnologies"

// Volhaven
| "NWO"
| "HeliosLabs"
| "OmniaCybersystems"
| "LexoCorp"
| "SysCoreSecurities"
| "CompuTek"

// Chongqing
| "KuaiGongInternational"
| "SolarisSpaceSystems"

// Ishima
| "StormTechnologies"
| "NovaMedical"
| "OmegaSoftware"

// New Tokyo
| "DefComm"
| "VitaLife"
| "GlobalPharmaceuticals"
| "NoodleBar";

// @public (undocumented)
export type CreatableProgram = PurchaseableProgram | "serverprofiler.exe";

// @public (undocumented)
export type Crime =
| "shoplift"
| "rob store"
| "mug"
| "larceny"
| "deal drugs"
| "bond forgery"
| "traffick arms"
| "homicide"
| "grand theft auto"
| "kidnap"
| "assassinate"
| "heist";

// @public (undocumented)
export interface CrimeStats {
    agility_exp: number;
    agility_success_weight: number;
    charisma_exp: number;
    charisma_success_weight: number;
    defense_exp: number;
    defense_success_weight: number;
    dexterity_exp: number;
    dexterity_success_weight: number;
    difficulty: number;
    hacking_exp: number;
    hacking_success_weight: number;
    intelligence_exp: number;
    karma: number;
    kills: number;
    money: number;
    name: number;
    strength_exp: number;
    strength_success_weight: number;
    time: number;
    type: string;
}

// @public (undocumented)
export type FactionName =
| "Illuminati"
| "Daedalus"
| "The Covenant"
| "ECorp"
| "MegaCorp"
| "Bachman & Associates"
| "Blade Industries"
| "NWO"
| "Clarke Incorporated"
| "OmniTek Incorporated"
| "Four Sigma"
| "KuaiGong International"
| "Fulcrum Secret Technologies"
| "BitRunners"
| "The Black Hand"
| "NiteSec"
| "Aevum"
| "Chongqing"
| "Ishima"
| "New Tokyo"
| "Sector-12"
| "Volhaven"
| "Speakers for the Dead"
| "The Dark Army"
| "The Syndicate"
| "Silhouette"
| "Tetrads"
| "Slum Snakes"
| "Netburners"
| "Tian Di Hui"
| "CyberSec"
| "Bladeburners";

// @public (undocumented)
export type FactionWork = "hacking" | "field" | "security";

// @public (undocumented)
export interface Gang {
    ascendMember(memberName: string): GangMemberAscension;

    canRecruitMember(): boolean;

    getBonusTime(): number;

    getChanceToWinClash(gangName: GangName): number;

    getEquipmentCost(equipName: GangEquipment | GangAugmentations): number;

    getEquipmentNames(): (GangEquipment | GangAugmentations)[];

    getEquipmentStats(equipName: GangEquipment | GangAugmentations): GangEquipmentStats;

    getEquipmentType(equipName: GangEquipment | GangAugmentations): GangEquipmentType;

    getGangInformation(): GangGenInfo;

    getMemberInformation(name: string): GangMemberInfo;

    getMemberNames(): string[];

    getOtherGangInformation(): GangOtherInfo;

    getTaskNames(): GangTasks[];

    getTaskStats(name: GangTasks): GangTasksStats;

    purchaseEquipment(memberName: string, equipName: GangEquipment | GangAugmentations): boolean;

    recruitMember(name: string): boolean;

    setMemberTask(memberName: string, taskName: GangTasks): boolean;

    setTerritoryWarfare(engage: boolean): void;
}

// @public (undocumented)
export type GangAugmentations =
| "Bionic Arms"
| "Bionic Legs"
| "Bionic Spine"
| "BrachiBlades"
| "Nanofiber Weave"
| "Synthetic Heart"
| "Synfibril Muscle"
| "BitWire"
| "Neuralstimulator"
| "DataJack"
| "Graphene Bone Lacings";

// @public (undocumented)
export type GangEquipment =
| "Baseball Bat"
| "Katana"
| "Glock 18C"
| "P90C"
| "Steyr AUG"
| "AK-47"
| "M15A10 Assault Rifle"
| "AWM Sniper Rifle"
| "Bulletproof Vest"
| "Full Body Armor"
| "Liquid Body Armor"
| "Graphene Plating Armor"
| "Ford Flex V20"
| "ATX1070 Superbike"
| "Mercedes-Benz S9001"
| "White Ferrari"
| "NUKE Rootkit"
| "Soulstealer Rootkit"
| "Demon Rootkit"
| "Hmap Node"
| "Jack the Ripper";

// @public (undocumented)
export interface GangEquipmentStats {
    agi: number;
    cha: number;
    def: number;
    dex: number;
    hack: number;
    str: number;
}

// @public (undocumented)
export type GangEquipmentType = "Weapon" | "Armor" | "Vehicle" | "Rootkit" | "Augmentation";

// @public (undocumented)
export interface GangGenInfo {
    faction: GangName;
    isHacking: boolean;
    moneyGainRate: number;
    power: number;
    respect: number;
    respectGainRate: number;
    territory: number;
    territoryClashChance: number;
    wantedLevel: number;
    wantedLevelGainRate: number;
}

// @public (undocumented)
export interface GangMemberAscension {
    agi: number;
    cha: number;
    def: number;
    dex: number;
    hack: number;
    respect: number;
    str: number;
}

// @public (undocumented)
export interface GangMemberInfo {
    agility: number;
    agilityAscensionMult: number;
    agilityEquipMult: number;
    augmentations: GangAugmentations[];
    charisma: number;
    charismaAscensionMult: number;
    charismaEquipMult: number;
    defense: number;
    defenseAscensionMult: number;
    defenseEquipMult: number;
    dexterity: number;
    dexterityAscensionMult: number;
    dexterityEquipMult: number;
    equipment: GangEquipment[];
    hacking: number;
    hackingAscensionMult: number;
    hackingEquipMult: number;
    strength: number;
    strengthAscensionMult: number;
    strengthEquipMult: number;
    task: GangTasks;
}

// @public (undocumented)
export type GangName =
| "Slum Snakes"
| "Tetrads"
| "The Syndicate"
| "The Dark Army"
| "Speakers for the Dead"
| "NiteSec"
| "The Black Hand";

// @public (undocumented)
export type GangOtherInfo = {
    /** Stock Symbol */
    [key in GangName]: GangOtherInfoObject[];
};

// @public (undocumented)
export interface GangOtherInfoObject {
    power: number;
    territory: number;
}

// @public (undocumented)
export type GangTasks =
| "Unassigned"
| "Ransomware"
| "Phishing"
| "Identity Theft"
| "DDoS Attacks"
| "Plant Virus"
| "Fraud & Counterfeiting"
| "Money Laundering"
| "Cyberterrorism"
| "Ethical Hacking"
| "Mug People"
| "Deal Drugs"
| "Strongarm Civilians"
| "Run a Con"
| "Armed Robbery"
| "Traffick Illegal Arms"
| "Threaten & Blackmail"
| "Human Trafficking"
| "Terrorism"
| "Vigilante Justice"
| "Train Combat"
| "Train Hacking"
| "Train Charisma"
| "Territory Warfare";

// @public (undocumented)
export interface GangTasksStats {
    agiWeight: number;
    baseMoney: number;
    baseRespect: number;
    baseWanted: number;
    chaWeight: number;
    defWeight: number;
    desc: string;
    dexWeight: number;
    difficulty: number;
    hackWeight: number;
    isCombat: boolean;
    isHacking: boolean;
    name: GangTasks;
    strWeight: number;
    territory: GangTasksTerritory;
}

// @public (undocumented)
export interface GangTasksTerritory {
    money: number;
    respect: number;
    wanted: number;
}

// @public (undocumented)
export type Gym = "Crush Fitness Gym" | "Snap Fitness Gym" | "Iron Gym" | "Powerhouse Gym" | "Millenium Fitness Gym";

// @public (undocumented)
export type GymStat = "str" | "def" | "dex" | "agi";

// @public (undocumented)
export interface HackingMultipliers {
    chance: number;
    growth: number;
    money: number;
    speed: number;
}

// @public (undocumented)
export interface HackNet {
    getCacheUpgradeCost(index: number, n: number): number;

    getCoreUpgradeCost(index: number, n: number): number;

    getLevelUpgradeCost(index: number, n: number): number;

    getNodeStats(index: number): NodeStats;

    getPurchaseNodeCost(): number;

    getRamUpgradeCost(index: number, n: number): number;

    hashCost(upgName: HashUpgrades): number;

    numHashes(): number;

    numNodes(): number;

    purchaseNode(): number;

    spendHashes(upgName: HashUpgrades, upgTarget?: Host): boolean;

    upgradeCache(index: number, n: number): boolean;

    upgradeCore(index: number, n: number): boolean;

    upgradeLevel(index: number, n: number): boolean;

    upgradeRam(index: number, n: number): boolean;
}

// @public (undocumented)
export interface HacknetMultipliers {
    coreCost: number;
    levelCost: number;
    production: number;
    purchaseCost: number;
    ramCost: number;
}

// @public (undocumented)
export type Handle = string | Port;

// @public (undocumented)
export type HashUpgrades =
| "Sell for Money"
| "Sell for Corporation Funds"
| "Reduce Minimum Security"
| "Increase Maximum Money"
| "Improve Studying"
| "Improve Gym Training"
| "Exchange for Corporation Research"
| "Exchange for Bladeburner Rank"
| "Exchange for Bladeburner SP"
| "Generate Coding Contract";

// @public (undocumented)
export type Host = string;

// @public (undocumented)
export interface NodeStats {
    cache: number;
    cores: number;
    hashCapacity: number;
    level: number;
    name: string;
    production: number;
    ram: number;
    timeOnline: number;
    totalProduction: number;
}

// @public (undocumented)
export interface NS extends Singularity {
    readonly args: any[];
    // (undocumented)
    readonly bladeburner: Bladeburner;
    brutessh(host: Host): void;
    clear(handle: Handle): void;
    clearLog(): void;
    // (undocumented)
    readonly codingcontract: CodingContract;
    deleteServer(host: Host): boolean;
    disableLog(fn: string): void;
    enableLog(fn: string): void;
    exec(script: Script, host: Host, numThreads?: number, ...args: string[]): number;
    exit(): void;
    fileExists(filename: string, host?: Host): boolean;
    ftpcrack(host: Host): void;
    // (undocumented)
    readonly gang: Gang;
    getBitNodeMultipliers(url: string, target: string, host: string): BitNodeMultipliers;
    getFavorToDonate(): number;
    getGrowTime(host: Host, hackLvl?: number, intLvl?: number): number;
    getHackingLevel(): number;
    getHackingMultipliers(): HackingMultipliers;
    getHacknetMultipliers(): HacknetMultipliers;
    getHackTime(host: Host, hackLvl?: number, intLvl?: number): number;
    getHostname(): Host;
    getPortHandle(port: Port): any[];
    getPurchasedServerCost(ram: number): number;
    getPurchasedServerLimit(): number;
    getPurchasedServerMaxRam(): number;
    getPurchasedServers(hostnameMode?: boolean): Host[];
    getScriptExpGain(script: Script, host: Host, ...args: string[]): number;
    getScriptIncome(script: Script, host: Host, ...args: string[]): number | [number, number];
    getScriptLogs(fn?: Script, host?: Host, ...args: any[]): string[];
    getScriptName(): string;
    getScriptRam(script: Script, host?: Host): number;
    getServer(host?: Host): Server;
    getServerBaseSecurityLevel(host: Host): number;
    getServerGrowth(host: Host): number;
    getServerMaxMoney(host: Host): number;
    getServerMinSecurityLevel(host: Host): number;
    getServerMoneyAvailable(host: Host): number;
    getServerNumPortsRequired(host: Host): number;
    getServerRam(host: Host): [number, number];
    getServerRequiredHackingLevel(host: Host): number;
    getServerSecurityLevel(host: Host): number;
    getTimeSinceLastAug(): number;
    getWeakenTime(host: Host, hackLvl?: number, intLvl?: number): number;
    grow(host: Host, opts?: BasicHGWOptions): Promise<number>;
    growthAnalyze(host: Host, growthAmount: number): number;
    growthAnalyzeSecurity(threads: number): number;
    hack(host: Host, opts?: BasicHGWOptions): Promise<number>;
    hackAnalyzePercent(host: Host): number;
    hackAnalyzeSecurity(threads: number): number;
    hackAnalyzeThreads(host: Host, hackAmount: number): number;
    hackChance(host: Host): number;
    readonly hacknet: HackNet;
    hasRootAccess(host: Host): boolean;
    httpworm(host: Host): void;
    isLogEnabled(fn: string): boolean;
    isRunning(script: Script, host: Host, ...args: string[]): boolean;
    kill(script: Script, host: Host, ...args: string[]): boolean;
    kill(scriptPid: number): boolean;
    killall(host: Host): boolean;
    ls(host: Host, grep?: string): string[];
    nFormat(n: number, format: string): number;
    nuke(host: Host): void;
    peek(port: Port): string | number | object;
    print(msg: string | number | string[] | number[]): void;
    prompt(txt: string): Promise<boolean>;
    ps(host?: Host): ProcessInfo[];
    purchaseServer(hostname: Host, ram: number): Host | "";
    read(handle: Handle): string | number | object;
    relaysmtp(host: Host): void;
    rm(name: string, host?: Host): boolean;
    run(script: Script, numThreads?: number, ...args: string[]): number;
    scan(host: Host, hostnames?: boolean): Host[];
    scp(files: string | ReadonlyArray<string>, destination: Host): boolean;
    scp(
    files: string | ReadonlyArray<string>,
    source: Host,
    // tslint:disable-next-line:unified-signatures
    destination: Host,
    ): boolean;
    scriptKill(script: Script, host: Host): boolean;
    scriptRunning(script: Script, host: Host): boolean;
    serverExists(host: Host): boolean;
    sleep(millis: number): Promise<void>;
    // (undocumented)
    readonly sleeve: Sleeve;
    spawn(script: Script, numThreads?: number, ...args: string[]): void;
    sprintf(format: string, ...args: string[]): string;
    sqlinject(host: Host): void;
    // (undocumented)
    readonly stock: TIX;
    tail(fn?: Script, host?: Host, ...args: any[]): void;
    tprint(msg: string | number | string[] | number[]): void;
    tryWrite(port: Handle, data: string | string[] | number): boolean;
    vsprintf(format: string, args: string[]): string;
    weaken(host: Host, opts?: BasicHGWOptions): Promise<number>;
    weakenAnalyze(threads: number, cores?: number): number;
    wget(url: string, target: string, host?: string): Promise<boolean>;
    write(handle: Handle, data?: string | string[] | number, mode?: "w" | "a"): void;
}

// @public (undocumented)
export type OrderPos = "long" | "short";

// @public (undocumented)
export type OrderType = "limitbuy" | "limitsell" | "stopbuy" | "stopsell";

// @public (undocumented)
export interface PlayerStats {
    agility: number;
    charisma: number;
    defense: number;
    dexterity: number;
    hacking: number;
    intelligence: number;
    strength: number;
}

// @public
export type Port = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;

// @public (undocumented)
export interface ProcessInfo {
    args: string[];
    filename: Script;
    threads: number;
}

// @public (undocumented)
export type PurchaseableProgram =
| "brutessh.exe"
| "ftpcrack.exe"
| "relaysmtp.exe"
| "httpworm.exe"
| "sqlinject.exe"
| "deepscanv1.exe"
| "deepscanv2.exe"
| "autolink.exe";

// @public (undocumented)
export type Script = string;

// @public (undocumented)
export interface Server {
    // How many CPU cores this server has. Maximum of 8.
    // Currently, this only affects hacking missions
    // (undocumented)
    cpuCores: number;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    ftpPortOpen: boolean;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    hasAdminRights: boolean;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    hostname: string;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    httpPortOpen: boolean;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    ip: string;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    isConnectedTo: boolean;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    maxRam: number;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    organizationName: string;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    ramUsed: number;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    smtpPortOpen: boolean;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    sqlPortOpen: boolean;

    // Flag indicating whether the FTP port is open
    // (undocumented)
    sshPortOpen: boolean;
}

// @public (undocumented)
export interface Singularity {
    applyToCompany(companyName: CompanyName, field: CompanyField): boolean;

    checkFactionInvitations(): FactionName[];

    commitCrime(crime: Crime): number;

    createProgram(program: CreatableProgram): boolean;

    donateToFaction(faction: FactionName, amount: number): boolean;

    getAugmentationCost(augName: AugmentName): [number, number];

    getAugmentationPrereq(augName: AugmentName): AugmentName[];

    getAugmentationsFromFaction(faction: FactionName): AugmentName[];

    getAugmentationStats(name: AugmentName): AugmentationStats;

    getCharacterInformation(): CharacterInfo;

    getCompanyFavor(companyName: CompanyName): number;

    getCompanyFavorGain(companyName: CompanyName): number;

    getCompanyRep(companyName: CompanyName): number;

    getCrimeChance(crime: Crime): number;

    getCrimeStats(crime: Crime): CrimeStats;

    getFactionFavor(faction: FactionName): number;

    getFactionFavorGain(faction: FactionName): number;

    getFactionRep(faction: FactionName): number;

    getOwnedAugmentations(purchased?: boolean): AugmentName[];

    getOwnedSourceFiles(): SourceFileLvl[];

    getStats(): PlayerStats;

    getUpgradeHomeRamCost(): number;

    gymWorkout(gymName: Gym, stat: GymStat): boolean;

    installAugmentations(cbScript?: Script): void;

    isBusy(): boolean;

    joinFaction(faction: FactionName): boolean;

    purchaseAugmentation(faction: FactionName, augmnet: AugmentName): boolean;

    purchaseProgram(programName: PurchaseableProgram): boolean;

    purchaseTor(): boolean;

    softReset(): void;

    stopAction(): boolean;

    travelToCity(city: City): boolean;

    universityCourse(universityName: University, courseName: UniversityCourse): boolean;

    upgradeHomeRam(): boolean;

    workForCompany(companyName?: CompanyName): boolean;

    workForFaction(faction: FactionName, workType: FactionWork): boolean;
}

// @public (undocumented)
export interface Sleeve {
    getInformation(sleeveNumber: number): SleeveInformation;

    getNumSleeves(): number;

    getSleeveAugmentations(sleeveNumber: number): AugmentName[];

    getSleevePurchasableAugs(sleeveNumber: number): AugmentPair[];

    getSleeveStats(sleeveNumber: number): SleeveStats;

    getTask(sleeveNumber: number): SleeveTask;

    purchaseSleeveAug(sleeveNumber: number, augName: AugmentName): boolean;

    setToCommitCrime(sleeveNumber: number, name: Crime): boolean;

    setToCompanyWork(sleeveNumber: number, companyName: CompanyName): boolean;

    setToFactionWork(sleeveNumber: number, factionName: FactionName, factionWorkType: FactionWork): boolean;

    setToGymWorkout(sleeveNumber: number, gymName: Gym, stat: GymStat): boolean;

    setToShockRecovery(sleeveNumber: number): boolean;

    setToSynchronize(sleeveNumber: number): boolean;

    setToUniversityCourse(sleeveNumber: number, university: University, className: UniversityCourse): boolean;

    travel(sleeveNumber: number, cityName: City): boolean;
}

// @public (undocumented)
export interface SleeveInformation {
    city: City;
    earningsForPlayer: SleeveWorkGains;
    earningsForSleeves: SleeveWorkGains;
    earningsForTask: SleeveWorkGains;
    hp: number;
    jobs: string[];
    jobTitle: CompanyField[];
    maxHp: number;
    mult: CharacterMult;
    timeWorked: number;
    tor: boolean;
    workRepGain: number;
}

// @public (undocumented)
export interface SleeveStats {
    agility: number;
    charisma: number;
    defense: number;
    dexterity: number;
    hacking_skill: number;
    shock:
    | 0
    | 1
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9
    | 10
    | 11
    | 12
    | 13
    | 14
    | 15
    | 16
    | 17
    | 18
    | 19
    | 20
    | 21
    | 22
    | 23
    | 24
    | 25
    | 26
    | 27
    | 28
    | 29
    | 30
    | 31
    | 32
    | 33
    | 34
    | 35
    | 36
    | 37
    | 38
    | 39
    | 40
    | 41
    | 42
    | 43
    | 44
    | 45
    | 46
    | 47
    | 48
    | 49
    | 50
    | 51
    | 52
    | 53
    | 54
    | 55
    | 56
    | 57
    | 58
    | 59
    | 60
    | 61
    | 62
    | 63
    | 64
    | 65
    | 66
    | 67
    | 68
    | 69
    | 70
    | 71
    | 72
    | 73
    | 74
    | 75
    | 76
    | 77
    | 78
    | 79
    | 80
    | 81
    | 82
    | 83
    | 84
    | 85
    | 86
    | 87
    | 88
    | 89
    | 90
    | 91
    | 92
    | 93
    | 94
    | 95
    | 96
    | 97
    | 98
    | 99
    | 100;
    strength: number;
    sync:
    | 0
    | 1
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9
    | 10
    | 11
    | 12
    | 13
    | 14
    | 15
    | 16
    | 17
    | 18
    | 19
    | 20
    | 21
    | 22
    | 23
    | 24
    | 25
    | 26
    | 27
    | 28
    | 29
    | 30
    | 31
    | 32
    | 33
    | 34
    | 35
    | 36
    | 37
    | 38
    | 39
    | 40
    | 41
    | 42
    | 43
    | 44
    | 45
    | 46
    | 47
    | 48
    | 49
    | 50
    | 51
    | 52
    | 53
    | 54
    | 55
    | 56
    | 57
    | 58
    | 59
    | 60
    | 61
    | 62
    | 63
    | 64
    | 65
    | 66
    | 67
    | 68
    | 69
    | 70
    | 71
    | 72
    | 73
    | 74
    | 75
    | 76
    | 77
    | 78
    | 79
    | 80
    | 81
    | 82
    | 83
    | 84
    | 85
    | 86
    | 87
    | 88
    | 89
    | 90
    | 91
    | 92
    | 93
    | 94
    | 95
    | 96
    | 97
    | 98
    | 99
    | 100;
}

// @public (undocumented)
export interface SleeveTask {
    crime: Crime | "";
    factionWorkType: FactionWork | "";
    gymStatType: GymStat | "";
    location: City | "";
    task: string;
}

// @public (undocumented)
export interface SleeveWorkGains {
    workAgiExpGain: number;
    workChaExpGain: number;
    workDefExpGain: number;
    workDexExpGain: number;
    workHackExpGain: number;
    workMoneyGain: number;
    workStrExpGain: number;
}

// @public (undocumented)
export interface SourceFileLvl {
    lvl: number;
    n: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
}

// @public (undocumented)
export type StockOrder = {
    /** Stock Symbol */
    [key in StockSymbol]?: StockOrderObject[];
};

// @public (undocumented)
export interface StockOrderObject {
    position: "S" | "L";
    price: number;
    shares: number;
    type: "Limit Buy Order" | "Limit Sell Order" | "Stop Buy Order" | "Stop Buy Order";
}

// @public (undocumented)
export type StockSymbol =
| "ECP"
| "MGCP"
| "BLD"
| "CLRK"
| "OMTK"
| "FSIG"
| "KGI"
| "FLCM"
| "STM"
| "DCOMM"
| "HLS"
| "VITA"
| "ICRS"
| "UNV"
| "AERO"
| "OMN"
| "SLRS"
| "GPH"
| "NVMD"
| "WDS"
| "LXO"
| "RHOC"
| "APHE"
| "SYSC"
| "CTK"
| "NTLK"
| "OMGA"
| "FNS"
| "SGC"
| "JGN"
| "CTYS"
| "MDYN"
| "TITN";

// @public (undocumented)
export interface TIX {
    buy(sym: StockSymbol, shares: number): number;

    cancelOrder(sym: StockSymbol, shares: number, price: number, type: OrderType, pos: OrderPos): void;

    getAskPrice(sym: StockSymbol): number;

    getBidPrice(sym: StockSymbol): number;

    getForecast(sym: StockSymbol): number;

    getMaxShares(sym: StockSymbol): number;

    getOrders(): StockOrder;

    getPosition(sym: StockSymbol): [number, number, number, number];

    getPrice(sym: StockSymbol): number;

    getPurchaseCost(sym: StockSymbol, shares: number, posType: OrderPos): number;

    getSaleGain(sym: StockSymbol, shares: number, posType: OrderPos): number;

    getSymbols(): StockSymbol[];

    getVolatility(sym: StockSymbol): number;

    placeOrder(sym: StockSymbol, shares: number, price: number, type: OrderType, pos: OrderPos): boolean;

    purchase4SMarketData(): boolean;

    purchase4SMarketDataTixApi(): boolean;

    sell(sym: StockSymbol, shares: number): number;

    sellShort(sym: StockSymbol, shares: number): number;

    short(sym: StockSymbol, shares: number): number;
}

// @public (undocumented)
export type University = "Summit University" | "Rothman University" | "ZB Institute Of Technology";

// @public (undocumented)
export type UniversityCourse =
| "Study Computer Science"
| "Data Strucures"
| "Networks"
| "Algorithms"
| "Management"
| "Leadership";

// (No @packageDocumentation comment for this package)