From d83e2ebb1f05f13f0c633a73e0a34c3b83ce8b97 Mon Sep 17 00:00:00 2001 From: "Fifo (Fabricius Zatti)" <62725221+fazzatti@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:55:54 -0300 Subject: [PATCH] Fix: paths build issue (#38) * fix default account handler * add tslib * fix account handler types * fix account data viewer * fix asset * fix channel accounts handler * fix tx submitter * Tx processor and horizon * wrap up and test * feat: upload wasm hash * feat: deploy contract instance * feat: wrap sac and SAC handler * wrap up and testing * fix-build * fix: imports and add tsc-alias --- package-lock.json | 106 +++++++++++++++++- package.json | 3 +- src/index.ts | 2 +- .../account/account-handler/default/index.ts | 6 +- .../account/account-handler/default/types.ts | 5 +- .../account-handler/freighter/index.ts | 6 +- .../account-handler/freighter/types.ts | 4 +- .../account/account-handler/types.d.ts | 6 +- src/stellar-plus/account/base/index.ts | 4 +- src/stellar-plus/account/base/types.ts | 2 +- .../helpers/account-data-viewer/index.ts | 10 +- .../helpers/account-data-viewer/types.ts | 2 +- .../account/helpers/friendbot/index.ts | 6 +- .../account/helpers/friendbot/types.ts | 2 +- src/stellar-plus/account/helpers/index.ts | 10 +- src/stellar-plus/account/helpers/types.ts | 4 +- src/stellar-plus/account/index.ts | 6 +- src/stellar-plus/asset/classic/index.ts | 15 ++- src/stellar-plus/asset/classic/types.ts | 9 +- src/stellar-plus/asset/index.ts | 6 +- .../asset/stellar-asset-contract/index.ts | 17 +-- .../asset/stellar-asset-contract/types.ts | 8 +- src/stellar-plus/asset/types.ts | 4 +- src/stellar-plus/channel-accounts/index.ts | 13 +-- src/stellar-plus/constants.ts | 2 +- .../classic-transaction-processor/index.ts | 14 +-- .../core/contract-engine/index.ts | 8 +- .../core/contract-engine/types.ts | 5 +- src/stellar-plus/core/index.ts | 10 +- .../soroban-transaction-processor/index.ts | 18 +-- .../soroban-transaction-processor/types.ts | 5 +- .../channel-accounts-submitter/index.ts | 12 +- .../classic/default/index.ts | 10 +- .../transaction-submitter/classic/types.ts | 2 +- src/stellar-plus/core/types.d.ts | 2 +- src/stellar-plus/horizon/index.ts | 4 +- src/stellar-plus/index.ts | 20 ++-- src/stellar-plus/rpc/default-handler/index.ts | 4 +- src/stellar-plus/rpc/index.ts | 4 +- .../rpc/validation-cloud-handler/index.ts | 6 +- .../contracts/certificate-of-deposit/index.ts | 5 +- .../contracts/certificate-of-deposit/types.ts | 8 +- src/stellar-plus/soroban/index.ts | 4 +- tsconfig.json | 11 +- 44 files changed, 262 insertions(+), 148 deletions(-) diff --git a/package-lock.json b/package-lock.json index acb061a..8f91c54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "stellar-plus", - "version": "0.1.10", + "version": "0.3.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "stellar-plus", - "version": "0.1.10", + "version": "0.3.2", "license": "ISC", "dependencies": { "@stellar/freighter-api": "^1.7.1", @@ -30,6 +30,7 @@ "nodemon": "^3.0.1", "prettier": "^3.1.0", "ts-node": "^10.9.1", + "tsc-alias": "^1.8.8", "tsconfig-paths": "^4.2.0", "tslib": "^2.6.2", "typescript": "^5.3.2" @@ -1442,6 +1443,15 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3602,6 +3612,19 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/mylas": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz", + "integrity": "sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==", + "dev": true, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/raouldeheer" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4016,6 +4039,18 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/plimit-lit": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/plimit-lit/-/plimit-lit-1.6.1.tgz", + "integrity": "sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==", + "dev": true, + "dependencies": { + "queue-lit": "^1.5.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -4099,6 +4134,15 @@ "node": ">=6" } }, + "node_modules/queue-lit": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/queue-lit/-/queue-lit-1.5.2.tgz", + "integrity": "sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4999,6 +5043,23 @@ } } }, + "node_modules/tsc-alias": { + "version": "1.8.8", + "resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.8.tgz", + "integrity": "sha512-OYUOd2wl0H858NvABWr/BoSKNERw3N9GTi3rHPK8Iv4O1UyUXIrTTOAZNHsjlVpXFOhpJBVARI1s+rzwLivN3Q==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.3", + "commander": "^9.0.0", + "globby": "^11.0.4", + "mylas": "^2.1.9", + "normalize-path": "^3.0.0", + "plimit-lit": "^1.2.6" + }, + "bin": { + "tsc-alias": "dist/bin/index.js" + } + }, "node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -6313,6 +6374,12 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -7875,6 +7942,12 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "mylas": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz", + "integrity": "sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -8170,6 +8243,15 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "plimit-lit": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/plimit-lit/-/plimit-lit-1.6.1.tgz", + "integrity": "sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==", + "dev": true, + "requires": { + "queue-lit": "^1.5.1" + } + }, "pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -8234,6 +8316,12 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, + "queue-lit": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/queue-lit/-/queue-lit-1.5.2.tgz", + "integrity": "sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -8859,6 +8947,20 @@ "yn": "3.1.1" } }, + "tsc-alias": { + "version": "1.8.8", + "resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.8.tgz", + "integrity": "sha512-OYUOd2wl0H858NvABWr/BoSKNERw3N9GTi3rHPK8Iv4O1UyUXIrTTOAZNHsjlVpXFOhpJBVARI1s+rzwLivN3Q==", + "dev": true, + "requires": { + "chokidar": "^3.5.3", + "commander": "^9.0.0", + "globby": "^11.0.4", + "mylas": "^2.1.9", + "normalize-path": "^3.0.0", + "plimit-lit": "^1.2.6" + } + }, "tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", diff --git a/package.json b/package.json index 418658d..5dcbd20 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ ], "private": false, "scripts": { - "build": "tsc", + "build": "tsc && tsc-alias -p tsconfig.json", "dev": "nodemon -e ts,js --exec ts-node -r tsconfig-paths/register ./src/index-test.ts", "test": "echo \"No test specified yet\" && exit 0", "lint": "eslint --ext .js,.ts .", @@ -40,6 +40,7 @@ "nodemon": "^3.0.1", "prettier": "^3.1.0", "ts-node": "^10.9.1", + "tsc-alias": "^1.8.8", "tsconfig-paths": "^4.2.0", "tslib": "^2.6.2", "typescript": "^5.3.2" diff --git a/src/index.ts b/src/index.ts index 7f3f6fd..f120ddc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ -export * as StellarPlus from '@stellar-plus/index' +export * as StellarPlus from 'stellar-plus/index' export default module.exports diff --git a/src/stellar-plus/account/account-handler/default/index.ts b/src/stellar-plus/account/account-handler/default/index.ts index 9e3e5dc..b48220f 100644 --- a/src/stellar-plus/account/account-handler/default/index.ts +++ b/src/stellar-plus/account/account-handler/default/index.ts @@ -1,8 +1,8 @@ import { FeeBumpTransaction, Keypair, Transaction } from '@stellar/stellar-sdk' -import { DefaultAccountHandler, DefaultAccountHandlerPayload } from '@account/account-handler/default/types' -import { AccountBaseClient } from '@account/base' -import { TransactionXdr } from '@stellar-plus/types' +import { DefaultAccountHandler, DefaultAccountHandlerPayload } from 'stellar-plus/account/account-handler/default/types' +import { AccountBaseClient } from 'stellar-plus/account/base' +import { TransactionXdr } from 'stellar-plus/types' export class DefaultAccountHandlerClient extends AccountBaseClient implements DefaultAccountHandler { public secretKey: string diff --git a/src/stellar-plus/account/account-handler/default/types.ts b/src/stellar-plus/account/account-handler/default/types.ts index 1a53542..cb76f8e 100644 --- a/src/stellar-plus/account/account-handler/default/types.ts +++ b/src/stellar-plus/account/account-handler/default/types.ts @@ -1,7 +1,8 @@ import { Transaction } from '@stellar/stellar-sdk' -import { AccountHandler, AccountHandlerPayload } from '@account/account-handler/types' -import { TransactionXdr } from '@stellar-plus/types' +import { AccountHandler, AccountHandlerPayload } from 'stellar-plus/account/account-handler/types' +import { TransactionXdr } from 'stellar-plus/types' + export type DefaultAccountHandler = AccountHandler & { sign(tx: Transaction): TransactionXdr diff --git a/src/stellar-plus/account/account-handler/freighter/index.ts b/src/stellar-plus/account/account-handler/freighter/index.ts index 003bf61..8248da3 100644 --- a/src/stellar-plus/account/account-handler/freighter/index.ts +++ b/src/stellar-plus/account/account-handler/freighter/index.ts @@ -12,9 +12,9 @@ import { FreighterAccHandlerPayload, FreighterAccountHandler, FreighterCallback, -} from '@account/account-handler/freighter/types' -import { AccountBaseClient } from '@account/base' -import { Network } from '@stellar-plus/types' +} from 'stellar-plus/account/account-handler/freighter/types' +import { AccountBaseClient } from 'stellar-plus/account/base' +import { Network } from 'stellar-plus/types' export class FreighterAccountHandlerClient extends AccountBaseClient implements FreighterAccountHandler { private network: Network diff --git a/src/stellar-plus/account/account-handler/freighter/types.ts b/src/stellar-plus/account/account-handler/freighter/types.ts index c509857..1225cd6 100644 --- a/src/stellar-plus/account/account-handler/freighter/types.ts +++ b/src/stellar-plus/account/account-handler/freighter/types.ts @@ -1,5 +1,5 @@ -import { AccountHandler, AccountHandlerPayload } from '@account/account-handler/types' -import { Network } from '@stellar-plus/types' +import { AccountHandler, AccountHandlerPayload } from 'stellar-plus/account/account-handler/types' +import { Network } from 'stellar-plus/types' export type FreighterAccountHandler = AccountHandler & { connect(onPublicKeyReceived: FreighterCallback): Promise diff --git a/src/stellar-plus/account/account-handler/types.d.ts b/src/stellar-plus/account/account-handler/types.d.ts index e0952ea..e4dedb9 100644 --- a/src/stellar-plus/account/account-handler/types.d.ts +++ b/src/stellar-plus/account/account-handler/types.d.ts @@ -1,8 +1,8 @@ import { FeeBumpTransaction, Transaction } from '@stellar/stellar-sdk' -import { AccountBase } from '@account/base/types' -import { AccountHelpersPayload } from '@account/helpers/types' -import { TransactionXdr } from '@stellar-plus/types' +import { AccountBase } from 'stellar-plus/account/base/types' +import { AccountHelpersPayload } from 'stellar-plus/account/helpers/types' +import { TransactionXdr } from 'stellar-plus/types' export type AccountHandler = AccountBase & { sign(tx: Transaction | FeeBumpTransaction): Promise | TransactionXdr diff --git a/src/stellar-plus/account/base/index.ts b/src/stellar-plus/account/base/index.ts index 18242d2..c8f5764 100644 --- a/src/stellar-plus/account/base/index.ts +++ b/src/stellar-plus/account/base/index.ts @@ -1,5 +1,5 @@ -import { AccountBase, AccountBasePayload } from '@account/base/types' -import { AccountHelpers } from '@account/helpers' +import { AccountBase, AccountBasePayload } from 'stellar-plus/account/base/types' +import { AccountHelpers } from 'stellar-plus/account/helpers' export class AccountBaseClient extends AccountHelpers implements AccountBase { publicKey: string diff --git a/src/stellar-plus/account/base/types.ts b/src/stellar-plus/account/base/types.ts index 9e1e9de..209a347 100644 --- a/src/stellar-plus/account/base/types.ts +++ b/src/stellar-plus/account/base/types.ts @@ -1,4 +1,4 @@ -import { AccountHelpers, AccountHelpersPayload } from '@account/helpers/types' +import { AccountHelpers, AccountHelpersPayload } from 'stellar-plus/account/helpers/types' export type AccountBase = AccountHelpers & { publicKey?: string diff --git a/src/stellar-plus/account/helpers/account-data-viewer/index.ts b/src/stellar-plus/account/helpers/account-data-viewer/index.ts index 774c0d5..aac248d 100644 --- a/src/stellar-plus/account/helpers/account-data-viewer/index.ts +++ b/src/stellar-plus/account/helpers/account-data-viewer/index.ts @@ -1,10 +1,10 @@ import { Horizon } from '@stellar/stellar-sdk' -import { AccountHelpers } from '@account/helpers' -import { AccountDataViewer } from '@account/helpers/account-data-viewer/types' -import { HorizonHandlerClient } from '@horizon/index' -import { HorizonHandler } from '@horizon/types' -import { Network } from '@stellar-plus/types' +import { AccountHelpers } from 'stellar-plus/account/helpers' +import { AccountDataViewer } from 'stellar-plus/account/helpers/account-data-viewer/types' +import { HorizonHandlerClient } from 'stellar-plus/horizon/index' +import { HorizonHandler } from 'stellar-plus/horizon/types' +import { Network } from 'stellar-plus/types' export class AccountDataViewerClient implements AccountDataViewer { private network: Network diff --git a/src/stellar-plus/account/helpers/account-data-viewer/types.ts b/src/stellar-plus/account/helpers/account-data-viewer/types.ts index b3856b8..453b8c9 100644 --- a/src/stellar-plus/account/helpers/account-data-viewer/types.ts +++ b/src/stellar-plus/account/helpers/account-data-viewer/types.ts @@ -1,6 +1,6 @@ import { Horizon } from '@stellar/stellar-sdk' -import { Network } from '@stellar-plus/types' +import { Network } from 'stellar-plus/types' // // Allows for account data to be fetched from the network diff --git a/src/stellar-plus/account/helpers/friendbot/index.ts b/src/stellar-plus/account/helpers/friendbot/index.ts index ab965ba..f4afcdc 100644 --- a/src/stellar-plus/account/helpers/friendbot/index.ts +++ b/src/stellar-plus/account/helpers/friendbot/index.ts @@ -1,8 +1,8 @@ import axios from 'axios' -import { AccountHelpers } from '@account/helpers' -import { Friendbot } from '@account/helpers/friendbot/types' -import { Network, NetworksList } from '@stellar-plus/types' +import { AccountHelpers } from 'stellar-plus/account/helpers' +import { Friendbot } from 'stellar-plus/account/helpers/friendbot/types' +import { Network, NetworksList } from 'stellar-plus/types' export class FriendbotClient implements Friendbot { private network: Network diff --git a/src/stellar-plus/account/helpers/friendbot/types.ts b/src/stellar-plus/account/helpers/friendbot/types.ts index f05afef..f08e25c 100644 --- a/src/stellar-plus/account/helpers/friendbot/types.ts +++ b/src/stellar-plus/account/helpers/friendbot/types.ts @@ -1,4 +1,4 @@ -import { Network } from '@stellar-plus/types' +import { Network } from 'stellar-plus/types' // // Allows for accounts to be initialized with Friendbot diff --git a/src/stellar-plus/account/helpers/index.ts b/src/stellar-plus/account/helpers/index.ts index e6869e5..e5e991b 100644 --- a/src/stellar-plus/account/helpers/index.ts +++ b/src/stellar-plus/account/helpers/index.ts @@ -1,8 +1,8 @@ -import { AccountDataViewerClient } from '@account/helpers/account-data-viewer' -import { AccountDataViewer } from '@account/helpers/account-data-viewer/types' -import { FriendbotClient } from '@account/helpers/friendbot' -import { Friendbot } from '@account/helpers/friendbot/types' -import { AccountHelpersPayload, AccountHelpers as AccountHelpersType } from '@account/helpers/types' +import { AccountDataViewerClient } from 'stellar-plus/account/helpers/account-data-viewer' +import { AccountDataViewer } from 'stellar-plus/account/helpers/account-data-viewer/types' +import { FriendbotClient } from 'stellar-plus/account/helpers/friendbot' +import { Friendbot } from 'stellar-plus/account/helpers/friendbot/types' +import { AccountHelpersPayload, AccountHelpers as AccountHelpersType } from 'stellar-plus/account/helpers/types' export class AccountHelpers implements AccountHelpersType { public accountDataViewer?: AccountDataViewer diff --git a/src/stellar-plus/account/helpers/types.ts b/src/stellar-plus/account/helpers/types.ts index 8f70eef..50734d8 100644 --- a/src/stellar-plus/account/helpers/types.ts +++ b/src/stellar-plus/account/helpers/types.ts @@ -1,5 +1,5 @@ -import { AccountDataViewer, AccountDataViewerConstructor } from '@account/helpers/account-data-viewer/types' -import { Friendbot } from '@account/helpers/friendbot/types' +import { AccountDataViewer, AccountDataViewerConstructor } from 'stellar-plus/account/helpers/account-data-viewer/types' +import { Friendbot } from 'stellar-plus/account/helpers/friendbot/types' export type AccountHelpersPayload = AccountDataViewerConstructor export type AccountHelpers = { diff --git a/src/stellar-plus/account/index.ts b/src/stellar-plus/account/index.ts index 3f81a40..8330add 100644 --- a/src/stellar-plus/account/index.ts +++ b/src/stellar-plus/account/index.ts @@ -1,6 +1,6 @@ -import { DefaultAccountHandlerClient as DefaultAccountHandler } from '@account/account-handler/default' -import { FreighterAccountHandlerClient as FreighterAccountHandler } from '@account/account-handler/freighter' -import { AccountBaseClient as Base } from '@account/base' +import { DefaultAccountHandlerClient as DefaultAccountHandler } from 'stellar-plus/account/account-handler/default' +import { FreighterAccountHandlerClient as FreighterAccountHandler } from 'stellar-plus/account/account-handler/freighter' +import { AccountBaseClient as Base } from 'stellar-plus/account/base' // // Export Classes diff --git a/src/stellar-plus/asset/classic/index.ts b/src/stellar-plus/asset/classic/index.ts index 9c97d3f..f6fcf03 100644 --- a/src/stellar-plus/asset/classic/index.ts +++ b/src/stellar-plus/asset/classic/index.ts @@ -1,11 +1,14 @@ import { Horizon as HorizonNamespace, Operation, Asset as StellarAsset } from '@stellar/stellar-sdk' -import { AccountHandler } from '@account/account-handler/types' -import { ClassicAssetHandlerConstructorArgs, ClassicAssetHandler as IClassicAssetHandler } from '@asset/classic/types' -import { AssetTypes } from '@asset/types' -import { TransactionProcessor } from '@core/classic-transaction-processor' -import { TransactionInvocation } from '@core/types' -import { i128 } from '@stellar-plus/types' +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { + ClassicAssetHandlerConstructorArgs, + ClassicAssetHandler as IClassicAssetHandler, +} from 'stellar-plus/asset/classic/types' +import { AssetTypes } from 'stellar-plus/asset/types' +import { TransactionProcessor } from 'stellar-plus/core/classic-transaction-processor' +import { TransactionInvocation } from 'stellar-plus/core/types' +import { i128 } from 'stellar-plus/types' export class ClassicAssetHandler extends TransactionProcessor implements IClassicAssetHandler { public code: string diff --git a/src/stellar-plus/asset/classic/types.ts b/src/stellar-plus/asset/classic/types.ts index 87f50fc..ba19beb 100644 --- a/src/stellar-plus/asset/classic/types.ts +++ b/src/stellar-plus/asset/classic/types.ts @@ -1,7 +1,8 @@ -import { AccountHandler } from '@account/account-handler/types' -import { AssetTypes, TokenInterface } from '@asset/types' -import { TransactionSubmitter } from '@core/transaction-submitter/classic/types' -import { Network } from '@stellar-plus/types' + +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { AssetTypes, TokenInterface } from 'stellar-plus/asset/types' +import { TransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/types' +import { Network } from 'stellar-plus/types' export type ClassicAsset = { code: string diff --git a/src/stellar-plus/asset/index.ts b/src/stellar-plus/asset/index.ts index bac84d6..62951b2 100644 --- a/src/stellar-plus/asset/index.ts +++ b/src/stellar-plus/asset/index.ts @@ -1,2 +1,4 @@ -export { ClassicAssetHandler } from '@asset/classic/index' -export { SACHandler } from '@asset/stellar-asset-contract/index' + +export { ClassicAssetHandler } from 'stellar-plus/asset/classic/index' +export { SACHandler } from 'stellar-plus/asset/stellar-asset-contract/index' + diff --git a/src/stellar-plus/asset/stellar-asset-contract/index.ts b/src/stellar-plus/asset/stellar-asset-contract/index.ts index 507da38..6836afe 100644 --- a/src/stellar-plus/asset/stellar-asset-contract/index.ts +++ b/src/stellar-plus/asset/stellar-asset-contract/index.ts @@ -1,13 +1,14 @@ import { Horizon as HorizonNamespace, Asset as StellarAsset } from '@stellar/stellar-sdk' -import { AccountHandler } from '@account/account-handler/types' -import { ClassicAssetHandler } from '@asset/classic' -import { ClassicAssetHandlerConstructorArgs } from '@asset/classic/types' -import { SACConstructorArgs, SACHandler as SACHandlerType } from '@asset/stellar-asset-contract/types' -import { AssetTypes } from '@asset/types' -import { SorobanTransactionProcessor } from '@core/soroban-transaction-processor' -import { TransactionInvocation } from '@core/types' -import { i128 } from '@stellar-plus/types' +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { ClassicAssetHandler } from 'stellar-plus/asset/classic' +import { ClassicAssetHandlerConstructorArgs } from 'stellar-plus/asset/classic/types' +import { SACConstructorArgs, SACHandler as SACHandlerType } from 'stellar-plus/asset/stellar-asset-contract/types' +import { AssetTypes } from 'stellar-plus/asset/types' +import { SorobanTransactionProcessor } from 'stellar-plus/core/soroban-transaction-processor' +import { TransactionInvocation } from 'stellar-plus/core/types' +import { i128 } from 'stellar-plus/types' + export class SACHandler extends SorobanTransactionProcessor implements SACHandlerType { public code: string diff --git a/src/stellar-plus/asset/stellar-asset-contract/types.ts b/src/stellar-plus/asset/stellar-asset-contract/types.ts index b286d32..18d295a 100644 --- a/src/stellar-plus/asset/stellar-asset-contract/types.ts +++ b/src/stellar-plus/asset/stellar-asset-contract/types.ts @@ -1,6 +1,8 @@ -import { ClassicAssetHandler, ClassicAssetHandlerConstructorArgs } from '@asset/classic/types' -import { TokenInterface } from '@asset/types' -import { RpcHandler } from '@rpc/types' + +import { ClassicAssetHandler, ClassicAssetHandlerConstructorArgs } from 'stellar-plus/asset/classic/types' +import { TokenInterface } from 'stellar-plus/asset/types' +import { RpcHandler } from 'stellar-plus/rpc/types' + export type SACHandler = TokenInterface & { classicHandler: ClassicAssetHandler diff --git a/src/stellar-plus/asset/types.ts b/src/stellar-plus/asset/types.ts index a1665f8..6e63f9f 100644 --- a/src/stellar-plus/asset/types.ts +++ b/src/stellar-plus/asset/types.ts @@ -1,7 +1,7 @@ import { Horizon as HorizonNamespace } from '@stellar/stellar-sdk' -import { TransactionInvocation } from '@core/types' -import { Address, i128, u32 } from '@stellar-plus/types' +import { TransactionInvocation } from 'stellar-plus/core/types' +import { Address, i128, u32 } from 'stellar-plus/types' export type TokenInterface = TokenInterfaceManagement & TokenInterfaceUser diff --git a/src/stellar-plus/channel-accounts/index.ts b/src/stellar-plus/channel-accounts/index.ts index 6b90dc3..31014a2 100644 --- a/src/stellar-plus/channel-accounts/index.ts +++ b/src/stellar-plus/channel-accounts/index.ts @@ -1,10 +1,10 @@ import { xdr as ClassicXdrNamespace, Operation } from '@stellar/stellar-sdk' -import { DefaultAccountHandlerClient as DefaultAccountHandler } from '@account/account-handler/default' -import { AccountHandler } from '@account/account-handler/types' -import { TransactionProcessor } from '@core/classic-transaction-processor' -import { TransactionInvocation } from '@core/types' -import { Network } from '@stellar-plus/types' +import { DefaultAccountHandlerClient as DefaultAccountHandler } from 'stellar-plus/account/account-handler/default' +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { TransactionProcessor } from 'stellar-plus/core/classic-transaction-processor' +import { TransactionInvocation } from 'stellar-plus/core/types' +import { Network } from 'stellar-plus/types' export class ChannelAccounts { /** @@ -38,7 +38,7 @@ export class ChannelAccounts { const channel = new DefaultAccountHandler({ network }) channels.push(channel) - operations.push( + operations.push( Operation.beginSponsoringFutureReserves({ sponsoredId: channel.publicKey, }), @@ -67,7 +67,6 @@ export class ChannelAccounts { // console.log("TxInvocation: ", updatedTxInvocation); await txProcessor.processTransaction(builtTx, updatedTxInvocation.signers) - return channels } diff --git a/src/stellar-plus/constants.ts b/src/stellar-plus/constants.ts index 11af47f..f6314bf 100644 --- a/src/stellar-plus/constants.ts +++ b/src/stellar-plus/constants.ts @@ -1,4 +1,4 @@ -import { Network, NetworksList } from '@stellar-plus/types' +import { Network, NetworksList } from 'stellar-plus/types' const networksConfig: { [key: string]: Network } = { futurenet: { diff --git a/src/stellar-plus/core/classic-transaction-processor/index.ts b/src/stellar-plus/core/classic-transaction-processor/index.ts index b1e39ac..35328fb 100644 --- a/src/stellar-plus/core/classic-transaction-processor/index.ts +++ b/src/stellar-plus/core/classic-transaction-processor/index.ts @@ -6,13 +6,13 @@ import { xdr as xdrNamespace, } from '@stellar/stellar-sdk' -import { AccountHandler } from '@account/account-handler/types' -import { DefaultTransactionSubmitter } from '@core/transaction-submitter/classic/default' -import { TransactionSubmitter } from '@core/transaction-submitter/classic/types' -import { FeeBumpHeader, TransactionInvocation } from '@core/types' -import { HorizonHandlerClient } from '@horizon/index' -import { HorizonHandler } from '@horizon/types' -import { Network, TransactionXdr } from '@stellar-plus/types' +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { DefaultTransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/default' +import { TransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/types' +import { FeeBumpHeader, TransactionInvocation } from 'stellar-plus/core/types' +import { HorizonHandlerClient } from 'stellar-plus/horizon/index' +import { HorizonHandler } from 'stellar-plus/horizon/types' +import { Network, TransactionXdr } from 'stellar-plus/types' export class TransactionProcessor { protected horizonHandler: HorizonHandler diff --git a/src/stellar-plus/core/contract-engine/index.ts b/src/stellar-plus/core/contract-engine/index.ts index 4aed13e..057327e 100644 --- a/src/stellar-plus/core/contract-engine/index.ts +++ b/src/stellar-plus/core/contract-engine/index.ts @@ -1,10 +1,10 @@ import { ContractSpec, SorobanRpc as SorobanRpcNamespace, Transaction } from '@stellar/stellar-sdk' -import { SorobanTransactionProcessor } from '@core/soroban-transaction-processor' -import { SorobanInvokeArgs, SorobanSimulateArgs } from '@core/soroban-transaction-processor/types' -import { TransactionInvocation } from '@core/types' +import { ContractEngineConstructorArgs } from 'stellar-plus/core/contract-engine/types' +import { SorobanTransactionProcessor } from 'stellar-plus/core/soroban-transaction-processor' +import { SorobanInvokeArgs, SorobanSimulateArgs } from 'stellar-plus/core/soroban-transaction-processor/types' +import { TransactionInvocation } from 'stellar-plus/core/types' -import { ContractEngineConstructorArgs } from './types' export class ContractEngine extends SorobanTransactionProcessor { private spec: ContractSpec diff --git a/src/stellar-plus/core/contract-engine/types.ts b/src/stellar-plus/core/contract-engine/types.ts index 6aa81df..78d5b01 100644 --- a/src/stellar-plus/core/contract-engine/types.ts +++ b/src/stellar-plus/core/contract-engine/types.ts @@ -1,7 +1,8 @@ import { ContractSpec } from '@stellar/stellar-sdk' -import { RpcHandler } from '@rpc/types' -import { Network } from '@stellar-plus/types' +import { RpcHandler } from 'stellar-plus/rpc/types' +import { Network } from 'stellar-plus/types' + export type ContractEngineConstructorArgs = { network: Network diff --git a/src/stellar-plus/core/index.ts b/src/stellar-plus/core/index.ts index cb95424..c8d3bc7 100644 --- a/src/stellar-plus/core/index.ts +++ b/src/stellar-plus/core/index.ts @@ -1,7 +1,9 @@ -import { TransactionProcessor } from '@core/classic-transaction-processor' -import { SorobanTransactionProcessor } from '@core/soroban-transaction-processor' -import { ChannelAccountsTransactionSubmitter } from '@core/transaction-submitter/classic/channel-accounts-submitter' -import { DefaultTransactionSubmitter } from '@core/transaction-submitter/classic/default' + +import { TransactionProcessor } from 'stellar-plus/core/classic-transaction-processor' +import { SorobanTransactionProcessor } from 'stellar-plus/core/soroban-transaction-processor' +import { ChannelAccountsTransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/channel-accounts-submitter' +import { DefaultTransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/default' + export const Core = { Classic: { diff --git a/src/stellar-plus/core/soroban-transaction-processor/index.ts b/src/stellar-plus/core/soroban-transaction-processor/index.ts index dea5ca7..c70019b 100644 --- a/src/stellar-plus/core/soroban-transaction-processor/index.ts +++ b/src/stellar-plus/core/soroban-transaction-processor/index.ts @@ -14,18 +14,22 @@ import { xdr, } from '@stellar/stellar-sdk' -import { AccountHandler } from '@account/account-handler/types' -import { TransactionProcessor } from '@core/classic-transaction-processor' + +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { TransactionProcessor } from 'stellar-plus/core/classic-transaction-processor' + import { SorobanDeployArgs, SorobanSimulateArgs, SorobanUploadArgs, WrapClassicAssetArgs, -} from '@core/soroban-transaction-processor/types' -import { FeeBumpHeader } from '@core/types' -import { DefaultRpcHandler } from '@rpc/default-handler' -import { RpcHandler } from '@rpc/types' -import { Network, TransactionXdr } from '@stellar-plus/types' + +} from 'stellar-plus/core/soroban-transaction-processor/types' +import { FeeBumpHeader } from 'stellar-plus/core/types' +import { DefaultRpcHandler } from 'stellar-plus/rpc/default-handler' +import { RpcHandler } from 'stellar-plus/rpc/types' +import { Network, TransactionXdr } from 'stellar-plus/types' + export class SorobanTransactionProcessor extends TransactionProcessor { private rpcHandler: RpcHandler diff --git a/src/stellar-plus/core/soroban-transaction-processor/types.ts b/src/stellar-plus/core/soroban-transaction-processor/types.ts index 8143133..347f06e 100644 --- a/src/stellar-plus/core/soroban-transaction-processor/types.ts +++ b/src/stellar-plus/core/soroban-transaction-processor/types.ts @@ -1,7 +1,8 @@ import { Asset as StellarAsset } from '@stellar/stellar-sdk' -import { AccountHandler } from '@account/account-handler/types' -import { EnvelopeHeader, FeeBumpHeader } from '@core/types' +import { AccountHandler } from 'stellar-plus/account/account-handler/types' +import { EnvelopeHeader, FeeBumpHeader } from 'stellar-plus/core/types' + export type SorobanInvokeArgs = SorobanSimulateArgs & { signers: AccountHandler[] diff --git a/src/stellar-plus/core/transaction-submitter/classic/channel-accounts-submitter/index.ts b/src/stellar-plus/core/transaction-submitter/classic/channel-accounts-submitter/index.ts index 872b5ad..9d7773e 100644 --- a/src/stellar-plus/core/transaction-submitter/classic/channel-accounts-submitter/index.ts +++ b/src/stellar-plus/core/transaction-submitter/classic/channel-accounts-submitter/index.ts @@ -1,11 +1,11 @@ import { FeeBumpTransaction, Horizon as HorizonNamespace, Transaction, TransactionBuilder } from '@stellar/stellar-sdk' -import { DefaultAccountHandler } from '@account/account-handler/default/types' -import { TransactionSubmitter as TransactionSubmitter } from '@core/transaction-submitter/classic/types' -import { FeeBumpHeader, TransactionInvocation } from '@core/types' -import { HorizonHandlerClient } from '@horizon/index' -import { HorizonHandler } from '@horizon/types' -import { Network } from '@stellar-plus/types' +import { DefaultAccountHandler } from 'stellar-plus/account/account-handler/default/types' +import { TransactionSubmitter as TransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/types' +import { FeeBumpHeader, TransactionInvocation } from 'stellar-plus/core/types' +import { HorizonHandlerClient } from 'stellar-plus/horizon/index' +import { HorizonHandler } from 'stellar-plus/horizon/types' +import { Network } from 'stellar-plus/types' export class ChannelAccountsTransactionSubmitter implements TransactionSubmitter { private feeBump?: FeeBumpHeader diff --git a/src/stellar-plus/core/transaction-submitter/classic/default/index.ts b/src/stellar-plus/core/transaction-submitter/classic/default/index.ts index 8871ac0..6243115 100644 --- a/src/stellar-plus/core/transaction-submitter/classic/default/index.ts +++ b/src/stellar-plus/core/transaction-submitter/classic/default/index.ts @@ -1,10 +1,10 @@ import { Horizon as HorizonNamespace, Transaction, TransactionBuilder } from '@stellar/stellar-sdk' -import { TransactionSubmitter as TransactionSubmitter } from '@core/transaction-submitter/classic/types' -import { FeeBumpHeader, TransactionInvocation } from '@core/types' -import { HorizonHandlerClient } from '@horizon/index' -import { HorizonHandler } from '@horizon/types' -import { Network } from '@stellar-plus/types' +import { TransactionSubmitter as TransactionSubmitter } from 'stellar-plus/core/transaction-submitter/classic/types' +import { FeeBumpHeader, TransactionInvocation } from 'stellar-plus/core/types' +import { HorizonHandlerClient } from 'stellar-plus/horizon/index' +import { HorizonHandler } from 'stellar-plus/horizon/types' +import { Network } from 'stellar-plus/types' export class DefaultTransactionSubmitter implements TransactionSubmitter { private feeBump?: FeeBumpHeader diff --git a/src/stellar-plus/core/transaction-submitter/classic/types.ts b/src/stellar-plus/core/transaction-submitter/classic/types.ts index 4efcd9e..3b4bcf8 100644 --- a/src/stellar-plus/core/transaction-submitter/classic/types.ts +++ b/src/stellar-plus/core/transaction-submitter/classic/types.ts @@ -6,7 +6,7 @@ import { TransactionBuilder, } from '@stellar/stellar-sdk' -import { TransactionInvocation } from '@core/types' +import { TransactionInvocation } from 'stellar-plus/core/types' export type TransactionSubmitter = { createEnvelope(txInvocation: TransactionInvocation): Promise<{ diff --git a/src/stellar-plus/core/types.d.ts b/src/stellar-plus/core/types.d.ts index 978263d..d18f7f9 100644 --- a/src/stellar-plus/core/types.d.ts +++ b/src/stellar-plus/core/types.d.ts @@ -1,4 +1,4 @@ -import { AccountHandler } from '@account/account-handler/types' +import { AccountHandler } from 'stellar-plus/account/account-handler/types' export type TransactionInvocation = { signers: AccountHandler[] diff --git a/src/stellar-plus/horizon/index.ts b/src/stellar-plus/horizon/index.ts index 89dccb8..25f3863 100644 --- a/src/stellar-plus/horizon/index.ts +++ b/src/stellar-plus/horizon/index.ts @@ -1,7 +1,7 @@ import { Horizon } from '@stellar/stellar-sdk' -import { HorizonHandler } from '@horizon/types' -import { Network } from '@stellar-plus/types' +import { HorizonHandler } from 'stellar-plus/horizon/types' +import { Network } from 'stellar-plus/types' export class HorizonHandlerClient implements HorizonHandler { private network: Network diff --git a/src/stellar-plus/index.ts b/src/stellar-plus/index.ts index 97325f0..b18d89d 100644 --- a/src/stellar-plus/index.ts +++ b/src/stellar-plus/index.ts @@ -1,15 +1,15 @@ -import { ChannelAccounts as ChannelAccountsHandler } from '@channel-accounts/index' -import { CertificateOfDepositClient } from '@soroban/contracts/certificate-of-deposit' +import { ChannelAccounts as ChannelAccountsHandler } from 'stellar-plus/channel-accounts/index' +import { CertificateOfDepositClient } from 'stellar-plus/soroban/contracts/certificate-of-deposit' -export * as Account from '@account/index' -export * as Asset from '@asset/index' +export * as Account from 'stellar-plus/account/index' +export * as Asset from 'stellar-plus/asset/index' export * as Constants from './constants' -export { HorizonHandlerClient as HorizonHandler } from '@horizon/index' -export { SorobanHandlerClient as SorobanHandler } from '@soroban/index' +export { HorizonHandlerClient as HorizonHandler } from 'stellar-plus/horizon/index' +export { SorobanHandlerClient as SorobanHandler } from 'stellar-plus/soroban/index' -export { ContractEngine } from '@core/contract-engine' +export { ContractEngine } from 'stellar-plus/core/contract-engine' -export { Core } from '@core/index' +export { Core } from 'stellar-plus/core/index' export const Contracts = { CertificateOfDeposit: CertificateOfDepositClient, @@ -19,9 +19,9 @@ export const Utils = { ChannelAccountsHandler, } -export * as RPC from '@rpc/index' +export * as RPC from 'stellar-plus/rpc/index' -// export { TransactionInvocation } from '@core/types' +// export { TransactionInvocation } from 'stellar-plus/core/types' // import { DefaultTransactionSubmitter } from "./core/transaction-submitter/classic/default"; // import { ChannelAccountsTransactionSubmitter } from "./core/transaction-submitter/classic/channel-accounts-submitter"; diff --git a/src/stellar-plus/rpc/default-handler/index.ts b/src/stellar-plus/rpc/default-handler/index.ts index fec866d..d6f977a 100644 --- a/src/stellar-plus/rpc/default-handler/index.ts +++ b/src/stellar-plus/rpc/default-handler/index.ts @@ -1,7 +1,7 @@ import { FeeBumpTransaction, SorobanRpc, Transaction } from '@stellar/stellar-sdk' -import { RpcHandler } from '@rpc/types' -import { Network } from '@stellar-plus/types' +import { RpcHandler } from 'stellar-plus/rpc/types' +import { Network } from 'stellar-plus/types' export class DefaultRpcHandler implements RpcHandler { private server: SorobanRpc.Server diff --git a/src/stellar-plus/rpc/index.ts b/src/stellar-plus/rpc/index.ts index 88f4d33..f2fba9b 100644 --- a/src/stellar-plus/rpc/index.ts +++ b/src/stellar-plus/rpc/index.ts @@ -1,2 +1,2 @@ -export * from '@rpc/default-handler' -export * from '@rpc/validation-cloud-handler' +export * from 'stellar-plus/rpc/default-handler' +export * from 'stellar-plus/rpc/validation-cloud-handler' diff --git a/src/stellar-plus/rpc/validation-cloud-handler/index.ts b/src/stellar-plus/rpc/validation-cloud-handler/index.ts index 7f0bc1b..107ba6f 100644 --- a/src/stellar-plus/rpc/validation-cloud-handler/index.ts +++ b/src/stellar-plus/rpc/validation-cloud-handler/index.ts @@ -3,14 +3,14 @@ import axios from 'axios' // import { SorobanRpc, xdr as SorobanXdr, assembleTransaction, parseRawSimulation } from 'soroban-client' // import { parseRawSendTransaction } from 'soroban-client/lib/parsers' -import { RpcHandler } from '@rpc/types' +import { RpcHandler } from 'stellar-plus/rpc/types' import { ApiResponse, RequestPayload, SendTransactionAPIResponse, SimulateTransactionAPIResponse, -} from '@rpc/validation-cloud-handler/types' -import { Network } from '@stellar-plus/types' +} from 'stellar-plus/rpc/validation-cloud-handler/types' +import { Network } from 'stellar-plus/types' export class ValidationCloudRpcHandler implements RpcHandler { private apiKey: string diff --git a/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts b/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts index fad2858..c44c0fb 100644 --- a/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts +++ b/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts @@ -1,7 +1,8 @@ import { Address, ContractSpec } from '@stellar/stellar-sdk' -import { ContractEngine } from '@core/contract-engine' -import { i128, u32, u64 } from '@stellar-plus/types' +import { ContractEngine } from 'stellar-plus/core/contract-engine' +import { i128, u32, u64 } from 'stellar-plus/types' + import { Methods, spec } from './constants' import { diff --git a/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts b/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts index fef0d38..9437a5d 100644 --- a/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts +++ b/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts @@ -1,6 +1,8 @@ -import { TransactionInvocation } from '@core/types' -import { RpcHandler } from '@rpc/types' -import { Network, i128, u64 } from '@stellar-plus/types' + +import { TransactionInvocation } from 'stellar-plus/core/types' +import { RpcHandler } from 'stellar-plus/rpc/types' +import { Network, i128, u64 } from 'stellar-plus/types' + export enum methods { get_position = 'get_position', diff --git a/src/stellar-plus/soroban/index.ts b/src/stellar-plus/soroban/index.ts index 85f2526..63dd55a 100644 --- a/src/stellar-plus/soroban/index.ts +++ b/src/stellar-plus/soroban/index.ts @@ -1,7 +1,7 @@ import { SorobanRpc } from '@stellar/stellar-sdk' -import { SorobanHandler } from '@soroban/types' -import { Network } from '@stellar-plus/types' +import { SorobanHandler } from 'stellar-plus/soroban/types' +import { Network } from 'stellar-plus/types' export class SorobanHandlerClient implements SorobanHandler { private network: Network public server: SorobanRpc.Server diff --git a/tsconfig.json b/tsconfig.json index 307fb47..9b90226 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,16 +31,7 @@ "rootDir": "./src" /* Specify the root folder within your source files. */, "moduleResolution": "node10" /* Specify how TypeScript looks up a file from a given module specifier. */, "baseUrl": "./src" /* Specify the base directory to resolve non-relative module names. */, - "paths": { - "@account/*": ["stellar-plus/account/*"], - "@asset/*": ["stellar-plus/asset/*"], - "@channel-accounts/*": ["stellar-plus/channel-accounts/*"], - "@core/*": ["stellar-plus/core/*"], - "@horizon/*": ["stellar-plus/horizon/*"], - "@rpc/*": ["stellar-plus/rpc/*"], - "@soroban/*": ["stellar-plus/soroban/*"], - "@stellar-plus/*": ["stellar-plus/*"] - } /* Specify a set of entries that re-map imports to additional lookup locations. */, + // "paths": {} /* Specify a set of entries that re-map imports to additional lookup locations. */, // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */