@streamr/node 103.0.0-rc.0 → 103.0.0-rc.11
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/dist/package.json +24 -15
- package/dist/src/broker.js +1 -1
- package/dist/src/broker.js.map +1 -1
- package/dist/src/plugins/operator/OperatorPlugin.d.ts +1 -9
- package/dist/src/plugins/operator/OperatorPlugin.js.map +1 -1
- package/package.json +24 -15
- package/bin/delete-expired-data.ts +0 -41
- package/bin/entry-point.ts +0 -27
- package/bin/streamr-node-init.ts +0 -17
- package/bin/streamr-node.ts +0 -35
- package/jest.config.ts +0 -9
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/node",
|
|
3
|
-
"version": "103.0.0-rc.
|
|
3
|
+
"version": "103.0.0-rc.11",
|
|
4
4
|
"description": "A full-featured node implementation for the Streamr Network",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "./dist/src/exports.js",
|
|
17
17
|
"types": "./dist/src/exports.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"!*.tsbuildinfo",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"plugins.md",
|
|
24
|
+
"configs",
|
|
25
|
+
"configuration.md"
|
|
26
|
+
],
|
|
18
27
|
"scripts": {
|
|
19
28
|
"build": "tsc -b tsconfig.node.json",
|
|
20
29
|
"check": "tsc -p ./tsconfig.jest.json",
|
|
@@ -28,11 +37,11 @@
|
|
|
28
37
|
"author": "Streamr Network AG <contact@streamr.network>",
|
|
29
38
|
"license": "STREAMR NETWORK OPEN SOURCE LICENSE",
|
|
30
39
|
"dependencies": {
|
|
31
|
-
"@inquirer/prompts": "^7.
|
|
32
|
-
"@streamr/config": "^5.5.
|
|
33
|
-
"@streamr/dht": "103.0.0-rc.
|
|
34
|
-
"@streamr/sdk": "103.0.0-rc.
|
|
35
|
-
"@streamr/utils": "103.0.0-rc.
|
|
40
|
+
"@inquirer/prompts": "^7.5.0",
|
|
41
|
+
"@streamr/config": "^5.5.3",
|
|
42
|
+
"@streamr/dht": "103.0.0-rc.11",
|
|
43
|
+
"@streamr/sdk": "103.0.0-rc.11",
|
|
44
|
+
"@streamr/utils": "103.0.0-rc.11",
|
|
36
45
|
"aedes": "^0.51.3",
|
|
37
46
|
"ajv": "^8.17.1",
|
|
38
47
|
"ajv-formats": "^3.0.1",
|
|
@@ -43,7 +52,7 @@
|
|
|
43
52
|
"cors": "^2.8.5",
|
|
44
53
|
"ethers": "^6.13.0",
|
|
45
54
|
"eventemitter3": "^5.0.0",
|
|
46
|
-
"express": "^
|
|
55
|
+
"express": "^5.1.0",
|
|
47
56
|
"heap": "^0.2.6",
|
|
48
57
|
"lodash": "^4.17.21",
|
|
49
58
|
"merge2": "^1.4.1",
|
|
@@ -51,23 +60,23 @@
|
|
|
51
60
|
"qs": "^6.14.0",
|
|
52
61
|
"uuid": "^11.1.0",
|
|
53
62
|
"ws": "^8.18.1",
|
|
54
|
-
"zod": "^3.24.
|
|
63
|
+
"zod": "^3.24.3"
|
|
55
64
|
},
|
|
56
65
|
"devDependencies": {
|
|
57
|
-
"@inquirer/testing": "^2.1.
|
|
58
|
-
"@streamr/network-contracts": "^
|
|
59
|
-
"@streamr/test-utils": "103.0.0-rc.
|
|
66
|
+
"@inquirer/testing": "^2.1.46",
|
|
67
|
+
"@streamr/network-contracts": "^9.1.0",
|
|
68
|
+
"@streamr/test-utils": "103.0.0-rc.11",
|
|
60
69
|
"@types/cors": "^2.8.17",
|
|
61
|
-
"@types/express": "^
|
|
70
|
+
"@types/express": "^5.0.1",
|
|
62
71
|
"@types/heap": "^0.2.34",
|
|
63
72
|
"@types/lodash": "^4.17.16",
|
|
64
73
|
"@types/merge2": "^1.4.4",
|
|
65
74
|
"@types/qs": "^6.9.18",
|
|
66
75
|
"@types/stream-to-array": "^2.3.3",
|
|
67
|
-
"@types/supertest": "^6.0.
|
|
68
|
-
"@types/ws": "^8.
|
|
76
|
+
"@types/supertest": "^6.0.3",
|
|
77
|
+
"@types/ws": "^8.18.1",
|
|
69
78
|
"async-mqtt": "^2.6.1",
|
|
70
79
|
"stream-to-array": "^2.3.0",
|
|
71
|
-
"supertest": "^7.
|
|
80
|
+
"supertest": "^7.1.0"
|
|
72
81
|
}
|
|
73
82
|
}
|
package/dist/src/broker.js
CHANGED
|
@@ -52,7 +52,7 @@ const createBroker = async (configWithoutDefaults) => {
|
|
|
52
52
|
logger.info(`Network node ${nodeId} running`);
|
|
53
53
|
logger.info(`Node address ${brokerAddress}`);
|
|
54
54
|
logger.info(`Plugins: ${JSON.stringify(plugins.map((p) => p.name))}`);
|
|
55
|
-
if (!
|
|
55
|
+
if (!streamrClient.getConfig().network.controlLayer.webrtcAllowPrivateAddresses) {
|
|
56
56
|
logger.warn('WebRTC private address probing is disabled. ' +
|
|
57
57
|
'This makes it impossible to create network layer connections directly via local routers ' +
|
|
58
58
|
'More info: https://github.com/streamr-dev/network-monorepo/wiki/WebRTC-private-addresses');
|
package/dist/src/broker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker.js","sourceRoot":"","sources":["../../src/broker.ts"],"names":[],"mappings":";;;;;;AAAA,0CAA0D;AAG1D,uDAAwC;AACxC,kDAA4D;AAG5D,qFAA8D;AAC9D,4DAAwD;AACxD,iFAA6E;AAC7E,uFAAmF;AACnF,6CAAyE;AACzE,qDAA+C;AAE/C,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC,MAAM,CAAC,CAAA;AAQ1B,MAAM,YAAY,GAAG,KAAK,EAAE,qBAA6B,EAAmB,EAAE;IACjF,MAAM,MAAM,GAAG,IAAA,+BAAc,EAAC,qBAAqB,EAAE,4BAAoB,CAAC,CAAA;IAC1E,MAAM,OAAO,GAAkB,MAAM,CAAC,IAAI,C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AAY,gBAyDxB;AAED,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAG,EAAE,EAAE;IACpC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,GAAG,EAAE,EAAE;IACrC,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;IACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EthereumAddress } from '@streamr/utils';
|
|
1
|
+
import { StreamrClient } from '@streamr/sdk';
|
|
3
2
|
import { Schema } from 'ajv';
|
|
4
|
-
import { Overrides } from 'ethers';
|
|
5
3
|
import { Plugin } from '../../Plugin';
|
|
6
4
|
export interface OperatorPluginConfig {
|
|
7
5
|
operatorContractAddress: string;
|
|
@@ -37,12 +35,6 @@ export interface OperatorPluginConfig {
|
|
|
37
35
|
maxAgeInMs: number;
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
|
-
export interface OperatorServiceConfig {
|
|
41
|
-
signer: SignerWithProvider;
|
|
42
|
-
operatorContractAddress: EthereumAddress;
|
|
43
|
-
theGraphUrl: string;
|
|
44
|
-
getEthersOverrides: () => Promise<Overrides>;
|
|
45
|
-
}
|
|
46
38
|
export declare class OperatorPlugin extends Plugin<OperatorPluginConfig> {
|
|
47
39
|
private readonly abortController;
|
|
48
40
|
start(streamrClient: StreamrClient): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperatorPlugin.js","sourceRoot":"","sources":["../../../../src/plugins/operator/OperatorPlugin.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
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aAAa,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC,qBAAqB,EAAE,CAAA;gCAC3F,CAAC;gCACD,iCAAiC,EAAE,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,iCAAiC;gCACxG,oBAAoB,EAAE,IAAI,CAAC,YAAY,CAAC,oBAAoB;gCAC5D,YAAY,EAAE;oCACV,SAAS,EAAE,KAAK,CAAC,0BAA0B;oCAC3C,OAAO,EAAE,KAAK,CAAC,wBAAwB;iCAC1C;gCACD,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;gCACrC,kBAAkB,EAAE,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,kBAAkB;gCAC1E,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM;6BAC3C,CAAC,CAAA;wBACN,CAAC;oBACL,CAAC;oBAAC,OAAO,GAAG,EAAE,CAAC;wBACX,MAAM,CAAC,KAAK,CAAC,mDAAmD,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;oBAC9E,CAAC;gBACL,CAAC,CAAC,CAAA;YACN,CAAC,EACD,IAAI,CAAC,eAAe,CAAC,MAAM,CAC9B,CAAA;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IAED,KAAK,CAAC,IAAI;QACN,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;IAChC,CAAC;IAED,kDAAkD;IACzC,eAAe;QACpB,OAAO,4BAAoB,CAAA;IAC/B,CAAC;IAED,kDAAkD;IACzC,eAAe;QACpB,OAAO,CAAC;gBACJ,IAAI,EAAE,qCAAqC,EAAE,KAAK,EAAE,IAAI;aAC3D,CAAC,CAAA;IACN,CAAC;CACJ;AAzMD,wCAyMC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/node",
|
|
3
|
-
"version": "103.0.0-rc.
|
|
3
|
+
"version": "103.0.0-rc.11",
|
|
4
4
|
"description": "A full-featured node implementation for the Streamr Network",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "./dist/src/exports.js",
|
|
17
17
|
"types": "./dist/src/exports.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"!*.tsbuildinfo",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"plugins.md",
|
|
24
|
+
"configs",
|
|
25
|
+
"configuration.md"
|
|
26
|
+
],
|
|
18
27
|
"scripts": {
|
|
19
28
|
"build": "tsc -b tsconfig.node.json",
|
|
20
29
|
"check": "tsc -p ./tsconfig.jest.json",
|
|
@@ -28,11 +37,11 @@
|
|
|
28
37
|
"author": "Streamr Network AG <contact@streamr.network>",
|
|
29
38
|
"license": "STREAMR NETWORK OPEN SOURCE LICENSE",
|
|
30
39
|
"dependencies": {
|
|
31
|
-
"@inquirer/prompts": "^7.
|
|
32
|
-
"@streamr/config": "^5.5.
|
|
33
|
-
"@streamr/dht": "103.0.0-rc.
|
|
34
|
-
"@streamr/sdk": "103.0.0-rc.
|
|
35
|
-
"@streamr/utils": "103.0.0-rc.
|
|
40
|
+
"@inquirer/prompts": "^7.5.0",
|
|
41
|
+
"@streamr/config": "^5.5.3",
|
|
42
|
+
"@streamr/dht": "103.0.0-rc.11",
|
|
43
|
+
"@streamr/sdk": "103.0.0-rc.11",
|
|
44
|
+
"@streamr/utils": "103.0.0-rc.11",
|
|
36
45
|
"aedes": "^0.51.3",
|
|
37
46
|
"ajv": "^8.17.1",
|
|
38
47
|
"ajv-formats": "^3.0.1",
|
|
@@ -43,7 +52,7 @@
|
|
|
43
52
|
"cors": "^2.8.5",
|
|
44
53
|
"ethers": "^6.13.0",
|
|
45
54
|
"eventemitter3": "^5.0.0",
|
|
46
|
-
"express": "^
|
|
55
|
+
"express": "^5.1.0",
|
|
47
56
|
"heap": "^0.2.6",
|
|
48
57
|
"lodash": "^4.17.21",
|
|
49
58
|
"merge2": "^1.4.1",
|
|
@@ -51,23 +60,23 @@
|
|
|
51
60
|
"qs": "^6.14.0",
|
|
52
61
|
"uuid": "^11.1.0",
|
|
53
62
|
"ws": "^8.18.1",
|
|
54
|
-
"zod": "^3.24.
|
|
63
|
+
"zod": "^3.24.3"
|
|
55
64
|
},
|
|
56
65
|
"devDependencies": {
|
|
57
|
-
"@inquirer/testing": "^2.1.
|
|
58
|
-
"@streamr/network-contracts": "^
|
|
59
|
-
"@streamr/test-utils": "103.0.0-rc.
|
|
66
|
+
"@inquirer/testing": "^2.1.46",
|
|
67
|
+
"@streamr/network-contracts": "^9.1.0",
|
|
68
|
+
"@streamr/test-utils": "103.0.0-rc.11",
|
|
60
69
|
"@types/cors": "^2.8.17",
|
|
61
|
-
"@types/express": "^
|
|
70
|
+
"@types/express": "^5.0.1",
|
|
62
71
|
"@types/heap": "^0.2.34",
|
|
63
72
|
"@types/lodash": "^4.17.16",
|
|
64
73
|
"@types/merge2": "^1.4.4",
|
|
65
74
|
"@types/qs": "^6.9.18",
|
|
66
75
|
"@types/stream-to-array": "^2.3.3",
|
|
67
|
-
"@types/supertest": "^6.0.
|
|
68
|
-
"@types/ws": "^8.
|
|
76
|
+
"@types/supertest": "^6.0.3",
|
|
77
|
+
"@types/ws": "^8.18.1",
|
|
69
78
|
"async-mqtt": "^2.6.1",
|
|
70
79
|
"stream-to-array": "^2.3.0",
|
|
71
|
-
"supertest": "^7.
|
|
80
|
+
"supertest": "^7.1.0"
|
|
72
81
|
}
|
|
73
82
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { program } from 'commander'
|
|
3
|
-
import pkg from '../package.json'
|
|
4
|
-
import { DeleteExpiredCmd } from '../src/plugins/storage/DeleteExpiredCmd'
|
|
5
|
-
|
|
6
|
-
program
|
|
7
|
-
.version(pkg.version)
|
|
8
|
-
.requiredOption('--cassandra-username <username>')
|
|
9
|
-
.requiredOption('--cassandra-password <password>')
|
|
10
|
-
.requiredOption('--cassandra-hosts <hosts_delimited_by_comma>')
|
|
11
|
-
.requiredOption('--cassandra-datacenter <datacenter>')
|
|
12
|
-
.requiredOption('--cassandra-keyspace <keyspace>')
|
|
13
|
-
.requiredOption('--streamr-base-url <baseUrl>')
|
|
14
|
-
.requiredOption('--bucket-limit <bucketLimit>', 'max number of buckets to fetch')
|
|
15
|
-
.option('--real-run', 'delete data for real', false)
|
|
16
|
-
.description('Delete expired data')
|
|
17
|
-
.parse(process.argv)
|
|
18
|
-
|
|
19
|
-
const deleteExpiredCommand = new DeleteExpiredCmd({
|
|
20
|
-
cassandraUsername: program.opts().cassandraUsername,
|
|
21
|
-
cassandraPassword: program.opts().cassandraPassword,
|
|
22
|
-
cassandraHosts: program.opts().cassandraHosts.split(','),
|
|
23
|
-
cassandraDatacenter: program.opts().cassandraDatacenter,
|
|
24
|
-
cassandraKeyspace: program.opts().cassandraKeyspace,
|
|
25
|
-
streamrBaseUrl: program.opts().streamrBaseUrl,
|
|
26
|
-
bucketLimit: program.opts().bucketLimit,
|
|
27
|
-
dryRun: !program.opts().realRun
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
async function run() {
|
|
31
|
-
try {
|
|
32
|
-
// @ts-expect-error TODO fix
|
|
33
|
-
await deleteExpiredCommand.run()
|
|
34
|
-
return {}
|
|
35
|
-
} catch (err) {
|
|
36
|
-
console.error(err)
|
|
37
|
-
process.exit(1)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
run()
|
package/bin/entry-point.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { config as CHAIN_CONFIG } from '@streamr/config'
|
|
3
|
-
import { DhtAddress, DhtNode, NodeType, toDhtAddressRaw } from '@streamr/dht'
|
|
4
|
-
|
|
5
|
-
const main = async () => {
|
|
6
|
-
const entryPoint = CHAIN_CONFIG.dev2.entryPoints[0]
|
|
7
|
-
const peerDescriptor = {
|
|
8
|
-
...entryPoint,
|
|
9
|
-
nodeId: toDhtAddressRaw(entryPoint.nodeId as DhtAddress),
|
|
10
|
-
type: NodeType.NODEJS // TODO remove this when NET-1070 done
|
|
11
|
-
}
|
|
12
|
-
const dhtNode = new DhtNode({
|
|
13
|
-
nodeId: entryPoint.nodeId as DhtAddress,
|
|
14
|
-
websocketHost: entryPoint.websocket.host,
|
|
15
|
-
websocketPortRange: {
|
|
16
|
-
min: entryPoint.websocket.port,
|
|
17
|
-
max: entryPoint.websocket.port
|
|
18
|
-
},
|
|
19
|
-
websocketServerEnableTls: false,
|
|
20
|
-
entryPoints: [peerDescriptor]
|
|
21
|
-
})
|
|
22
|
-
await dhtNode.start()
|
|
23
|
-
await dhtNode.joinDht([peerDescriptor])
|
|
24
|
-
console.info('Entry point started')
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
main()
|
package/bin/streamr-node-init.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { program } from 'commander'
|
|
3
|
-
import pkg from '../package.json'
|
|
4
|
-
import { start } from '../src/config/ConfigWizard'
|
|
5
|
-
|
|
6
|
-
program
|
|
7
|
-
.version(pkg.version)
|
|
8
|
-
.name('streamr-node-init')
|
|
9
|
-
.description('Run the configuration wizard for the Streamr node.')
|
|
10
|
-
|
|
11
|
-
;(async () => {
|
|
12
|
-
try {
|
|
13
|
-
await start()
|
|
14
|
-
} catch (e) {
|
|
15
|
-
console.error('Streamr Node Config Wizard encountered an error:\n', e)
|
|
16
|
-
}
|
|
17
|
-
})()
|
package/bin/streamr-node.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { program } from 'commander'
|
|
3
|
-
import pkg from '../package.json'
|
|
4
|
-
|
|
5
|
-
import { createBroker } from '../src/broker'
|
|
6
|
-
import { readConfigAndMigrateIfNeeded } from '../src/config/migration'
|
|
7
|
-
import { overrideConfigToEnvVarsIfGiven } from '../src/config/config'
|
|
8
|
-
|
|
9
|
-
program
|
|
10
|
-
.version(pkg.version)
|
|
11
|
-
.name('streamr-node')
|
|
12
|
-
.description('Run a Streamr node in the environment specified by given configuration file.')
|
|
13
|
-
.arguments('[configFile]')
|
|
14
|
-
.option('--test', 'test the configuration (does not start the node)')
|
|
15
|
-
.action(async (configFile) => {
|
|
16
|
-
try {
|
|
17
|
-
const config = readConfigAndMigrateIfNeeded(configFile)
|
|
18
|
-
overrideConfigToEnvVarsIfGiven(config)
|
|
19
|
-
const broker = await createBroker(config)
|
|
20
|
-
if (!program.opts().test) {
|
|
21
|
-
await broker.start()
|
|
22
|
-
} else {
|
|
23
|
-
console.info('the configuration is valid')
|
|
24
|
-
// TODO remove process.exit(0)
|
|
25
|
-
// We should not need explicit exit call if all setTimeouts are cleared.
|
|
26
|
-
// Currently there is only one leaking timeout in PingPongWs (created
|
|
27
|
-
// by NodeClientWsEndpoint from the createNetworkNode() call)
|
|
28
|
-
process.exit(0)
|
|
29
|
-
}
|
|
30
|
-
} catch (err) {
|
|
31
|
-
console.error(err)
|
|
32
|
-
process.exit(1)
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
.parse(process.argv)
|