@leofcoin/launch-chain 0.1.5 → 0.1.7

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/exports/launch.js CHANGED
@@ -67,7 +67,7 @@ const hasClient = async (httpURL, wsURL, networkVersion) => {
67
67
  * @param {object} options { ws: boolean || {url: string, port: number}, http: boolean || {url: string, port: number}, network}
68
68
  * @returns '{ mode: string, endpoints: object, chain}'
69
69
  */
70
- const launch = async (options = {ws, http, network: 'leofcoin:peach'}) => {
70
+ const launch = async (options = {}) => {
71
71
  if (!options) options = {}
72
72
  if (!options.network) options.network = 'leofcoin:peach'
73
73
  if (options.ws === undefined) options.ws = { port: 4040 }
@@ -93,11 +93,11 @@ const launch = async (options = {ws, http, network: 'leofcoin:peach'}) => {
93
93
 
94
94
  chain = await new Chain()
95
95
 
96
- if (endpoints.ws) {
96
+ if (options.ws) {
97
97
  await wsServer(chain, options.ws.port, options.networkVersion)
98
98
  endpoints.ws = options.ws.url
99
99
  }
100
- if (endpoints.http) {
100
+ if (options.http) {
101
101
  await httpServer(chain, options.http.port, options.networkVersion)
102
102
  endpoints.http = options.http.url
103
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/launch-chain",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": "./exports/launch.js"