From b81d899f45a9567ab1ff227c24d759b13f59fceb Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Thu, 17 Oct 2024 18:01:35 +0300 Subject: [PATCH 01/16] improves logging to try and trace issue Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index 80aadee9f..5b636f420 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -738,7 +738,7 @@ export class SDKClient { if (!transactionResponse) { throw predefined.INTERNAL_ERROR( - `${requestDetails.formattedRequestId} Transaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, + `${requestDetails.formattedRequestId} TTransaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, ); } return transactionResponse; From f2caac732d202cd0f3d76f6aef63ebb1e368cab6 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Fri, 18 Oct 2024 18:25:01 +0300 Subject: [PATCH 02/16] Improves logging further Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index 5b636f420..d7c34bd04 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -731,6 +731,13 @@ export class SDKClient { throw sdkClientError; } + this.logger.warn( + `${ + requestDetails.formattedRequestId + } Logging more info about failed transaction LogID: ${transaction._getLogId()} Max attempts: ${ + transaction._maxAttempts + }, Grpc deadline ${transaction._grpcDeadline}, NodeIds ${transaction.nodeAccountIds} `, + ); this.logger.warn( sdkClientError, `${requestDetails.formattedRequestId} Fail to execute ${txConstructorName} transaction: transactionId=${transaction.transactionId}, callerName=${callerName}, status=${sdkClientError.status}(${sdkClientError.status._code}) message=${sdkClientError.message}`, From ca4e6f8c6604c2f46dea6f9860a32b286e7395bc Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Mon, 21 Oct 2024 14:04:47 +0300 Subject: [PATCH 03/16] adds check for transaction in mirror node Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index d7c34bd04..4bf558644 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -69,6 +69,9 @@ import { ITransactionRecordMetric, RequestDetails, } from '../types'; +import MirrorNode from '@hashgraph/sdk/lib/MirrorNode'; +import { MirrorNodeClient } from './mirrorNodeClient'; +import { Registry } from 'prom-client'; const _ = require('lodash'); @@ -114,6 +117,8 @@ export class SDKClient { */ private readonly eventEmitter: EventEmitter; + private readonly mirrorNodeClient: MirrorNodeClient; + /** * An instance of the HbarLimitService that tracks hbar expenses and limits. * @private @@ -137,6 +142,9 @@ export class SDKClient { eventEmitter: EventEmitter, hbarLimitService: HbarLimitService, ) { + const registry = new Registry(); + const restUrl = process.env.MIRROR_NODE_REST_URL || ''; + this.mirrorNodeClient = new MirrorNodeClient(restUrl, logger, registry, cacheService); this.clientMain = clientMain; if (ConfigService.get('CONSENSUS_MAX_EXECUTION_TIME')) { @@ -748,6 +756,14 @@ export class SDKClient { `${requestDetails.formattedRequestId} TTransaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, ); } + + const transactionId = transaction.transactionId ? transaction.transactionId.toString() : false; + console.log('Transaction id', transactionId); + if (transactionId) { + const transactionFromMirrorNode = await this.mirrorNodeClient.getTransactionById(transactionId, requestDetails); + this.logger.warn('Transaction found', transactionFromMirrorNode); + } + return transactionResponse; } finally { if (transactionId?.length) { From 508456c3522ba6d214431ae62b779a8f4ed4618d Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Mon, 21 Oct 2024 15:09:29 +0300 Subject: [PATCH 04/16] Fixes error handling Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index 4bf558644..5e527bedb 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -760,8 +760,15 @@ export class SDKClient { const transactionId = transaction.transactionId ? transaction.transactionId.toString() : false; console.log('Transaction id', transactionId); if (transactionId) { - const transactionFromMirrorNode = await this.mirrorNodeClient.getTransactionById(transactionId, requestDetails); - this.logger.warn('Transaction found', transactionFromMirrorNode); + try { + const transactionFromMirrorNode = await this.mirrorNodeClient.getTransactionById( + transactionId, + requestDetails, + ); + this.logger.warn('Transaction found', transactionFromMirrorNode); + } catch (e) { + this.logger.warn('Transaction not found in mirror node', e); + } } return transactionResponse; From 85789507c9cb913cd570a61cf853bcb19afd1289 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Mon, 21 Oct 2024 15:23:02 +0300 Subject: [PATCH 05/16] Only executes when response is null Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 27 ++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index 5e527bedb..a95eac45a 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -752,25 +752,24 @@ export class SDKClient { ); if (!transactionResponse) { + const transactionId = transaction.transactionId ? transaction.transactionId.toString() : false; + console.log('Transaction id', transactionId); + if (transactionId) { + try { + const transactionFromMirrorNode = await this.mirrorNodeClient.getTransactionById( + transactionId, + requestDetails, + ); + this.logger.warn('Transaction found', transactionFromMirrorNode); + } catch (e) { + this.logger.warn('Transaction not found in mirror node', e); + } + } throw predefined.INTERNAL_ERROR( `${requestDetails.formattedRequestId} TTransaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, ); } - const transactionId = transaction.transactionId ? transaction.transactionId.toString() : false; - console.log('Transaction id', transactionId); - if (transactionId) { - try { - const transactionFromMirrorNode = await this.mirrorNodeClient.getTransactionById( - transactionId, - requestDetails, - ); - this.logger.warn('Transaction found', transactionFromMirrorNode); - } catch (e) { - this.logger.warn('Transaction not found in mirror node', e); - } - } - return transactionResponse; } finally { if (transactionId?.length) { From 90c745eecda6633bad7efeda737f9056da279c97 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Mon, 21 Oct 2024 16:30:17 +0300 Subject: [PATCH 06/16] Experiments to see if transaction could be found in mirrornode Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index a95eac45a..83186ffb4 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -752,6 +752,7 @@ export class SDKClient { ); if (!transactionResponse) { + await new Promise((resolve) => setTimeout(resolve, 2000)); const transactionId = transaction.transactionId ? transaction.transactionId.toString() : false; console.log('Transaction id', transactionId); if (transactionId) { From d24a51b20d90b0b0d94df9446b7acf85cc728bfa Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Mon, 21 Oct 2024 17:25:50 +0300 Subject: [PATCH 07/16] Removes querying to mirrorNode Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 25 +-------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index 83186ffb4..c316fd1ab 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -69,9 +69,6 @@ import { ITransactionRecordMetric, RequestDetails, } from '../types'; -import MirrorNode from '@hashgraph/sdk/lib/MirrorNode'; -import { MirrorNodeClient } from './mirrorNodeClient'; -import { Registry } from 'prom-client'; const _ = require('lodash'); @@ -117,8 +114,6 @@ export class SDKClient { */ private readonly eventEmitter: EventEmitter; - private readonly mirrorNodeClient: MirrorNodeClient; - /** * An instance of the HbarLimitService that tracks hbar expenses and limits. * @private @@ -142,9 +137,6 @@ export class SDKClient { eventEmitter: EventEmitter, hbarLimitService: HbarLimitService, ) { - const registry = new Registry(); - const restUrl = process.env.MIRROR_NODE_REST_URL || ''; - this.mirrorNodeClient = new MirrorNodeClient(restUrl, logger, registry, cacheService); this.clientMain = clientMain; if (ConfigService.get('CONSENSUS_MAX_EXECUTION_TIME')) { @@ -752,25 +744,10 @@ export class SDKClient { ); if (!transactionResponse) { - await new Promise((resolve) => setTimeout(resolve, 2000)); - const transactionId = transaction.transactionId ? transaction.transactionId.toString() : false; - console.log('Transaction id', transactionId); - if (transactionId) { - try { - const transactionFromMirrorNode = await this.mirrorNodeClient.getTransactionById( - transactionId, - requestDetails, - ); - this.logger.warn('Transaction found', transactionFromMirrorNode); - } catch (e) { - this.logger.warn('Transaction not found in mirror node', e); - } - } throw predefined.INTERNAL_ERROR( - `${requestDetails.formattedRequestId} TTransaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, + `${requestDetails.formattedRequestId} Transaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, ); } - return transactionResponse; } finally { if (transactionId?.length) { From 8f22211cdd8c67c1c5dacbf8bbb1f35bcf1244cc Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Tue, 22 Oct 2024 11:08:33 +0300 Subject: [PATCH 08/16] Logs the transaction object Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index c316fd1ab..423d5d3da 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -736,7 +736,8 @@ export class SDKClient { requestDetails.formattedRequestId } Logging more info about failed transaction LogID: ${transaction._getLogId()} Max attempts: ${ transaction._maxAttempts - }, Grpc deadline ${transaction._grpcDeadline}, NodeIds ${transaction.nodeAccountIds} `, + }, Grpc deadline ${transaction._grpcDeadline}, NodeIds ${transaction.nodeAccountIds} ${this.clientMain} + Tranasaction ${transaction} `, ); this.logger.warn( sdkClientError, From fc64edd0bb3ba982e38050ea809a8ab83de12b18 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Tue, 22 Oct 2024 12:55:14 +0300 Subject: [PATCH 09/16] Adds logger to client Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/services/hapiService/hapiService.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/relay/src/lib/services/hapiService/hapiService.ts b/packages/relay/src/lib/services/hapiService/hapiService.ts index ac0e002b9..9a58390c0 100644 --- a/packages/relay/src/lib/services/hapiService/hapiService.ts +++ b/packages/relay/src/lib/services/hapiService/hapiService.ts @@ -28,9 +28,9 @@ import { Counter, Registry } from 'prom-client'; import { SDKClient } from '../../clients/sdkClient'; import { HbarLimitService } from '../hbarLimitService'; import { CacheService } from '../cacheService/cacheService'; -import { AccountId, Client, PrivateKey } from '@hashgraph/sdk'; -import fs from 'fs'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; +import { AccountId, Client, LogLevel, PrivateKey, Logger as SDKLogger } from '@hashgraph/sdk'; +import fs from 'fs'; export default class HAPIService { /** @@ -364,7 +364,8 @@ export default class HAPIService { // @ts-ignore const SDK_REQUEST_TIMEOUT = parseInt(ConfigService.get('SDK_REQUEST_TIMEOUT') || '10000'); client.setRequestTimeout(SDK_REQUEST_TIMEOUT); - + const sdkLogger = new SDKLogger(LogLevel.Debug); + client.setLogger(sdkLogger); logger.info( `SDK client successfully configured to ${JSON.stringify(hederaNetwork)} for account ${ client.operatorAccountId From 33666e1acc65bbde0b452648b9f86524926287ae Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Tue, 22 Oct 2024 13:18:16 +0300 Subject: [PATCH 10/16] Adds logging for the transaction count Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/services/hapiService/hapiService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/relay/src/lib/services/hapiService/hapiService.ts b/packages/relay/src/lib/services/hapiService/hapiService.ts index 9a58390c0..981e0a99f 100644 --- a/packages/relay/src/lib/services/hapiService/hapiService.ts +++ b/packages/relay/src/lib/services/hapiService/hapiService.ts @@ -250,6 +250,7 @@ export default class HAPIService { } this.transactionCount--; + this.logger.info(`Transaction count for sdk client, ${this.transactionCount}`); if (this.transactionCount <= 0) { this.shouldReset = true; } From 3e62a318c81d8636a3eb8cecbf674a4340778dd9 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Wed, 23 Oct 2024 15:41:50 +0300 Subject: [PATCH 11/16] Replaces sdk with own version with more logging Signed-off-by: Konstantina Blazhukova --- dapp-example/src/hooks/useHederaSdk.js | 2 +- dapp-example/tests/e2e/bootstrap.js | 2 +- package-lock.json | 456 ++++++++++++++++-- package.json | 8 +- packages/relay/package.json | 2 +- packages/relay/src/lib/clients/sdkClient.ts | 2 +- .../src/lib/errors/MirrorNodeClientError.ts | 2 +- .../relay/src/lib/errors/SDKClientError.ts | 2 +- packages/relay/src/lib/eth.ts | 2 +- packages/relay/src/lib/model.ts | 2 +- packages/relay/src/lib/net.ts | 2 +- packages/relay/src/lib/relay.ts | 2 +- .../lib/services/hapiService/hapiService.ts | 2 +- .../lib/services/hbarLimitService/index.ts | 2 +- packages/relay/src/lib/web3.ts | 2 +- packages/relay/src/utils.ts | 2 +- packages/relay/tests/helpers.ts | 2 +- .../tests/lib/errors/SDKClientError.spec.ts | 2 +- packages/relay/tests/lib/eth/eth-helpers.ts | 2 +- packages/relay/tests/lib/eth/eth_call.spec.ts | 2 +- .../lib/eth/eth_sendRawTransaction.spec.ts | 2 +- .../relay/tests/lib/ethGetBlockBy.spec.ts | 2 +- packages/relay/tests/lib/hapiService.spec.ts | 2 +- packages/relay/tests/lib/openrpc.spec.ts | 2 +- packages/relay/tests/lib/precheck.spec.ts | 2 +- packages/relay/tests/lib/sdkClient.spec.ts | 2 +- .../hbarLimitService/hbarLimitService.spec.ts | 2 +- .../metricService/metricService.spec.ts | 2 +- packages/server/package.json | 2 +- .../tests/acceptance/equivalence.spec.ts | 2 +- .../htsPrecompile/precompileCalls.spec.ts | 2 +- .../server/tests/acceptance/index.spec.ts | 2 +- .../tests/acceptance/rpc_batch1.spec.ts | 2 +- .../tests/acceptance/rpc_batch2.spec.ts | 2 +- .../tests/acceptance/rpc_batch3.spec.ts | 2 +- .../server/tests/clients/servicesClient.ts | 2 +- packages/server/tests/helpers/utils.ts | 2 +- packages/server/tests/types/AliasAccount.ts | 2 +- packages/ws-server/package.json | 2 +- .../ws-server/tests/acceptance/index.spec.ts | 2 +- 40 files changed, 454 insertions(+), 86 deletions(-) diff --git a/dapp-example/src/hooks/useHederaSdk.js b/dapp-example/src/hooks/useHederaSdk.js index f31b284d3..f58acd5a9 100644 --- a/dapp-example/src/hooks/useHederaSdk.js +++ b/dapp-example/src/hooks/useHederaSdk.js @@ -1,6 +1,6 @@ import React from 'react'; import { ethers } from 'ethers'; -import { PublicKey, Client, TransferTransaction, Hbar, AccountId, AccountInfoQuery } from '@hashgraph/sdk'; +import { PublicKey, Client, TransferTransaction, Hbar, AccountId, AccountInfoQuery } from 'kosi-sdk'; const client = Client.forTestnet(); diff --git a/dapp-example/tests/e2e/bootstrap.js b/dapp-example/tests/e2e/bootstrap.js index 30353476e..f81908a89 100644 --- a/dapp-example/tests/e2e/bootstrap.js +++ b/dapp-example/tests/e2e/bootstrap.js @@ -1,4 +1,4 @@ -const HederaSDK = require('@hashgraph/sdk'); +const HederaSDK = require('kosi-sdk'); const ethers = require('ethers'); const fs = require('fs'); const path = require('path'); diff --git a/package-lock.json b/package-lock.json index 8d1623084..0f24f3a7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,12 +12,14 @@ "keyv-file": "^0.3.3", "koa-cors": "^0.0.16", "koa-websocket": "^7.0.0", + "kosi-sdk": "1.0.1", "lerna": "^8.1.8", "pino": "^7.11.0", "pino-pretty": "^7.6.1", "pnpm": "^8.7.1", "prom-client": "^14.0.1", - "redis": "^4.7.0" + "redis": "^4.7.0", + "type": "^2.7.3" }, "devDependencies": { "@hashgraph/hedera-local": "^2.31.0", @@ -2307,6 +2309,7 @@ "version": "1.4.8-beta.8", "resolved": "https://registry.npmjs.org/@hashgraph/cryptography/-/cryptography-1.4.8-beta.8.tgz", "integrity": "sha512-RK1SL5B6IGsYM4HyepC24rsMGr1qOvHFbNiJPlK+AGV5lApjxGpyNVWC80GusYqwRD9B1ljw43wJBSbHdaZIgw==", + "dev": true, "license": "Apache-2.0", "dependencies": { "asn1js": "^3.0.5", @@ -2690,6 +2693,7 @@ "version": "2.15.0-beta.4", "resolved": "https://registry.npmjs.org/@hashgraph/proto/-/proto-2.15.0-beta.4.tgz", "integrity": "sha512-da51j1RCHm+uXpQNM0KJ7qbhUJLTp6Avw8GdL+PQCbZ4lBwKAo8jjJ5rRjf1odsN1+zKl+JF7SMmKZB8PY229Q==", + "dev": true, "license": "Apache-2.0", "dependencies": { "long": "^4.0.0", @@ -2703,6 +2707,7 @@ "version": "2.51.0", "resolved": "https://registry.npmjs.org/@hashgraph/sdk/-/sdk-2.51.0.tgz", "integrity": "sha512-+RtBs8wmPr9g93fDSMCnQnAX27w+i5itw0bbYDFiAcFZ0F3Vb+TyxdPw7jfcHRgFDvwkyblEsPBzG7DO2lt5Ow==", + "dev": true, "license": "Apache-2.0", "dependencies": { "@ethersproject/abi": "^5.7.0", @@ -2740,6 +2745,7 @@ "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -2749,6 +2755,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" @@ -2758,6 +2765,7 @@ "version": "8.21.0", "resolved": "https://registry.npmjs.org/pino/-/pino-8.21.0.tgz", "integrity": "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==", + "dev": true, "license": "MIT", "dependencies": { "atomic-sleep": "^1.0.0", @@ -2780,6 +2788,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", + "dev": true, "license": "MIT", "dependencies": { "readable-stream": "^4.0.0", @@ -2790,6 +2799,7 @@ "version": "10.3.1", "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.3.1.tgz", "integrity": "sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==", + "dev": true, "license": "MIT", "dependencies": { "colorette": "^2.0.7", @@ -2815,18 +2825,21 @@ "version": "6.2.2", "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==", + "dev": true, "license": "MIT" }, "node_modules/@hashgraph/sdk/node_modules/process-warning": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", + "dev": true, "license": "MIT" }, "node_modules/@hashgraph/sdk/node_modules/readable-stream": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", @@ -2843,6 +2856,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "dev": true, "license": "MIT", "engines": { "node": ">= 12.13.0" @@ -2852,6 +2866,7 @@ "version": "3.8.1", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.1.tgz", "integrity": "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==", + "dev": true, "license": "MIT", "dependencies": { "atomic-sleep": "^1.0.0" @@ -2861,6 +2876,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, "license": "ISC", "engines": { "node": ">= 10.x" @@ -2870,6 +2886,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz", "integrity": "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==", + "dev": true, "license": "MIT", "dependencies": { "real-require": "^0.2.0" @@ -6197,6 +6214,7 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "pvtsutils": "^1.3.2", @@ -13008,6 +13026,179 @@ } } }, + "node_modules/kosi-sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/kosi-sdk/-/kosi-sdk-1.0.1.tgz", + "integrity": "sha512-ShiYea1QhUv+VwMhbuk5eW0eS/LTYAhyf+9obgS+YLFoMvNky7Ls42N7vPaMJbE1WMDGkX3IlPMo+j6/HNjqCg==", + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@grpc/grpc-js": "1.8.2", + "@hashgraph/cryptography": "file:.yalc/@hashgraph/cryptography", + "@hashgraph/proto": "file:.yalc/@hashgraph/proto", + "axios": "^1.6.4", + "bignumber.js": "^9.1.1", + "bn.js": "^5.1.1", + "crypto-js": "^4.2.0", + "js-base64": "^3.7.4", + "long": "^4.0.0", + "pino": "^8.14.1", + "pino-pretty": "^10.0.0", + "protobufjs": "7.2.5", + "rfc4648": "^1.5.3", + "utf8": "^3.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "expo": "^49.0.16" + }, + "peerDependenciesMeta": { + "expo": { + "optional": true + } + } + }, + "node_modules/kosi-sdk/.yalc/@hashgraph/cryptography": {}, + "node_modules/kosi-sdk/.yalc/@hashgraph/proto": {}, + "node_modules/kosi-sdk/node_modules/@hashgraph/cryptography": { + "resolved": "node_modules/kosi-sdk/.yalc/@hashgraph/cryptography", + "link": true + }, + "node_modules/kosi-sdk/node_modules/@hashgraph/proto": { + "resolved": "node_modules/kosi-sdk/.yalc/@hashgraph/proto", + "link": true + }, + "node_modules/kosi-sdk/node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "engines": { + "node": "*" + } + }, + "node_modules/kosi-sdk/node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/kosi-sdk/node_modules/pino": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.21.0.tgz", + "integrity": "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==", + "dependencies": { + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.2.0", + "pino-std-serializers": "^6.0.0", + "process-warning": "^3.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^3.7.0", + "thread-stream": "^2.6.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/kosi-sdk/node_modules/pino-abstract-transport": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", + "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", + "dependencies": { + "readable-stream": "^4.0.0", + "split2": "^4.0.0" + } + }, + "node_modules/kosi-sdk/node_modules/pino-pretty": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.3.1.tgz", + "integrity": "sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==", + "dependencies": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^3.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^5.0.0", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", + "pump": "^3.0.0", + "readable-stream": "^4.0.0", + "secure-json-parse": "^2.4.0", + "sonic-boom": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "bin": { + "pino-pretty": "bin.js" + } + }, + "node_modules/kosi-sdk/node_modules/pino-std-serializers": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==" + }, + "node_modules/kosi-sdk/node_modules/process-warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==" + }, + "node_modules/kosi-sdk/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/kosi-sdk/node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/kosi-sdk/node_modules/sonic-boom": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.1.tgz", + "integrity": "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/kosi-sdk/node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/kosi-sdk/node_modules/thread-stream": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz", + "integrity": "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==", + "dependencies": { + "real-require": "^0.2.0" + } + }, "node_modules/lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -15434,6 +15625,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, "license": "(BSD-3-Clause OR GPL-2.0)", "engines": { "node": ">= 6.13.0" @@ -17360,9 +17552,9 @@ } }, "node_modules/protobufjs": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", - "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -17437,6 +17629,7 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.6.1" @@ -17446,6 +17639,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -18905,6 +19099,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.2.tgz", "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==", + "dev": true, "license": "(WTFPL OR MIT)" }, "node_modules/sparkline": { @@ -19968,8 +20163,14 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true, "license": "Unlicense" }, + "node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -21129,7 +21330,6 @@ "dependencies": { "@ethersproject/asm": "^5.7.0", "@hashgraph/json-rpc-config-service": "file:../config-service", - "@hashgraph/sdk": "^2.50.0-beta.3", "@keyvhq/core": "^1.6.9", "axios": "^1.4.0", "axios-retry": "^3.5.1", @@ -21141,6 +21341,7 @@ "keccak": "^3.0.2", "keyv": "^4.2.2", "keyv-file": "^0.3.0", + "kosi-sdk": "1.0.1", "lodash": "^4.17.21", "lru-cache": "^7.14.0", "pino": "^7.11.0", @@ -21250,12 +21451,12 @@ "koa-cors": "^0.0.16", "koa-logger": "^3.2.1", "koa-router": "^13.0.1", + "kosi-sdk": "^1.0.0", "pino": "^7.11.0", "pino-pretty": "^7.6.1", "uuid": "^3.3.2" }, "devDependencies": { - "@hashgraph/sdk": "^2.50.0-beta.3", "@koa/cors": "^5.0.0", "@types/chai": "^4.3.0", "@types/cors": "^2.8.12", @@ -21997,7 +22198,7 @@ "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.2", - "semver": "^7.5.3" + "semver": "^6.3.1" } }, "@babel/generator": { @@ -22022,7 +22223,7 @@ "@babel/helper-validator-option": "^7.22.5", "browserslist": "^4.21.9", "lru-cache": "^5.1.1", - "semver": "^7.5.3" + "semver": "^6.3.1" }, "dependencies": { "lru-cache": { @@ -22381,7 +22582,7 @@ "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", - "semver": "^7.5.3", + "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, @@ -22467,7 +22668,7 @@ "fs-extra": "^0.30.0", "memorystream": "^0.3.1", "require-from-string": "^1.1.0", - "semver": "^7.5.3", + "semver": "^5.3.0", "yargs": "^4.7.1" } }, @@ -23542,6 +23743,7 @@ "version": "1.4.8-beta.8", "resolved": "https://registry.npmjs.org/@hashgraph/cryptography/-/cryptography-1.4.8-beta.8.tgz", "integrity": "sha512-RK1SL5B6IGsYM4HyepC24rsMGr1qOvHFbNiJPlK+AGV5lApjxGpyNVWC80GusYqwRD9B1ljw43wJBSbHdaZIgw==", + "dev": true, "requires": { "asn1js": "^3.0.5", "bignumber.js": "^9.1.1", @@ -23772,7 +23974,6 @@ "requires": { "@ethersproject/asm": "^5.7.0", "@hashgraph/json-rpc-config-service": "file:../config-service", - "@hashgraph/sdk": "^2.50.0-beta.3", "@keyvhq/core": "^1.6.9", "@types/chai": "^4.3.0", "@types/mocha": "^9.1.0", @@ -23788,6 +23989,7 @@ "keccak": "^3.0.2", "keyv": "^4.2.2", "keyv-file": "^0.3.0", + "kosi-sdk": "1.0.1", "lodash": "^4.17.21", "lru-cache": "^7.14.0", "pino": "^7.11.0", @@ -23857,7 +24059,6 @@ "requires": { "@hashgraph/json-rpc-config-service": "file:../config-service", "@hashgraph/json-rpc-relay": "file:../relay", - "@hashgraph/sdk": "^2.50.0-beta.3", "@koa/cors": "^5.0.0", "@types/chai": "^4.3.0", "@types/cors": "^2.8.12", @@ -23880,6 +24081,7 @@ "koa-cors": "^0.0.16", "koa-logger": "^3.2.1", "koa-router": "^13.0.1", + "kosi-sdk": "^1.0.0", "mocha": "^10.6.0", "pino": "^7.11.0", "pino-pretty": "^7.6.1", @@ -24368,15 +24570,17 @@ "version": "2.15.0-beta.4", "resolved": "https://registry.npmjs.org/@hashgraph/proto/-/proto-2.15.0-beta.4.tgz", "integrity": "sha512-da51j1RCHm+uXpQNM0KJ7qbhUJLTp6Avw8GdL+PQCbZ4lBwKAo8jjJ5rRjf1odsN1+zKl+JF7SMmKZB8PY229Q==", + "dev": true, "requires": { "long": "^4.0.0", - "protobufjs": "^7.2.4" + "protobufjs": "^7.2.5" } }, "@hashgraph/sdk": { "version": "2.51.0", "resolved": "https://registry.npmjs.org/@hashgraph/sdk/-/sdk-2.51.0.tgz", "integrity": "sha512-+RtBs8wmPr9g93fDSMCnQnAX27w+i5itw0bbYDFiAcFZ0F3Vb+TyxdPw7jfcHRgFDvwkyblEsPBzG7DO2lt5Ow==", + "dev": true, "requires": { "@ethersproject/abi": "^5.7.0", "@ethersproject/bignumber": "^5.7.0", @@ -24401,17 +24605,20 @@ "dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==" + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true }, "on-exit-leak-free": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", - "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==" + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true }, "pino": { "version": "8.21.0", "resolved": "https://registry.npmjs.org/pino/-/pino-8.21.0.tgz", "integrity": "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==", + "dev": true, "requires": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", @@ -24430,6 +24637,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", + "dev": true, "requires": { "readable-stream": "^4.0.0", "split2": "^4.0.0" @@ -24439,6 +24647,7 @@ "version": "10.3.1", "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.3.1.tgz", "integrity": "sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==", + "dev": true, "requires": { "colorette": "^2.0.7", "dateformat": "^4.6.3", @@ -24459,17 +24668,20 @@ "pino-std-serializers": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", - "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==" + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==", + "dev": true }, "process-warning": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", - "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==" + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", + "dev": true }, "readable-stream": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, "requires": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -24481,12 +24693,14 @@ "real-require": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", - "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==" + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "dev": true }, "sonic-boom": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.1.tgz", "integrity": "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==", + "dev": true, "requires": { "atomic-sleep": "^1.0.0" } @@ -24494,12 +24708,14 @@ "split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==" + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true }, "thread-stream": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz", "integrity": "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==", + "dev": true, "requires": { "real-require": "^0.2.0" } @@ -24846,7 +25062,7 @@ "read-cmd-shim": "4.0.0", "resolve-from": "5.0.0", "rimraf": "^4.4.1", - "semver": "^7.5.3", + "semver": "^7.3.4", "set-blocking": "^2.0.0", "signal-exit": "3.0.7", "slash": "^3.0.0", @@ -25123,7 +25339,7 @@ "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^3.0.1", "read-package-json-fast": "^3.0.2", - "semver": "^7.5.3", + "semver": "^7.3.7", "ssri": "^10.0.6", "treeverse": "^3.0.0", "walk-up-path": "^3.0.1" @@ -25165,7 +25381,7 @@ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", "requires": { - "semver": "^7.5.3" + "semver": "^7.3.5" } }, "@npmcli/git": { @@ -25180,7 +25396,7 @@ "proc-log": "^4.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", - "semver": "^7.5.3", + "semver": "^7.3.5", "which": "^4.0.0" }, "dependencies": { @@ -25288,7 +25504,7 @@ "json-parse-even-better-errors": "^3.0.0", "pacote": "^18.0.0", "proc-log": "^4.1.0", - "semver": "^7.5.3" + "semver": "^7.3.5" } }, "@npmcli/name-from-folder": { @@ -27072,6 +27288,7 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dev": true, "requires": { "pvtsutils": "^1.3.2", "pvutils": "^1.1.3", @@ -27474,7 +27691,7 @@ "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, "requires": { - "semver": "^7.5.3" + "semver": "^7.0.0" } }, "byte-size": { @@ -28127,7 +28344,7 @@ "requires": { "hosted-git-info": "^4.0.1", "is-core-module": "^2.5.0", - "semver": "^7.5.3", + "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" } } @@ -28148,7 +28365,7 @@ "handlebars": "^4.7.7", "json-stringify-safe": "^5.0.1", "meow": "^8.1.2", - "semver": "^7.5.3", + "semver": "^7.0.0", "split": "^1.0.1" } }, @@ -30504,7 +30721,7 @@ "integrity": "sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==", "requires": { "meow": "^8.1.2", - "semver": "^7.5.3" + "semver": "^7.0.0" } }, "git-up": { @@ -31002,7 +31219,7 @@ "npm-package-arg": "^11.0.0", "promzard": "^1.0.0", "read": "^3.0.1", - "semver": "^7.5.3", + "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", "validate-npm-package-name": "^5.0.0" } @@ -31480,7 +31697,7 @@ "@babel/core": "^7.7.5", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", - "semver": "^7.5.3" + "semver": "^6.3.0" } }, "istanbul-lib-processinfo": { @@ -32045,6 +32262,145 @@ } } }, + "kosi-sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/kosi-sdk/-/kosi-sdk-1.0.1.tgz", + "integrity": "sha512-ShiYea1QhUv+VwMhbuk5eW0eS/LTYAhyf+9obgS+YLFoMvNky7Ls42N7vPaMJbE1WMDGkX3IlPMo+j6/HNjqCg==", + "requires": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@grpc/grpc-js": "1.8.2", + "@hashgraph/cryptography": "file:.yalc/@hashgraph/cryptography", + "@hashgraph/proto": "file:.yalc/@hashgraph/proto", + "axios": "^1.6.4", + "bignumber.js": "^9.1.1", + "bn.js": "^5.1.1", + "crypto-js": "^4.2.0", + "js-base64": "^3.7.4", + "long": "^4.0.0", + "pino": "^8.14.1", + "pino-pretty": "^10.0.0", + "protobufjs": "^7.2.4", + "rfc4648": "^1.5.3", + "utf8": "^3.0.0" + }, + "dependencies": { + "@hashgraph/cryptography": { + "version": "file:node_modules/kosi-sdk/.yalc/@hashgraph/cryptography" + }, + "@hashgraph/proto": { + "version": "file:node_modules/kosi-sdk/.yalc/@hashgraph/proto" + }, + "dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==" + }, + "on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==" + }, + "pino": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.21.0.tgz", + "integrity": "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==", + "requires": { + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.2.0", + "pino-std-serializers": "^6.0.0", + "process-warning": "^3.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^3.7.0", + "thread-stream": "^2.6.0" + } + }, + "pino-abstract-transport": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", + "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", + "requires": { + "readable-stream": "^4.0.0", + "split2": "^4.0.0" + } + }, + "pino-pretty": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.3.1.tgz", + "integrity": "sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==", + "requires": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^3.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^5.0.0", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", + "pump": "^3.0.0", + "readable-stream": "^4.0.0", + "secure-json-parse": "^2.4.0", + "sonic-boom": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "pino-std-serializers": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==" + }, + "process-warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==" + }, + "readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + } + }, + "real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==" + }, + "sonic-boom": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.1.tgz", + "integrity": "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==", + "requires": { + "atomic-sleep": "^1.0.0" + } + }, + "split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==" + }, + "thread-stream": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz", + "integrity": "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==", + "requires": { + "real-require": "^0.2.0" + } + } + } + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -32929,7 +33285,7 @@ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { - "semver": "^7.5.3" + "semver": "^6.0.0" } }, "make-error": { @@ -33198,7 +33554,7 @@ "requires": { "hosted-git-info": "^4.0.1", "is-core-module": "^2.5.0", - "semver": "^7.5.3", + "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" } }, @@ -33241,7 +33597,7 @@ "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", - "semver": "^7.5.3", + "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, @@ -33822,7 +34178,8 @@ "node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true }, "node-gyp": { "version": "10.2.0", @@ -33836,7 +34193,7 @@ "make-fetch-happen": "^13.0.0", "nopt": "^7.0.0", "proc-log": "^4.1.0", - "semver": "^7.5.3", + "semver": "^7.3.5", "tar": "^6.2.1", "which": "^4.0.0" }, @@ -34017,7 +34374,7 @@ "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", "requires": { - "semver": "^7.5.3" + "semver": "^7.1.1" } }, "npm-normalize-package-bin": { @@ -34067,7 +34424,7 @@ "npm-install-checks": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", "npm-package-arg": "^11.0.0", - "semver": "^7.5.3" + "semver": "^7.3.5" } }, "npm-registry-fetch": { @@ -35243,9 +35600,9 @@ } }, "protobufjs": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", - "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -35315,6 +35672,7 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dev": true, "requires": { "tslib": "^2.6.1" } @@ -35322,7 +35680,8 @@ "pvutils": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "dev": true }, "qs": { "version": "6.11.2", @@ -35448,7 +35807,7 @@ "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", - "semver": "^7.5.3", + "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, @@ -36394,7 +36753,8 @@ "spark-md5": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.2.tgz", - "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==" + "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==", + "dev": true }, "sparkline": { "version": "0.1.2", @@ -37210,7 +37570,13 @@ "tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true + }, + "type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==" }, "type-check": { "version": "0.4.0", @@ -37825,7 +38191,7 @@ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "requires": { "pify": "^4.0.1", - "semver": "^7.5.3" + "semver": "^5.6.0" } }, "pify": { diff --git a/package.json b/package.json index c0c8ef3aa..40d4c9a23 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "@types/co-body": "6.1.0", "@types/find-config": "^1.0.4", "@types/koa-cors": "^0.0.6", - "@types/sinon": "^10.0.20", "@types/lodash": "^4.17.7", + "@types/sinon": "^10.0.20", "@typescript-eslint/eslint-plugin": "^6.5.0", "@typescript-eslint/parser": "^6.5.0", "ajv": "^8.16.0", @@ -89,12 +89,14 @@ "keyv-file": "^0.3.3", "koa-cors": "^0.0.16", "koa-websocket": "^7.0.0", + "kosi-sdk": "1.0.1", "lerna": "^8.1.8", "pino": "^7.11.0", "pino-pretty": "^7.6.1", - "prom-client": "^14.0.1", "pnpm": "^8.7.1", - "redis": "^4.7.0" + "prom-client": "^14.0.1", + "redis": "^4.7.0", + "type": "^2.7.3" }, "overrides": { "protobufjs": "^7.2.4", diff --git a/packages/relay/package.json b/packages/relay/package.json index be0bc50bd..51016df50 100644 --- a/packages/relay/package.json +++ b/packages/relay/package.json @@ -50,7 +50,6 @@ "dependencies": { "@hashgraph/json-rpc-config-service": "file:../config-service", "@ethersproject/asm": "^5.7.0", - "@hashgraph/sdk": "^2.50.0-beta.3", "@keyvhq/core": "^1.6.9", "axios": "^1.4.0", "axios-retry": "^3.5.1", @@ -60,6 +59,7 @@ "ethers": "^6.7.0", "find-config": "^1.0.0", "keccak": "^3.0.2", + "kosi-sdk": "1.0.1", "keyv": "^4.2.2", "keyv-file": "^0.3.0", "lodash": "^4.17.21", diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index 423d5d3da..aed74a8ba 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -51,7 +51,7 @@ import { TransactionRecord, TransactionRecordQuery, TransactionResponse, -} from '@hashgraph/sdk'; +} from 'kosi-sdk'; import { Logger } from 'pino'; import { Utils } from '../../utils'; import { EventEmitter } from 'events'; diff --git a/packages/relay/src/lib/errors/MirrorNodeClientError.ts b/packages/relay/src/lib/errors/MirrorNodeClientError.ts index 95796f023..a2410588a 100644 --- a/packages/relay/src/lib/errors/MirrorNodeClientError.ts +++ b/packages/relay/src/lib/errors/MirrorNodeClientError.ts @@ -18,7 +18,7 @@ * */ -import { Status } from '@hashgraph/sdk'; +import { Status } from 'kosi-sdk'; export class MirrorNodeClientError extends Error { public statusCode: number; diff --git a/packages/relay/src/lib/errors/SDKClientError.ts b/packages/relay/src/lib/errors/SDKClientError.ts index 18a53873a..dac1bf255 100644 --- a/packages/relay/src/lib/errors/SDKClientError.ts +++ b/packages/relay/src/lib/errors/SDKClientError.ts @@ -18,7 +18,7 @@ * */ -import { Status } from '@hashgraph/sdk'; +import { Status } from 'kosi-sdk'; export class SDKClientError extends Error { public status: Status = Status.Unknown; diff --git a/packages/relay/src/lib/eth.ts b/packages/relay/src/lib/eth.ts index 8b7a1c424..021c45846 100644 --- a/packages/relay/src/lib/eth.ts +++ b/packages/relay/src/lib/eth.ts @@ -34,7 +34,7 @@ import { Transaction as EthersTransaction } from 'ethers'; import HAPIService from './services/hapiService/hapiService'; import { JsonRpcError, predefined } from './errors/JsonRpcError'; import { Block, Log, Transaction, Transaction1559 } from './model'; -import { FileId, Hbar, PrecheckStatusError } from '@hashgraph/sdk'; +import { FileId, Hbar, PrecheckStatusError } from 'kosi-sdk'; import { CacheService } from './services/cacheService/cacheService'; import { CommonService, FilterService } from './services/ethService'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; diff --git a/packages/relay/src/lib/model.ts b/packages/relay/src/lib/model.ts index bf211e048..9f4280cdd 100644 --- a/packages/relay/src/lib/model.ts +++ b/packages/relay/src/lib/model.ts @@ -19,7 +19,7 @@ */ // Used for fake implementation of block history -import { Status, TransactionRecord } from '@hashgraph/sdk'; +import { Status, TransactionRecord } from 'kosi-sdk'; export class Block { public readonly timestamp: string = '0x' + new Date().valueOf().toString(16); diff --git a/packages/relay/src/lib/net.ts b/packages/relay/src/lib/net.ts index 12394f9d2..6c01c827a 100644 --- a/packages/relay/src/lib/net.ts +++ b/packages/relay/src/lib/net.ts @@ -20,8 +20,8 @@ import { Net } from '../index'; import constants from './constants'; -import { Client } from '@hashgraph/sdk'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; +import { Client } from 'kosi-sdk'; export class NetImpl implements Net { private client: Client; diff --git a/packages/relay/src/lib/relay.ts b/packages/relay/src/lib/relay.ts index e256f3852..868aedd59 100644 --- a/packages/relay/src/lib/relay.ts +++ b/packages/relay/src/lib/relay.ts @@ -26,7 +26,7 @@ import { Poller } from './poller'; import { Web3Impl } from './web3'; import EventEmitter from 'events'; import constants from './constants'; -import { Client, Hbar } from '@hashgraph/sdk'; +import { Client, Hbar } from 'kosi-sdk'; import { RequestDetails } from './types'; import { prepend0x } from '../formatters'; import { MirrorNodeClient } from './clients'; diff --git a/packages/relay/src/lib/services/hapiService/hapiService.ts b/packages/relay/src/lib/services/hapiService/hapiService.ts index 981e0a99f..f9f3bfe3e 100644 --- a/packages/relay/src/lib/services/hapiService/hapiService.ts +++ b/packages/relay/src/lib/services/hapiService/hapiService.ts @@ -29,7 +29,7 @@ import { SDKClient } from '../../clients/sdkClient'; import { HbarLimitService } from '../hbarLimitService'; import { CacheService } from '../cacheService/cacheService'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; -import { AccountId, Client, LogLevel, PrivateKey, Logger as SDKLogger } from '@hashgraph/sdk'; +import { AccountId, Client, LogLevel, PrivateKey, Logger as SDKLogger } from 'kosi-sdk'; import fs from 'fs'; export default class HAPIService { diff --git a/packages/relay/src/lib/services/hbarLimitService/index.ts b/packages/relay/src/lib/services/hbarLimitService/index.ts index 0f5654539..5ec33139b 100644 --- a/packages/relay/src/lib/services/hbarLimitService/index.ts +++ b/packages/relay/src/lib/services/hbarLimitService/index.ts @@ -28,7 +28,7 @@ import { EthAddressHbarSpendingPlanRepository } from '../../db/repositories/hbar import { IPAddressHbarSpendingPlanRepository } from '../../db/repositories/hbarLimiter/ipAddressHbarSpendingPlanRepository'; import { RequestDetails } from '../../types'; import constants from '../../constants'; -import { Hbar } from '@hashgraph/sdk'; +import { Hbar } from 'kosi-sdk'; export class HbarLimitService implements IHbarLimitService { static readonly TIER_LIMITS: Record = { diff --git a/packages/relay/src/lib/web3.ts b/packages/relay/src/lib/web3.ts index 21d7d2489..e795b817c 100644 --- a/packages/relay/src/lib/web3.ts +++ b/packages/relay/src/lib/web3.ts @@ -19,8 +19,8 @@ */ import { Web3 } from '../index'; -import { Client } from '@hashgraph/sdk'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; +import { Client } from 'kosi-sdk'; export class Web3Impl implements Web3 { private client: Client; diff --git a/packages/relay/src/utils.ts b/packages/relay/src/utils.ts index 993f6ca8b..1e9ac41cb 100644 --- a/packages/relay/src/utils.ts +++ b/packages/relay/src/utils.ts @@ -18,7 +18,7 @@ * */ -import { PrivateKey } from '@hashgraph/sdk'; +import { PrivateKey } from 'kosi-sdk'; import constants from './lib/constants'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; import crypto from 'crypto'; diff --git a/packages/relay/tests/helpers.ts b/packages/relay/tests/helpers.ts index f88a9abb0..6f2b3c63d 100644 --- a/packages/relay/tests/helpers.ts +++ b/packages/relay/tests/helpers.ts @@ -23,7 +23,7 @@ import { expect } from 'chai'; import { ethers } from 'ethers'; import { v4 as uuid } from 'uuid'; import constants from '../src/lib/constants'; -import { Hbar, HbarUnit } from '@hashgraph/sdk'; +import { Hbar, HbarUnit } from 'kosi-sdk'; import { formatRequestIdMessage, numberTo0x, toHash32 } from '../src/formatters'; import { RedisInMemoryServer } from './redisInMemoryServer'; import { Logger } from 'pino'; diff --git a/packages/relay/tests/lib/errors/SDKClientError.spec.ts b/packages/relay/tests/lib/errors/SDKClientError.spec.ts index 8dfda0d3c..610565aef 100644 --- a/packages/relay/tests/lib/errors/SDKClientError.spec.ts +++ b/packages/relay/tests/lib/errors/SDKClientError.spec.ts @@ -19,7 +19,7 @@ */ import { expect } from 'chai'; -import { Status } from '@hashgraph/sdk'; +import { Status } from 'kosi-sdk'; import { SDKClientError } from '../../../src/lib/errors/SDKClientError'; // Update the path to point to the SDKClientError file describe('SDKClientError', () => { diff --git a/packages/relay/tests/lib/eth/eth-helpers.ts b/packages/relay/tests/lib/eth/eth-helpers.ts index 9111756dd..fb76a161c 100644 --- a/packages/relay/tests/lib/eth/eth-helpers.ts +++ b/packages/relay/tests/lib/eth/eth-helpers.ts @@ -32,7 +32,7 @@ import { EthAddressHbarSpendingPlanRepository } from '../../../src/lib/db/reposi import { HbarSpendingPlanRepository } from '../../../src/lib/db/repositories/hbarLimiter/hbarSpendingPlanRepository'; import { IPAddressHbarSpendingPlanRepository } from '../../../src/lib/db/repositories/hbarLimiter/ipAddressHbarSpendingPlanRepository'; import { HbarLimitService } from '../../../src/lib/services/hbarLimitService'; -import { Hbar } from '@hashgraph/sdk'; +import { Hbar } from 'kosi-sdk'; import { CacheService } from '../../../src/lib/services/cacheService/cacheService'; export function contractResultsByNumberByIndexURL(number: number, index: number): string { diff --git a/packages/relay/tests/lib/eth/eth_call.spec.ts b/packages/relay/tests/lib/eth/eth_call.spec.ts index 057ccd054..bca4fed59 100644 --- a/packages/relay/tests/lib/eth/eth_call.spec.ts +++ b/packages/relay/tests/lib/eth/eth_call.spec.ts @@ -57,7 +57,7 @@ import { } from '../../helpers'; import { generateEthTestEnv } from './eth-helpers'; import { IContractCallRequest, IContractCallResponse, RequestDetails } from '../../../src/lib/types'; -import { ContractFunctionResult } from '@hashgraph/sdk'; +import { ContractFunctionResult } from 'kosi-sdk'; use(chaiAsPromised); diff --git a/packages/relay/tests/lib/eth/eth_sendRawTransaction.spec.ts b/packages/relay/tests/lib/eth/eth_sendRawTransaction.spec.ts index a04e4dcba..8ee235b62 100644 --- a/packages/relay/tests/lib/eth/eth_sendRawTransaction.spec.ts +++ b/packages/relay/tests/lib/eth/eth_sendRawTransaction.spec.ts @@ -31,7 +31,7 @@ import { Long, TransactionId, TransactionResponse, -} from '@hashgraph/sdk'; +} from 'kosi-sdk'; import { HbarLimitService } from '../../../src/lib/services/hbarLimitService'; import { EventEmitter } from 'events'; import pino from 'pino'; diff --git a/packages/relay/tests/lib/ethGetBlockBy.spec.ts b/packages/relay/tests/lib/ethGetBlockBy.spec.ts index d633d3673..80ea6a2ab 100644 --- a/packages/relay/tests/lib/ethGetBlockBy.spec.ts +++ b/packages/relay/tests/lib/ethGetBlockBy.spec.ts @@ -27,7 +27,7 @@ import { EthImpl } from '../../src/lib/eth'; import { MirrorNodeClient } from '../../src/lib/clients/mirrorNodeClient'; import pino from 'pino'; import { EventEmitter } from 'events'; -import { Hbar } from '@hashgraph/sdk'; +import { Hbar } from 'kosi-sdk'; import constants from '../../src/lib/constants'; import { Log, Transaction } from '../../src/lib/model'; import HAPIService from '../../src/lib/services/hapiService/hapiService'; diff --git a/packages/relay/tests/lib/hapiService.spec.ts b/packages/relay/tests/lib/hapiService.spec.ts index 3198bfcd6..06cf4c4ab 100644 --- a/packages/relay/tests/lib/hapiService.spec.ts +++ b/packages/relay/tests/lib/hapiService.spec.ts @@ -22,7 +22,7 @@ import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services' import pino from 'pino'; import { expect } from 'chai'; import EventEmitter from 'events'; -import { Client, Hbar } from '@hashgraph/sdk'; +import { Client, Hbar } from 'kosi-sdk'; import constants from '../../src/lib/constants'; import { register, Registry } from 'prom-client'; import { SDKClient } from '../../src/lib/clients'; diff --git a/packages/relay/tests/lib/openrpc.spec.ts b/packages/relay/tests/lib/openrpc.spec.ts index a50d8a24f..589e49afe 100644 --- a/packages/relay/tests/lib/openrpc.spec.ts +++ b/packages/relay/tests/lib/openrpc.spec.ts @@ -26,8 +26,8 @@ import axios from 'axios'; import sinon from 'sinon'; import { expect } from 'chai'; import EventEmitter from 'events'; -import { AccountInfo, Hbar } from '@hashgraph/sdk'; import MockAdapter from 'axios-mock-adapter'; +import { AccountInfo, Hbar } from 'kosi-sdk'; import { BigNumber } from 'bignumber.js'; import { EthImpl } from '../../src/lib/eth'; import constants from '../../src/lib/constants'; diff --git a/packages/relay/tests/lib/precheck.spec.ts b/packages/relay/tests/lib/precheck.spec.ts index d53b1b320..da2afe029 100644 --- a/packages/relay/tests/lib/precheck.spec.ts +++ b/packages/relay/tests/lib/precheck.spec.ts @@ -21,7 +21,7 @@ import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; import { expect } from 'chai'; import { Registry } from 'prom-client'; -import { Hbar, HbarUnit } from '@hashgraph/sdk'; +import { Hbar, HbarUnit } from 'kosi-sdk'; import pino from 'pino'; import { Precheck } from '../../src/lib/precheck'; import { diff --git a/packages/relay/tests/lib/sdkClient.spec.ts b/packages/relay/tests/lib/sdkClient.spec.ts index 97b23d4c3..d51b6b42e 100644 --- a/packages/relay/tests/lib/sdkClient.spec.ts +++ b/packages/relay/tests/lib/sdkClient.spec.ts @@ -63,7 +63,7 @@ import { TransactionId, TransactionRecordQuery, TransactionResponse, -} from '@hashgraph/sdk'; +} from 'kosi-sdk'; import { Context } from 'mocha'; const registry = new Registry(); diff --git a/packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts b/packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts index 06ff203d5..bdf0566f3 100644 --- a/packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts +++ b/packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts @@ -38,7 +38,7 @@ import { IPAddressHbarSpendingPlanNotFoundError, } from '../../../../src/lib/db/types/hbarLimiter/errors'; import { RequestDetails } from '../../../../src/lib/types'; -import { Hbar } from '@hashgraph/sdk'; +import { Hbar } from 'kosi-sdk'; import { Long } from 'long'; chai.use(chaiAsPromised); diff --git a/packages/relay/tests/lib/services/metricService/metricService.spec.ts b/packages/relay/tests/lib/services/metricService/metricService.spec.ts index 3f14d1cf3..5d96329f0 100644 --- a/packages/relay/tests/lib/services/metricService/metricService.spec.ts +++ b/packages/relay/tests/lib/services/metricService/metricService.spec.ts @@ -37,7 +37,7 @@ import { MirrorNodeClient, SDKClient } from '../../../../src/lib/clients'; import { HbarLimitService } from '../../../../src/lib/services/hbarLimitService'; import MetricService from '../../../../src/lib/services/metricService/metricService'; import { CacheService } from '../../../../src/lib/services/cacheService/cacheService'; -import { AccountId, Client, Hbar, Long, Status, TransactionRecord, TransactionRecordQuery } from '@hashgraph/sdk'; +import { AccountId, Client, Hbar, Long, Status, TransactionRecord, TransactionRecordQuery } from 'kosi-sdk'; import { IExecuteQueryEventPayload, IExecuteTransactionEventPayload, RequestDetails } from '../../../../src/lib/types'; import { HbarSpendingPlanRepository } from '../../../../src/lib/db/repositories/hbarLimiter/hbarSpendingPlanRepository'; import { IPAddressHbarSpendingPlanRepository } from '../../../../src/lib/db/repositories/hbarLimiter/ipAddressHbarSpendingPlanRepository'; diff --git a/packages/server/package.json b/packages/server/package.json index 4b05d7bdc..0c8393aeb 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -15,12 +15,12 @@ "koa-cors": "^0.0.16", "koa-logger": "^3.2.1", "koa-router": "^13.0.1", + "kosi-sdk": "1.0.1", "pino": "^7.11.0", "pino-pretty": "^7.6.1", "uuid": "^3.3.2" }, "devDependencies": { - "@hashgraph/sdk": "^2.50.0-beta.3", "@koa/cors": "^5.0.0", "@types/chai": "^4.3.0", "@types/cors": "^2.8.12", diff --git a/packages/server/tests/acceptance/equivalence.spec.ts b/packages/server/tests/acceptance/equivalence.spec.ts index d1dec4598..ca42df817 100644 --- a/packages/server/tests/acceptance/equivalence.spec.ts +++ b/packages/server/tests/acceptance/equivalence.spec.ts @@ -21,7 +21,7 @@ import { assert, expect } from 'chai'; import { Utils } from '../helpers/utils'; import ServicesClient from '../clients/servicesClient'; -import { ContractFunctionParameters } from '@hashgraph/sdk'; +import { ContractFunctionParameters } from 'kosi-sdk'; import EstimatePrecompileContractJson from '../contracts/EstimatePrecompileContract.json'; import Constants from '../helpers/constants'; import EquivalenceContractJson from '../contracts/EquivalenceContract.json'; diff --git a/packages/server/tests/acceptance/htsPrecompile/precompileCalls.spec.ts b/packages/server/tests/acceptance/htsPrecompile/precompileCalls.spec.ts index de4441b69..9bb0afaf1 100644 --- a/packages/server/tests/acceptance/htsPrecompile/precompileCalls.spec.ts +++ b/packages/server/tests/acceptance/htsPrecompile/precompileCalls.spec.ts @@ -21,7 +21,7 @@ // external resources import { solidity } from 'ethereum-waffle'; import chai, { expect } from 'chai'; -import { ContractId } from '@hashgraph/sdk'; +import { ContractId } from 'kosi-sdk'; //Constants are imported with different definitions for better readability in the code. import Constants from '../../helpers/constants'; import RelayCall from '../../helpers/constants'; diff --git a/packages/server/tests/acceptance/index.spec.ts b/packages/server/tests/acceptance/index.spec.ts index c8097bfe2..dcf2cb2a8 100644 --- a/packages/server/tests/acceptance/index.spec.ts +++ b/packages/server/tests/acceptance/index.spec.ts @@ -39,7 +39,7 @@ import app from '../../dist/server'; import { app as wsApp } from '@hashgraph/json-rpc-ws-server/dist/webSocketServer'; // Hashgraph SDK -import { AccountId, Hbar } from '@hashgraph/sdk'; +import { AccountId, Hbar } from 'kosi-sdk'; // Constants import constants from '@hashgraph/json-rpc-relay/dist/lib/constants'; diff --git a/packages/server/tests/acceptance/rpc_batch1.spec.ts b/packages/server/tests/acceptance/rpc_batch1.spec.ts index c74434085..f01128268 100644 --- a/packages/server/tests/acceptance/rpc_batch1.spec.ts +++ b/packages/server/tests/acceptance/rpc_batch1.spec.ts @@ -23,7 +23,7 @@ import { expect } from 'chai'; import { ethers } from 'ethers'; import { AliasAccount } from '../types/AliasAccount'; import { Utils } from '../helpers/utils'; -import { FileInfo, FileInfoQuery, Hbar, TransferTransaction } from '@hashgraph/sdk'; +import { FileInfo, FileInfoQuery, Hbar, TransferTransaction } from 'kosi-sdk'; // Assertions from local resources import Assertions from '../helpers/assertions'; diff --git a/packages/server/tests/acceptance/rpc_batch2.spec.ts b/packages/server/tests/acceptance/rpc_batch2.spec.ts index ffd2661b0..0a5d74199 100644 --- a/packages/server/tests/acceptance/rpc_batch2.spec.ts +++ b/packages/server/tests/acceptance/rpc_batch2.spec.ts @@ -26,8 +26,8 @@ import { Utils } from '../helpers/utils'; import { predefined } from '@hashgraph/json-rpc-relay/dist'; import { EthImpl } from '@hashgraph/json-rpc-relay/dist/lib/eth'; import { numberTo0x } from '@hashgraph/json-rpc-relay/dist/formatters'; -import { ContractId, Hbar, HbarUnit } from '@hashgraph/sdk'; import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services'; +import { ContractId, Hbar, HbarUnit } from 'kosi-sdk'; // Assertions from local resources import Assertions from '../helpers/assertions'; diff --git a/packages/server/tests/acceptance/rpc_batch3.spec.ts b/packages/server/tests/acceptance/rpc_batch3.spec.ts index dad74a11c..f7b0f71c4 100644 --- a/packages/server/tests/acceptance/rpc_batch3.spec.ts +++ b/packages/server/tests/acceptance/rpc_batch3.spec.ts @@ -28,7 +28,7 @@ import Axios from 'axios'; import chai, { expect } from 'chai'; import chaiExclude from 'chai-exclude'; import Constants from '@hashgraph/json-rpc-relay/dist/lib/constants'; -import { ContractId } from '@hashgraph/sdk'; +import { ContractId } from 'kosi-sdk'; // Assertions and constants from local resources import Assertions from '../helpers/assertions'; diff --git a/packages/server/tests/clients/servicesClient.ts b/packages/server/tests/clients/servicesClient.ts index 90441ed63..04cb75632 100644 --- a/packages/server/tests/clients/servicesClient.ts +++ b/packages/server/tests/clients/servicesClient.ts @@ -52,7 +52,7 @@ import { TransactionId, TransactionResponse, TransferTransaction, -} from '@hashgraph/sdk'; +} from 'kosi-sdk'; import { Logger } from 'pino'; import { ethers, JsonRpcProvider } from 'ethers'; import { Utils } from '../helpers/utils'; diff --git a/packages/server/tests/helpers/utils.ts b/packages/server/tests/helpers/utils.ts index 4666ff84e..aa126d9df 100644 --- a/packages/server/tests/helpers/utils.ts +++ b/packages/server/tests/helpers/utils.ts @@ -24,7 +24,7 @@ import crypto from 'crypto'; import RelayClient from '../clients/relayClient'; import { numberTo0x } from '@hashgraph/json-rpc-relay/dist/formatters'; import RelayCall from '../../tests/helpers/constants'; -import { AccountId, KeyList, PrivateKey } from '@hashgraph/sdk'; +import { AccountId, KeyList, PrivateKey } from 'kosi-sdk'; import { AliasAccount } from '../types/AliasAccount'; import ServicesClient from '../clients/servicesClient'; import http from 'http'; diff --git a/packages/server/tests/types/AliasAccount.ts b/packages/server/tests/types/AliasAccount.ts index 55e5b5338..61108523a 100644 --- a/packages/server/tests/types/AliasAccount.ts +++ b/packages/server/tests/types/AliasAccount.ts @@ -18,7 +18,7 @@ * */ -import { AccountId, KeyList, PrivateKey } from '@hashgraph/sdk'; +import { AccountId, KeyList, PrivateKey } from 'kosi-sdk'; import ServicesClient from '../clients/servicesClient'; import { ethers } from 'ethers'; diff --git a/packages/ws-server/package.json b/packages/ws-server/package.json index 3577da639..76595e596 100644 --- a/packages/ws-server/package.json +++ b/packages/ws-server/package.json @@ -21,7 +21,6 @@ "pino-pretty": "^7.6.1" }, "devDependencies": { - "@hashgraph/sdk": "^2.50.0-beta.3", "@koa/cors": "^5.0.0", "@types/chai": "^4.3.0", "@types/cors": "^2.8.12", @@ -34,6 +33,7 @@ "axios-retry": "^3.5.1", "chai": "^4.3.6", "ethers": "^6.7.0", + "kosi-sdk": "1.0.1", "mocha": "^10.1.0", "shelljs": "^0.8.5", "ts-mocha": "^9.0.2", diff --git a/packages/ws-server/tests/acceptance/index.spec.ts b/packages/ws-server/tests/acceptance/index.spec.ts index 6cb020232..3bda3ec9d 100644 --- a/packages/ws-server/tests/acceptance/index.spec.ts +++ b/packages/ws-server/tests/acceptance/index.spec.ts @@ -23,7 +23,7 @@ import pino from 'pino'; import dotenv from 'dotenv'; import chaiAsPromised from 'chai-as-promised'; import fs from 'fs'; -import { AccountId, Hbar } from '@hashgraph/sdk'; +import { AccountId, Hbar } from 'kosi-sdk'; import app from '@hashgraph/json-rpc-server/dist/server'; import constants from '@hashgraph/json-rpc-relay/dist/lib/constants'; import RelayClient from '@hashgraph/json-rpc-server/tests/clients/relayClient'; From 858e8feb5d4107863b8ea9d1d5a068c2737a6484 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Fri, 25 Oct 2024 11:07:59 +0300 Subject: [PATCH 12/16] Bumps timeout on sdk Signed-off-by: Konstantina Blazhukova --- packages/server/tests/localAcceptance.env | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/tests/localAcceptance.env b/packages/server/tests/localAcceptance.env index e096ae317..c2c4b05e5 100644 --- a/packages/server/tests/localAcceptance.env +++ b/packages/server/tests/localAcceptance.env @@ -26,6 +26,7 @@ INITIAL_BALANCE='5000000000' LIMIT_DURATION=90000 SERVER_REQUEST_TIMEOUT_MS=60000 MEMWATCH_ENABLED=true +SDK_REQUEST_TIMEOUT = 15000 WRITE_SNAPSHOT_ON_MEMORY_LEAK=false HBAR_RATE_LIMIT_TINYBAR=5000000000# 50 HBARs HBAR_RATE_LIMIT_DURATION=80000# 80 seconds From f1dd35e670c0e46cfebfb5d7d30b44e90308f53f Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Fri, 25 Oct 2024 14:58:59 +0300 Subject: [PATCH 13/16] revert timeout to 10 seconds Signed-off-by: Konstantina Blazhukova --- packages/ws-server/tests/acceptance/subscribe.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ws-server/tests/acceptance/subscribe.spec.ts b/packages/ws-server/tests/acceptance/subscribe.spec.ts index 479705e63..81a78e5b2 100644 --- a/packages/ws-server/tests/acceptance/subscribe.spec.ts +++ b/packages/ws-server/tests/acceptance/subscribe.spec.ts @@ -771,7 +771,7 @@ describe('@web-socket-batch-3 eth_subscribe', async function () { await wsHtsProvider.websocket.close(); }); - it('@release captures transfer events', async function () { + it.only('@release captures transfer events', async function () { const balanceBefore = await htsToken.balanceOf(htsAccounts[1].wallet.address); expect(balanceBefore.toString()).to.eq('0', 'verify initial balance'); From 5585dbd8d2bc159120197a5a8301f36f607fe837 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Fri, 25 Oct 2024 16:58:35 +0300 Subject: [PATCH 14/16] Revert timeout to default Signed-off-by: Konstantina Blazhukova --- packages/server/tests/localAcceptance.env | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/server/tests/localAcceptance.env b/packages/server/tests/localAcceptance.env index c2c4b05e5..e096ae317 100644 --- a/packages/server/tests/localAcceptance.env +++ b/packages/server/tests/localAcceptance.env @@ -26,7 +26,6 @@ INITIAL_BALANCE='5000000000' LIMIT_DURATION=90000 SERVER_REQUEST_TIMEOUT_MS=60000 MEMWATCH_ENABLED=true -SDK_REQUEST_TIMEOUT = 15000 WRITE_SNAPSHOT_ON_MEMORY_LEAK=false HBAR_RATE_LIMIT_TINYBAR=5000000000# 50 HBARs HBAR_RATE_LIMIT_DURATION=80000# 80 seconds From b84bb7b15a27d61168e74859a7f46de9f4e9561e Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Fri, 25 Oct 2024 18:47:06 +0300 Subject: [PATCH 15/16] remo forgotten only Signed-off-by: Konstantina Blazhukova --- packages/ws-server/tests/acceptance/subscribe.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ws-server/tests/acceptance/subscribe.spec.ts b/packages/ws-server/tests/acceptance/subscribe.spec.ts index 81a78e5b2..479705e63 100644 --- a/packages/ws-server/tests/acceptance/subscribe.spec.ts +++ b/packages/ws-server/tests/acceptance/subscribe.spec.ts @@ -771,7 +771,7 @@ describe('@web-socket-batch-3 eth_subscribe', async function () { await wsHtsProvider.websocket.close(); }); - it.only('@release captures transfer events', async function () { + it('@release captures transfer events', async function () { const balanceBefore = await htsToken.balanceOf(htsAccounts[1].wallet.address); expect(balanceBefore.toString()).to.eq('0', 'verify initial balance'); From 2158bc7af35297baa6ef6c3211dea3b665ce25a7 Mon Sep 17 00:00:00 2001 From: Konstantina Blazhukova Date: Wed, 30 Oct 2024 13:07:40 +0200 Subject: [PATCH 16/16] Adds more logging Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/clients/sdkClient.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/relay/src/lib/clients/sdkClient.ts b/packages/relay/src/lib/clients/sdkClient.ts index aed74a8ba..28dbde7df 100644 --- a/packages/relay/src/lib/clients/sdkClient.ts +++ b/packages/relay/src/lib/clients/sdkClient.ts @@ -429,6 +429,7 @@ export class SDKClient { originalCallerAddress, currentNetworkExchangeRateInCents, ); + this.logger.info('Created file...'); if (!fileId) { throw new SDKClientError({}, `${requestDetails.formattedRequestId} No fileId created for transaction. `); } @@ -440,7 +441,7 @@ export class SDKClient { ethereumTransaction.setMaxTransactionFee( Hbar.fromTinybars(Math.floor(networkGasPriceInTinyBars * constants.MAX_GAS_PER_SEC)), ); - + this.logger.info('About to execute transaction...'); return { fileId, txResponse: await this.executeTransaction( @@ -709,9 +710,9 @@ export class SDKClient { try { this.logger.info(`${requestDetails.formattedRequestId} Execute ${txConstructorName} transaction`); transactionResponse = await transaction.execute(this.clientMain); - + this.logger.info('Transaction Response before receipt', transactionResponse); transactionId = transactionResponse.transactionId.toString(); - + this.logger.info('Transaction Id before receipt', transactionId); // .getReceipt() will throw an error if, in any case, the status !== 22 (SUCCESS). const transactionReceipt = await transactionResponse.getReceipt(this.clientMain); @@ -745,6 +746,7 @@ export class SDKClient { ); if (!transactionResponse) { + this.logger.info('Transaction Response in if', transactionResponse); throw predefined.INTERNAL_ERROR( `${requestDetails.formattedRequestId} Transaction execution returns a null value: transactionId=${transaction.transactionId}, callerName=${callerName}, txConstructorName=${txConstructorName}`, );