0.3.7 • Published 19 days ago

@leofcoin/launch-chain v0.3.7

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

lauch-chain

launch chain & peernet (reuses exposed transports when already running)

usage

import launch from '@leofcoin/launch-chain'

const { chain, endpoints, mode } = await launch()
// chain is undefined when mode is remote
// endpoints contain urls to connect to the desired remote
// when mode is remote means an instance is already running
// when mode is direct means chain is directly available and no endpoint is needed to interact with it

options

default

{
  network: 'leofcoin:peach',
  stars: ['wss://peach.leofcoin.org'],
  forceRemote: false, // when set to true only tries to connect to an external/local exposed node
  ws: {
    port: 4040,
    url: 'ws://localhost:4040'
  },
  http: {
    port: 8080,
    url: 'http://localhost:8080'
  }
}

disabling options

stars: [] // note that disabling stars results in no peer discovery
{
  ws: false,
  http: false
}

build for browser

no prebuild are provided since the esm switch, everything is written with the browser in mind so some simple ignores are enough to build.

rollup

external: ['@koush/wrtc', '@leofcoin/endpoints/ws', '@leofcoin/endpoints/http']

webpack

externals: {
  '@koush/wrtc': false,
  '@leofcoin/endpoints/ws': false,
  '@leofcoin/endpoints/http': false
}
0.3.7

19 days ago

0.3.6

2 months ago

0.3.5

4 months ago

0.3.2

7 months ago

0.3.1

8 months ago

0.3.4

7 months ago

0.3.3

7 months ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago