@leofcoin/launch-chain 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,7 @@ const {chain, endpoints, mode} = await launch()
18
18
  ```js
19
19
  {
20
20
  network: 'leofcoin:peach',
21
+ stars: ['wss://peach.leofcoin.org'],
21
22
  ws: {
22
23
  port: 4040,
23
24
  url: 'ws://localhost:4040'
@@ -31,6 +32,7 @@ const {chain, endpoints, mode} = await launch()
31
32
 
32
33
  ### disabling options
33
34
  ```js
35
+ stars: [] // note that disabling stars results in no peer discovery
34
36
  {
35
37
  ws: false,
36
38
  http: false
package/exports/launch.js CHANGED
@@ -70,6 +70,7 @@ const hasClient = async (httpURL, wsURL, networkVersion) => {
70
70
  const launch = async (options = {}) => {
71
71
  if (!options) options = {}
72
72
  if (!options.network) options.network = 'leofcoin:peach'
73
+ if (!options.stars) options.stars = ['wss://peach.leofcoin.org']
73
74
  if (options.ws === undefined) options.ws = { port: 4040 }
74
75
  if (options.http === undefined) options.http = { port: 8080 }
75
76
  if (options.networkVersion === undefined) options.networkVersion = options.network.replace(':', '-')
@@ -88,8 +89,8 @@ const launch = async (options = {}) => {
88
89
  })
89
90
  mode = 'remote'
90
91
  } else {
91
- await new Node({ network: options.network })
92
- await nodeConfig({ network: options.network })
92
+ await new Node({ network: options.network, stars: options.stars })
93
+ await nodeConfig({ network: options.network, stars: options.stars })
93
94
 
94
95
  chain = await new Chain()
95
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/launch-chain",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": "./exports/launch.js"
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "homepage": "https://github.com/leofcoin/launch-chain#readme",
23
23
  "dependencies": {
24
- "@leofcoin/chain": "^1.4.5",
25
- "@leofcoin/endpoints": "^0.1.0"
24
+ "@leofcoin/chain": "^1.4.8",
25
+ "@leofcoin/endpoints": "^0.2.0"
26
26
  }
27
27
  }