@leofcoin/launch-chain 0.4.24 → 0.4.25
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 +26 -0
- package/exports/cli.js +13 -1
- package/exports/validator-cli.js +1 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -22,6 +22,32 @@ const { chain, endpoints, mode } = await launch(
|
|
|
22
22
|
Requires Node.js 24.15.0 or newer. The default native WebRTC backend is
|
|
23
23
|
`@vandeurenglenn/wrtc` 0.7.2 or newer.
|
|
24
24
|
|
|
25
|
+
### automatic peer transports
|
|
26
|
+
|
|
27
|
+
Launch-chain 0.4.25 requires chain 1.10.17 and lib 1.3.15, using published
|
|
28
|
+
peernet 3 / swarm 0.10. Peers discover an available WebTransport relay through
|
|
29
|
+
their configured star; clients do not need a relay URL, shared secret or TLS
|
|
30
|
+
configuration. WebRTC and circuit fallback remain available when no relay is
|
|
31
|
+
advertised. HTTP/3 needs reachable UDP and a correctly configured public star.
|
|
32
|
+
Node's HTTP/3 backend also needs the optional native QUIC package's installation
|
|
33
|
+
hook. This repository approves its exact reviewed version in `allowScripts`.
|
|
34
|
+
Standalone installations using npm's script-blocking policy must review/approve
|
|
35
|
+
that native package as well; the launcher never bypasses that policy.
|
|
36
|
+
|
|
37
|
+
The star operator must also deploy swarm 0.10. Its `npm start` starts the star
|
|
38
|
+
and relay together, creates the private relay secret, and discovers an existing
|
|
39
|
+
matching Let's Encrypt certificate. Multiple certificate names require a one-time
|
|
40
|
+
hostname selection. This does not issue certificates or change DNS/firewalls.
|
|
41
|
+
See the [relay operator guide](https://github.com/netpeer/swarm/blob/main/docs/webtransport-relay.md).
|
|
42
|
+
|
|
43
|
+
This dependency update does not change the Peach genesis, protocol version,
|
|
44
|
+
account identities, passwords or data directory. Do not delete existing stores.
|
|
45
|
+
Stop the existing process before upgrading and restart using the same data root.
|
|
46
|
+
|
|
47
|
+
For development, after building, `npm run test:package -w @leofcoin/launch-chain`
|
|
48
|
+
checks a clean tarball install, npm CLI entry and real-genesis offline startup
|
|
49
|
+
using temporary storage. It is not proof of public peer sync or validator finality.
|
|
50
|
+
|
|
25
51
|
No monorepo checkout or global install is required:
|
|
26
52
|
|
|
27
53
|
```sh
|
package/exports/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { realpathSync } from 'node:fs';
|
|
3
4
|
import { homedir } from 'node:os';
|
|
4
5
|
import { resolve, isAbsolute, relative } from 'node:path';
|
|
5
6
|
import { pathToFileURL } from 'node:url';
|
|
@@ -177,7 +178,18 @@ const runCli = async (args = process.argv.slice(2)) => {
|
|
|
177
178
|
// explicitly closed interactive shell terminate predictably.
|
|
178
179
|
setTimeout(() => process.exit(0), 100);
|
|
179
180
|
};
|
|
180
|
-
|
|
181
|
+
// npm's bin entry and macOS temporary directories can both be symlinks. Node
|
|
182
|
+
// canonicalizes import.meta.url, so compare it with the canonical argv path too.
|
|
183
|
+
const isCliEntry = () => {
|
|
184
|
+
try {
|
|
185
|
+
return Boolean(process.argv[1]) && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href;
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
// Imported from an eval/embedding process whose argv is not a file path.
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
if (isCliEntry()) {
|
|
181
193
|
runCli().catch((error) => {
|
|
182
194
|
process.stderr.write(`leofcoin: ${error?.message ?? error}\n`);
|
|
183
195
|
process.exitCode = 1;
|
package/exports/validator-cli.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/launch-chain",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"type": "module",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "rollup -c",
|
|
29
|
-
"test": "node --test test/*.test.js"
|
|
29
|
+
"test": "node --test test/*.test.js",
|
|
30
|
+
"test:package": "node test/standalone-install.js"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|
|
@@ -41,11 +42,11 @@
|
|
|
41
42
|
},
|
|
42
43
|
"homepage": "https://github.com/leofcoin/monorepo/tree/main/packages/launch-chain#readme",
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@leofcoin/addresses": "^1.0.
|
|
45
|
-
"@leofcoin/chain": "^1.10.
|
|
45
|
+
"@leofcoin/addresses": "^1.0.64",
|
|
46
|
+
"@leofcoin/chain": "^1.10.17",
|
|
46
47
|
"@leofcoin/endpoint-clients": "^0.3.16",
|
|
47
48
|
"@leofcoin/endpoints": "^0.4.9",
|
|
48
|
-
"@leofcoin/lib": "^1.3.
|
|
49
|
+
"@leofcoin/lib": "^1.3.15",
|
|
49
50
|
"@leofcoin/networks": "^1.1.30",
|
|
50
51
|
"@vandeurenglenn/wrtc": "^0.7.2"
|
|
51
52
|
},
|