Initialization
- 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' }
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
const eoslime = require('eoslime').init('jungle');
const eoslime = require('eoslime').init('jungle', { url: "Your network", chainId: "Your chainId"});
const eoslime = require('eoslime').init({ url: 'Your network', chainId: 'Your chainId' });
Last modified 3yr ago