diff --git a/package-lock.json b/package-lock.json index cea4ee45..4002f5fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,14 +29,14 @@ "@rosen-bridge/rosen-extractor": "^0.1.8", "@rosen-bridge/scanner": "^1.0.4", "@rosen-bridge/tokens": "^0.1.12", - "@rosen-bridge/tss": "^0.1.1", + "@rosen-bridge/tss": "^1.0.0", "@rosen-bridge/watcher-data-extractor": "^1.1.4", "@rosen-chains/abstract-chain": "^0.1.9", "@rosen-chains/cardano": "^0.1.10", "@rosen-chains/cardano-koios-network": "^0.1.7", - "@rosen-chains/ergo": "^0.1.14", - "@rosen-chains/ergo-explorer-network": "^0.1.9", - "@rosen-chains/ergo-node-network": "^0.1.11", + "@rosen-chains/ergo": "^0.1.15", + "@rosen-chains/ergo-explorer-network": "^0.1.10", + "@rosen-chains/ergo-node-network": "^0.1.12", "@sinclair/typebox": "^0.28.15", "await-semaphore": "^0.1.3", "axios": "^0.27.2", @@ -45,7 +45,7 @@ "config": "^3.3.7", "cross-env": "^7.0.3", "discord.js": "^14.7.1", - "ergo-lib-wasm-nodejs": "^0.25.0-alpha-5b1291c", + "ergo-lib-wasm-nodejs": "^0.24.0", "fastify": "^4.18.0", "it-pipe": "2.0.4", "it-pushable": "^3.1.0", @@ -2270,11 +2270,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/@rosen-bridge/minimum-fee/node_modules/ergo-lib-wasm-nodejs": { - "version": "0.24.0-alpha-d52aedc", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.24.0-alpha-d52aedc.tgz", - "integrity": "sha512-S47Q1LywEFYp8eXP29BPzRx69aPqQrNWn4sMEfj1CRY9gzazCaJZWAqAs9lAmMqjb1ygVpkclESyooAfg9jgNg==" - }, "node_modules/@rosen-bridge/rosen-extractor": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/@rosen-bridge/rosen-extractor/-/rosen-extractor-0.1.8.tgz", @@ -2288,11 +2283,6 @@ "lodash-es": "^4.17.21" } }, - "node_modules/@rosen-bridge/rosen-extractor/node_modules/ergo-lib-wasm-nodejs": { - "version": "0.24.0-alpha-d52aedc", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.24.0-alpha-d52aedc.tgz", - "integrity": "sha512-S47Q1LywEFYp8eXP29BPzRx69aPqQrNWn4sMEfj1CRY9gzazCaJZWAqAs9lAmMqjb1ygVpkclESyooAfg9jgNg==" - }, "node_modules/@rosen-bridge/scanner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@rosen-bridge/scanner/-/scanner-1.0.4.tgz", @@ -2314,9 +2304,9 @@ "integrity": "sha512-fsXNRNmfh76aMQmsJYfUrBZViAcXF8bC3w89LTyayuRuDXIuBJi1bmr0t7/rRh6Tof+qR9VFAmWTNu6X4JG/fQ==" }, "node_modules/@rosen-bridge/tss": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rosen-bridge/tss/-/tss-0.1.1.tgz", - "integrity": "sha512-9hPSSFBo0LfPa6ILoRM0jpV77dwLnGE+udcboP22MaoW9jPZsRwEMVR+QBl1wsUEj0RWhaokgwstqHkb+fAoiA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rosen-bridge/tss/-/tss-1.0.0.tgz", + "integrity": "sha512-i86xp2kVq4BQqEdC8c46ib7Dx3W9inb6OIivuLiMjtwUkjiD5eZTlBmE676DhbOBAJrYz/BHr7TnsBWg/oiazA==", "dependencies": { "@noble/ed25519": "^2.0.0", "@noble/hashes": "^1.3.1", @@ -2366,11 +2356,6 @@ "typeorm": "^0.3.7" } }, - "node_modules/@rosen-bridge/watcher-data-extractor/node_modules/ergo-lib-wasm-nodejs": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.24.0.tgz", - "integrity": "sha512-WSQu+o71xE3bdMld8qZnzWJAtzOG2edXruh6BmcUIB0ZXt9obACnPo2jJ/2vN0Ez68gOkxVMn6M7UvojrCM78w==" - }, "node_modules/@rosen-chains/abstract-chain": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/@rosen-chains/abstract-chain/-/abstract-chain-0.1.10.tgz", @@ -2411,39 +2396,34 @@ } }, "node_modules/@rosen-chains/ergo": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@rosen-chains/ergo/-/ergo-0.1.14.tgz", - "integrity": "sha512-m5yeNxMyjSZRCmN65BQkY4I5vU77i03TQV8dadDaA1KOkfoCCdrDF9q8IoGcqSlxXotzWZObDc+5UHCTzHlVGA==", + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@rosen-chains/ergo/-/ergo-0.1.15.tgz", + "integrity": "sha512-74gsAnvRWdIks8I99q3MuYb/MmArLHl45UNeKE//56Rcs6wU3uQ3QI9IIsiXssTdgWbS/yYN0qHaZq5jw8eiJw==", "dependencies": { "@rosen-bridge/minimum-fee": "^0.1.10", "@rosen-bridge/rosen-extractor": "^0.1.8", "@rosen-chains/abstract-chain": "^0.1.10", "blakejs": "^1.2.1", - "ergo-lib-wasm-nodejs": "^0.23.0", + "ergo-lib-wasm-nodejs": "^0.24.0", "json-bigint": "^1.0.0" } }, "node_modules/@rosen-chains/ergo-explorer-network": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@rosen-chains/ergo-explorer-network/-/ergo-explorer-network-0.1.9.tgz", - "integrity": "sha512-zD6p5BB3GLBn6e6fToDRwiiE/SL6bUhhfChTFaa57GgfbryE8HmXbEu4p4vOjelkFU9vXnXligCPmOPRLGuZbA==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@rosen-chains/ergo-explorer-network/-/ergo-explorer-network-0.1.10.tgz", + "integrity": "sha512-hqVRaiJ3pzeGjRHigRvr0uGVG6kkwtCKBSgL3GqQfkWnn3fxIU2fIM2o+ITjwE5o0rw1C3yierlg0sEObA28Rw==", "dependencies": { "@rosen-bridge/logger-interface": "^0.1.0", "@rosen-bridge/rosen-extractor": "^0.1.8", "@rosen-bridge/tokens": "^0.1.12", "@rosen-chains/abstract-chain": "^0.1.10", - "@rosen-chains/ergo": "^0.1.14", + "@rosen-chains/ergo": "^0.1.15", "@rosen-clients/ergo-explorer": "^0.3.0", - "ergo-lib-wasm-nodejs": "^0.23.0", + "ergo-lib-wasm-nodejs": "^0.24.0", "it-all": "^3.0.1", "json-bigint": "^1.0.0" } }, - "node_modules/@rosen-chains/ergo-explorer-network/node_modules/ergo-lib-wasm-nodejs": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.23.0.tgz", - "integrity": "sha512-1CMiu2gM8c9F4LqQ+j4ib2CS9FTTvnwxKYGQvkZN7beaiIqPFr1AQvMVT3dn/9JfQmEz9zcp2OejvIamcQitFQ==" - }, "node_modules/@rosen-chains/ergo-explorer-network/node_modules/it-all": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.2.tgz", @@ -2454,26 +2434,21 @@ } }, "node_modules/@rosen-chains/ergo-node-network": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@rosen-chains/ergo-node-network/-/ergo-node-network-0.1.11.tgz", - "integrity": "sha512-LKEg69o8JrcmH4HuEnDm5qyzNhNVJA/Q6joZSQM0eu7R1Zo4Qm/hkeonZJpJnQImBWORMwYBI9g13U6iHXEyHw==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@rosen-chains/ergo-node-network/-/ergo-node-network-0.1.12.tgz", + "integrity": "sha512-ObGIzAOhU1LIsI4WFgmIhFFIPhsmjY4FM6WusjNnlIM2CScVqBKBb6rWLte33VmdDNMUf5eCsKwT4QSKrJMn6g==", "dependencies": { "@rosen-bridge/logger-interface": "^0.1.0", "@rosen-bridge/rosen-extractor": "^0.1.8", "@rosen-bridge/tokens": "^0.1.12", "@rosen-chains/abstract-chain": "^0.1.10", - "@rosen-chains/ergo": "^0.1.14", + "@rosen-chains/ergo": "^0.1.15", "@rosen-clients/ergo-node": "^0.3.2", - "ergo-lib-wasm-nodejs": "^0.23.0", + "ergo-lib-wasm-nodejs": "^0.24.0", "it-all": "^3.0.1", "json-bigint": "^1.0.0" } }, - "node_modules/@rosen-chains/ergo-node-network/node_modules/ergo-lib-wasm-nodejs": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.23.0.tgz", - "integrity": "sha512-1CMiu2gM8c9F4LqQ+j4ib2CS9FTTvnwxKYGQvkZN7beaiIqPFr1AQvMVT3dn/9JfQmEz9zcp2OejvIamcQitFQ==" - }, "node_modules/@rosen-chains/ergo-node-network/node_modules/it-all": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.2.tgz", @@ -2483,11 +2458,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@rosen-chains/ergo/node_modules/ergo-lib-wasm-nodejs": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.23.0.tgz", - "integrity": "sha512-1CMiu2gM8c9F4LqQ+j4ib2CS9FTTvnwxKYGQvkZN7beaiIqPFr1AQvMVT3dn/9JfQmEz9zcp2OejvIamcQitFQ==" - }, "node_modules/@rosen-clients/cardano-koios": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@rosen-clients/cardano-koios/-/cardano-koios-0.2.2.tgz", @@ -5051,9 +5021,9 @@ } }, "node_modules/ergo-lib-wasm-nodejs": { - "version": "0.25.0-alpha-d20f964", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.25.0-alpha-d20f964.tgz", - "integrity": "sha512-QzMN1M2Fh9OfhQgjBoCqzSW4NoY/2+t1LNq0uBHxqu3q+euyC39UG7hrj2h1r877NGoy4XKgpft9ug76wr/S+A==" + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.24.0.tgz", + "integrity": "sha512-WSQu+o71xE3bdMld8qZnzWJAtzOG2edXruh6BmcUIB0ZXt9obACnPo2jJ/2vN0Ez68gOkxVMn6M7UvojrCM78w==" }, "node_modules/err-code": { "version": "3.0.1", diff --git a/package.json b/package.json index 24e51965..b320994c 100644 --- a/package.json +++ b/package.json @@ -42,14 +42,14 @@ "@rosen-bridge/rosen-extractor": "^0.1.8", "@rosen-bridge/scanner": "^1.0.4", "@rosen-bridge/tokens": "^0.1.12", - "@rosen-bridge/tss": "^0.1.1", + "@rosen-bridge/tss": "^1.0.0", "@rosen-bridge/watcher-data-extractor": "^1.1.4", "@rosen-chains/abstract-chain": "^0.1.9", "@rosen-chains/cardano": "^0.1.10", "@rosen-chains/cardano-koios-network": "^0.1.7", - "@rosen-chains/ergo": "^0.1.14", - "@rosen-chains/ergo-explorer-network": "^0.1.9", - "@rosen-chains/ergo-node-network": "^0.1.11", + "@rosen-chains/ergo": "^0.1.15", + "@rosen-chains/ergo-explorer-network": "^0.1.10", + "@rosen-chains/ergo-node-network": "^0.1.12", "@sinclair/typebox": "^0.28.15", "await-semaphore": "^0.1.3", "axios": "^0.27.2", @@ -58,7 +58,7 @@ "config": "^3.3.7", "cross-env": "^7.0.3", "discord.js": "^14.7.1", - "ergo-lib-wasm-nodejs": "^0.25.0-alpha-5b1291c", + "ergo-lib-wasm-nodejs": "^0.24.0", "fastify": "^4.18.0", "it-pipe": "2.0.4", "it-pushable": "^3.1.0", diff --git a/src/guard/Tss.ts b/src/guard/Tss.ts index 3ae67a65..a3e26dac 100644 --- a/src/guard/Tss.ts +++ b/src/guard/Tss.ts @@ -10,7 +10,6 @@ import Dialer from '../communication/Dialer'; import { loggerFactory } from '../log/Logger'; import Configs from '../configs/Configs'; import * as childProcess from 'child_process'; -import GuardPkHandler from '../handlers/GuardPkHandler'; const logger = loggerFactory(import.meta.url); const exec = childProcess.exec; @@ -73,13 +72,11 @@ class Tss { Tss.dialer = await Dialer.getInstance(); // initialize guard detection - const requiredSign = GuardPkHandler.getInstance().requiredSign; const signer = new EdDSA(Configs.tssKeys.secret); Tss.guardDetection = new GuardDetection({ guardsPublicKey: Configs.tssKeys.publicKeys, signer: signer, submit: this.generateSubmitMessageWrapper(Tss.DETECTION_CHANNEL), - needGuardThreshold: requiredSign, getPeerId: () => Promise.resolve(Tss.dialer.getDialerId()), }); await Tss.guardDetection.init(); @@ -89,8 +86,7 @@ class Tss { signer: signer, detection: Tss.guardDetection, guardsPk: Configs.tssKeys.publicKeys, - tssSignUrl: `${Configs.tssUrl}:${Configs.tssPort}/sign`, - threshold: requiredSign, + tssApiUrl: `${Configs.tssUrl}:${Configs.tssPort}`, submitMsg: this.generateSubmitMessageWrapper(Tss.SIGNING_CHANNEL), getPeerId: () => Promise.resolve(Tss.dialer.getDialerId()), callbackUrl: Configs.tssCallBackUrl,