Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Functions

Functions

Const Export assignment Compound

  • Compound(provider?: any, options?: any): any
  • Creates an instance of the Compound.js SDK.

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

    Parameters

    • Default value provider: any = "mainnet"
    • Default value options: any = {}

    Returns any

    Returns an instance of the Compound.js SDK.