Initialization

Parameters

  • network name

  • network configuration

Supported networks:

  1. local

  2. jungle

  3. jungle3

  4. bos

  5. worbli

  6. main

  7. kylin

  8. { url: 'custom url', chainId: 'custom id' }

Instantiation with default parameters

const eoslime = require('eoslime').init();

Defaults/Optionals:

  • network name - local On local network, eoslime.provider.defaultAccount is set automatically to eosio

  • network configuration - { url: http://127.0.0.1:8888, chainId: cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f }

const eoslime = require('eoslime').init();

eoslime.provider.defaultAccount => 

    Account {
        name: 'eosio',
        executiveAuthority: {
            actor: 'eosio', permission: 'active'
        }
        publicKey: 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV',
        privateKey: '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3',
        provider: {
             network: {
                "name": "local",
                "url": "http://127.0.0.1:8888",
                "chainId": "cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f"
            },
            ...
        }
    }

Only local network comes with preset provider account. If you connect to another network you should set provider's default account manually

Instantiation on supported network

With default connection

const eoslime = require('eoslime').init('jungle');

With custom connection

const eoslime = require('eoslime').init('jungle', { url: "Your network", chainId: "Your chainId"});

Instantiation on custom network

const eoslime = require('eoslime').init({ url: 'Your network', chainId: 'Your chainId' });

Last updated