From ffec1a3735d9078e153a20ac8c6249391672d140 Mon Sep 17 00:00:00 2001 From: saraantole Date: Tue, 28 Jan 2025 12:54:42 +0100 Subject: [PATCH 1/6] fix: update sdk core package to v2 --- packages/thorest/package.json | 96 +++++++++++++++++------------------ yarn.lock | 53 +------------------ 2 files changed, 50 insertions(+), 99 deletions(-) diff --git a/packages/thorest/package.json b/packages/thorest/package.json index ece01053a..c6c4042a2 100644 --- a/packages/thorest/package.json +++ b/packages/thorest/package.json @@ -1,49 +1,49 @@ { - "name": "@vechain/sdk-thorest-api", - "version": "1.0.0-rc.6", - "description": "This module connects decentralized applications (dApps) with the Thorest API.", - "author": "VeChain Foundation", - "license": "MIT", - "homepage": "https://github.com/vechain/vechain-sdk-js", - "repository": { - "type": "git", - "url": "github:vechain/vechain-sdk-js" - }, - "keywords": [ - "VeChain" - ], - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "files": [ - "dist", - "src", - "package.json", - "README.md", - "LICENSE" - ], - "scripts": { - "build": "rm -rf ./dist && tsup-node src/index.ts --format cjs,esm --dts", - "check:circular-dependencies": "npx madge --json --circular --extensions ts src | jq '. | length' | awk '{if($1 > 15) exit 1}'", - "lint": "eslint", - "format": "prettier --write src/**/*.ts tests/**/*.ts solo-seeding/**/*.ts", - "start-thor-solo": "echo 'Starting thor solo node ...' && docker compose -f ../../docker-compose.thor.yml up -d --wait && echo '\nThor solo node started ...'", - "stop-thor-solo": "echo 'Stopping thor solo node ...' && docker compose -f ../../docker-compose.thor.yml down && echo 'Thor solo node stopped ...'", - "test:unit": "rm -rf ./coverageUnit && UNIT=true jest --coverage --coverageDirectory=coverageUnit --group=unit", - "test:integration": "rm -rf ./coverageIntegration && jest --coverage --coverageDirectory=coverageIntegration --group=integration", - "test:integration:solo": "(yarn start-thor-solo && yarn test:integration && yarn stop-thor-solo) || yarn stop-thor-solo", - "test:browser": "rm -rf ./coverage && jest --coverage --coverageDirectory=coverage --group=integration --group=unit --config ./jest.config.browser.js", - "test": "rm -rf ./coverage && jest --coverage --coverageDirectory=coverage --group=integration --group=unit", - "test:solo": "(yarn start-thor-solo && yarn test && yarn stop-thor-solo) || yarn stop-thor-solo", - "test:browser:solo": "(yarn start-thor-solo && yarn test:browser && yarn stop-thor-solo) || yarn stop-thor-solo" - }, - "dependencies": { - "@vechain/sdk-core": "1.0.0-rc.6", - "ws": "^8.18.0" - }, - "devDependencies": { - "@types/ws": "^8.5.13", - "jest-fetch-mock": "^3.0.3", - "whatwg-fetch": "^3.6.20" - } -} + "name": "@vechain/sdk-thorest-api", + "version": "1.0.0-rc.6", + "description": "This module connects decentralized applications (dApps) with the Thorest API.", + "author": "VeChain Foundation", + "license": "MIT", + "homepage": "https://github.com/vechain/vechain-sdk-js", + "repository": { + "type": "git", + "url": "github:vechain/vechain-sdk-js" + }, + "keywords": [ + "VeChain" + ], + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist", + "src", + "package.json", + "README.md", + "LICENSE" + ], + "scripts": { + "build": "rm -rf ./dist && tsup-node src/index.ts --format cjs,esm --dts", + "check:circular-dependencies": "npx madge --json --circular --extensions ts src | jq '. | length' | awk '{if($1 > 15) exit 1}'", + "lint": "eslint", + "format": "prettier --write src/**/*.ts tests/**/*.ts solo-seeding/**/*.ts", + "start-thor-solo": "echo 'Starting thor solo node ...' && docker compose -f ../../docker-compose.thor.yml up -d --wait && echo '\nThor solo node started ...'", + "stop-thor-solo": "echo 'Stopping thor solo node ...' && docker compose -f ../../docker-compose.thor.yml down && echo 'Thor solo node stopped ...'", + "test:unit": "rm -rf ./coverageUnit && UNIT=true jest --coverage --coverageDirectory=coverageUnit --group=unit", + "test:integration": "rm -rf ./coverageIntegration && jest --coverage --coverageDirectory=coverageIntegration --group=integration", + "test:integration:solo": "(yarn start-thor-solo && yarn test:integration && yarn stop-thor-solo) || yarn stop-thor-solo", + "test:browser": "rm -rf ./coverage && jest --coverage --coverageDirectory=coverage --group=integration --group=unit --config ./jest.config.browser.js", + "test": "rm -rf ./coverage && jest --coverage --coverageDirectory=coverage --group=integration --group=unit", + "test:solo": "(yarn start-thor-solo && yarn test && yarn stop-thor-solo) || yarn stop-thor-solo", + "test:browser:solo": "(yarn start-thor-solo && yarn test:browser && yarn stop-thor-solo) || yarn stop-thor-solo" + }, + "dependencies": { + "@vechain/sdk-core": "2.0.0-beta.1", + "ws": "^8.18.0" + }, + "devDependencies": { + "@types/ws": "^8.5.13", + "jest-fetch-mock": "^3.0.3", + "whatwg-fetch": "^3.6.20" + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index f53d2d011..87d345936 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3427,11 +3427,6 @@ dependencies: eslint-scope "5.1.1" -"@noble/ciphers@^1.1.1": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.2.0.tgz#a7858e18eb620f6b2a327a7f0e647b6a78fd0727" - integrity sha512-YGdEUzYEd+82jeaVbSKKVp1jFZb8LwaNMIIzHFkihGvYdd/KKAr7KaJHdEdSYGredE3ssSravXIa0Jxg28Sv5w== - "@noble/ciphers@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.1.3.tgz#eb27085aa7ce94d8c6eaeb64299bab0589920ec1" @@ -3855,7 +3850,7 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.10.4.tgz#427d5549943a9c6fce808e39ea64dbe60d4047f1" integrity sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA== -"@scure/base@^1.1.9", "@scure/base@^1.2.1", "@scure/base@~1.2.1": +"@scure/base@^1.2.1", "@scure/base@~1.2.1": version "1.2.1" resolved "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== @@ -5368,37 +5363,6 @@ uuid "2.0.1" xmlhttprequest "1.8.0" -"@vechain/sdk-core@1.0.0-rc.6": - version "1.0.0-rc.6" - resolved "https://registry.yarnpkg.com/@vechain/sdk-core/-/sdk-core-1.0.0-rc.6.tgz#1c0b3c3297434f63d85bde65d344f8b34ae2a3ea" - integrity sha512-71ztrebtgi8u6uDu+HShnZt7OGqXa8tIyzv91GKjwXKDOSJKR6WVXfhWiMSCxEL4EBDAMsiRw5/zM+X4/8wxgg== - dependencies: - "@ethereumjs/rlp" "^5.0.2" - "@noble/ciphers" "^1.1.1" - "@noble/curves" "^1.6.0" - "@noble/hashes" "^1.5.0" - "@scure/base" "^1.1.9" - "@scure/bip32" "^1.4.0" - "@scure/bip39" "^1.4.0" - "@vechain/sdk-errors" "1.0.0-rc.6" - "@vechain/sdk-logging" "1.0.0-rc.6" - abitype "^1.0.6" - ethers "6.13.4" - fast-json-stable-stringify "^2.1.0" - viem "^2.21.45" - -"@vechain/sdk-errors@1.0.0-rc.6": - version "1.0.0-rc.6" - resolved "https://registry.yarnpkg.com/@vechain/sdk-errors/-/sdk-errors-1.0.0-rc.6.tgz#f0f0cb172ef0556a19c43aedd6cf9a4fa821cfd0" - integrity sha512-DzIbaXOis8/yEfRc1KED8Kyo89K3jTJ+2T+gKvAYDyeut0cR4pB8l64ufYagqFDBkU0hJkOQsoz0bF8CRnZX8w== - -"@vechain/sdk-logging@1.0.0-rc.6": - version "1.0.0-rc.6" - resolved "https://registry.yarnpkg.com/@vechain/sdk-logging/-/sdk-logging-1.0.0-rc.6.tgz#f6ca4d37c4eb7aab848c1c973b00d6e6ba103668" - integrity sha512-RaPvzZM9ez2jsEowW6/3UXU+fRYiu7KPhiDf3aD19JWpMN92jU9T1NpX4aNsphH+XjhVCj7Ucz4MVwK+TwhGiw== - dependencies: - "@vechain/sdk-errors" "1.0.0-rc.6" - "@vechain/vebetterdao-contracts@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@vechain/vebetterdao-contracts/-/vebetterdao-contracts-4.1.0.tgz#5a081bf9c548ea777fe16dcab40536d6d2cc1a62" @@ -8413,19 +8377,6 @@ ethereumjs-util@^7.1.4: ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethers@6.13.4: - version "6.13.4" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.4.tgz#bd3e1c3dc1e7dc8ce10f9ffb4ee40967a651b53c" - integrity sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA== - dependencies: - "@adraffy/ens-normalize" "1.10.1" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@types/node" "22.7.5" - aes-js "4.0.0-beta.5" - tslib "2.7.0" - ws "8.17.1" - ethers@6.13.5, ethers@^6.9.0: version "6.13.5" resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.5.tgz#8c1d6ac988ac08abc3c1d8fabbd4b8b602851ac4" @@ -14440,7 +14391,7 @@ vfile@^6.0.0: "@types/unist" "^3.0.0" vfile-message "^4.0.0" -viem@^2.21.45, viem@^2.22.8: +viem@^2.22.8: version "2.22.9" resolved "https://registry.yarnpkg.com/viem/-/viem-2.22.9.tgz#14ddb7f1ccf900784e347e1aa157e8e58043b0c2" integrity sha512-2yy46qYhcdo8GZggQ3Zoq9QCahI0goddzpVI/vSnTpcClQBSDxYRCuAqRzzLqjvJ7hS0UYgplC7eRkM2sYgflw== From 5ad946f35f264a83e00de324994415a411b1d658 Mon Sep 17 00:00:00 2001 From: saraantole Date: Tue, 28 Jan 2025 12:56:49 +0100 Subject: [PATCH 2/6] fix: import new types from sdk package instead of locally --- .../thorest/src/thor/accounts/ExecuteCodesRequest.ts | 3 +-- .../thorest/src/thor/blocks/RegularBlockResponse..ts | 3 +-- .../src/thor/debug/PostDebugTracerCallRequest.ts | 2 +- packages/thorest/src/thor/debug/StorageRangeOption.ts | 3 +-- packages/thorest/src/thor/explorer/index.ts | 4 +--- packages/thorest/src/thor/logs/FilterOptions.ts | 2 +- packages/thorest/src/thor/logs/FilterRange.ts | 2 +- packages/thorest/src/thor/logs/LogMeta.ts | 3 +-- packages/thorest/src/thor/node/PeerStat.ts | 4 +--- .../thor/subscriptions/SubscriptionBeat2Response.ts | 3 +-- .../thor/subscriptions/SubscriptionBlockResponse.ts | 11 +++++++++-- .../thorest/src/thor/transactions/GetTxResponse.ts | 6 +----- packages/thorest/src/thor/transactions/ReceiptMeta.ts | 4 +--- .../thor/transactions/RetrieveRawTransactionByID.ts | 4 +--- .../src/thor/transactions/RetrieveTransactionByID.ts | 4 +--- .../thor/transactions/RetrieveTransactionReceipt.ts | 5 +---- packages/thorest/src/thor/transactions/TxMeta.ts | 4 +--- 17 files changed, 25 insertions(+), 42 deletions(-) diff --git a/packages/thorest/src/thor/accounts/ExecuteCodesRequest.ts b/packages/thorest/src/thor/accounts/ExecuteCodesRequest.ts index 0ea2860d3..bd1feecfd 100644 --- a/packages/thorest/src/thor/accounts/ExecuteCodesRequest.ts +++ b/packages/thorest/src/thor/accounts/ExecuteCodesRequest.ts @@ -1,6 +1,5 @@ import { Clause, type ClauseJSON } from '../transactions'; -import { UInt } from '../../../../core/src'; -import { Address, BlockRef, Units, VTHO } from '@vechain/sdk-core'; +import { Address, BlockRef, UInt, Units, VTHO } from '@vechain/sdk-core'; class ExecuteCodesRequest { readonly provedWork?: string; diff --git a/packages/thorest/src/thor/blocks/RegularBlockResponse..ts b/packages/thorest/src/thor/blocks/RegularBlockResponse..ts index cfab6b47d..af389dd2f 100644 --- a/packages/thorest/src/thor/blocks/RegularBlockResponse..ts +++ b/packages/thorest/src/thor/blocks/RegularBlockResponse..ts @@ -1,5 +1,4 @@ -import { Address, ThorId, Units, VTHO } from '@vechain/sdk-core'; -import { UInt } from '../../../../core/src'; +import { Address, ThorId, UInt, Units, VTHO } from '@vechain/sdk-core'; class RegularBlockResponse { readonly number: UInt; diff --git a/packages/thorest/src/thor/debug/PostDebugTracerCallRequest.ts b/packages/thorest/src/thor/debug/PostDebugTracerCallRequest.ts index 70663df62..63aa53339 100644 --- a/packages/thorest/src/thor/debug/PostDebugTracerCallRequest.ts +++ b/packages/thorest/src/thor/debug/PostDebugTracerCallRequest.ts @@ -3,11 +3,11 @@ import { Address, type BlockRef, HexUInt, + UInt, Units, VET, VTHO } from '@vechain/sdk-core'; -import { UInt } from '../../../../core/src'; class PostDebugTracerCallRequest { readonly name?: TracerName; diff --git a/packages/thorest/src/thor/debug/StorageRangeOption.ts b/packages/thorest/src/thor/debug/StorageRangeOption.ts index e521daedf..7189bc1a0 100644 --- a/packages/thorest/src/thor/debug/StorageRangeOption.ts +++ b/packages/thorest/src/thor/debug/StorageRangeOption.ts @@ -1,5 +1,4 @@ -import { Address, ThorId } from '@vechain/sdk-core'; -import { UInt } from '../../../../core/src'; +import { Address, ThorId, UInt } from '@vechain/sdk-core'; class StorageRangeOption { readonly address: Address; diff --git a/packages/thorest/src/thor/explorer/index.ts b/packages/thorest/src/thor/explorer/index.ts index 21fb5819e..7e3c0ba10 100644 --- a/packages/thorest/src/thor/explorer/index.ts +++ b/packages/thorest/src/thor/explorer/index.ts @@ -1,11 +1,9 @@ import { FetchHttpClient } from '../../http'; import { ThorNetworks } from '../ThorNetworks'; import { RetrieveBlock, RetrieveBlockPath } from '../blocks'; -import { Revision } from '@vechain/sdk-core'; +import { Revision, TxId } from '@vechain/sdk-core'; import { RetrieveTransactionByID } from '../transactions'; -import { TxId } from '../../../../core/src/vcdm/BlockId'; - async function getBestBlockNumber( httpClient: FetchHttpClient ): Promise { diff --git a/packages/thorest/src/thor/logs/FilterOptions.ts b/packages/thorest/src/thor/logs/FilterOptions.ts index 54c212af6..60e5fbb5f 100644 --- a/packages/thorest/src/thor/logs/FilterOptions.ts +++ b/packages/thorest/src/thor/logs/FilterOptions.ts @@ -1,4 +1,4 @@ -import { UInt } from '../../../../core/src'; +import { UInt } from '@vechain/sdk-core'; class FilterOptions { readonly limit?: UInt; diff --git a/packages/thorest/src/thor/logs/FilterRange.ts b/packages/thorest/src/thor/logs/FilterRange.ts index 658df799e..af8d06a58 100644 --- a/packages/thorest/src/thor/logs/FilterRange.ts +++ b/packages/thorest/src/thor/logs/FilterRange.ts @@ -1,4 +1,4 @@ -import { UInt } from '../../../../core/src'; +import { UInt } from '@vechain/sdk-core'; class FilterRange { readonly unit?: FilterRangeUnits; diff --git a/packages/thorest/src/thor/logs/LogMeta.ts b/packages/thorest/src/thor/logs/LogMeta.ts index 7a2b3b61b..85974231e 100644 --- a/packages/thorest/src/thor/logs/LogMeta.ts +++ b/packages/thorest/src/thor/logs/LogMeta.ts @@ -1,5 +1,4 @@ -import { Address, BlockId } from '@vechain/sdk-core'; -import { TxId, UInt } from '../../../../core/src/vcdm'; +import { Address, BlockId, TxId, UInt } from '@vechain/sdk-core'; class LogMeta { readonly blockID: BlockId; diff --git a/packages/thorest/src/thor/node/PeerStat.ts b/packages/thorest/src/thor/node/PeerStat.ts index 35e187716..c51091913 100644 --- a/packages/thorest/src/thor/node/PeerStat.ts +++ b/packages/thorest/src/thor/node/PeerStat.ts @@ -1,6 +1,4 @@ -import { BlockId } from '@vechain/sdk-core'; - -import { UInt } from '../../../../core/src/vcdm/UInt'; +import { BlockId, UInt } from '@vechain/sdk-core'; class PeerStat { readonly name: string; diff --git a/packages/thorest/src/thor/subscriptions/SubscriptionBeat2Response.ts b/packages/thorest/src/thor/subscriptions/SubscriptionBeat2Response.ts index 417551247..7b36126cf 100644 --- a/packages/thorest/src/thor/subscriptions/SubscriptionBeat2Response.ts +++ b/packages/thorest/src/thor/subscriptions/SubscriptionBeat2Response.ts @@ -1,5 +1,4 @@ -import { BlockId, HexUInt, Units, VTHO } from '@vechain/sdk-core'; -import { UInt } from '../../../../core'; +import { BlockId, HexUInt, UInt, Units, VTHO } from '@vechain/sdk-core'; class SubscriptionBeat2Response { readonly gasLimit: VTHO; diff --git a/packages/thorest/src/thor/subscriptions/SubscriptionBlockResponse.ts b/packages/thorest/src/thor/subscriptions/SubscriptionBlockResponse.ts index a72bf3278..72d0684cc 100644 --- a/packages/thorest/src/thor/subscriptions/SubscriptionBlockResponse.ts +++ b/packages/thorest/src/thor/subscriptions/SubscriptionBlockResponse.ts @@ -1,5 +1,12 @@ -import { UInt, type TxId } from '../../../../core'; -import { Address, BlockId, ThorId, Units, VTHO } from '@vechain/sdk-core'; +import { + Address, + BlockId, + ThorId, + type TxId, + UInt, + Units, + VTHO +} from '@vechain/sdk-core'; class SubscriptionBlockResponse { readonly number: UInt; diff --git a/packages/thorest/src/thor/transactions/GetTxResponse.ts b/packages/thorest/src/thor/transactions/GetTxResponse.ts index 6c2c0d41e..7454d48df 100644 --- a/packages/thorest/src/thor/transactions/GetTxResponse.ts +++ b/packages/thorest/src/thor/transactions/GetTxResponse.ts @@ -1,10 +1,6 @@ import { Clause, type ClauseJSON } from './Clause'; import { TxMeta, type TxMetaJSON } from './TxMeta'; -import { Address, BlockId, VTHO } from '@vechain/sdk-core'; -import { UInt } from '../../../../core/src'; - -import { Nonce } from '../../../../core/src/vcdm/Nonce'; -import { TxId } from '../../../../core/src/vcdm/BlockId'; +import { Address, BlockId, Nonce, TxId, UInt, VTHO } from '@vechain/sdk-core'; class GetTxResponse { readonly id: TxId; diff --git a/packages/thorest/src/thor/transactions/ReceiptMeta.ts b/packages/thorest/src/thor/transactions/ReceiptMeta.ts index 47216cf0d..806834f15 100644 --- a/packages/thorest/src/thor/transactions/ReceiptMeta.ts +++ b/packages/thorest/src/thor/transactions/ReceiptMeta.ts @@ -1,7 +1,5 @@ import { TxMeta, type TxMetaJSON } from './TxMeta'; -import { Address } from '@vechain/sdk-core'; - -import { TxId } from '../../../../core/src/vcdm/BlockId'; +import { Address, TxId } from '@vechain/sdk-core'; class ReceiptMeta extends TxMeta { readonly txID: TxId; diff --git a/packages/thorest/src/thor/transactions/RetrieveRawTransactionByID.ts b/packages/thorest/src/thor/transactions/RetrieveRawTransactionByID.ts index 308098d0a..519e52ae2 100644 --- a/packages/thorest/src/thor/transactions/RetrieveRawTransactionByID.ts +++ b/packages/thorest/src/thor/transactions/RetrieveRawTransactionByID.ts @@ -6,13 +6,11 @@ import { GetRawTxResponse, type GetRawTxResponseJSON } from './GetRawTxResponse'; -import { type BlockId } from '@vechain/sdk-core'; +import { type TxId, type BlockId } from '@vechain/sdk-core'; import { type HttpClient } from '../../http'; import { type ThorRequest } from '../ThorRequest'; import { type ThorResponse } from '../ThorResponse'; -import { type TxId } from '../../../../core/src/vcdm/BlockId'; - class RetrieveRawTransactionByID implements ThorRequest { diff --git a/packages/thorest/src/thor/transactions/RetrieveTransactionByID.ts b/packages/thorest/src/thor/transactions/RetrieveTransactionByID.ts index 1ae1abc32..1f8c03b17 100644 --- a/packages/thorest/src/thor/transactions/RetrieveTransactionByID.ts +++ b/packages/thorest/src/thor/transactions/RetrieveTransactionByID.ts @@ -1,11 +1,9 @@ -import { type BlockId } from '@vechain/sdk-core'; +import { type TxId, type BlockId } from '@vechain/sdk-core'; import { type HttpClient, type HttpPath, type HttpQuery } from '../../http'; import { GetTxResponse, type GetTxResponseJSON } from './GetTxResponse'; import { type ThorRequest } from '../ThorRequest'; import { type ThorResponse } from '../ThorResponse'; -import { type TxId } from '../../../../core/src/vcdm/BlockId'; - class RetrieveTransactionByID implements ThorRequest { diff --git a/packages/thorest/src/thor/transactions/RetrieveTransactionReceipt.ts b/packages/thorest/src/thor/transactions/RetrieveTransactionReceipt.ts index a89792b66..cad60133a 100644 --- a/packages/thorest/src/thor/transactions/RetrieveTransactionReceipt.ts +++ b/packages/thorest/src/thor/transactions/RetrieveTransactionReceipt.ts @@ -1,4 +1,4 @@ -import { type BlockId } from '@vechain/sdk-core'; +import { type TxId, type BlockId } from '@vechain/sdk-core'; import { type HttpClient, type HttpPath, type HttpQuery } from '../../http'; import { GetTxReceiptResponse, @@ -6,9 +6,6 @@ import { } from './GetTxReceiptResponse'; import { type ThorRequest } from '../ThorRequest'; import { type ThorResponse } from '../ThorResponse'; - -import { type TxId } from '../../../../core/src/vcdm/BlockId'; - class RetrieveTransactionReceipt implements ThorRequest { diff --git a/packages/thorest/src/thor/transactions/TxMeta.ts b/packages/thorest/src/thor/transactions/TxMeta.ts index 589a4ec75..749acda41 100644 --- a/packages/thorest/src/thor/transactions/TxMeta.ts +++ b/packages/thorest/src/thor/transactions/TxMeta.ts @@ -1,6 +1,4 @@ -import { BlockId } from '@vechain/sdk-core'; - -import { UInt } from '../../../../core/src/vcdm/UInt'; +import { BlockId, UInt } from '@vechain/sdk-core'; class TxMeta { readonly blockID: BlockId; From 06fa4a7ad23dd68a36171cc934e0f7b4dbed08a8 Mon Sep 17 00:00:00 2001 From: saraantole Date: Tue, 28 Jan 2025 13:55:52 +0100 Subject: [PATCH 3/6] fix: update thorest package version --- packages/thorest/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/thorest/package.json b/packages/thorest/package.json index c6c4042a2..5812d372c 100644 --- a/packages/thorest/package.json +++ b/packages/thorest/package.json @@ -1,6 +1,6 @@ { "name": "@vechain/sdk-thorest-api", - "version": "1.0.0-rc.6", + "version": "2.0.0-beta.1", "description": "This module connects decentralized applications (dApps) with the Thorest API.", "author": "VeChain Foundation", "license": "MIT", From dc2e895d18e8c4349c8d658d46d465fadbed6c4b Mon Sep 17 00:00:00 2001 From: saraantole Date: Tue, 28 Jan 2025 16:18:29 +0100 Subject: [PATCH 4/6] fix: fix test command --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf1590d4e..8ad9dd682 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "test:integration:solo": "(yarn start-thor-solo && yarn test:integration && yarn stop-thor-solo) || yarn stop-thor-solo", "test:examples": "turbo test:examples", "test:examples:solo": "(yarn start-thor-solo && yarn test:examples && yarn stop-thor-solo) || yarn stop-thor-solo", - "test": "turbo test --force --filter='packages/core' --filter='packages/thorest' && yarn merge-coverage", + "test": "turbo test --force --filter='@vechain/sdk-core' --filter='@vechain/sdk-thorest-api' && yarn merge-coverage", "test:browser": "turbo test:browser --force && yarn merge-coverage", "test:solo": "(yarn start-thor-solo && yarn test && yarn stop-thor-solo) || yarn stop-thor-solo", "test:browser:solo": "(yarn start-thor-solo && yarn test:browser && yarn stop-thor-solo) || yarn stop-thor-solo", @@ -92,4 +92,4 @@ "cross-spawn": "^7.0.5" }, "version": "1.22.22" -} +} \ No newline at end of file From 931e0f1271ddafee92589ce7aed07ebaf984f986 Mon Sep 17 00:00:00 2001 From: saraantole Date: Wed, 29 Jan 2025 11:34:59 +0100 Subject: [PATCH 5/6] fix: upgrade undici nested dependency --- package.json | 3 ++- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8ad9dd682..16ba570c1 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,8 @@ "hardhat": "^2.22.15" }, "resolutions": { - "cross-spawn": "^7.0.5" + "cross-spawn": "^7.0.5", + "undici": "^5.28.5" }, "version": "1.22.22" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 87d345936..008bf1a3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14192,10 +14192,10 @@ undici-types@~6.19.2: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== -undici@^5.14.0, undici@^5.28.4: - version "5.28.4" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068" - integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== +undici@^5.14.0, undici@^5.28.4, undici@^5.28.5: + version "5.28.5" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.5.tgz#b2b94b6bf8f1d919bc5a6f31f2c01deb02e54d4b" + integrity sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA== dependencies: "@fastify/busboy" "^2.0.0" From 2be417c77ea0707dfb9dc395160f3077dde81d3c Mon Sep 17 00:00:00 2001 From: saraantole Date: Wed, 29 Jan 2025 12:09:35 +0100 Subject: [PATCH 6/6] fix: fix import - first try --- .../tests/thor/transactions/SendTransaction.solo.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/thorest/tests/thor/transactions/SendTransaction.solo.test.ts b/packages/thorest/tests/thor/transactions/SendTransaction.solo.test.ts index da12b7efa..e5a60312f 100644 --- a/packages/thorest/tests/thor/transactions/SendTransaction.solo.test.ts +++ b/packages/thorest/tests/thor/transactions/SendTransaction.solo.test.ts @@ -1,6 +1,6 @@ import { describe, test } from '@jest/globals'; -import { THOR_SOLO_URL, ThorClient } from '../../../../network/'; +import { THOR_SOLO_URL, ThorClient } from '../../../../network/src'; import { transfer1VTHOClause, transferTransactionBody