From 41fa2c0aeefb44e171420c8512a25caf0f9fe85f Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Sun, 26 May 2024 13:28:26 +0800 Subject: [PATCH 1/5] removed extension require --- packages/types/.eslintrc.json | 6 +----- packages/types/package.json | 2 +- packages/types/src/assets.ts | 2 +- packages/types/src/browser.ts | 4 ++-- packages/types/src/index.ts | 20 +++++++++---------- packages/types/src/models.ts | 4 ++-- .../services/TransactionListenerInterface.ts | 4 ++-- .../services/TransactionSignerInterface.ts | 2 +- 8 files changed, 20 insertions(+), 24 deletions(-) diff --git a/packages/types/.eslintrc.json b/packages/types/.eslintrc.json index d7e3244..67ce4bf 100644 --- a/packages/types/.eslintrc.json +++ b/packages/types/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/types/package.json b/packages/types/package.json index 1193f99..0f68894 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/types", - "version": "0.1.65", + "version": "0.1.66", "type": "module", "main": "./src/index.ts", "types": "./src/index.ts", diff --git a/packages/types/src/assets.ts b/packages/types/src/assets.ts index 57a9e12..c188019 100644 --- a/packages/types/src/assets.ts +++ b/packages/types/src/assets.ts @@ -1,4 +1,4 @@ -import type { ContractAddress, NftId, TransferAmount, WalletAddress } from './defines.ts' +import type { ContractAddress, NftId, TransferAmount, WalletAddress } from './defines' /** * There are 2 comprehensive interfaces: AssetInterface, ContractInterface diff --git a/packages/types/src/browser.ts b/packages/types/src/browser.ts index 755d523..9863054 100644 --- a/packages/types/src/browser.ts +++ b/packages/types/src/browser.ts @@ -1,5 +1,5 @@ -import type { WalletPlatformEnum } from './enums.ts' -import type { SignedMessage, TransactionId, WalletAddress } from './defines.ts' +import type { WalletPlatformEnum } from './enums' +import type { SignedMessage, TransactionId, WalletAddress } from './defines' // WalletAdapter registration function for WalletInterface export type RegisterWalletAdapterType = ( diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 961a8c5..d5e69df 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,10 +1,10 @@ -export * from './enums.ts' -export type * from './enums.ts' -export type * from './assets.ts' -export type * from './models.ts' -export type * from './browser.ts' -export type * from './defines.ts' -export type * from './services/ProviderInterface.ts' -export type * from './services/TransactionListenerInterface.ts' -export type * from './services/TransactionSignerInterface.ts' -export { TransactionListenerProcessIndex } from './services/TransactionListenerInterface.ts' +export * from './enums' +export type * from './enums' +export type * from './assets' +export type * from './models' +export type * from './browser' +export type * from './defines' +export type * from './services/ProviderInterface' +export type * from './services/TransactionListenerInterface' +export type * from './services/TransactionSignerInterface' +export { TransactionListenerProcessIndex } from './services/TransactionListenerInterface' diff --git a/packages/types/src/models.ts b/packages/types/src/models.ts index 91fd922..e8016c8 100644 --- a/packages/types/src/models.ts +++ b/packages/types/src/models.ts @@ -1,4 +1,4 @@ -import type { AssetDirectionEnum, TransactionStatusEnum, TransactionTypeEnum } from './enums.ts' +import type { AssetDirectionEnum, TransactionStatusEnum, TransactionTypeEnum } from './enums' import type { BlockConfirmationCount, BlockNumber, @@ -9,7 +9,7 @@ import type { TransactionId, TransferAmount, WalletAddress -} from './defines.ts' +} from './defines' export interface TransactionInterface { /** diff --git a/packages/types/src/services/TransactionListenerInterface.ts b/packages/types/src/services/TransactionListenerInterface.ts index adce5d1..90f9bbb 100644 --- a/packages/types/src/services/TransactionListenerInterface.ts +++ b/packages/types/src/services/TransactionListenerInterface.ts @@ -4,8 +4,8 @@ import type { TransactionId, TransferAmount, WalletAddress -} from '../defines.ts' -import { TransactionTypeEnum } from '../enums.ts' +} from '../defines' +import { TransactionTypeEnum } from '../enums' /** * Filter types for each transaction type in TransactionListenerInterface diff --git a/packages/types/src/services/TransactionSignerInterface.ts b/packages/types/src/services/TransactionSignerInterface.ts index bf4ac63..03d4b0f 100644 --- a/packages/types/src/services/TransactionSignerInterface.ts +++ b/packages/types/src/services/TransactionSignerInterface.ts @@ -1,4 +1,4 @@ -import type { PrivateKey, TransactionId } from '../defines.ts' +import type { PrivateKey, TransactionId } from '../defines' export interface TransactionSignerInterface { /** From 192187abb8a13b15999831bb1e51528bef743e34 Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Sun, 26 May 2024 13:29:40 +0800 Subject: [PATCH 2/5] removed extension require --- packages/utils/.eslintrc.json | 6 +----- packages/utils/package.json | 2 +- packages/utils/tests/index.spec.ts | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/utils/.eslintrc.json b/packages/utils/.eslintrc.json index d7e3244..67ce4bf 100644 --- a/packages/utils/.eslintrc.json +++ b/packages/utils/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/utils/package.json b/packages/utils/package.json index 8ed8f5a..5cf3b33 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/utils", - "version": "0.1.22", + "version": "0.1.23", "type": "module", "main": "./src/index.ts", "types": "./src/index.ts", diff --git a/packages/utils/tests/index.spec.ts b/packages/utils/tests/index.spec.ts index 108c212..df6d807 100644 --- a/packages/utils/tests/index.spec.ts +++ b/packages/utils/tests/index.spec.ts @@ -14,7 +14,7 @@ import { isWebview, sleep, math -} from '../src/index.js' +} from '../src/index' describe('Helper methods', () => { it('toHex', () => { From a9a4fc4ae3a26291a47a8224fbe305a0601721a2 Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Sun, 26 May 2024 13:31:18 +0800 Subject: [PATCH 3/5] removed extension require --- packages/wrapper/.eslintrc.json | 6 +----- packages/wrapper/esbuild.ts | 2 +- packages/wrapper/package.json | 4 ++-- packages/wrapper/pnpm-lock.yaml | 12 ++++++------ packages/wrapper/src/browser/index.ts | 2 +- packages/wrapper/vite.config.ts | 2 +- packages/wrapper/vitest.config.ts | 2 +- 7 files changed, 13 insertions(+), 17 deletions(-) diff --git a/packages/wrapper/.eslintrc.json b/packages/wrapper/.eslintrc.json index d7e3244..67ce4bf 100644 --- a/packages/wrapper/.eslintrc.json +++ b/packages/wrapper/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/wrapper/esbuild.ts b/packages/wrapper/esbuild.ts index 4c624d2..5c69dd1 100644 --- a/packages/wrapper/esbuild.ts +++ b/packages/wrapper/esbuild.ts @@ -1,3 +1,3 @@ -void import('../../esbuild.ts').then((module) => { +void import('../../esbuild').then((module) => { module.default() }) diff --git a/packages/wrapper/package.json b/packages/wrapper/package.json index 3637112..e7e03ab 100644 --- a/packages/wrapper/package.json +++ b/packages/wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/wrapper", - "version": "0.1.2", + "version": "0.1.3", "type": "module", "main": "dist/index.cjs", "module": "dist/index.es.js", @@ -71,7 +71,7 @@ "url": "https://github.com/MultipleChain/js/issues" }, "dependencies": { - "@multiplechain/types": "^0.1.64", + "@multiplechain/types": "^0.1.66", "@multiplechain/utils": "^0.1.21" }, "devDependencies": { diff --git a/packages/wrapper/pnpm-lock.yaml b/packages/wrapper/pnpm-lock.yaml index f87d9c9..cca92ed 100644 --- a/packages/wrapper/pnpm-lock.yaml +++ b/packages/wrapper/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@multiplechain/types': - specifier: ^0.1.64 - version: 0.1.64 + specifier: ^0.1.66 + version: 0.1.66 '@multiplechain/utils': specifier: ^0.1.21 version: 0.1.21 @@ -695,7 +695,7 @@ packages: /@multiplechain/evm-chains@0.4.1(react@18.3.1)(typescript@5.4.5): resolution: {integrity: sha512-z8bwNcmgLdZAm1OmA38EL9MORKHe3jATQGXdELrboAXb1GcTLhkjpiDQ3SPIIJ+u9I4p4gOFvlIELcNBaGhQbA==} dependencies: - '@multiplechain/types': 0.1.64 + '@multiplechain/types': 0.1.66 '@multiplechain/utils': 0.1.21 '@wagmi/chains': 1.8.0(typescript@5.4.5) '@walletconnect/ethereum-provider': 2.13.0(react@18.3.1) @@ -772,7 +772,7 @@ packages: dependencies: '@beycandeveloper/tron-tx-decoder': 2.0.7 '@multiplechain/tron-walletconnect': 0.1.2(typescript@5.4.5)(vite@5.2.11) - '@multiplechain/types': 0.1.64 + '@multiplechain/types': 0.1.66 '@multiplechain/utils': 0.1.21 '@noble/secp256k1': 1.7.1 '@tronweb3/tronwallet-adapter-bitkeep': 1.1.1 @@ -806,8 +806,8 @@ packages: - vite dev: true - /@multiplechain/types@0.1.64: - resolution: {integrity: sha512-euzFLiq18L3SCqN9mLY2GKEkaJhTFcBg7Ono/yqN87IT5qlZ1Xqzk2jcWvRcnlN3O5wL15QLKS+e2C11DKeXOA==} + /@multiplechain/types@0.1.66: + resolution: {integrity: sha512-ekv6EAQWZnya3hWX1WSvIWhAw3XbKvqp3JnlTeNw0BxzRnO6rYyHXD5iRse6R95mk11N3OUyDtbMCAvzYQUsxg==} /@multiplechain/utils@0.1.21: resolution: {integrity: sha512-4mRlnhvXcS+7Hb1By5s2eoCH02kqOSQzV8qj0DHqZK20FtxtduaoGCtcClrFgEjN/HAXnHgdDc1pxTpveIkvRQ==} diff --git a/packages/wrapper/src/browser/index.ts b/packages/wrapper/src/browser/index.ts index ffdb04c..f9f51db 100644 --- a/packages/wrapper/src/browser/index.ts +++ b/packages/wrapper/src/browser/index.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line filenames/match-exported -import BaseWrapper from '../index.ts' +import BaseWrapper from '../index' import type { WalletInterface, ProviderInterface, diff --git a/packages/wrapper/vite.config.ts b/packages/wrapper/vite.config.ts index bfcc95d..0585d22 100644 --- a/packages/wrapper/vite.config.ts +++ b/packages/wrapper/vite.config.ts @@ -1,5 +1,5 @@ import { mergeConfig } from 'vite' -import mainConfig from '../../vite.config.ts' +import mainConfig from '../../vite.config' export default mergeConfig(mainConfig, { build: { diff --git a/packages/wrapper/vitest.config.ts b/packages/wrapper/vitest.config.ts index 3e93e2f..9c1fd85 100644 --- a/packages/wrapper/vitest.config.ts +++ b/packages/wrapper/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineConfig } from 'vitest/config' -import mainConfig from '../../vite.config.ts' +import mainConfig from '../../vite.config' export default mergeConfig( mainConfig, From 418ace024138a876dc838e396b9a102b3891634d Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Sun, 26 May 2024 13:41:55 +0800 Subject: [PATCH 4/5] removed extension require --- .github/workflows/npm-publish.yaml | 2 +- package.json | 1 - packages/networks/bitcoin/.eslintrc.json | 6 +---- packages/networks/bitcoin/esbuild.ts | 2 +- packages/networks/bitcoin/package.json | 4 ++-- packages/networks/bitcoin/pnpm-lock.yaml | 8 +++---- packages/networks/bitcoin/src/assets/Coin.ts | 6 ++--- packages/networks/bitcoin/src/assets/index.ts | 2 +- .../networks/bitcoin/src/browser/Wallet.ts | 4 ++-- .../bitcoin/src/browser/adapters/Leather.ts | 6 ++--- .../bitcoin/src/browser/adapters/UniSat.ts | 6 ++--- .../bitcoin/src/browser/adapters/Xverse.ts | 6 ++--- .../bitcoin/src/browser/adapters/index.ts | 6 ++--- .../networks/bitcoin/src/browser/index.ts | 6 ++--- packages/networks/bitcoin/src/index.ts | 10 ++++---- .../bitcoin/src/models/CoinTransaction.ts | 4 ++-- .../bitcoin/src/models/Transaction.ts | 4 ++-- packages/networks/bitcoin/src/models/index.ts | 4 ++-- .../src/services/TransactionListener.ts | 8 +++---- .../bitcoin/src/services/TransactionSigner.ts | 2 +- .../networks/bitcoin/src/services/index.ts | 4 ++-- .../networks/bitcoin/tests/assets.spec.ts | 6 ++--- .../networks/bitcoin/tests/models.spec.ts | 4 ++-- .../networks/bitcoin/tests/services.spec.ts | 10 ++++---- packages/networks/bitcoin/tests/setup.ts | 2 +- packages/networks/bitcoin/vite.config.ts | 2 +- packages/networks/bitcoin/vitest.config.ts | 2 +- packages/networks/boilerplate/.eslintrc.json | 6 +---- packages/networks/boilerplate/esbuild.ts | 2 +- packages/networks/boilerplate/package.json | 2 +- packages/networks/boilerplate/pnpm-lock.yaml | 8 +++---- .../networks/boilerplate/src/assets/Coin.ts | 4 ++-- .../boilerplate/src/assets/Contract.ts | 2 +- .../networks/boilerplate/src/assets/NFT.ts | 4 ++-- .../networks/boilerplate/src/assets/Token.ts | 4 ++-- .../networks/boilerplate/src/assets/index.ts | 8 +++---- .../boilerplate/src/browser/Wallet.ts | 4 ++-- .../boilerplate/src/browser/adapters/index.ts | 2 +- .../networks/boilerplate/src/browser/index.ts | 8 +++---- packages/networks/boilerplate/src/index.ts | 8 +++---- .../boilerplate/src/models/CoinTransaction.ts | 2 +- .../src/models/ContractTransaction.ts | 2 +- .../boilerplate/src/models/NftTransaction.ts | 2 +- .../src/models/TokenTransaction.ts | 2 +- .../boilerplate/src/models/Transaction.ts | 2 +- .../networks/boilerplate/src/models/index.ts | 10 ++++---- .../src/services/TransactionListener.ts | 12 +++++----- .../src/services/TransactionSigner.ts | 2 +- .../boilerplate/src/services/index.ts | 4 ++-- .../networks/boilerplate/tests/assets.spec.ts | 10 ++++---- .../networks/boilerplate/tests/models.spec.ts | 8 +++---- .../boilerplate/tests/services.spec.ts | 22 ++++++++--------- packages/networks/boilerplate/tests/setup.ts | 2 +- packages/networks/boilerplate/vite.config.ts | 2 +- .../networks/boilerplate/vitest.config.ts | 2 +- packages/networks/evm-chains/.eslintrc.json | 5 ++-- packages/networks/evm-chains/cdt.ts | 2 +- packages/networks/evm-chains/esbuild.ts | 2 +- packages/networks/evm-chains/package.json | 4 ++-- packages/networks/evm-chains/pnpm-lock.yaml | 8 +++---- .../networks/evm-chains/src/assets/Coin.ts | 6 ++--- .../evm-chains/src/assets/Contract.ts | 6 ++--- .../networks/evm-chains/src/assets/NFT.ts | 6 ++--- .../networks/evm-chains/src/assets/Token.ts | 6 ++--- .../networks/evm-chains/src/assets/index.ts | 8 +++---- .../networks/evm-chains/src/browser/Wallet.ts | 6 ++--- .../src/browser/adapters/BitgetWallet.ts | 8 +++---- .../src/browser/adapters/MetaMask.ts | 10 ++++---- .../src/browser/adapters/OkxWallet.ts | 8 +++---- .../src/browser/adapters/Phantom.ts | 6 ++--- .../src/browser/adapters/TrustWallet.ts | 10 ++++---- .../src/browser/adapters/WalletConnect.ts | 6 ++--- .../src/browser/adapters/Web3Modal.ts | 8 +++---- .../src/browser/adapters/XdefiWallet.ts | 8 +++---- .../evm-chains/src/browser/adapters/index.ts | 18 +++++++------- .../src/browser/adapters/switcher.ts | 8 +++---- .../evm-chains/src/browser/adapters/types.ts | 2 +- .../networks/evm-chains/src/browser/index.ts | 12 +++++----- packages/networks/evm-chains/src/index.ts | 10 ++++---- .../evm-chains/src/models/CoinTransaction.ts | 2 +- .../src/models/ContractTransaction.ts | 4 ++-- .../evm-chains/src/models/NftTransaction.ts | 4 ++-- .../evm-chains/src/models/TokenTransaction.ts | 6 ++--- .../evm-chains/src/models/Transaction.ts | 6 ++--- .../networks/evm-chains/src/models/index.ts | 10 ++++---- .../evm-chains/src/services/Ethers.ts | 4 ++-- .../evm-chains/src/services/Networks.ts | 2 +- .../evm-chains/src/services/Provider.ts | 2 +- .../src/services/TransactionListener.ts | 14 +++++------ .../src/services/TransactionSigner.ts | 4 ++-- .../networks/evm-chains/src/services/index.ts | 4 ++-- .../networks/evm-chains/tests/assets.spec.ts | 10 ++++---- .../networks/evm-chains/tests/models.spec.ts | 8 +++---- .../evm-chains/tests/services.spec.ts | 24 +++++++++---------- packages/networks/evm-chains/tests/setup.ts | 2 +- packages/networks/evm-chains/vite.config.ts | 2 +- packages/networks/evm-chains/vitest.config.ts | 2 +- packages/networks/solana/.eslintrc.json | 6 +---- packages/networks/solana/esbuild.ts | 2 +- packages/networks/solana/package.json | 4 ++-- packages/networks/solana/pnpm-lock.yaml | 8 +++---- packages/networks/solana/src/assets/Coin.ts | 6 ++--- .../networks/solana/src/assets/Contract.ts | 2 +- packages/networks/solana/src/assets/NFT.ts | 4 ++-- packages/networks/solana/src/assets/Token.ts | 4 ++-- packages/networks/solana/src/assets/index.ts | 8 +++---- .../networks/solana/src/browser/Wallet.ts | 4 ++-- .../src/browser/adapters/BitgetWallet.ts | 4 ++-- .../src/browser/adapters/CoinbaseWallet.ts | 4 ++-- .../solana/src/browser/adapters/Phantom.ts | 4 ++-- .../solana/src/browser/adapters/Slope.ts | 4 ++-- .../solana/src/browser/adapters/Solflare.ts | 4 ++-- .../src/browser/adapters/TokenPocket.ts | 4 ++-- .../src/browser/adapters/TrustWallet.ts | 4 ++-- .../src/browser/adapters/WalletConnect.ts | 4 ++-- .../solana/src/browser/adapters/Web3Modal.ts | 4 ++-- .../solana/src/browser/adapters/index.ts | 18 +++++++------- packages/networks/solana/src/browser/index.ts | 8 +++---- packages/networks/solana/src/index.ts | 10 ++++---- .../solana/src/models/CoinTransaction.ts | 4 ++-- .../solana/src/models/ContractTransaction.ts | 2 +- .../solana/src/models/NftTransaction.ts | 2 +- .../solana/src/models/TokenTransaction.ts | 2 +- .../networks/solana/src/models/Transaction.ts | 4 ++-- packages/networks/solana/src/models/index.ts | 10 ++++---- .../src/services/TransactionListener.ts | 12 +++++----- .../solana/src/services/TransactionSigner.ts | 2 +- .../networks/solana/src/services/index.ts | 4 ++-- packages/networks/solana/tests/assets.spec.ts | 10 ++++---- packages/networks/solana/tests/models.spec.ts | 10 ++++---- .../networks/solana/tests/services.spec.ts | 22 ++++++++--------- packages/networks/solana/tests/setup.ts | 2 +- packages/networks/solana/vite.config.ts | 2 +- packages/networks/solana/vitest.config.ts | 2 +- packages/networks/tron/.eslintrc.json | 6 +---- packages/networks/tron/esbuild.ts | 2 +- packages/networks/tron/package.json | 4 ++-- packages/networks/tron/pnpm-lock.yaml | 8 +++---- packages/networks/tron/src/assets/Coin.ts | 4 ++-- packages/networks/tron/src/assets/Contract.ts | 4 ++-- packages/networks/tron/src/assets/NFT.ts | 6 ++--- packages/networks/tron/src/assets/Token.ts | 6 ++--- packages/networks/tron/src/assets/index.ts | 8 +++---- packages/networks/tron/src/browser/Wallet.ts | 4 ++-- .../tron/src/browser/adapters/BitgetWallet.ts | 4 ++-- .../tron/src/browser/adapters/OkxWallet.ts | 4 ++-- .../tron/src/browser/adapters/TokenPocket.ts | 4 ++-- .../tron/src/browser/adapters/TronLink.ts | 4 ++-- .../src/browser/adapters/WalletConnect.ts | 4 ++-- .../tron/src/browser/adapters/index.ts | 10 ++++---- packages/networks/tron/src/browser/index.ts | 8 +++---- packages/networks/tron/src/index.ts | 8 +++---- .../tron/src/models/CoinTransaction.ts | 2 +- .../tron/src/models/ContractTransaction.ts | 2 +- .../tron/src/models/NftTransaction.ts | 2 +- .../tron/src/models/TokenTransaction.ts | 4 ++-- .../networks/tron/src/models/Transaction.ts | 4 ++-- packages/networks/tron/src/models/index.ts | 10 ++++---- .../networks/tron/src/services/Provider.ts | 2 +- .../tron/src/services/TransactionListener.ts | 4 ++-- .../tron/src/services/TransactionSigner.ts | 2 +- .../networks/tron/src/services/TronWeb.ts | 4 ++-- packages/networks/tron/src/services/index.ts | 4 ++-- packages/networks/tron/tests/assets.spec.ts | 10 ++++---- packages/networks/tron/tests/models.spec.ts | 8 +++---- packages/networks/tron/tests/services.spec.ts | 4 ++-- packages/networks/tron/tests/setup.ts | 2 +- packages/networks/tron/vite.config.ts | 2 +- packages/networks/tron/vitest.config.ts | 2 +- packages/types/package.json | 1 + packages/utils/package.json | 1 + pnpm-lock.yaml | 12 ---------- tsconfig.json | 1 - 173 files changed, 459 insertions(+), 488 deletions(-) diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index 79c7704..9f02f3f 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -24,7 +24,7 @@ jobs: env: NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} - - name: Check if version changed + - name: Publish if version changed run: | npm install -g pnpm pnpm install diff --git a/package.json b/package.json index 47d94e0..765bd15 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "eslint-plugin-n": "^16.6.2", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-require-extensions": "^0.1.3", "jsdom": "^24.0.0", "prettier": "^3.2.5", "tsx": "^4.7.1", diff --git a/packages/networks/bitcoin/.eslintrc.json b/packages/networks/bitcoin/.eslintrc.json index b62472f..f8f7a15 100644 --- a/packages/networks/bitcoin/.eslintrc.json +++ b/packages/networks/bitcoin/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/networks/bitcoin/esbuild.ts b/packages/networks/bitcoin/esbuild.ts index 5714b9c..f25aad1 100644 --- a/packages/networks/bitcoin/esbuild.ts +++ b/packages/networks/bitcoin/esbuild.ts @@ -1,3 +1,3 @@ -void import('../../../esbuild.ts').then((module) => { +void import('../../../esbuild').then((module) => { module.default() }) diff --git a/packages/networks/bitcoin/package.json b/packages/networks/bitcoin/package.json index c60c5db..4e2f1c5 100644 --- a/packages/networks/bitcoin/package.json +++ b/packages/networks/bitcoin/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/bitcoin", - "version": "0.4.3", + "version": "0.4.4", "type": "module", "main": "dist/index.cjs", "module": "dist/index.es.js", @@ -72,7 +72,7 @@ "url": "https://github.com/MultipleChain/js/issues" }, "dependencies": { - "@multiplechain/types": "^0.1.64", + "@multiplechain/types": "^0.1.66", "@multiplechain/utils": "^0.1.21", "axios": "^1.6.8", "bitcore-lib": "^10.0.28", diff --git a/packages/networks/bitcoin/pnpm-lock.yaml b/packages/networks/bitcoin/pnpm-lock.yaml index faefe4f..5e12d6d 100644 --- a/packages/networks/bitcoin/pnpm-lock.yaml +++ b/packages/networks/bitcoin/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@multiplechain/types': - specifier: ^0.1.64 - version: 0.1.64 + specifier: ^0.1.66 + version: 0.1.66 '@multiplechain/utils': specifier: ^0.1.21 version: 0.1.21 @@ -34,8 +34,8 @@ devDependencies: packages: - /@multiplechain/types@0.1.64: - resolution: {integrity: sha512-euzFLiq18L3SCqN9mLY2GKEkaJhTFcBg7Ono/yqN87IT5qlZ1Xqzk2jcWvRcnlN3O5wL15QLKS+e2C11DKeXOA==} + /@multiplechain/types@0.1.66: + resolution: {integrity: sha512-ekv6EAQWZnya3hWX1WSvIWhAw3XbKvqp3JnlTeNw0BxzRnO6rYyHXD5iRse6R95mk11N3OUyDtbMCAvzYQUsxg==} dev: false /@multiplechain/utils@0.1.21: diff --git a/packages/networks/bitcoin/src/assets/Coin.ts b/packages/networks/bitcoin/src/assets/Coin.ts index aa981de..0ba8e44 100644 --- a/packages/networks/bitcoin/src/assets/Coin.ts +++ b/packages/networks/bitcoin/src/assets/Coin.ts @@ -1,8 +1,8 @@ import axios from 'axios' -import { Provider } from '../services/Provider.ts' -import { fromSatoshi, toSatoshi } from '../utils.ts' +import { Provider } from '../services/Provider' +import { fromSatoshi, toSatoshi } from '../utils' import { Transaction, Script, Address } from 'bitcore-lib' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { TransactionSigner } from '../services/TransactionSigner' import { ErrorTypeEnum, type CoinInterface, diff --git a/packages/networks/bitcoin/src/assets/index.ts b/packages/networks/bitcoin/src/assets/index.ts index 5742d2b..c03964d 100644 --- a/packages/networks/bitcoin/src/assets/index.ts +++ b/packages/networks/bitcoin/src/assets/index.ts @@ -1 +1 @@ -export * from './Coin.ts' +export * from './Coin' diff --git a/packages/networks/bitcoin/src/browser/Wallet.ts b/packages/networks/bitcoin/src/browser/Wallet.ts index f4e4f82..b5b1763 100644 --- a/packages/networks/bitcoin/src/browser/Wallet.ts +++ b/packages/networks/bitcoin/src/browser/Wallet.ts @@ -9,8 +9,8 @@ import { type SignedMessage, type TransactionId } from '@multiplechain/types' -import { Provider } from '../services/Provider.ts' -import type { TransactionSigner } from '../services/TransactionSigner.ts' +import { Provider } from '../services/Provider' +import type { TransactionSigner } from '../services/TransactionSigner' export interface WalletProvider { getAddress: () => Promise diff --git a/packages/networks/bitcoin/src/browser/adapters/Leather.ts b/packages/networks/bitcoin/src/browser/adapters/Leather.ts index 33faa06..afe4d1a 100644 --- a/packages/networks/bitcoin/src/browser/adapters/Leather.ts +++ b/packages/networks/bitcoin/src/browser/adapters/Leather.ts @@ -1,7 +1,7 @@ -import icons from './icons.ts' -import type { WalletProvider } from '../Wallet.ts' +import icons from './icons' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' declare global { diff --git a/packages/networks/bitcoin/src/browser/adapters/UniSat.ts b/packages/networks/bitcoin/src/browser/adapters/UniSat.ts index 6f7c29c..edb6a60 100644 --- a/packages/networks/bitcoin/src/browser/adapters/UniSat.ts +++ b/packages/networks/bitcoin/src/browser/adapters/UniSat.ts @@ -1,7 +1,7 @@ -import icons from './icons.ts' -import type { WalletProvider } from '../Wallet.ts' +import icons from './icons' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' declare global { diff --git a/packages/networks/bitcoin/src/browser/adapters/Xverse.ts b/packages/networks/bitcoin/src/browser/adapters/Xverse.ts index f7f6b63..cb3fc43 100644 --- a/packages/networks/bitcoin/src/browser/adapters/Xverse.ts +++ b/packages/networks/bitcoin/src/browser/adapters/Xverse.ts @@ -1,6 +1,6 @@ -import icons from './icons.ts' -import type { WalletProvider } from '../Wallet.ts' -import type { Provider } from '../../services/Provider.ts' +import icons from './icons' +import type { WalletProvider } from '../Wallet' +import type { Provider } from '../../services/Provider' import { ErrorTypeEnum, WalletPlatformEnum, diff --git a/packages/networks/bitcoin/src/browser/adapters/index.ts b/packages/networks/bitcoin/src/browser/adapters/index.ts index 6408790..49a47d7 100644 --- a/packages/networks/bitcoin/src/browser/adapters/index.ts +++ b/packages/networks/bitcoin/src/browser/adapters/index.ts @@ -1,3 +1,3 @@ -export { default as UniSat } from './UniSat.ts' -export { default as Xverse } from './Xverse.ts' -export { default as Leather } from './Leather.ts' +export { default as UniSat } from './UniSat' +export { default as Xverse } from './Xverse' +export { default as Leather } from './Leather' diff --git a/packages/networks/bitcoin/src/browser/index.ts b/packages/networks/bitcoin/src/browser/index.ts index d1b6c70..ef4b5c0 100644 --- a/packages/networks/bitcoin/src/browser/index.ts +++ b/packages/networks/bitcoin/src/browser/index.ts @@ -1,6 +1,6 @@ import type { Provider } from 'sats-connect' -import { Wallet, type WalletProvider } from './Wallet.ts' -import * as adapterList from './adapters/index.ts' +import { Wallet, type WalletProvider } from './Wallet' +import * as adapterList from './adapters/index' import type { WalletAdapterListType, WalletAdapterInterface, @@ -19,7 +19,7 @@ const registerAdapter: RegisterWalletAdapterType = ( adapters[adapter.id] = adapter } -export * from '../index.ts' +export * from '../index' export const browser = { Wallet, diff --git a/packages/networks/bitcoin/src/index.ts b/packages/networks/bitcoin/src/index.ts index 7b0e1cd..be37abf 100644 --- a/packages/networks/bitcoin/src/index.ts +++ b/packages/networks/bitcoin/src/index.ts @@ -1,8 +1,8 @@ -export * from './services/Provider.ts' +export * from './services/Provider' -export * as assets from './assets/index.ts' -export * as models from './models/index.ts' -export * as services from './services/index.ts' +export * as assets from './assets/index' +export * as models from './models/index' +export * as services from './services/index' -export * as utils from './utils.ts' +export * as utils from './utils' export * as types from '@multiplechain/types' diff --git a/packages/networks/bitcoin/src/models/CoinTransaction.ts b/packages/networks/bitcoin/src/models/CoinTransaction.ts index 353e75d..47fd00f 100644 --- a/packages/networks/bitcoin/src/models/CoinTransaction.ts +++ b/packages/networks/bitcoin/src/models/CoinTransaction.ts @@ -1,5 +1,5 @@ -import { fromSatoshi } from '../utils.ts' -import { Transaction } from './Transaction.ts' +import { fromSatoshi } from '../utils' +import { Transaction } from './Transaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { WalletAddress, CoinTransactionInterface, TransferAmount } from '@multiplechain/types' diff --git a/packages/networks/bitcoin/src/models/Transaction.ts b/packages/networks/bitcoin/src/models/Transaction.ts index 2026094..cecc894 100644 --- a/packages/networks/bitcoin/src/models/Transaction.ts +++ b/packages/networks/bitcoin/src/models/Transaction.ts @@ -1,6 +1,6 @@ -import { fromSatoshi, sleep } from '../utils.ts' +import { fromSatoshi, sleep } from '../utils' import axios, { type AxiosError } from 'axios' -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { ErrorTypeEnum, TransactionStatusEnum } from '@multiplechain/types' import { TransactionTypeEnum, diff --git a/packages/networks/bitcoin/src/models/index.ts b/packages/networks/bitcoin/src/models/index.ts index f4c3f87..4cca7f1 100644 --- a/packages/networks/bitcoin/src/models/index.ts +++ b/packages/networks/bitcoin/src/models/index.ts @@ -1,2 +1,2 @@ -export * from './Transaction.ts' -export * from './CoinTransaction.ts' +export * from './Transaction' +export * from './CoinTransaction' diff --git a/packages/networks/bitcoin/src/services/TransactionListener.ts b/packages/networks/bitcoin/src/services/TransactionListener.ts index 09cd798..0072d71 100644 --- a/packages/networks/bitcoin/src/services/TransactionListener.ts +++ b/packages/networks/bitcoin/src/services/TransactionListener.ts @@ -6,10 +6,10 @@ import type { TransactionId } from '@multiplechain/types' import WebSocket from 'ws' -import { Provider } from './Provider.ts' -import { fromSatoshi } from '../utils.ts' -import { Transaction } from '../models/Transaction.ts' -import { CoinTransaction } from '../models/CoinTransaction.ts' +import { Provider } from './Provider' +import { fromSatoshi } from '../utils' +import { Transaction } from '../models/Transaction' +import { CoinTransaction } from '../models/CoinTransaction' import { checkWebSocket, objectsEqual } from '@multiplechain/utils' import { TransactionListenerProcessIndex } from '@multiplechain/types' diff --git a/packages/networks/bitcoin/src/services/TransactionSigner.ts b/packages/networks/bitcoin/src/services/TransactionSigner.ts index e0526c5..4230e8c 100644 --- a/packages/networks/bitcoin/src/services/TransactionSigner.ts +++ b/packages/networks/bitcoin/src/services/TransactionSigner.ts @@ -1,6 +1,6 @@ import axios from 'axios' import type { AxiosError } from 'axios' -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import type { Transaction as BitcoreLibTransactionData } from 'bitcore-lib' import type { PrivateKey, TransactionId, TransactionSignerInterface } from '@multiplechain/types' diff --git a/packages/networks/bitcoin/src/services/index.ts b/packages/networks/bitcoin/src/services/index.ts index 549a382..0b05d2e 100644 --- a/packages/networks/bitcoin/src/services/index.ts +++ b/packages/networks/bitcoin/src/services/index.ts @@ -1,2 +1,2 @@ -export * from './TransactionSigner.ts' -export * from './TransactionListener.ts' +export * from './TransactionSigner' +export * from './TransactionListener' diff --git a/packages/networks/bitcoin/tests/assets.spec.ts b/packages/networks/bitcoin/tests/assets.spec.ts index 5edb0a1..d552f6c 100644 --- a/packages/networks/bitcoin/tests/assets.spec.ts +++ b/packages/networks/bitcoin/tests/assets.spec.ts @@ -1,10 +1,10 @@ import { describe, it, expect, assert } from 'vitest' -import { Coin } from '../src/assets/Coin.ts' +import { Coin } from '../src/assets/Coin' import { math } from '@multiplechain/utils' -import { Transaction } from '../src/models/Transaction.ts' +import { Transaction } from '../src/models/Transaction' import { TransactionStatusEnum, type TransactionId } from '@multiplechain/types' -import { TransactionSigner } from '../src/services/TransactionSigner.ts' +import { TransactionSigner } from '../src/services/TransactionSigner' const testAmount = Number(process.env.BTC_TRANSFER_AMOUNT) const senderTestAddress = String(process.env.BTC_SENDER_ADDRESS) diff --git a/packages/networks/bitcoin/tests/models.spec.ts b/packages/networks/bitcoin/tests/models.spec.ts index d4265de..73b46d0 100644 --- a/packages/networks/bitcoin/tests/models.spec.ts +++ b/packages/networks/bitcoin/tests/models.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest' -import { Transaction } from '../src/models/Transaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' +import { Transaction } from '../src/models/Transaction' +import { CoinTransaction } from '../src/models/CoinTransaction' import { AssetDirectionEnum, TransactionStatusEnum } from '@multiplechain/types' const testAmount = Number(process.env.BTC_TRANSFER_AMOUNT) diff --git a/packages/networks/bitcoin/tests/services.spec.ts b/packages/networks/bitcoin/tests/services.spec.ts index d5e59cb..719ea55 100644 --- a/packages/networks/bitcoin/tests/services.spec.ts +++ b/packages/networks/bitcoin/tests/services.spec.ts @@ -1,11 +1,11 @@ import { describe, it, expect } from 'vitest' -import { provider } from './setup.ts' -import { Provider } from '../src/services/Provider.ts' -import { TransactionListener } from '../src/services/TransactionListener.ts' +import { provider } from './setup' +import { Provider } from '../src/services/Provider' +import { TransactionListener } from '../src/services/TransactionListener' import { TransactionTypeEnum } from '@multiplechain/types' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { Coin } from '../src/assets/Coin.ts' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { Coin } from '../src/assets/Coin' import { sleep } from '@multiplechain/utils' const senderTestAddress = String(process.env.BTC_SENDER_ADDRESS) diff --git a/packages/networks/bitcoin/tests/setup.ts b/packages/networks/bitcoin/tests/setup.ts index 6c04b6b..476b875 100644 --- a/packages/networks/bitcoin/tests/setup.ts +++ b/packages/networks/bitcoin/tests/setup.ts @@ -1,4 +1,4 @@ -import { Provider } from '../src/services/Provider.ts' +import { Provider } from '../src/services/Provider' let provider: Provider diff --git a/packages/networks/bitcoin/vite.config.ts b/packages/networks/bitcoin/vite.config.ts index 206b6fc..0d2a74a 100644 --- a/packages/networks/bitcoin/vite.config.ts +++ b/packages/networks/bitcoin/vite.config.ts @@ -1,5 +1,5 @@ import { mergeConfig } from 'vite' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig(mainConfig, { build: { diff --git a/packages/networks/bitcoin/vitest.config.ts b/packages/networks/bitcoin/vitest.config.ts index c96edcb..8a33630 100644 --- a/packages/networks/bitcoin/vitest.config.ts +++ b/packages/networks/bitcoin/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineConfig } from 'vitest/config' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig( mainConfig, diff --git a/packages/networks/boilerplate/.eslintrc.json b/packages/networks/boilerplate/.eslintrc.json index b62472f..f8f7a15 100644 --- a/packages/networks/boilerplate/.eslintrc.json +++ b/packages/networks/boilerplate/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/networks/boilerplate/esbuild.ts b/packages/networks/boilerplate/esbuild.ts index 5714b9c..f25aad1 100644 --- a/packages/networks/boilerplate/esbuild.ts +++ b/packages/networks/boilerplate/esbuild.ts @@ -1,3 +1,3 @@ -void import('../../../esbuild.ts').then((module) => { +void import('../../../esbuild').then((module) => { module.default() }) diff --git a/packages/networks/boilerplate/package.json b/packages/networks/boilerplate/package.json index e17cc80..a998856 100644 --- a/packages/networks/boilerplate/package.json +++ b/packages/networks/boilerplate/package.json @@ -72,7 +72,7 @@ "url": "https://github.com/MultipleChain/js/issues" }, "dependencies": { - "@multiplechain/types": "^0.1.64", + "@multiplechain/types": "^0.1.66", "@multiplechain/utils": "^0.1.21" } } \ No newline at end of file diff --git a/packages/networks/boilerplate/pnpm-lock.yaml b/packages/networks/boilerplate/pnpm-lock.yaml index 88414c2..4af44f6 100644 --- a/packages/networks/boilerplate/pnpm-lock.yaml +++ b/packages/networks/boilerplate/pnpm-lock.yaml @@ -6,16 +6,16 @@ settings: dependencies: '@multiplechain/types': - specifier: ^0.1.64 - version: 0.1.64 + specifier: ^0.1.66 + version: 0.1.66 '@multiplechain/utils': specifier: ^0.1.21 version: 0.1.21 packages: - /@multiplechain/types@0.1.64: - resolution: {integrity: sha512-euzFLiq18L3SCqN9mLY2GKEkaJhTFcBg7Ono/yqN87IT5qlZ1Xqzk2jcWvRcnlN3O5wL15QLKS+e2C11DKeXOA==} + /@multiplechain/types@0.1.66: + resolution: {integrity: sha512-ekv6EAQWZnya3hWX1WSvIWhAw3XbKvqp3JnlTeNw0BxzRnO6rYyHXD5iRse6R95mk11N3OUyDtbMCAvzYQUsxg==} dev: false /@multiplechain/utils@0.1.21: diff --git a/packages/networks/boilerplate/src/assets/Coin.ts b/packages/networks/boilerplate/src/assets/Coin.ts index 2b7df88..2b29b1b 100644 --- a/packages/networks/boilerplate/src/assets/Coin.ts +++ b/packages/networks/boilerplate/src/assets/Coin.ts @@ -1,5 +1,5 @@ -import { Provider } from '../services/Provider.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { Provider } from '../services/Provider' +import { TransactionSigner } from '../services/TransactionSigner' import type { CoinInterface, TransferAmount, WalletAddress } from '@multiplechain/types' export class Coin implements CoinInterface { diff --git a/packages/networks/boilerplate/src/assets/Contract.ts b/packages/networks/boilerplate/src/assets/Contract.ts index 5b63d07..eb25c2e 100644 --- a/packages/networks/boilerplate/src/assets/Contract.ts +++ b/packages/networks/boilerplate/src/assets/Contract.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import type { ContractAddress, ContractInterface, WalletAddress } from '@multiplechain/types' export class Contract implements ContractInterface { diff --git a/packages/networks/boilerplate/src/assets/NFT.ts b/packages/networks/boilerplate/src/assets/NFT.ts index 5452c21..cc04571 100644 --- a/packages/networks/boilerplate/src/assets/NFT.ts +++ b/packages/networks/boilerplate/src/assets/NFT.ts @@ -1,5 +1,5 @@ -import { Contract } from './Contract.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { Contract } from './Contract' +import { TransactionSigner } from '../services/TransactionSigner' import type { NftId, NftInterface, WalletAddress } from '@multiplechain/types' export class NFT extends Contract implements NftInterface { diff --git a/packages/networks/boilerplate/src/assets/Token.ts b/packages/networks/boilerplate/src/assets/Token.ts index 0f640e4..14bb3ed 100644 --- a/packages/networks/boilerplate/src/assets/Token.ts +++ b/packages/networks/boilerplate/src/assets/Token.ts @@ -1,5 +1,5 @@ -import { Contract } from './Contract.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { Contract } from './Contract' +import { TransactionSigner } from '../services/TransactionSigner' import type { TokenInterface, TransferAmount, WalletAddress } from '@multiplechain/types' export class Token extends Contract implements TokenInterface { diff --git a/packages/networks/boilerplate/src/assets/index.ts b/packages/networks/boilerplate/src/assets/index.ts index 7ea522f..737051b 100644 --- a/packages/networks/boilerplate/src/assets/index.ts +++ b/packages/networks/boilerplate/src/assets/index.ts @@ -1,4 +1,4 @@ -export * from './NFT.ts' -export * from './Coin.ts' -export * from './Token.ts' -export * from './Contract.ts' +export * from './NFT' +export * from './Coin' +export * from './Token' +export * from './Contract' diff --git a/packages/networks/boilerplate/src/browser/Wallet.ts b/packages/networks/boilerplate/src/browser/Wallet.ts index 3d75a8a..274b221 100644 --- a/packages/networks/boilerplate/src/browser/Wallet.ts +++ b/packages/networks/boilerplate/src/browser/Wallet.ts @@ -1,5 +1,5 @@ -import { Provider } from '../services/Provider.ts' -import type { TransactionSigner } from '../services/TransactionSigner.ts' +import { Provider } from '../services/Provider' +import type { TransactionSigner } from '../services/TransactionSigner' import type { WalletInterface, WalletAdapterInterface, diff --git a/packages/networks/boilerplate/src/browser/adapters/index.ts b/packages/networks/boilerplate/src/browser/adapters/index.ts index de0149d..479da98 100644 --- a/packages/networks/boilerplate/src/browser/adapters/index.ts +++ b/packages/networks/boilerplate/src/browser/adapters/index.ts @@ -1 +1 @@ -export { default as Example } from './Example.ts' +export { default as Example } from './Example' diff --git a/packages/networks/boilerplate/src/browser/index.ts b/packages/networks/boilerplate/src/browser/index.ts index 5bc8eb8..28622c8 100644 --- a/packages/networks/boilerplate/src/browser/index.ts +++ b/packages/networks/boilerplate/src/browser/index.ts @@ -1,6 +1,6 @@ -import { Wallet } from './Wallet.ts' -import * as adapterList from './adapters/index.ts' -import type { Provider } from '../services/Provider.ts' +import { Wallet } from './Wallet' +import * as adapterList from './adapters/index' +import type { Provider } from '../services/Provider' import type { WalletAdapterListType, WalletAdapterInterface, @@ -19,7 +19,7 @@ const registerAdapter: RegisterWalletAdapterType = ( adapters[adapter.id] = adapter } -export * from '../index.ts' +export * from '../index' export const browser = { Wallet, diff --git a/packages/networks/boilerplate/src/index.ts b/packages/networks/boilerplate/src/index.ts index 668ab52..612a2b2 100644 --- a/packages/networks/boilerplate/src/index.ts +++ b/packages/networks/boilerplate/src/index.ts @@ -1,8 +1,8 @@ -export * from './services/Provider.ts' +export * from './services/Provider' -export * as assets from './assets/index.ts' -export * as models from './models/index.ts' -export * as services from './services/index.ts' +export * as assets from './assets/index' +export * as models from './models/index' +export * as services from './services/index' export * as utils from '@multiplechain/utils' export * as types from '@multiplechain/types' diff --git a/packages/networks/boilerplate/src/models/CoinTransaction.ts b/packages/networks/boilerplate/src/models/CoinTransaction.ts index 0f35f9b..9c8c8ae 100644 --- a/packages/networks/boilerplate/src/models/CoinTransaction.ts +++ b/packages/networks/boilerplate/src/models/CoinTransaction.ts @@ -1,4 +1,4 @@ -import { Transaction } from './Transaction.ts' +import { Transaction } from './Transaction' import { TransactionStatusEnum } from '@multiplechain/types' import type { AssetDirectionEnum, CoinTransactionInterface, TransferAmount, WalletAddress } from '@multiplechain/types' diff --git a/packages/networks/boilerplate/src/models/ContractTransaction.ts b/packages/networks/boilerplate/src/models/ContractTransaction.ts index c4f15fc..17e94f4 100644 --- a/packages/networks/boilerplate/src/models/ContractTransaction.ts +++ b/packages/networks/boilerplate/src/models/ContractTransaction.ts @@ -1,4 +1,4 @@ -import { Transaction } from './Transaction.ts' +import { Transaction } from './Transaction' import type { ContractAddress, ContractTransactionInterface } from '@multiplechain/types' export class ContractTransaction extends Transaction implements ContractTransactionInterface { diff --git a/packages/networks/boilerplate/src/models/NftTransaction.ts b/packages/networks/boilerplate/src/models/NftTransaction.ts index ad5680c..5280cd8 100644 --- a/packages/networks/boilerplate/src/models/NftTransaction.ts +++ b/packages/networks/boilerplate/src/models/NftTransaction.ts @@ -1,4 +1,4 @@ -import { ContractTransaction } from './ContractTransaction.ts' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum } from '@multiplechain/types' import type { NftTransactionInterface, AssetDirectionEnum, WalletAddress, NftId } from '@multiplechain/types' diff --git a/packages/networks/boilerplate/src/models/TokenTransaction.ts b/packages/networks/boilerplate/src/models/TokenTransaction.ts index 37cd45f..4da0327 100644 --- a/packages/networks/boilerplate/src/models/TokenTransaction.ts +++ b/packages/networks/boilerplate/src/models/TokenTransaction.ts @@ -1,4 +1,4 @@ -import { ContractTransaction } from './ContractTransaction.ts' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum } from '@multiplechain/types' import type { AssetDirectionEnum, TokenTransactionInterface, TransferAmount, WalletAddress } from '@multiplechain/types' diff --git a/packages/networks/boilerplate/src/models/Transaction.ts b/packages/networks/boilerplate/src/models/Transaction.ts index b5a238f..1fe3c38 100644 --- a/packages/networks/boilerplate/src/models/Transaction.ts +++ b/packages/networks/boilerplate/src/models/Transaction.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { TransactionStatusEnum } from '@multiplechain/types' import { TransactionTypeEnum, diff --git a/packages/networks/boilerplate/src/models/index.ts b/packages/networks/boilerplate/src/models/index.ts index cc0a27c..354aa74 100644 --- a/packages/networks/boilerplate/src/models/index.ts +++ b/packages/networks/boilerplate/src/models/index.ts @@ -1,5 +1,5 @@ -export * from './Transaction.ts' -export * from './NftTransaction.ts' -export * from './CoinTransaction.ts' -export * from './TokenTransaction.ts' -export * from './ContractTransaction.ts' +export * from './Transaction' +export * from './NftTransaction' +export * from './CoinTransaction' +export * from './TokenTransaction' +export * from './ContractTransaction' diff --git a/packages/networks/boilerplate/src/services/TransactionListener.ts b/packages/networks/boilerplate/src/services/TransactionListener.ts index 7b141f7..6ee74b7 100644 --- a/packages/networks/boilerplate/src/services/TransactionListener.ts +++ b/packages/networks/boilerplate/src/services/TransactionListener.ts @@ -1,9 +1,9 @@ -import { Provider } from './Provider.ts' -import { Transaction } from '../models/Transaction.ts' -import { NftTransaction } from '../models/NftTransaction.ts' -import { CoinTransaction } from '../models/CoinTransaction.ts' -import { TokenTransaction } from '../models/TokenTransaction.ts' -import { ContractTransaction } from '../models/ContractTransaction.ts' +import { Provider } from './Provider' +import { Transaction } from '../models/Transaction' +import { NftTransaction } from '../models/NftTransaction' +import { CoinTransaction } from '../models/CoinTransaction' +import { TokenTransaction } from '../models/TokenTransaction' +import { ContractTransaction } from '../models/ContractTransaction' import { TransactionListenerProcessIndex, TransactionTypeEnum } from '@multiplechain/types' import type { DynamicTransactionType, diff --git a/packages/networks/boilerplate/src/services/TransactionSigner.ts b/packages/networks/boilerplate/src/services/TransactionSigner.ts index 96f0ef6..879ef50 100644 --- a/packages/networks/boilerplate/src/services/TransactionSigner.ts +++ b/packages/networks/boilerplate/src/services/TransactionSigner.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import type { PrivateKey, TransactionId, TransactionSignerInterface } from '@multiplechain/types' export class TransactionSigner implements TransactionSignerInterface{ diff --git a/packages/networks/boilerplate/src/services/index.ts b/packages/networks/boilerplate/src/services/index.ts index 549a382..0b05d2e 100644 --- a/packages/networks/boilerplate/src/services/index.ts +++ b/packages/networks/boilerplate/src/services/index.ts @@ -1,2 +1,2 @@ -export * from './TransactionSigner.ts' -export * from './TransactionListener.ts' +export * from './TransactionSigner' +export * from './TransactionListener' diff --git a/packages/networks/boilerplate/tests/assets.spec.ts b/packages/networks/boilerplate/tests/assets.spec.ts index ebafb17..c42bb11 100644 --- a/packages/networks/boilerplate/tests/assets.spec.ts +++ b/packages/networks/boilerplate/tests/assets.spec.ts @@ -1,12 +1,12 @@ import { describe, it, expect, assert } from 'vitest' -import { NFT } from '../src/assets/NFT.ts' -import { Coin } from '../src/assets/Coin.ts' -import { Token } from '../src/assets/Token.ts' +import { NFT } from '../src/assets/NFT' +import { Coin } from '../src/assets/Coin' +import { Token } from '../src/assets/Token' import { math } from '@multiplechain/utils' -import { Transaction } from '../src/models/Transaction.ts' +import { Transaction } from '../src/models/Transaction' import { TransactionStatusEnum, type TransactionId } from '@multiplechain/types' -import { TransactionSigner } from '../src/services/TransactionSigner.ts' +import { TransactionSigner } from '../src/services/TransactionSigner' const coinBalanceTestAmount = Number(process.env.BLP_COIN_BALANCE_TEST_AMOUNT) const tokenBalanceTestAmount = Number(process.env.BLP_TOKEN_BALANCE_TEST_AMOUNT) diff --git a/packages/networks/boilerplate/tests/models.spec.ts b/packages/networks/boilerplate/tests/models.spec.ts index e3d8ed2..0e6f8e5 100644 --- a/packages/networks/boilerplate/tests/models.spec.ts +++ b/packages/networks/boilerplate/tests/models.spec.ts @@ -1,9 +1,9 @@ import { describe, it, expect } from 'vitest' -import { Transaction } from '../src/models/Transaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' +import { Transaction } from '../src/models/Transaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { TokenTransaction } from '../src/models/TokenTransaction' import { AssetDirectionEnum, TransactionStatusEnum } from '@multiplechain/types' const nftId = Number(process.env.BLP_NFT_ID) diff --git a/packages/networks/boilerplate/tests/services.spec.ts b/packages/networks/boilerplate/tests/services.spec.ts index 9ea4958..93f492a 100644 --- a/packages/networks/boilerplate/tests/services.spec.ts +++ b/packages/networks/boilerplate/tests/services.spec.ts @@ -1,19 +1,19 @@ import { describe, it, expect } from 'vitest' -import { provider } from './setup.ts' -import { Provider } from '../src/services/Provider.ts' +import { provider } from './setup' +import { Provider } from '../src/services/Provider' -import { NFT } from '../src/assets/NFT.ts' -import { Coin } from '../src/assets/Coin.ts' -import { Token } from '../src/assets/Token.ts' +import { NFT } from '../src/assets/NFT' +import { Coin } from '../src/assets/Coin' +import { Token } from '../src/assets/Token' import { sleep } from '@multiplechain/utils' import { TransactionTypeEnum } from '@multiplechain/types' -import { Transaction } from '../src/models/Transaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' -import { ContractTransaction } from '../src/models/ContractTransaction.ts' -import { TransactionListener } from '../src/services/TransactionListener.ts' +import { Transaction } from '../src/models/Transaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { TokenTransaction } from '../src/models/TokenTransaction' +import { ContractTransaction } from '../src/models/ContractTransaction' +import { TransactionListener } from '../src/services/TransactionListener' const senderPrivateKey = String(process.env.BLP_SENDER_PRIVATE_KEY) const receiverPrivateKey = String(process.env.BLP_RECEIVER_PRIVATE_KEY) diff --git a/packages/networks/boilerplate/tests/setup.ts b/packages/networks/boilerplate/tests/setup.ts index 6c04b6b..476b875 100644 --- a/packages/networks/boilerplate/tests/setup.ts +++ b/packages/networks/boilerplate/tests/setup.ts @@ -1,4 +1,4 @@ -import { Provider } from '../src/services/Provider.ts' +import { Provider } from '../src/services/Provider' let provider: Provider diff --git a/packages/networks/boilerplate/vite.config.ts b/packages/networks/boilerplate/vite.config.ts index 084a66e..cfc31e7 100644 --- a/packages/networks/boilerplate/vite.config.ts +++ b/packages/networks/boilerplate/vite.config.ts @@ -1,5 +1,5 @@ import { mergeConfig } from 'vite' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig(mainConfig, { build: { diff --git a/packages/networks/boilerplate/vitest.config.ts b/packages/networks/boilerplate/vitest.config.ts index 433e719..94ef2da 100644 --- a/packages/networks/boilerplate/vitest.config.ts +++ b/packages/networks/boilerplate/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineConfig } from 'vitest/config' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig( mainConfig, diff --git a/packages/networks/evm-chains/.eslintrc.json b/packages/networks/evm-chains/.eslintrc.json index 3614d50..f8f7a15 100644 --- a/packages/networks/evm-chains/.eslintrc.json +++ b/packages/networks/evm-chains/.eslintrc.json @@ -1,4 +1,3 @@ { - "extends": ["plugin:require-extensions/recommended", "../../../.eslintrc.json"], - "plugins": ["require-extensions"] -} + "extends": ["../../../.eslintrc.json"] +} \ No newline at end of file diff --git a/packages/networks/evm-chains/cdt.ts b/packages/networks/evm-chains/cdt.ts index e6c4aa6..9dfd98e 100644 --- a/packages/networks/evm-chains/cdt.ts +++ b/packages/networks/evm-chains/cdt.ts @@ -1,7 +1,7 @@ // Create dynamic types import fs from 'fs' -import { networks } from './src/index.ts' +import { networks } from './src/index' console.log('\r\nCreating dynamic types...') diff --git a/packages/networks/evm-chains/esbuild.ts b/packages/networks/evm-chains/esbuild.ts index 5714b9c..f25aad1 100644 --- a/packages/networks/evm-chains/esbuild.ts +++ b/packages/networks/evm-chains/esbuild.ts @@ -1,3 +1,3 @@ -void import('../../../esbuild.ts').then((module) => { +void import('../../../esbuild').then((module) => { module.default() }) diff --git a/packages/networks/evm-chains/package.json b/packages/networks/evm-chains/package.json index c27b9e2..d6989e1 100644 --- a/packages/networks/evm-chains/package.json +++ b/packages/networks/evm-chains/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/evm-chains", - "version": "0.4.3", + "version": "0.4.4", "type": "module", "main": "dist/index.cjs", "module": "dist/index.es.js", @@ -75,7 +75,7 @@ "url": "https://github.com/MultipleChain/js/issues" }, "dependencies": { - "@multiplechain/types": "^0.1.64", + "@multiplechain/types": "^0.1.66", "@multiplechain/utils": "^0.1.21", "@wagmi/chains": "^1.8.0", "@walletconnect/ethereum-provider": "^2.12.2", diff --git a/packages/networks/evm-chains/pnpm-lock.yaml b/packages/networks/evm-chains/pnpm-lock.yaml index dfd8dcc..3afd1dc 100644 --- a/packages/networks/evm-chains/pnpm-lock.yaml +++ b/packages/networks/evm-chains/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@multiplechain/types': - specifier: ^0.1.64 - version: 0.1.64 + specifier: ^0.1.66 + version: 0.1.66 '@multiplechain/utils': specifier: ^0.1.21 version: 0.1.21 @@ -239,8 +239,8 @@ packages: tslib: 2.4.0 dev: false - /@multiplechain/types@0.1.64: - resolution: {integrity: sha512-euzFLiq18L3SCqN9mLY2GKEkaJhTFcBg7Ono/yqN87IT5qlZ1Xqzk2jcWvRcnlN3O5wL15QLKS+e2C11DKeXOA==} + /@multiplechain/types@0.1.66: + resolution: {integrity: sha512-ekv6EAQWZnya3hWX1WSvIWhAw3XbKvqp3JnlTeNw0BxzRnO6rYyHXD5iRse6R95mk11N3OUyDtbMCAvzYQUsxg==} dev: false /@multiplechain/utils@0.1.21: diff --git a/packages/networks/evm-chains/src/assets/Coin.ts b/packages/networks/evm-chains/src/assets/Coin.ts index 043aa11..73fc2e8 100644 --- a/packages/networks/evm-chains/src/assets/Coin.ts +++ b/packages/networks/evm-chains/src/assets/Coin.ts @@ -1,7 +1,7 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { hexToNumber, numberToHex } from '@multiplechain/utils' -import { TransactionSigner } from '../services/TransactionSigner.ts' -import type { TransactionData } from '../services/TransactionSigner.ts' +import { TransactionSigner } from '../services/TransactionSigner' +import type { TransactionData } from '../services/TransactionSigner' import { ErrorTypeEnum, type CoinInterface, diff --git a/packages/networks/evm-chains/src/assets/Contract.ts b/packages/networks/evm-chains/src/assets/Contract.ts index b65aabc..e3813bd 100644 --- a/packages/networks/evm-chains/src/assets/Contract.ts +++ b/packages/networks/evm-chains/src/assets/Contract.ts @@ -1,8 +1,8 @@ -import { Provider } from '../services/Provider.ts' -import type { Ethers } from '../services/Ethers.ts' +import { Provider } from '../services/Provider' +import type { Ethers } from '../services/Ethers' import type { ContractAddress, ContractInterface, WalletAddress } from '@multiplechain/types' import type { Contract as EthersContract, InterfaceAbi } from 'ethers' -import type { TransactionData } from '../services/TransactionSigner.ts' +import type { TransactionData } from '../services/TransactionSigner' export class Contract implements ContractInterface { /** diff --git a/packages/networks/evm-chains/src/assets/NFT.ts b/packages/networks/evm-chains/src/assets/NFT.ts index 6e6227d..eec552a 100644 --- a/packages/networks/evm-chains/src/assets/NFT.ts +++ b/packages/networks/evm-chains/src/assets/NFT.ts @@ -1,8 +1,8 @@ -import { Contract } from './Contract.ts' +import { Contract } from './Contract' import type { InterfaceAbi } from 'ethers' import ERC721 from '../../resources/ERC721.json' -import type { Provider } from '../services/Provider.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import type { Provider } from '../services/Provider' +import { TransactionSigner } from '../services/TransactionSigner' import { ErrorTypeEnum, type ContractAddress, diff --git a/packages/networks/evm-chains/src/assets/Token.ts b/packages/networks/evm-chains/src/assets/Token.ts index f6a26d3..c865b7e 100644 --- a/packages/networks/evm-chains/src/assets/Token.ts +++ b/packages/networks/evm-chains/src/assets/Token.ts @@ -1,9 +1,9 @@ -import { Contract } from './Contract.ts' +import { Contract } from './Contract' import type { InterfaceAbi } from 'ethers' import ERC20 from '../../resources/ERC20.json' -import type { Provider } from '../services/Provider.ts' +import type { Provider } from '../services/Provider' import { hexToNumber, numberToHex } from '@multiplechain/utils' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { TransactionSigner } from '../services/TransactionSigner' import { ErrorTypeEnum, type ContractAddress, diff --git a/packages/networks/evm-chains/src/assets/index.ts b/packages/networks/evm-chains/src/assets/index.ts index 7ea522f..737051b 100644 --- a/packages/networks/evm-chains/src/assets/index.ts +++ b/packages/networks/evm-chains/src/assets/index.ts @@ -1,4 +1,4 @@ -export * from './NFT.ts' -export * from './Coin.ts' -export * from './Token.ts' -export * from './Contract.ts' +export * from './NFT' +export * from './Coin' +export * from './Token' +export * from './Contract' diff --git a/packages/networks/evm-chains/src/browser/Wallet.ts b/packages/networks/evm-chains/src/browser/Wallet.ts index ca74a78..2fbf547 100644 --- a/packages/networks/evm-chains/src/browser/Wallet.ts +++ b/packages/networks/evm-chains/src/browser/Wallet.ts @@ -9,10 +9,10 @@ import { type SignedMessage, type WalletAddress } from '@multiplechain/types' -import { Provider } from '../services/Provider.ts' -import type { EIP1193Provider } from './adapters/EIP6963.ts' +import { Provider } from '../services/Provider' +import type { EIP1193Provider } from './adapters/EIP6963' import { toHex } from '@multiplechain/utils' -import type { TransactionSigner } from '../services/TransactionSigner.ts' +import type { TransactionSigner } from '../services/TransactionSigner' const rejectMap = (error: any, reject: (a: any) => any): any => { console.error('MultipleChain EVM Wallet Error:', error) diff --git a/packages/networks/evm-chains/src/browser/adapters/BitgetWallet.ts b/packages/networks/evm-chains/src/browser/adapters/BitgetWallet.ts index 64443e6..b48729e 100644 --- a/packages/networks/evm-chains/src/browser/adapters/BitgetWallet.ts +++ b/packages/networks/evm-chains/src/browser/adapters/BitgetWallet.ts @@ -1,8 +1,8 @@ -import icons from './icons.ts' -import { switcher } from './switcher.ts' -import type { EIP1193Provider } from './EIP6963.ts' +import icons from './icons' +import { switcher } from './switcher' +import type { EIP1193Provider } from './EIP6963' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' const BitgetWallet: WalletAdapterInterface = { diff --git a/packages/networks/evm-chains/src/browser/adapters/MetaMask.ts b/packages/networks/evm-chains/src/browser/adapters/MetaMask.ts index 1a8aa43..81b4572 100644 --- a/packages/networks/evm-chains/src/browser/adapters/MetaMask.ts +++ b/packages/networks/evm-chains/src/browser/adapters/MetaMask.ts @@ -1,9 +1,9 @@ -import icons from './icons.ts' -import { switcher } from './switcher.ts' -import type { WindowEthereum } from './types.ts' -import type { EIP1193Provider } from './EIP6963.ts' +import icons from './icons' +import { switcher } from './switcher' +import type { WindowEthereum } from './types' +import type { EIP1193Provider } from './EIP6963' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' const MetaMask: WalletAdapterInterface = { diff --git a/packages/networks/evm-chains/src/browser/adapters/OkxWallet.ts b/packages/networks/evm-chains/src/browser/adapters/OkxWallet.ts index 882fc8b..b884201 100644 --- a/packages/networks/evm-chains/src/browser/adapters/OkxWallet.ts +++ b/packages/networks/evm-chains/src/browser/adapters/OkxWallet.ts @@ -1,8 +1,8 @@ -import icons from './icons.ts' -import { switcher } from './switcher.ts' -import type { EIP1193Provider } from './EIP6963.ts' +import icons from './icons' +import { switcher } from './switcher' +import type { EIP1193Provider } from './EIP6963' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' const OkxWallet: WalletAdapterInterface = { diff --git a/packages/networks/evm-chains/src/browser/adapters/Phantom.ts b/packages/networks/evm-chains/src/browser/adapters/Phantom.ts index 80532d2..98fde5f 100644 --- a/packages/networks/evm-chains/src/browser/adapters/Phantom.ts +++ b/packages/networks/evm-chains/src/browser/adapters/Phantom.ts @@ -1,7 +1,7 @@ -import icons from './icons.ts' -import type { EIP1193Provider } from './EIP6963.ts' +import icons from './icons' +import type { EIP1193Provider } from './EIP6963' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' const Phantom: WalletAdapterInterface = { diff --git a/packages/networks/evm-chains/src/browser/adapters/TrustWallet.ts b/packages/networks/evm-chains/src/browser/adapters/TrustWallet.ts index d632273..8622f8d 100644 --- a/packages/networks/evm-chains/src/browser/adapters/TrustWallet.ts +++ b/packages/networks/evm-chains/src/browser/adapters/TrustWallet.ts @@ -1,9 +1,9 @@ -import icons from './icons.ts' -import { switcher } from './switcher.ts' -import type { WindowEthereum } from './types.ts' -import type { EIP1193Provider } from './EIP6963.ts' +import icons from './icons' +import { switcher } from './switcher' +import type { WindowEthereum } from './types' +import type { EIP1193Provider } from './EIP6963' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' const TrustWallet: WalletAdapterInterface = { diff --git a/packages/networks/evm-chains/src/browser/adapters/WalletConnect.ts b/packages/networks/evm-chains/src/browser/adapters/WalletConnect.ts index e7455db..7b3cb01 100644 --- a/packages/networks/evm-chains/src/browser/adapters/WalletConnect.ts +++ b/packages/networks/evm-chains/src/browser/adapters/WalletConnect.ts @@ -1,6 +1,6 @@ -import icons from './icons.ts' -import type { EIP1193Provider } from './EIP6963.ts' -import type { Provider } from '../../services/Provider.ts' +import icons from './icons' +import type { EIP1193Provider } from './EIP6963' +import type { Provider } from '../../services/Provider' import { EthereumProvider } from '@walletconnect/ethereum-provider' import { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types' import type { WalletConnectConfig, WalletAdapterInterface } from '@multiplechain/types' diff --git a/packages/networks/evm-chains/src/browser/adapters/Web3Modal.ts b/packages/networks/evm-chains/src/browser/adapters/Web3Modal.ts index 1a3f804..3d6039a 100644 --- a/packages/networks/evm-chains/src/browser/adapters/Web3Modal.ts +++ b/packages/networks/evm-chains/src/browser/adapters/Web3Modal.ts @@ -1,7 +1,7 @@ -import icons from './icons.ts' -import { networks } from '../../index.ts' -import type { EIP1193Provider } from './EIP6963.ts' -import type { Provider } from '../../services/Provider.ts' +import icons from './icons' +import { networks } from '../../index' +import type { EIP1193Provider } from './EIP6963' +import type { Provider } from '../../services/Provider' import type { Chain } from '@web3modal/scaffold-utils/ethers' import type { CustomWallet, Metadata } from '@web3modal/core' import { createWeb3Modal, defaultConfig } from '@web3modal/ethers' diff --git a/packages/networks/evm-chains/src/browser/adapters/XdefiWallet.ts b/packages/networks/evm-chains/src/browser/adapters/XdefiWallet.ts index 9547fb7..46ba9e4 100644 --- a/packages/networks/evm-chains/src/browser/adapters/XdefiWallet.ts +++ b/packages/networks/evm-chains/src/browser/adapters/XdefiWallet.ts @@ -1,7 +1,7 @@ -import icons from './icons.ts' -import { switcher } from './switcher.ts' -import type { EIP1193Provider } from './EIP6963.ts' -import type { Provider } from '../../services/Provider.ts' +import icons from './icons' +import { switcher } from './switcher' +import type { EIP1193Provider } from './EIP6963' +import type { Provider } from '../../services/Provider' import { WalletPlatformEnum } from '@multiplechain/types' import type { WalletAdapterInterface } from '@multiplechain/types' diff --git a/packages/networks/evm-chains/src/browser/adapters/index.ts b/packages/networks/evm-chains/src/browser/adapters/index.ts index 9cc32f0..ab7665f 100644 --- a/packages/networks/evm-chains/src/browser/adapters/index.ts +++ b/packages/networks/evm-chains/src/browser/adapters/index.ts @@ -1,9 +1,9 @@ -import './types.ts' // global types -export { default as Phantom } from './Phantom.ts' -export { default as MetaMask } from './MetaMask.ts' -export { default as Web3Modal } from './Web3Modal.ts' -export { default as OkxWallet } from './OkxWallet.ts' -export { default as XdefiWallet } from './XdefiWallet.ts' -export { default as TrustWallet } from './TrustWallet.ts' -export { default as BitgetWallet } from './BitgetWallet.ts' -export { default as WalletConnect } from './WalletConnect.ts' +import './types' // global types +export { default as Phantom } from './Phantom' +export { default as MetaMask } from './MetaMask' +export { default as Web3Modal } from './Web3Modal' +export { default as OkxWallet } from './OkxWallet' +export { default as XdefiWallet } from './XdefiWallet' +export { default as TrustWallet } from './TrustWallet' +export { default as BitgetWallet } from './BitgetWallet' +export { default as WalletConnect } from './WalletConnect' diff --git a/packages/networks/evm-chains/src/browser/adapters/switcher.ts b/packages/networks/evm-chains/src/browser/adapters/switcher.ts index d034043..161e076 100644 --- a/packages/networks/evm-chains/src/browser/adapters/switcher.ts +++ b/packages/networks/evm-chains/src/browser/adapters/switcher.ts @@ -1,8 +1,8 @@ -import type { RequestType } from '../Wallet.ts' -import networks from '../../services/Networks.ts' -import type { EIP1193Provider } from './EIP6963.ts' +import type { RequestType } from '../Wallet' +import networks from '../../services/Networks' +import type { EIP1193Provider } from './EIP6963' import { ErrorTypeEnum } from '@multiplechain/types' -import type { EvmNetworkConfigInterface, Provider } from '../../services/Provider.ts' +import type { EvmNetworkConfigInterface, Provider } from '../../services/Provider' export const switcher = async (wallet: EIP1193Provider, provider?: Provider): Promise => { const network = provider?.network diff --git a/packages/networks/evm-chains/src/browser/adapters/types.ts b/packages/networks/evm-chains/src/browser/adapters/types.ts index 8edd9f2..b193f34 100644 --- a/packages/networks/evm-chains/src/browser/adapters/types.ts +++ b/packages/networks/evm-chains/src/browser/adapters/types.ts @@ -1,4 +1,4 @@ -import type { EIP1193Provider } from './EIP6963.ts' +import type { EIP1193Provider } from './EIP6963' export interface WindowEthereum extends EIP1193Provider { isTrust?: boolean diff --git a/packages/networks/evm-chains/src/browser/index.ts b/packages/networks/evm-chains/src/browser/index.ts index 703b083..ccf03f0 100644 --- a/packages/networks/evm-chains/src/browser/index.ts +++ b/packages/networks/evm-chains/src/browser/index.ts @@ -1,14 +1,14 @@ -import { Wallet } from './Wallet.ts' -import { switcher } from './adapters/switcher.ts' -import * as adapterList from './adapters/index.ts' +import { Wallet } from './Wallet' +import { switcher } from './adapters/switcher' +import * as adapterList from './adapters/index' import { WalletPlatformEnum } from '@multiplechain/types' -import type { EIP6963ProviderDetail, EIP1193Provider } from './adapters/EIP6963.ts' +import type { EIP6963ProviderDetail, EIP1193Provider } from './adapters/EIP6963' import type { WalletAdapterInterface, WalletAdapterListType, RegisterWalletAdapterType } from '@multiplechain/types' -import type { Provider } from '../services/Provider.ts' +import type { Provider } from '../services/Provider' const EIP6963AdapterUUIDIndex: Record = { 'app.phantom': 'phantom', @@ -87,7 +87,7 @@ const toEIP6963ProviderDetail = ( } } -export * from '../index.ts' +export * from '../index' export const browser = { Wallet, diff --git a/packages/networks/evm-chains/src/index.ts b/packages/networks/evm-chains/src/index.ts index b06e38c..ecdfeab 100644 --- a/packages/networks/evm-chains/src/index.ts +++ b/packages/networks/evm-chains/src/index.ts @@ -1,9 +1,9 @@ -export * from './services/Provider.ts' +export * from './services/Provider' -export * as assets from './assets/index.ts' -export * as models from './models/index.ts' -export * as services from './services/index.ts' -export { default as networks } from './services/Networks.ts' +export * as assets from './assets/index' +export * as models from './models/index' +export * as services from './services/index' +export { default as networks } from './services/Networks' export * as utils from '@multiplechain/utils' export * as types from '@multiplechain/types' diff --git a/packages/networks/evm-chains/src/models/CoinTransaction.ts b/packages/networks/evm-chains/src/models/CoinTransaction.ts index 535610f..afcb1c7 100644 --- a/packages/networks/evm-chains/src/models/CoinTransaction.ts +++ b/packages/networks/evm-chains/src/models/CoinTransaction.ts @@ -1,4 +1,4 @@ -import { Transaction } from './Transaction.ts' +import { Transaction } from './Transaction' import { hexToNumber } from '@multiplechain/utils' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { WalletAddress, CoinTransactionInterface, TransferAmount } from '@multiplechain/types' diff --git a/packages/networks/evm-chains/src/models/ContractTransaction.ts b/packages/networks/evm-chains/src/models/ContractTransaction.ts index cd41da3..7010857 100644 --- a/packages/networks/evm-chains/src/models/ContractTransaction.ts +++ b/packages/networks/evm-chains/src/models/ContractTransaction.ts @@ -1,4 +1,4 @@ -import { Transaction } from './Transaction.ts' +import { Transaction } from './Transaction' import type { ContractAddress, ContractTransactionInterface, @@ -10,7 +10,7 @@ import { type TransactionResponse, type TransactionDescription } from 'ethers' -import type { Provider } from '../services/Provider.ts' +import type { Provider } from '../services/Provider' export class ContractTransaction extends Transaction implements ContractTransactionInterface { /** diff --git a/packages/networks/evm-chains/src/models/NftTransaction.ts b/packages/networks/evm-chains/src/models/NftTransaction.ts index d42cd05..be8e01b 100644 --- a/packages/networks/evm-chains/src/models/NftTransaction.ts +++ b/packages/networks/evm-chains/src/models/NftTransaction.ts @@ -1,7 +1,7 @@ import type { InterfaceAbi } from 'ethers' import ERC721 from '../../resources/ERC721.json' -import type { Provider } from '../services/Provider.ts' -import { ContractTransaction } from './ContractTransaction.ts' +import type { Provider } from '../services/Provider' +import { ContractTransaction } from './ContractTransaction' import type { NftId, NftTransactionInterface, diff --git a/packages/networks/evm-chains/src/models/TokenTransaction.ts b/packages/networks/evm-chains/src/models/TokenTransaction.ts index e2e5976..6654856 100644 --- a/packages/networks/evm-chains/src/models/TokenTransaction.ts +++ b/packages/networks/evm-chains/src/models/TokenTransaction.ts @@ -1,9 +1,9 @@ -import { Token } from '../assets/Token.ts' +import { Token } from '../assets/Token' import type { InterfaceAbi } from 'ethers' import ERC20 from '../../resources/ERC20.json' import { hexToNumber } from '@multiplechain/utils' -import type { Provider } from '../services/Provider.ts' -import { ContractTransaction } from './ContractTransaction.ts' +import type { Provider } from '../services/Provider' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { TransactionId, diff --git a/packages/networks/evm-chains/src/models/Transaction.ts b/packages/networks/evm-chains/src/models/Transaction.ts index 3343916..95f0232 100644 --- a/packages/networks/evm-chains/src/models/Transaction.ts +++ b/packages/networks/evm-chains/src/models/Transaction.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { ErrorTypeEnum, TransactionStatusEnum } from '@multiplechain/types' import { TransactionTypeEnum, @@ -11,9 +11,9 @@ import { type WalletAddress } from '@multiplechain/types' import type { TransactionReceipt, TransactionResponse } from 'ethers' -import type { Ethers } from '../services/Ethers.ts' +import type { Ethers } from '../services/Ethers' import { hexToNumber } from '@multiplechain/utils' -import { NFT } from '../assets/NFT.ts' +import { NFT } from '../assets/NFT' const selectors = { // ERC20 diff --git a/packages/networks/evm-chains/src/models/index.ts b/packages/networks/evm-chains/src/models/index.ts index cc0a27c..354aa74 100644 --- a/packages/networks/evm-chains/src/models/index.ts +++ b/packages/networks/evm-chains/src/models/index.ts @@ -1,5 +1,5 @@ -export * from './Transaction.ts' -export * from './NftTransaction.ts' -export * from './CoinTransaction.ts' -export * from './TokenTransaction.ts' -export * from './ContractTransaction.ts' +export * from './Transaction' +export * from './NftTransaction' +export * from './CoinTransaction' +export * from './TokenTransaction' +export * from './ContractTransaction' diff --git a/packages/networks/evm-chains/src/services/Ethers.ts b/packages/networks/evm-chains/src/services/Ethers.ts index e84c88d..c9e7fca 100644 --- a/packages/networks/evm-chains/src/services/Ethers.ts +++ b/packages/networks/evm-chains/src/services/Ethers.ts @@ -16,8 +16,8 @@ import { type WalletAddress } from '@multiplechain/types' import { sleep, checkWebSocket } from '@multiplechain/utils' -import type { EvmNetworkConfigInterface } from './Provider.ts' -import type { TransactionData } from '../services/TransactionSigner.ts' +import type { EvmNetworkConfigInterface } from './Provider' +import type { TransactionData } from '../services/TransactionSigner' import { Wallet, Contract, ContractFactory, JsonRpcProvider, WebSocketProvider } from 'ethers' export type { EthersError } from 'ethers' diff --git a/packages/networks/evm-chains/src/services/Networks.ts b/packages/networks/evm-chains/src/services/Networks.ts index 3ab739c..81bebca 100644 --- a/packages/networks/evm-chains/src/services/Networks.ts +++ b/packages/networks/evm-chains/src/services/Networks.ts @@ -1,5 +1,5 @@ import * as wagmiChains from '@wagmi/chains' -import type { EvmNetworkConfigInterface } from './Provider.ts' +import type { EvmNetworkConfigInterface } from './Provider' const networks: Record = {} diff --git a/packages/networks/evm-chains/src/services/Provider.ts b/packages/networks/evm-chains/src/services/Provider.ts index 2ae1bd3..70b9592 100644 --- a/packages/networks/evm-chains/src/services/Provider.ts +++ b/packages/networks/evm-chains/src/services/Provider.ts @@ -1,5 +1,5 @@ import axios from 'axios' -import { Ethers } from './Ethers.ts' +import { Ethers } from './Ethers' import { ErrorTypeEnum, type NetworkConfigInterface, diff --git a/packages/networks/evm-chains/src/services/TransactionListener.ts b/packages/networks/evm-chains/src/services/TransactionListener.ts index 91342f8..cc625ee 100644 --- a/packages/networks/evm-chains/src/services/TransactionListener.ts +++ b/packages/networks/evm-chains/src/services/TransactionListener.ts @@ -6,16 +6,16 @@ import type { TransactionId } from '@multiplechain/types' -import { Provider } from './Provider.ts' -import type { Ethers } from './Ethers.ts' +import { Provider } from './Provider' +import type { Ethers } from './Ethers' import { id, zeroPadValue } from 'ethers' import { objectsEqual } from '@multiplechain/utils' -import { Transaction } from '../models/Transaction.ts' -import { NftTransaction } from '../models/NftTransaction.ts' -import { CoinTransaction } from '../models/CoinTransaction.ts' -import { TokenTransaction } from '../models/TokenTransaction.ts' +import { Transaction } from '../models/Transaction' +import { NftTransaction } from '../models/NftTransaction' +import { CoinTransaction } from '../models/CoinTransaction' +import { TokenTransaction } from '../models/TokenTransaction' import { ErrorTypeEnum, TransactionListenerProcessIndex } from '@multiplechain/types' -import { ContractTransaction } from '../models/ContractTransaction.ts' +import { ContractTransaction } from '../models/ContractTransaction' import { type WebSocketProvider, type JsonRpcApiProvider, diff --git a/packages/networks/evm-chains/src/services/TransactionSigner.ts b/packages/networks/evm-chains/src/services/TransactionSigner.ts index c450881..b56993f 100644 --- a/packages/networks/evm-chains/src/services/TransactionSigner.ts +++ b/packages/networks/evm-chains/src/services/TransactionSigner.ts @@ -1,5 +1,5 @@ -import type { EthersError } from './Ethers.ts' -import { Provider } from '../services/Provider.ts' +import type { EthersError } from './Ethers' +import { Provider } from '../services/Provider' import type { TransactionRequest, Wallet, BigNumberish } from 'ethers' import { ErrorTypeEnum, diff --git a/packages/networks/evm-chains/src/services/index.ts b/packages/networks/evm-chains/src/services/index.ts index 549a382..0b05d2e 100644 --- a/packages/networks/evm-chains/src/services/index.ts +++ b/packages/networks/evm-chains/src/services/index.ts @@ -1,2 +1,2 @@ -export * from './TransactionSigner.ts' -export * from './TransactionListener.ts' +export * from './TransactionSigner' +export * from './TransactionListener' diff --git a/packages/networks/evm-chains/tests/assets.spec.ts b/packages/networks/evm-chains/tests/assets.spec.ts index d943f88..dd6eaa9 100644 --- a/packages/networks/evm-chains/tests/assets.spec.ts +++ b/packages/networks/evm-chains/tests/assets.spec.ts @@ -1,12 +1,12 @@ import { describe, it, expect, assert } from 'vitest' -import { NFT } from '../src/assets/NFT.ts' -import { Coin } from '../src/assets/Coin.ts' -import { Token } from '../src/assets/Token.ts' +import { NFT } from '../src/assets/NFT' +import { Coin } from '../src/assets/Coin' +import { Token } from '../src/assets/Token' import { math } from '@multiplechain/utils' -import { Transaction } from '../src/models/Transaction.ts' +import { Transaction } from '../src/models/Transaction' import { TransactionStatusEnum, type TransactionId } from '@multiplechain/types' -import { TransactionSigner } from '../src/services/TransactionSigner.ts' +import { TransactionSigner } from '../src/services/TransactionSigner' const coinBalanceTestAmount = Number(process.env.EVM_COIN_BALANCE_TEST_AMOUNT) const tokenBalanceTestAmount = Number(process.env.EVM_TOKEN_BALANCE_TEST_AMOUNT) diff --git a/packages/networks/evm-chains/tests/models.spec.ts b/packages/networks/evm-chains/tests/models.spec.ts index 860feab..5876f37 100644 --- a/packages/networks/evm-chains/tests/models.spec.ts +++ b/packages/networks/evm-chains/tests/models.spec.ts @@ -1,9 +1,9 @@ import { describe, it, expect } from 'vitest' -import { Transaction } from '../src/models/Transaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' +import { Transaction } from '../src/models/Transaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { TokenTransaction } from '../src/models/TokenTransaction' import { AssetDirectionEnum, TransactionStatusEnum } from '@multiplechain/types' const nftId = Number(process.env.EVM_NFT_ID) diff --git a/packages/networks/evm-chains/tests/services.spec.ts b/packages/networks/evm-chains/tests/services.spec.ts index b6c489b..d8024a8 100644 --- a/packages/networks/evm-chains/tests/services.spec.ts +++ b/packages/networks/evm-chains/tests/services.spec.ts @@ -1,18 +1,18 @@ import { describe, it, expect } from 'vitest' -import { provider } from './setup.ts' -import networks from '../src/services/Networks.ts' -import { Provider, type EvmNetworkConfigInterface } from '../src/services/Provider.ts' -import { TransactionListener } from '../src/services/TransactionListener.ts' +import { provider } from './setup' +import networks from '../src/services/Networks' +import { Provider, type EvmNetworkConfigInterface } from '../src/services/Provider' +import { TransactionListener } from '../src/services/TransactionListener' import { TransactionTypeEnum } from '@multiplechain/types' -import { Coin } from '../src/assets/Coin.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { ContractTransaction } from '../src/models/ContractTransaction.ts' -import { Token } from '../src/assets/Token.ts' -import { Transaction } from '../src/models/Transaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { NFT } from '../src/assets/NFT.ts' +import { Coin } from '../src/assets/Coin' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { ContractTransaction } from '../src/models/ContractTransaction' +import { Token } from '../src/assets/Token' +import { Transaction } from '../src/models/Transaction' +import { TokenTransaction } from '../src/models/TokenTransaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { NFT } from '../src/assets/NFT' import ERC20 from '../resources/ERC20.json' import type { InterfaceAbi } from 'ethers' import { ContractFactory, WebSocketProvider } from 'ethers' diff --git a/packages/networks/evm-chains/tests/setup.ts b/packages/networks/evm-chains/tests/setup.ts index f939bdf..2f8cad5 100644 --- a/packages/networks/evm-chains/tests/setup.ts +++ b/packages/networks/evm-chains/tests/setup.ts @@ -1,4 +1,4 @@ -import { Provider } from '../src/services/Provider.ts' +import { Provider } from '../src/services/Provider' let provider: Provider diff --git a/packages/networks/evm-chains/vite.config.ts b/packages/networks/evm-chains/vite.config.ts index 4422b05..336c39f 100644 --- a/packages/networks/evm-chains/vite.config.ts +++ b/packages/networks/evm-chains/vite.config.ts @@ -1,5 +1,5 @@ import { mergeConfig } from 'vite' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig(mainConfig, { build: { diff --git a/packages/networks/evm-chains/vitest.config.ts b/packages/networks/evm-chains/vitest.config.ts index 433e719..94ef2da 100644 --- a/packages/networks/evm-chains/vitest.config.ts +++ b/packages/networks/evm-chains/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineConfig } from 'vitest/config' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig( mainConfig, diff --git a/packages/networks/solana/.eslintrc.json b/packages/networks/solana/.eslintrc.json index b62472f..f8f7a15 100644 --- a/packages/networks/solana/.eslintrc.json +++ b/packages/networks/solana/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/networks/solana/esbuild.ts b/packages/networks/solana/esbuild.ts index 5714b9c..f25aad1 100644 --- a/packages/networks/solana/esbuild.ts +++ b/packages/networks/solana/esbuild.ts @@ -1,3 +1,3 @@ -void import('../../../esbuild.ts').then((module) => { +void import('../../../esbuild').then((module) => { module.default() }) diff --git a/packages/networks/solana/package.json b/packages/networks/solana/package.json index 36d1e3a..fafb654 100644 --- a/packages/networks/solana/package.json +++ b/packages/networks/solana/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/solana", - "version": "0.4.3", + "version": "0.4.4", "type": "module", "main": "dist/index.cjs", "module": "dist/index.es.js", @@ -74,7 +74,7 @@ "dependencies": { "@metaplex-foundation/js": "^0.20.1", "@multiplechain/solana-walletconnect": "^0.1.1", - "@multiplechain/types": "^0.1.64", + "@multiplechain/types": "^0.1.66", "@multiplechain/utils": "^0.1.21", "@solana/spl-token": "^0.4.6", "@solana/spl-token-metadata": "^0.1.4", diff --git a/packages/networks/solana/pnpm-lock.yaml b/packages/networks/solana/pnpm-lock.yaml index d956d19..b290049 100644 --- a/packages/networks/solana/pnpm-lock.yaml +++ b/packages/networks/solana/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^0.1.1 version: 0.1.1(@solana/web3.js@1.91.8)(vite@5.2.11) '@multiplechain/types': - specifier: ^0.1.64 - version: 0.1.64 + specifier: ^0.1.66 + version: 0.1.66 '@multiplechain/utils': specifier: ^0.1.21 version: 0.1.21 @@ -935,8 +935,8 @@ packages: - vite dev: false - /@multiplechain/types@0.1.64: - resolution: {integrity: sha512-euzFLiq18L3SCqN9mLY2GKEkaJhTFcBg7Ono/yqN87IT5qlZ1Xqzk2jcWvRcnlN3O5wL15QLKS+e2C11DKeXOA==} + /@multiplechain/types@0.1.66: + resolution: {integrity: sha512-ekv6EAQWZnya3hWX1WSvIWhAw3XbKvqp3JnlTeNw0BxzRnO6rYyHXD5iRse6R95mk11N3OUyDtbMCAvzYQUsxg==} dev: false /@multiplechain/utils@0.1.21: diff --git a/packages/networks/solana/src/assets/Coin.ts b/packages/networks/solana/src/assets/Coin.ts index 82b7911..f0c96e2 100644 --- a/packages/networks/solana/src/assets/Coin.ts +++ b/packages/networks/solana/src/assets/Coin.ts @@ -1,6 +1,6 @@ -import { Provider } from '../services/Provider.ts' -import { fromLamports, toLamports } from '../utils.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { Provider } from '../services/Provider' +import { fromLamports, toLamports } from '../utils' +import { TransactionSigner } from '../services/TransactionSigner' import { PublicKey, SystemProgram, Transaction } from '@solana/web3.js' import { ErrorTypeEnum, diff --git a/packages/networks/solana/src/assets/Contract.ts b/packages/networks/solana/src/assets/Contract.ts index d9bb2ae..9c8e677 100644 --- a/packages/networks/solana/src/assets/Contract.ts +++ b/packages/networks/solana/src/assets/Contract.ts @@ -1,5 +1,5 @@ import { PublicKey } from '@solana/web3.js' -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import type { ContractAddress, ContractInterface, WalletAddress } from '@multiplechain/types' export class Contract implements ContractInterface { diff --git a/packages/networks/solana/src/assets/NFT.ts b/packages/networks/solana/src/assets/NFT.ts index d172afa..a199198 100644 --- a/packages/networks/solana/src/assets/NFT.ts +++ b/packages/networks/solana/src/assets/NFT.ts @@ -1,4 +1,4 @@ -import { Contract } from './Contract.ts' +import { Contract } from './Contract' import { Metaplex } from '@metaplex-foundation/js' import { ErrorTypeEnum, @@ -22,7 +22,7 @@ import { createTransferInstruction, createApproveInstruction } from '@solana/spl-token' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { TransactionSigner } from '../services/TransactionSigner' type Metadata = Sft | SftWithToken | Nft | NftWithToken diff --git a/packages/networks/solana/src/assets/Token.ts b/packages/networks/solana/src/assets/Token.ts index 8561c34..89292af 100644 --- a/packages/networks/solana/src/assets/Token.ts +++ b/packages/networks/solana/src/assets/Token.ts @@ -1,4 +1,4 @@ -import { Contract } from './Contract.ts' +import { Contract } from './Contract' import { math } from '@multiplechain/utils' import { Metaplex } from '@metaplex-foundation/js' import { @@ -24,7 +24,7 @@ import { createTransferInstruction, createApproveInstruction } from '@solana/spl-token' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { TransactionSigner } from '../services/TransactionSigner' interface Metadata { name: string diff --git a/packages/networks/solana/src/assets/index.ts b/packages/networks/solana/src/assets/index.ts index 7ea522f..737051b 100644 --- a/packages/networks/solana/src/assets/index.ts +++ b/packages/networks/solana/src/assets/index.ts @@ -1,4 +1,4 @@ -export * from './NFT.ts' -export * from './Coin.ts' -export * from './Token.ts' -export * from './Contract.ts' +export * from './NFT' +export * from './Coin' +export * from './Token' +export * from './Contract' diff --git a/packages/networks/solana/src/browser/Wallet.ts b/packages/networks/solana/src/browser/Wallet.ts index ec49f2b..9811554 100644 --- a/packages/networks/solana/src/browser/Wallet.ts +++ b/packages/networks/solana/src/browser/Wallet.ts @@ -9,13 +9,13 @@ import { type SignedMessage, type TransactionId } from '@multiplechain/types' -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import type { WalletAdapterEvents, BaseMessageSignerWalletAdapter } from '@solana/wallet-adapter-base' import { base58Encode } from '@multiplechain/utils' -import type { TransactionSigner } from '../services/TransactionSigner.ts' +import type { TransactionSigner } from '../services/TransactionSigner' const rejectMap = (error: any, reject: (a: any) => any): any => { console.error('MultipleChain Solana Wallet Error:', error) diff --git a/packages/networks/solana/src/browser/adapters/BitgetWallet.ts b/packages/networks/solana/src/browser/adapters/BitgetWallet.ts index 88e22a6..0493bcb 100644 --- a/packages/networks/solana/src/browser/adapters/BitgetWallet.ts +++ b/packages/networks/solana/src/browser/adapters/BitgetWallet.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import { WalletReadyState } from '@solana/wallet-adapter-base' import { BitgetWalletAdapter } from '@solana/wallet-adapter-bitkeep' import type { WalletAdapterInterface } from '@multiplechain/types' diff --git a/packages/networks/solana/src/browser/adapters/CoinbaseWallet.ts b/packages/networks/solana/src/browser/adapters/CoinbaseWallet.ts index b1d5bfd..c72f615 100644 --- a/packages/networks/solana/src/browser/adapters/CoinbaseWallet.ts +++ b/packages/networks/solana/src/browser/adapters/CoinbaseWallet.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import { WalletReadyState } from '@solana/wallet-adapter-base' import type { WalletAdapterInterface } from '@multiplechain/types' import { CoinbaseWalletAdapter } from '@solana/wallet-adapter-coinbase' diff --git a/packages/networks/solana/src/browser/adapters/Phantom.ts b/packages/networks/solana/src/browser/adapters/Phantom.ts index 02e026e..1e663a6 100644 --- a/packages/networks/solana/src/browser/adapters/Phantom.ts +++ b/packages/networks/solana/src/browser/adapters/Phantom.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' import { PhantomWalletAdapter } from '@solana/wallet-adapter-phantom' diff --git a/packages/networks/solana/src/browser/adapters/Slope.ts b/packages/networks/solana/src/browser/adapters/Slope.ts index abcc16c..b37bc5b 100644 --- a/packages/networks/solana/src/browser/adapters/Slope.ts +++ b/packages/networks/solana/src/browser/adapters/Slope.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import { WalletReadyState } from '@solana/wallet-adapter-base' import { SlopeWalletAdapter } from '@solana/wallet-adapter-slope' import type { WalletAdapterInterface } from '@multiplechain/types' diff --git a/packages/networks/solana/src/browser/adapters/Solflare.ts b/packages/networks/solana/src/browser/adapters/Solflare.ts index 77cfc64..92309bd 100644 --- a/packages/networks/solana/src/browser/adapters/Solflare.ts +++ b/packages/networks/solana/src/browser/adapters/Solflare.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' import { SolflareWalletAdapter } from '@solana/wallet-adapter-solflare' import { WalletReadyState, WalletAdapterNetwork } from '@solana/wallet-adapter-base' diff --git a/packages/networks/solana/src/browser/adapters/TokenPocket.ts b/packages/networks/solana/src/browser/adapters/TokenPocket.ts index 507b39c..6d9878b 100644 --- a/packages/networks/solana/src/browser/adapters/TokenPocket.ts +++ b/packages/networks/solana/src/browser/adapters/TokenPocket.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import { WalletReadyState } from '@solana/wallet-adapter-base' import type { WalletAdapterInterface } from '@multiplechain/types' import { TokenPocketWalletAdapter } from '@solana/wallet-adapter-tokenpocket' diff --git a/packages/networks/solana/src/browser/adapters/TrustWallet.ts b/packages/networks/solana/src/browser/adapters/TrustWallet.ts index 737f40f..0c16d35 100644 --- a/packages/networks/solana/src/browser/adapters/TrustWallet.ts +++ b/packages/networks/solana/src/browser/adapters/TrustWallet.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import { WalletReadyState } from '@solana/wallet-adapter-base' import { TrustWalletAdapter } from '@solana/wallet-adapter-trust' import type { WalletAdapterInterface } from '@multiplechain/types' diff --git a/packages/networks/solana/src/browser/adapters/WalletConnect.ts b/packages/networks/solana/src/browser/adapters/WalletConnect.ts index 455fb91..5fba2aa 100644 --- a/packages/networks/solana/src/browser/adapters/WalletConnect.ts +++ b/packages/networks/solana/src/browser/adapters/WalletConnect.ts @@ -1,5 +1,5 @@ -import type { WalletProvider } from '../Wallet.ts' -import type { Provider } from '../../services/Provider.ts' +import type { WalletProvider } from '../Wallet' +import type { Provider } from '../../services/Provider' import { WalletAdapterNetwork } from '@solana/wallet-adapter-base' import { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types' import WalletConnectWalletAdapter from '@multiplechain/solana-walletconnect' diff --git a/packages/networks/solana/src/browser/adapters/Web3Modal.ts b/packages/networks/solana/src/browser/adapters/Web3Modal.ts index 1e5d205..61f4f88 100644 --- a/packages/networks/solana/src/browser/adapters/Web3Modal.ts +++ b/packages/networks/solana/src/browser/adapters/Web3Modal.ts @@ -1,6 +1,6 @@ import type { Metadata } from '@web3modal/core' -import type { WalletProvider } from '../Wallet.ts' -import type { Provider } from '../../services/Provider.ts' +import type { WalletProvider } from '../Wallet' +import type { Provider } from '../../services/Provider' import { solana, solanaDevnet } from '@web3modal/solana/chains' import { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types' import type { ProviderInterface, WalletAdapterInterface } from '@multiplechain/types' diff --git a/packages/networks/solana/src/browser/adapters/index.ts b/packages/networks/solana/src/browser/adapters/index.ts index 4afca6c..aa0d88a 100644 --- a/packages/networks/solana/src/browser/adapters/index.ts +++ b/packages/networks/solana/src/browser/adapters/index.ts @@ -1,9 +1,9 @@ -export { default as Slope } from './Slope.ts' -export { default as Phantom } from './Phantom.ts' -export { default as Solflare } from './Solflare.ts' -export { default as Web3Modal } from './Web3Modal.ts' -export { default as TrustWallet } from './TrustWallet.ts' -export { default as TokenPocket } from './TokenPocket.ts' -export { default as BitgetWallet } from './BitgetWallet.ts' -export { default as WalletConnect } from './WalletConnect.ts' -export { default as CoinbaseWallet } from './CoinbaseWallet.ts' +export { default as Slope } from './Slope' +export { default as Phantom } from './Phantom' +export { default as Solflare } from './Solflare' +export { default as Web3Modal } from './Web3Modal' +export { default as TrustWallet } from './TrustWallet' +export { default as TokenPocket } from './TokenPocket' +export { default as BitgetWallet } from './BitgetWallet' +export { default as WalletConnect } from './WalletConnect' +export { default as CoinbaseWallet } from './CoinbaseWallet' diff --git a/packages/networks/solana/src/browser/index.ts b/packages/networks/solana/src/browser/index.ts index 8de2ab5..3637cf7 100644 --- a/packages/networks/solana/src/browser/index.ts +++ b/packages/networks/solana/src/browser/index.ts @@ -1,6 +1,6 @@ -import type { Provider } from '../services/Provider.ts' -import { Wallet, type WalletProvider } from './Wallet.ts' -import * as adapterList from './adapters/index.ts' +import type { Provider } from '../services/Provider' +import { Wallet, type WalletProvider } from './Wallet' +import * as adapterList from './adapters/index' import type { WalletAdapterListType, WalletAdapterInterface, @@ -19,7 +19,7 @@ const registerAdapter: RegisterWalletAdapterType = ( adapters[adapter.id] = adapter } -export * from '../index.ts' +export * from '../index' export const browser = { Wallet, diff --git a/packages/networks/solana/src/index.ts b/packages/networks/solana/src/index.ts index 7b0e1cd..be37abf 100644 --- a/packages/networks/solana/src/index.ts +++ b/packages/networks/solana/src/index.ts @@ -1,8 +1,8 @@ -export * from './services/Provider.ts' +export * from './services/Provider' -export * as assets from './assets/index.ts' -export * as models from './models/index.ts' -export * as services from './services/index.ts' +export * as assets from './assets/index' +export * as models from './models/index' +export * as services from './services/index' -export * as utils from './utils.ts' +export * as utils from './utils' export * as types from '@multiplechain/types' diff --git a/packages/networks/solana/src/models/CoinTransaction.ts b/packages/networks/solana/src/models/CoinTransaction.ts index 1e3ce68..187c55a 100644 --- a/packages/networks/solana/src/models/CoinTransaction.ts +++ b/packages/networks/solana/src/models/CoinTransaction.ts @@ -1,5 +1,5 @@ -import { fromLamports } from '../utils.ts' -import { Transaction } from './Transaction.ts' +import { fromLamports } from '../utils' +import { Transaction } from './Transaction' import type { ParsedInstruction, ParsedTransactionWithMeta } from '@solana/web3.js' import { AssetDirectionEnum, diff --git a/packages/networks/solana/src/models/ContractTransaction.ts b/packages/networks/solana/src/models/ContractTransaction.ts index dc0d07d..318e407 100644 --- a/packages/networks/solana/src/models/ContractTransaction.ts +++ b/packages/networks/solana/src/models/ContractTransaction.ts @@ -1,4 +1,4 @@ -import { Transaction } from './Transaction.ts' +import { Transaction } from './Transaction' import type { ParsedInstruction, ParsedTransactionWithMeta } from '@solana/web3.js' import type { ContractAddress, ContractTransactionInterface } from '@multiplechain/types' diff --git a/packages/networks/solana/src/models/NftTransaction.ts b/packages/networks/solana/src/models/NftTransaction.ts index 804da91..afe885d 100644 --- a/packages/networks/solana/src/models/NftTransaction.ts +++ b/packages/networks/solana/src/models/NftTransaction.ts @@ -1,4 +1,4 @@ -import { ContractTransaction } from './ContractTransaction.ts' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { ParsedInstruction, ParsedTransactionWithMeta } from '@solana/web3.js' import type { diff --git a/packages/networks/solana/src/models/TokenTransaction.ts b/packages/networks/solana/src/models/TokenTransaction.ts index 078a0f3..55590a9 100644 --- a/packages/networks/solana/src/models/TokenTransaction.ts +++ b/packages/networks/solana/src/models/TokenTransaction.ts @@ -1,6 +1,6 @@ import { PublicKey } from '@solana/web3.js' import { math } from '@multiplechain/utils' -import { ContractTransaction } from './ContractTransaction.ts' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { ParsedAccountData, diff --git a/packages/networks/solana/src/models/Transaction.ts b/packages/networks/solana/src/models/Transaction.ts index b1c7ef1..7ec690d 100644 --- a/packages/networks/solana/src/models/Transaction.ts +++ b/packages/networks/solana/src/models/Transaction.ts @@ -1,5 +1,5 @@ -import { fromLamports } from '../utils.ts' -import { Provider } from '../services/Provider.ts' +import { fromLamports } from '../utils' +import { Provider } from '../services/Provider' import { ErrorTypeEnum, TransactionStatusEnum } from '@multiplechain/types' import { SystemProgram, diff --git a/packages/networks/solana/src/models/index.ts b/packages/networks/solana/src/models/index.ts index cc0a27c..354aa74 100644 --- a/packages/networks/solana/src/models/index.ts +++ b/packages/networks/solana/src/models/index.ts @@ -1,5 +1,5 @@ -export * from './Transaction.ts' -export * from './NftTransaction.ts' -export * from './CoinTransaction.ts' -export * from './TokenTransaction.ts' -export * from './ContractTransaction.ts' +export * from './Transaction' +export * from './NftTransaction' +export * from './CoinTransaction' +export * from './TokenTransaction' +export * from './ContractTransaction' diff --git a/packages/networks/solana/src/services/TransactionListener.ts b/packages/networks/solana/src/services/TransactionListener.ts index 7dac297..0d5e612 100644 --- a/packages/networks/solana/src/services/TransactionListener.ts +++ b/packages/networks/solana/src/services/TransactionListener.ts @@ -1,10 +1,10 @@ -import { Provider } from './Provider.ts' -import { Transaction } from '../models/Transaction.ts' +import { Provider } from './Provider' +import { Transaction } from '../models/Transaction' import { objectsEqual } from '@multiplechain/utils' -import { NftTransaction } from '../models/NftTransaction.ts' -import { CoinTransaction } from '../models/CoinTransaction.ts' -import { TokenTransaction } from '../models/TokenTransaction.ts' -import { ContractTransaction } from '../models/ContractTransaction.ts' +import { NftTransaction } from '../models/NftTransaction' +import { CoinTransaction } from '../models/CoinTransaction' +import { TokenTransaction } from '../models/TokenTransaction' +import { ContractTransaction } from '../models/ContractTransaction' import { getAssociatedTokenAddressSync } from '@solana/spl-token' import { PublicKey, diff --git a/packages/networks/solana/src/services/TransactionSigner.ts b/packages/networks/solana/src/services/TransactionSigner.ts index ea9e85e..e9570ca 100644 --- a/packages/networks/solana/src/services/TransactionSigner.ts +++ b/packages/networks/solana/src/services/TransactionSigner.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { base58Decode } from '@multiplechain/utils' import type { PrivateKey, TransactionId, TransactionSignerInterface } from '@multiplechain/types' import { Keypair, VersionedTransaction, Transaction as RawTransaction } from '@solana/web3.js' diff --git a/packages/networks/solana/src/services/index.ts b/packages/networks/solana/src/services/index.ts index 549a382..0b05d2e 100644 --- a/packages/networks/solana/src/services/index.ts +++ b/packages/networks/solana/src/services/index.ts @@ -1,2 +1,2 @@ -export * from './TransactionSigner.ts' -export * from './TransactionListener.ts' +export * from './TransactionSigner' +export * from './TransactionListener' diff --git a/packages/networks/solana/tests/assets.spec.ts b/packages/networks/solana/tests/assets.spec.ts index b48cf70..4d923ae 100644 --- a/packages/networks/solana/tests/assets.spec.ts +++ b/packages/networks/solana/tests/assets.spec.ts @@ -1,11 +1,11 @@ import { describe, it, expect, assert } from 'vitest' -import { NFT } from '../src/assets/NFT.ts' -import { Coin } from '../src/assets/Coin.ts' -import { Token } from '../src/assets/Token.ts' +import { NFT } from '../src/assets/NFT' +import { Coin } from '../src/assets/Coin' +import { Token } from '../src/assets/Token' import { math } from '@multiplechain/utils' -import { Transaction } from '../src/models/Transaction.ts' -import { TransactionSigner } from '../src/services/TransactionSigner.ts' +import { Transaction } from '../src/models/Transaction' +import { TransactionSigner } from '../src/services/TransactionSigner' import { TransactionStatusEnum, type PrivateKey, type TransactionId } from '@multiplechain/types' const coinBalanceTestAmount = Number(process.env.SOL_COIN_BALANCE_TEST_AMOUNT) diff --git a/packages/networks/solana/tests/models.spec.ts b/packages/networks/solana/tests/models.spec.ts index 7c47351..9aff4a0 100644 --- a/packages/networks/solana/tests/models.spec.ts +++ b/packages/networks/solana/tests/models.spec.ts @@ -1,11 +1,11 @@ import { describe, it, expect } from 'vitest' -import { Transaction } from '../src/models/Transaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' +import { Transaction } from '../src/models/Transaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { TokenTransaction } from '../src/models/TokenTransaction' import { AssetDirectionEnum, TransactionStatusEnum } from '@multiplechain/types' -import { ContractTransaction } from '../src/models/ContractTransaction.ts' +import { ContractTransaction } from '../src/models/ContractTransaction' const nftId = String(process.env.SOL_NFT_ID) const tokenAmount = Number(process.env.SOL_TOKEN_AMOUNT) diff --git a/packages/networks/solana/tests/services.spec.ts b/packages/networks/solana/tests/services.spec.ts index 113fd07..4dd9fa9 100644 --- a/packages/networks/solana/tests/services.spec.ts +++ b/packages/networks/solana/tests/services.spec.ts @@ -1,19 +1,19 @@ import { describe, it, expect } from 'vitest' -import { provider } from './setup.ts' -import { Provider } from '../src/services/Provider.ts' +import { provider } from './setup' +import { Provider } from '../src/services/Provider' -import { NFT } from '../src/assets/NFT.ts' -import { Coin } from '../src/assets/Coin.ts' -import { Token } from '../src/assets/Token.ts' +import { NFT } from '../src/assets/NFT' +import { Coin } from '../src/assets/Coin' +import { Token } from '../src/assets/Token' import { sleep } from '@multiplechain/utils' import { TransactionTypeEnum } from '@multiplechain/types' -import { Transaction } from '../src/models/Transaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' -import { ContractTransaction } from '../src/models/ContractTransaction.ts' -import { TransactionListener } from '../src/services/TransactionListener.ts' +import { Transaction } from '../src/models/Transaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { TokenTransaction } from '../src/models/TokenTransaction' +import { ContractTransaction } from '../src/models/ContractTransaction' +import { TransactionListener } from '../src/services/TransactionListener' const senderPrivateKey = String(process.env.SOL_SENDER_PRIVATE_KEY) const receiverPrivateKey = String(process.env.SOL_RECEIVER_PRIVATE_KEY) diff --git a/packages/networks/solana/tests/setup.ts b/packages/networks/solana/tests/setup.ts index 42e7f45..bccbd25 100644 --- a/packages/networks/solana/tests/setup.ts +++ b/packages/networks/solana/tests/setup.ts @@ -1,4 +1,4 @@ -import { Provider } from '../src/services/Provider.ts' +import { Provider } from '../src/services/Provider' let provider: Provider diff --git a/packages/networks/solana/vite.config.ts b/packages/networks/solana/vite.config.ts index 28e4ab0..33025af 100644 --- a/packages/networks/solana/vite.config.ts +++ b/packages/networks/solana/vite.config.ts @@ -1,5 +1,5 @@ import { mergeConfig } from 'vite' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig(mainConfig, { build: { diff --git a/packages/networks/solana/vitest.config.ts b/packages/networks/solana/vitest.config.ts index 433e719..94ef2da 100644 --- a/packages/networks/solana/vitest.config.ts +++ b/packages/networks/solana/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineConfig } from 'vitest/config' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig( mainConfig, diff --git a/packages/networks/tron/.eslintrc.json b/packages/networks/tron/.eslintrc.json index b62472f..f8f7a15 100644 --- a/packages/networks/tron/.eslintrc.json +++ b/packages/networks/tron/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "plugin:require-extensions/recommended", - "../../../.eslintrc.json" - ], - "plugins": ["require-extensions"] + "extends": ["../../../.eslintrc.json"] } \ No newline at end of file diff --git a/packages/networks/tron/esbuild.ts b/packages/networks/tron/esbuild.ts index 5714b9c..f25aad1 100644 --- a/packages/networks/tron/esbuild.ts +++ b/packages/networks/tron/esbuild.ts @@ -1,3 +1,3 @@ -void import('../../../esbuild.ts').then((module) => { +void import('../../../esbuild').then((module) => { module.default() }) diff --git a/packages/networks/tron/package.json b/packages/networks/tron/package.json index f49b005..0684ce1 100644 --- a/packages/networks/tron/package.json +++ b/packages/networks/tron/package.json @@ -1,6 +1,6 @@ { "name": "@multiplechain/tron", - "version": "0.4.3", + "version": "0.4.4", "type": "module", "main": "dist/index.cjs", "module": "dist/index.es.js", @@ -74,7 +74,7 @@ "dependencies": { "@beycandeveloper/tron-tx-decoder": "^2.0.5", "@multiplechain/tron-walletconnect": "^0.1.0", - "@multiplechain/types": "^0.1.64", + "@multiplechain/types": "^0.1.66", "@multiplechain/utils": "^0.1.21", "@noble/secp256k1": "^1.7.1", "@tronweb3/tronwallet-adapter-bitkeep": "^1.1.1", diff --git a/packages/networks/tron/pnpm-lock.yaml b/packages/networks/tron/pnpm-lock.yaml index 49769e5..ace06f0 100644 --- a/packages/networks/tron/pnpm-lock.yaml +++ b/packages/networks/tron/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^0.1.0 version: 0.1.0(typescript@5.4.5) '@multiplechain/types': - specifier: ^0.1.64 - version: 0.1.64 + specifier: ^0.1.66 + version: 0.1.66 '@multiplechain/utils': specifier: ^0.1.21 version: 0.1.21 @@ -348,8 +348,8 @@ packages: - vite dev: false - /@multiplechain/types@0.1.64: - resolution: {integrity: sha512-euzFLiq18L3SCqN9mLY2GKEkaJhTFcBg7Ono/yqN87IT5qlZ1Xqzk2jcWvRcnlN3O5wL15QLKS+e2C11DKeXOA==} + /@multiplechain/types@0.1.66: + resolution: {integrity: sha512-ekv6EAQWZnya3hWX1WSvIWhAw3XbKvqp3JnlTeNw0BxzRnO6rYyHXD5iRse6R95mk11N3OUyDtbMCAvzYQUsxg==} dev: false /@multiplechain/utils@0.1.21: diff --git a/packages/networks/tron/src/assets/Coin.ts b/packages/networks/tron/src/assets/Coin.ts index 2b4bb7f..26cf68c 100644 --- a/packages/networks/tron/src/assets/Coin.ts +++ b/packages/networks/tron/src/assets/Coin.ts @@ -1,11 +1,11 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { ErrorTypeEnum, type CoinInterface, type TransferAmount, type WalletAddress } from '@multiplechain/types' -import { TransactionSigner, type TransactionData } from '../services/TransactionSigner.ts' +import { TransactionSigner, type TransactionData } from '../services/TransactionSigner' export class Coin implements CoinInterface { /** diff --git a/packages/networks/tron/src/assets/Contract.ts b/packages/networks/tron/src/assets/Contract.ts index d4dd071..949f6b9 100644 --- a/packages/networks/tron/src/assets/Contract.ts +++ b/packages/networks/tron/src/assets/Contract.ts @@ -1,6 +1,6 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import type { ContractAddress, ContractInterface, WalletAddress } from '@multiplechain/types' -import type { TronWeb } from '../services/TronWeb.ts' +import type { TronWeb } from '../services/TronWeb' interface InputOutputInterface { internalType: string diff --git a/packages/networks/tron/src/assets/NFT.ts b/packages/networks/tron/src/assets/NFT.ts index e334a80..5e95198 100644 --- a/packages/networks/tron/src/assets/NFT.ts +++ b/packages/networks/tron/src/assets/NFT.ts @@ -1,7 +1,7 @@ import TRC721 from '../../resources/TRC721.json' -import type { Provider } from '../services/Provider.ts' -import { Contract, type InterfaceAbi } from './Contract.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import type { Provider } from '../services/Provider' +import { Contract, type InterfaceAbi } from './Contract' +import { TransactionSigner } from '../services/TransactionSigner' import { ErrorTypeEnum, type ContractAddress, diff --git a/packages/networks/tron/src/assets/Token.ts b/packages/networks/tron/src/assets/Token.ts index 8823a4f..966fa21 100644 --- a/packages/networks/tron/src/assets/Token.ts +++ b/packages/networks/tron/src/assets/Token.ts @@ -1,5 +1,5 @@ -import { Contract, type InterfaceAbi } from './Contract.ts' -import { TransactionSigner } from '../services/TransactionSigner.ts' +import { Contract, type InterfaceAbi } from './Contract' +import { TransactionSigner } from '../services/TransactionSigner' import { ErrorTypeEnum, type ContractAddress, @@ -8,7 +8,7 @@ import { type WalletAddress } from '@multiplechain/types' import { hexToNumber, numberToHex } from '@multiplechain/utils' -import type { Provider } from '../services/Provider.ts' +import type { Provider } from '../services/Provider' import TRC20 from '../../resources/TRC20.json' export class Token extends Contract implements TokenInterface { diff --git a/packages/networks/tron/src/assets/index.ts b/packages/networks/tron/src/assets/index.ts index 7ea522f..737051b 100644 --- a/packages/networks/tron/src/assets/index.ts +++ b/packages/networks/tron/src/assets/index.ts @@ -1,4 +1,4 @@ -export * from './NFT.ts' -export * from './Coin.ts' -export * from './Token.ts' -export * from './Contract.ts' +export * from './NFT' +export * from './Coin' +export * from './Token' +export * from './Contract' diff --git a/packages/networks/tron/src/browser/Wallet.ts b/packages/networks/tron/src/browser/Wallet.ts index bbd381d..e6d8206 100644 --- a/packages/networks/tron/src/browser/Wallet.ts +++ b/packages/networks/tron/src/browser/Wallet.ts @@ -9,8 +9,8 @@ import { type SignedMessage, type TransactionId } from '@multiplechain/types' -import { Provider } from '../services/Provider.ts' -import type { TransactionSigner } from '../services/TransactionSigner.ts' +import { Provider } from '../services/Provider' +import type { TransactionSigner } from '../services/TransactionSigner' import type { Adapter, AdapterEvents } from '@tronweb3/tronwallet-abstract-adapter' export interface WalletProvider extends Adapter { diff --git a/packages/networks/tron/src/browser/adapters/BitgetWallet.ts b/packages/networks/tron/src/browser/adapters/BitgetWallet.ts index c8b97e6..e283ec8 100644 --- a/packages/networks/tron/src/browser/adapters/BitgetWallet.ts +++ b/packages/networks/tron/src/browser/adapters/BitgetWallet.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' import { BitKeepAdapter } from '@tronweb3/tronwallet-adapter-bitkeep' diff --git a/packages/networks/tron/src/browser/adapters/OkxWallet.ts b/packages/networks/tron/src/browser/adapters/OkxWallet.ts index 4ba229d..0773aea 100644 --- a/packages/networks/tron/src/browser/adapters/OkxWallet.ts +++ b/packages/networks/tron/src/browser/adapters/OkxWallet.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' import { OkxWalletAdapter } from '@tronweb3/tronwallet-adapter-okxwallet' diff --git a/packages/networks/tron/src/browser/adapters/TokenPocket.ts b/packages/networks/tron/src/browser/adapters/TokenPocket.ts index ce2099f..ffa5440 100644 --- a/packages/networks/tron/src/browser/adapters/TokenPocket.ts +++ b/packages/networks/tron/src/browser/adapters/TokenPocket.ts @@ -1,6 +1,6 @@ -import type { WalletProvider } from '../Wallet.ts' +import type { WalletProvider } from '../Wallet' import { WalletPlatformEnum } from '@multiplechain/types' -import type { Provider } from '../../services/Provider.ts' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' import { TokenPocketAdapter } from '@tronweb3/tronwallet-adapter-tokenpocket' diff --git a/packages/networks/tron/src/browser/adapters/TronLink.ts b/packages/networks/tron/src/browser/adapters/TronLink.ts index fda6ef0..79171d0 100644 --- a/packages/networks/tron/src/browser/adapters/TronLink.ts +++ b/packages/networks/tron/src/browser/adapters/TronLink.ts @@ -1,6 +1,6 @@ import { sleep } from '@multiplechain/utils' -import type { WalletProvider } from '../Wallet.ts' -import type { Provider } from '../../services/Provider.ts' +import type { WalletProvider } from '../Wallet' +import type { Provider } from '../../services/Provider' import type { WalletAdapterInterface } from '@multiplechain/types' import { TronLinkAdapter } from '@tronweb3/tronwallet-adapter-tronlink' import { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types' diff --git a/packages/networks/tron/src/browser/adapters/WalletConnect.ts b/packages/networks/tron/src/browser/adapters/WalletConnect.ts index 23ed80b..46c06f9 100644 --- a/packages/networks/tron/src/browser/adapters/WalletConnect.ts +++ b/packages/networks/tron/src/browser/adapters/WalletConnect.ts @@ -1,5 +1,5 @@ -import type { WalletProvider } from '../Wallet.ts' -import type { Provider } from '../../services/Provider.ts' +import type { WalletProvider } from '../Wallet' +import type { Provider } from '../../services/Provider' import { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types' import { WalletConnectAdapter } from '@multiplechain/tron-walletconnect' import type { WalletAdapterInterface, WalletConnectConfig } from '@multiplechain/types' diff --git a/packages/networks/tron/src/browser/adapters/index.ts b/packages/networks/tron/src/browser/adapters/index.ts index 2342ba1..ada8157 100644 --- a/packages/networks/tron/src/browser/adapters/index.ts +++ b/packages/networks/tron/src/browser/adapters/index.ts @@ -1,5 +1,5 @@ -export { default as TronLink } from './TronLink.ts' -export { default as OkxWallet } from './OkxWallet.ts' -export { default as TokenPocket } from './TokenPocket.ts' -export { default as BitgetWallet } from './BitgetWallet.ts' -export { default as WalletConnect } from './WalletConnect.ts' +export { default as TronLink } from './TronLink' +export { default as OkxWallet } from './OkxWallet' +export { default as TokenPocket } from './TokenPocket' +export { default as BitgetWallet } from './BitgetWallet' +export { default as WalletConnect } from './WalletConnect' diff --git a/packages/networks/tron/src/browser/index.ts b/packages/networks/tron/src/browser/index.ts index 8de2ab5..3637cf7 100644 --- a/packages/networks/tron/src/browser/index.ts +++ b/packages/networks/tron/src/browser/index.ts @@ -1,6 +1,6 @@ -import type { Provider } from '../services/Provider.ts' -import { Wallet, type WalletProvider } from './Wallet.ts' -import * as adapterList from './adapters/index.ts' +import type { Provider } from '../services/Provider' +import { Wallet, type WalletProvider } from './Wallet' +import * as adapterList from './adapters/index' import type { WalletAdapterListType, WalletAdapterInterface, @@ -19,7 +19,7 @@ const registerAdapter: RegisterWalletAdapterType = ( adapters[adapter.id] = adapter } -export * from '../index.ts' +export * from '../index' export const browser = { Wallet, diff --git a/packages/networks/tron/src/index.ts b/packages/networks/tron/src/index.ts index 668ab52..612a2b2 100644 --- a/packages/networks/tron/src/index.ts +++ b/packages/networks/tron/src/index.ts @@ -1,8 +1,8 @@ -export * from './services/Provider.ts' +export * from './services/Provider' -export * as assets from './assets/index.ts' -export * as models from './models/index.ts' -export * as services from './services/index.ts' +export * as assets from './assets/index' +export * as models from './models/index' +export * as services from './services/index' export * as utils from '@multiplechain/utils' export * as types from '@multiplechain/types' diff --git a/packages/networks/tron/src/models/CoinTransaction.ts b/packages/networks/tron/src/models/CoinTransaction.ts index 93fb32d..68e8652 100644 --- a/packages/networks/tron/src/models/CoinTransaction.ts +++ b/packages/networks/tron/src/models/CoinTransaction.ts @@ -1,4 +1,4 @@ -import { Transaction } from './Transaction.ts' +import { Transaction } from './Transaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { WalletAddress, CoinTransactionInterface, TransferAmount } from '@multiplechain/types' diff --git a/packages/networks/tron/src/models/ContractTransaction.ts b/packages/networks/tron/src/models/ContractTransaction.ts index 24c6095..30c3fbf 100644 --- a/packages/networks/tron/src/models/ContractTransaction.ts +++ b/packages/networks/tron/src/models/ContractTransaction.ts @@ -1,6 +1,6 @@ // @ts-expect-error no need type import TxDecoder from '@beycandeveloper/tron-tx-decoder' -import { Transaction, type TransactionData } from './Transaction.ts' +import { Transaction, type TransactionData } from './Transaction' import type { ContractAddress, ContractTransactionInterface } from '@multiplechain/types' export interface DecodedInputData { diff --git a/packages/networks/tron/src/models/NftTransaction.ts b/packages/networks/tron/src/models/NftTransaction.ts index ba349e2..15ba492 100644 --- a/packages/networks/tron/src/models/NftTransaction.ts +++ b/packages/networks/tron/src/models/NftTransaction.ts @@ -1,4 +1,4 @@ -import { ContractTransaction } from './ContractTransaction.ts' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { NftId, NftTransactionInterface, WalletAddress } from '@multiplechain/types' diff --git a/packages/networks/tron/src/models/TokenTransaction.ts b/packages/networks/tron/src/models/TokenTransaction.ts index 7aa8b92..ec35605 100644 --- a/packages/networks/tron/src/models/TokenTransaction.ts +++ b/packages/networks/tron/src/models/TokenTransaction.ts @@ -1,6 +1,6 @@ import { hexToNumber } from '@multiplechain/utils' -import { Token } from '../assets/Token.ts' -import { ContractTransaction } from './ContractTransaction.ts' +import { Token } from '../assets/Token' +import { ContractTransaction } from './ContractTransaction' import { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types' import type { WalletAddress, TokenTransactionInterface, TransferAmount } from '@multiplechain/types' diff --git a/packages/networks/tron/src/models/Transaction.ts b/packages/networks/tron/src/models/Transaction.ts index 75254a8..7c7d96e 100644 --- a/packages/networks/tron/src/models/Transaction.ts +++ b/packages/networks/tron/src/models/Transaction.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { TransactionTypeEnum, type BlockConfirmationCount, @@ -10,7 +10,7 @@ import { type WalletAddress } from '@multiplechain/types' import { ErrorTypeEnum, TransactionStatusEnum } from '@multiplechain/types' -import { NFT } from '../assets/NFT.ts' +import { NFT } from '../assets/NFT' interface RetObject { contractRet: string diff --git a/packages/networks/tron/src/models/index.ts b/packages/networks/tron/src/models/index.ts index cc0a27c..354aa74 100644 --- a/packages/networks/tron/src/models/index.ts +++ b/packages/networks/tron/src/models/index.ts @@ -1,5 +1,5 @@ -export * from './Transaction.ts' -export * from './NftTransaction.ts' -export * from './CoinTransaction.ts' -export * from './TokenTransaction.ts' -export * from './ContractTransaction.ts' +export * from './Transaction' +export * from './NftTransaction' +export * from './CoinTransaction' +export * from './TokenTransaction' +export * from './ContractTransaction' diff --git a/packages/networks/tron/src/services/Provider.ts b/packages/networks/tron/src/services/Provider.ts index 3242588..f3204fc 100644 --- a/packages/networks/tron/src/services/Provider.ts +++ b/packages/networks/tron/src/services/Provider.ts @@ -3,7 +3,7 @@ import { type NetworkConfigInterface, type ProviderInterface } from '@multiplechain/types' -import { TronWeb } from './TronWeb.ts' +import { TronWeb } from './TronWeb' export interface TronNodeInfoInterface { id: string diff --git a/packages/networks/tron/src/services/TransactionListener.ts b/packages/networks/tron/src/services/TransactionListener.ts index d4e7d4c..6af67e6 100644 --- a/packages/networks/tron/src/services/TransactionListener.ts +++ b/packages/networks/tron/src/services/TransactionListener.ts @@ -6,14 +6,14 @@ import type { TransactionId } from '@multiplechain/types' -import { Provider } from './Provider.ts' +import { Provider } from './Provider' import type { Transaction, TokenTransaction, CoinTransaction, ContractTransaction, NftTransaction -} from '../models/index.ts' +} from '../models/index' import { TransactionListenerProcessIndex } from '@multiplechain/types' type TransactionListenerTriggerType = DynamicTransactionType< diff --git a/packages/networks/tron/src/services/TransactionSigner.ts b/packages/networks/tron/src/services/TransactionSigner.ts index d9d1cba..e6eae80 100644 --- a/packages/networks/tron/src/services/TransactionSigner.ts +++ b/packages/networks/tron/src/services/TransactionSigner.ts @@ -1,4 +1,4 @@ -import { Provider } from '../services/Provider.ts' +import { Provider } from '../services/Provider' import { ErrorTypeEnum, type PrivateKey, diff --git a/packages/networks/tron/src/services/TronWeb.ts b/packages/networks/tron/src/services/TronWeb.ts index c6aa406..9104850 100644 --- a/packages/networks/tron/src/services/TronWeb.ts +++ b/packages/networks/tron/src/services/TronWeb.ts @@ -1,6 +1,6 @@ import TronWebBase from 'tronweb' -import type { TransactionData } from './TransactionSigner.ts' -import type { TransactionRawData } from '../assets/Contract.ts' +import type { TransactionData } from './TransactionSigner' +import type { TransactionRawData } from '../assets/Contract' export class TronWeb extends TronWebBase { /** diff --git a/packages/networks/tron/src/services/index.ts b/packages/networks/tron/src/services/index.ts index 549a382..0b05d2e 100644 --- a/packages/networks/tron/src/services/index.ts +++ b/packages/networks/tron/src/services/index.ts @@ -1,2 +1,2 @@ -export * from './TransactionSigner.ts' -export * from './TransactionListener.ts' +export * from './TransactionSigner' +export * from './TransactionListener' diff --git a/packages/networks/tron/tests/assets.spec.ts b/packages/networks/tron/tests/assets.spec.ts index 787cae5..faa2ece 100644 --- a/packages/networks/tron/tests/assets.spec.ts +++ b/packages/networks/tron/tests/assets.spec.ts @@ -1,12 +1,12 @@ import { describe, it, expect, assert } from 'vitest' -import { NFT } from '../src/assets/NFT.ts' -import { Coin } from '../src/assets/Coin.ts' +import { NFT } from '../src/assets/NFT' +import { Coin } from '../src/assets/Coin' import { math } from '@multiplechain/utils' -import { Token } from '../src/assets/Token.ts' -import { Transaction } from '../src/models/Transaction.ts' +import { Token } from '../src/assets/Token' +import { Transaction } from '../src/models/Transaction' import { TransactionStatusEnum, type TransactionId } from '@multiplechain/types' -import { TransactionSigner } from '../src/services/TransactionSigner.ts' +import { TransactionSigner } from '../src/services/TransactionSigner' const coinBalanceTestAmount = Number(process.env.TRON_COIN_BALANCE_TEST_AMOUNT) const tokenBalanceTestAmount = Number(process.env.TRON_TOKEN_BALANCE_TEST_AMOUNT) diff --git a/packages/networks/tron/tests/models.spec.ts b/packages/networks/tron/tests/models.spec.ts index ad76580..ab60208 100644 --- a/packages/networks/tron/tests/models.spec.ts +++ b/packages/networks/tron/tests/models.spec.ts @@ -1,9 +1,9 @@ import { describe, it, expect } from 'vitest' -import { Transaction } from '../src/models/Transaction.ts' -import { NftTransaction } from '../src/models/NftTransaction.ts' -import { CoinTransaction } from '../src/models/CoinTransaction.ts' -import { TokenTransaction } from '../src/models/TokenTransaction.ts' +import { Transaction } from '../src/models/Transaction' +import { NftTransaction } from '../src/models/NftTransaction' +import { CoinTransaction } from '../src/models/CoinTransaction' +import { TokenTransaction } from '../src/models/TokenTransaction' import { AssetDirectionEnum, TransactionStatusEnum } from '@multiplechain/types' const nftId = Number(process.env.TRON_NFT_ID) diff --git a/packages/networks/tron/tests/services.spec.ts b/packages/networks/tron/tests/services.spec.ts index 37d09f4..afc1e1b 100644 --- a/packages/networks/tron/tests/services.spec.ts +++ b/packages/networks/tron/tests/services.spec.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest' -import { provider } from './setup.ts' -import { Provider } from '../src/services/Provider.ts' +import { provider } from './setup' +import { Provider } from '../src/services/Provider' describe('Provider', () => { it('isTestnet', () => { diff --git a/packages/networks/tron/tests/setup.ts b/packages/networks/tron/tests/setup.ts index 6c04b6b..476b875 100644 --- a/packages/networks/tron/tests/setup.ts +++ b/packages/networks/tron/tests/setup.ts @@ -1,4 +1,4 @@ -import { Provider } from '../src/services/Provider.ts' +import { Provider } from '../src/services/Provider' let provider: Provider diff --git a/packages/networks/tron/vite.config.ts b/packages/networks/tron/vite.config.ts index 9af53c3..3a11499 100644 --- a/packages/networks/tron/vite.config.ts +++ b/packages/networks/tron/vite.config.ts @@ -1,5 +1,5 @@ import { mergeConfig } from 'vite' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig(mainConfig, { build: { diff --git a/packages/networks/tron/vitest.config.ts b/packages/networks/tron/vitest.config.ts index 433e719..94ef2da 100644 --- a/packages/networks/tron/vitest.config.ts +++ b/packages/networks/tron/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineConfig } from 'vitest/config' -import mainConfig from '../../../vite.config.ts' +import mainConfig from '../../../vite.config' export default mergeConfig( mainConfig, diff --git a/packages/types/package.json b/packages/types/package.json index 0f68894..7851b3c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -10,6 +10,7 @@ "!tsconfig.tsbuildinfo" ], "scripts": { + "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts" }, "keywords": [ diff --git a/packages/utils/package.json b/packages/utils/package.json index 5cf3b33..5a92e7d 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -10,6 +10,7 @@ "!tsconfig.tsbuildinfo" ], "scripts": { + "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "test-ui": "vitest watch --ui", "test": "vitest run --dir tests" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0c9747..9617d23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,9 +44,6 @@ devDependencies: eslint-plugin-promise: specifier: ^6.1.1 version: 6.1.1(eslint@8.57.0) - eslint-plugin-require-extensions: - specifier: ^0.1.3 - version: 0.1.3(eslint@8.57.0) jsdom: specifier: ^24.0.0 version: 24.0.0 @@ -2406,15 +2403,6 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-require-extensions@0.1.3(eslint@8.57.0): - resolution: {integrity: sha512-T3c1PZ9PIdI3hjV8LdunfYI8gj017UQjzAnCrxuo3wAjneDbTPHdE3oNWInOjMA+z/aBkUtlW5vC0YepYMZIug==} - engines: {node: '>=16'} - peerDependencies: - eslint: '*' - dependencies: - eslint: 8.57.0 - dev: true - /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} diff --git a/tsconfig.json b/tsconfig.json index 3c819fd..19d76df 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,6 @@ "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "bundler", - "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, "verbatimModuleSyntax": true, From b42d9ea2f0e91369485c61beabe55bed86ed997e Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Sun, 26 May 2024 15:27:46 +0800 Subject: [PATCH 5/5] transform for eval() --- package.json | 1 + pnpm-lock.yaml | 17 +++++++++++++++++ vite.config.ts | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/package.json b/package.json index 765bd15..a6e4e7b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "lint": "eslint . --ext .ts --ignore-path .gitignore" }, "devDependencies": { + "@rollup/plugin-strip": "^3.0.4", "@types/node": "^20.11.20", "@typescript-eslint/eslint-plugin": "^6.21.0", "@vitest/coverage-istanbul": "^1.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9617d23..878c95f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false devDependencies: + '@rollup/plugin-strip': + specifier: ^3.0.4 + version: 3.0.4 '@types/node': specifier: ^20.11.20 version: 20.11.20 @@ -902,6 +905,20 @@ packages: magic-string: 0.30.7 dev: true + /@rollup/plugin-strip@3.0.4: + resolution: {integrity: sha512-LDRV49ZaavxUo2YoKKMQjCxzCxugu1rCPQa0lDYBOWLj6vtzBMr8DcoJjsmg+s450RbKbe3qI9ZLaSO+O1oNbg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0 + estree-walker: 2.0.2 + magic-string: 0.30.8 + dev: true + /@rollup/pluginutils@5.1.0: resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} diff --git a/vite.config.ts b/vite.config.ts index 5ed7853..dc8dbc8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,14 @@ import { defineConfig } from 'vite' import dts from 'vite-plugin-dts' +import strip from '@rollup/plugin-strip' import envCompatible from 'vite-plugin-env-compatible' import { nodePolyfills } from 'vite-plugin-node-polyfills' export default defineConfig({ plugins: [ + strip({ + functions: ['eval'] + }), dts({ entryRoot: './src' }),