Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Functions

Functions

Const Export assignment Fortress

  • Fortress(provider?: Provider | string, options?: CompoundOptions): CompoundInstance
  • Creates an instance of the Fortress.js SDK.

    example
    var fortress = new Fortress(window.ethereum); // web browser
    
    var fortress = new Fortress('http://127.0.0.1:8545'); // HTTP provider
    
    var fortress = new Fortress(); // Uses Ethers.js fallback mainnet (for testing only)
    
    var fortress = new Fortress('testnet'); // Uses Ethers.js fallback (for testing only)
    
    // Init with private key (server side)
    var fortress = new Fortress('https://mainnet.infura.io/v3/_your_project_id_', {
      privateKey: '0x_your_private_key_', // preferably with environment variable
    });
    
    // Init with HD mnemonic (server side)
    var fortress = new Fortress('mainnet' {
      mnemonic: 'clutch captain shoe...', // preferably with environment variable
    });

    Parameters

    • Default value provider: Provider | string = "mainnet"
    • Default value options: CompoundOptions = {}

    Returns CompoundInstance

    Returns an instance of the Fortress.js SDK.