trac-msb 0.1.77-msb-r2-dev.0 → 0.1.77-msb-r2-dev.2

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/msb.mjs CHANGED
@@ -6,7 +6,7 @@ const args = isPear ? Pear.config.args : process.argv.slice(2);
6
6
  const opts = {
7
7
  stores_directory : 'stores/',
8
8
  store_name : typeof process !== "undefined" ? process.argv[2] : Pear.config.args[0],
9
- bootstrap: '602d5443c19014e36a01254923afb1df56099d559f282761d70370a0da5d1d8a',
9
+ bootstrap: 'c48394008a5e30e5382b7bc504968fd81320f9af9e9cb960d2fc27a1eb800b9d',
10
10
  channel: 'TESTNET0002tracnetworkmainsettlementbus',
11
11
  enable_role_requester: false,
12
12
  enable_auto_transaction_consent: false,
@@ -31,8 +31,11 @@ msb.ready().then(async () => {
31
31
  console.log('Starting RPC server...');
32
32
  const portIndex = args.indexOf('--port');
33
33
  const port = (portIndex !== -1 && args[portIndex + 1]) ? parseInt(args[portIndex + 1], 10) : 5000;
34
+ const hostIndex = args.indexOf('--host');
35
+ const host = (hostIndex !== -1 && args[hostIndex + 1]) ? args[hostIndex + 1] : 'localhost';
36
+
34
37
  const {startRpcServer} = await import('./rpc/rpc_server.mjs');
35
- startRpcServer(msb, port);
38
+ startRpcServer(msb, host, port);
36
39
  } else {
37
40
  console.log('RPC server will not be started.');
38
41
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trac-msb",
3
3
  "main": "msb.mjs",
4
- "version": "0.1.77-msb-r2-dev.0",
4
+ "version": "0.1.77-msb-r2-dev.2",
5
5
  "pear": {
6
6
  "name": "trac-msb",
7
7
  "type": "terminal"
@@ -10,6 +10,7 @@
10
10
  "scripts": {
11
11
  "dev": "pear run -d .",
12
12
  "dev-rpc": "pear run -d . ${npm_config_store} --rpc --port ${npm_config_port}",
13
+ "prod-rpc": "pear run . ${npm_config_store} --rpc --host ${npm_config_host} --port ${npm_config_port}",
13
14
  "protobuf": "node scripts/generate-protobufs.js",
14
15
  "test:acceptance": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testTimeout=200000 test/acceptance/",
15
16
  "test:node": "brittle-node -t 120000 test/all.test.js",
@@ -18,7 +19,7 @@
18
19
  "test:bare:cov": "brittle-bare -c -t 120000 test/all.test.js"
19
20
  },
20
21
  "dependencies": {
21
- "@tracsystems/blake3": "^0.0.6",
22
+ "@tracsystems/blake3": "^0.0.13",
22
23
  "autobase": "7.16.1",
23
24
  "b4a": "1.6.7",
24
25
  "bare-crypto": "^1.11.2",
@@ -1,10 +1,10 @@
1
1
  import { createServer } from "./create_server.mjs";
2
2
 
3
3
  // Called by msb.mjs file
4
- export function startRpcServer(msbInstance, port) {
4
+ export function startRpcServer(msbInstance, host, port) {
5
5
  const server = createServer(msbInstance)
6
6
 
7
- return server.listen(port, () => {
8
- console.log(`Running RPC with https at https://localhost:${port}`);
7
+ return server.listen(port, host, () => {
8
+ console.log(`Running RPC with https at https://${host}:${port}`);
9
9
  });
10
10
  }