0.4.2 • Published 10 months ago

@leofcoin/launch-chain v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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.4.2

10 months ago

0.4.1

10 months ago

0.4.0

11 months ago

0.3.8

11 months ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.5

2 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago