Eoslime
Search…
Initialization

Parameters

  • network name
  • network configuration
Supported networks:
  1. 1.
    local
  2. 2.
    jungle
  3. 3.
    jungle3
  4. 4.
    bos
  5. 5.
    worbli
  6. 6.
    main
  7. 7.
    kylin
  8. 8.
    { url: 'custom url', chainId: 'custom id' }

Instantiation with default parameters

1
const eoslime = require('eoslime').init();
Copied!
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 }
1
const eoslime = require('eoslime').init();
2
3
eoslime.provider.defaultAccount =>
4
5
Account {
6
name: 'eosio',
7
executiveAuthority: {
8
actor: 'eosio', permission: 'active'
9
}
10
publicKey: 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV',
11
privateKey: '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3',
12
provider: {
13
network: {
14
"name": "local",
15
"url": "http://127.0.0.1:8888",
16
"chainId": "cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f"
17
},
18
...
19
}
20
}
Copied!
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

1
const eoslime = require('eoslime').init('jungle');
Copied!

With custom connection

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

Instantiation on custom network

1
const eoslime = require('eoslime').init({ url: 'Your network', chainId: 'Your chainId' });
Copied!
Last modified 1yr ago