diff --git a/bun.lockb b/bun.lockb index 94e9a4fc..f0c6e0d5 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index c9e9e2ae..cc9e1260 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types", "build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./src/_cjs --removeComments --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./src/_cjs/package.json", "build:esm": "tsc --project ./tsconfig.build.json --module es2015 --outDir ./src/_esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./src/_esm/package.json", - "build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./src/_types --emitDeclarationOnly --declaration --declarationMap", + "build:types": "rm -f tsconfig.build.tsbuildinfo && tsc --project ./tsconfig.build.json --module esnext --declarationDir ./src/_types --emitDeclarationOnly --declaration --declarationMap", "changeset": "changeset", "changeset:release": "bun run build && changeset publish", "changeset:version": "changeset version && bun scripts/updateVersion.ts && bun install --lockfile-only", @@ -27,11 +27,11 @@ "test:parser": "vitest -c ./test/vitest.config.ts ./src/chains/suave/parsers.test.ts", "test:cov": "vitest dev -c ./test/vitest.config.ts --coverage", "test:ci": "CI=true vitest -c ./test/vitest.config.ts --coverage --retry=3 --bail=1", - "test:typecheck": "SKIP_GLOBAL_SETUP=true vitest typecheck -c ./test/vitest.config.ts", + "test:typecheck": "SKIP_GLOBAL_SETUP=true vitest --typecheck.ignoreSourceErrors -c ./test/vitest.config.ts", "test:ui": "vitest dev -c ./test/vitest.config.ts --ui", "vectors": "bun test vectors/**/*.test.ts", "vectors:generate": "bun vectors/generate.ts", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --project ./tsconfig.typecheck.json --module esnext --noEmit" }, "devDependencies": { "@actions/core": "1.10.0", @@ -54,8 +54,8 @@ "simple-git-hooks": "^2.8.1", "size-limit": "^8.2.4", "typescript": "5.0.4", - "vite": "^4.4.2", - "vitest": "~0.34.3", + "vite": "^5.3.1", + "vitest": "^1.6.0", "which-pm-runs": "^1.1.0" }, "simple-git-hooks": { diff --git a/playgrounds/browser/src/components/actions/GetTransaction.tsx b/playgrounds/browser/src/components/actions/GetTransaction.tsx index f42d36d5..e276215d 100644 --- a/playgrounds/browser/src/components/actions/GetTransaction.tsx +++ b/playgrounds/browser/src/components/actions/GetTransaction.tsx @@ -65,7 +65,10 @@ function GetTransactionByHashAndIndex({ client }: { client: PublicClient }) { const handleGetTransaction = async () => { if (blockHash && index) { setTransaction( - await client.getTransaction({ blockHash, index: parseInt(index) }), + await client.getTransaction({ + blockHash, + index: Number.parseInt(index), + }), ) } } @@ -111,7 +114,7 @@ function GetTransactionByNumberAndIndex({ client }: { client: PublicClient }) { setTransaction( await client.getTransaction({ blockNumber: BigInt(blockNumber), - index: parseInt(index), + index: Number.parseInt(index), }), ) } @@ -159,7 +162,7 @@ function GetTransactionByTagAndIndex({ client }: { client: PublicClient }) { setTransaction( await client.getTransaction({ blockTag, - index: parseInt(index), + index: Number.parseInt(index), }), ) } diff --git a/playgrounds/browser/src/components/actions/SendTransaction.tsx b/playgrounds/browser/src/components/actions/SendTransaction.tsx index 5250786f..776d54f5 100644 --- a/playgrounds/browser/src/components/actions/SendTransaction.tsx +++ b/playgrounds/browser/src/components/actions/SendTransaction.tsx @@ -1,4 +1,4 @@ -import { WalletClient, parseEther } from 'viem' +import { type WalletClient, parseEther } from 'viem' import { goerli } from 'viem/chains' export function SendTransaction({ client }: { client: WalletClient }) { diff --git a/site/.vitepress/sidebar.ts b/site/.vitepress/sidebar.ts index d0178d8a..d8af3484 100644 --- a/site/.vitepress/sidebar.ts +++ b/site/.vitepress/sidebar.ts @@ -1,4 +1,4 @@ -import { DefaultTheme } from 'vitepress' +import type { DefaultTheme } from 'vitepress' export const sidebar: DefaultTheme.Sidebar = { '/docs/': [ diff --git a/site/index.ts b/site/index.ts index 336ce12b..f668d518 100644 --- a/site/index.ts +++ b/site/index.ts @@ -1 +1 @@ -export {} +export type {} diff --git a/src/actions/wallet/signTransaction.ts b/src/actions/wallet/signTransaction.ts index 7d806dd2..7fd2f9d5 100644 --- a/src/actions/wallet/signTransaction.ts +++ b/src/actions/wallet/signTransaction.ts @@ -10,7 +10,7 @@ import { AccountNotFoundError } from '../../errors/account.js' import type { ErrorType } from '../../errors/utils.js' import type { GetAccountParameter } from '../../types/account.js' import type { Chain, GetChain } from '../../types/chain.js' -import { type RpcTransactionRequest } from '../../types/rpc.js' +import type { RpcTransactionRequest } from '../../types/rpc.js' import type { TransactionRequest, TransactionSerializable, diff --git a/src/chains/celo/formatters.ts b/src/chains/celo/formatters.ts index 04e2c746..97405bf7 100644 --- a/src/chains/celo/formatters.ts +++ b/src/chains/celo/formatters.ts @@ -1,4 +1,4 @@ -import { type ChainFormatters } from '../../types/chain.js' +import type { ChainFormatters } from '../../types/chain.js' import type { Hash } from '../../types/misc.js' import type { RpcTransaction } from '../../types/rpc.js' import { hexToBigInt } from '../../utils/encoding/fromHex.js' diff --git a/src/chains/optimism/formatters.ts b/src/chains/optimism/formatters.ts index 2fbfebfd..fcf532c7 100644 --- a/src/chains/optimism/formatters.ts +++ b/src/chains/optimism/formatters.ts @@ -1,6 +1,6 @@ -import { type ChainFormatters } from '../../types/chain.js' +import type { ChainFormatters } from '../../types/chain.js' import type { Hash } from '../../types/misc.js' -import { type RpcTransaction } from '../../types/rpc.js' +import type { RpcTransaction } from '../../types/rpc.js' import { hexToBigInt } from '../../utils/encoding/fromHex.js' import { defineBlock } from '../../utils/formatters/block.js' import { diff --git a/src/chains/suave/formatters.ts b/src/chains/suave/formatters.ts index a71df7de..455ba434 100644 --- a/src/chains/suave/formatters.ts +++ b/src/chains/suave/formatters.ts @@ -1,5 +1,5 @@ import { zeroAddress } from '../../constants/address.js' -import { type ChainFormatters } from '../../types/chain.js' +import type { ChainFormatters } from '../../types/chain.js' import type { Hash, Hex } from '../../types/misc.js' import type { RpcTransaction } from '../../types/rpc.js' import type { @@ -22,16 +22,16 @@ import { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js' import { suaveRigil } from '../index.js' -import { - type ConfidentialComputeRecord, - type RpcTransactionReceiptSuave, - type RpcTransactionRequestSuave, - type RpcTransactionSuave, - type SuaveBlockOverrides, - type SuaveTxType, - type TransactionReceiptSuave, - type TransactionRequestSuave, - type TransactionSuave, +import type { + ConfidentialComputeRecord, + RpcTransactionReceiptSuave, + RpcTransactionRequestSuave, + RpcTransactionSuave, + SuaveBlockOverrides, + SuaveTxType, + TransactionReceiptSuave, + TransactionRequestSuave, + TransactionSuave, } from './types.js' export const formattersSuave = { @@ -75,7 +75,7 @@ export const formattersSuave = { return { // format original eth params as legacy tx ...formatTransaction({ ...args, type: '0x0' } as RpcTransaction), - chainId: parseInt(args.chainId, 16), + chainId: Number.parseInt(args.chainId, 16), accessList: args.accessList, // ... then replace and add fields as needed gasPrice: hexToBigInt(args.gasPrice as Hex), @@ -99,7 +99,7 @@ export const formattersSuave = { confidentialInputsHash: args.requestRecord.confidentialInputsHash, chainId: args.requestRecord.chainId && - parseInt(args.requestRecord.chainId, 16), + Number.parseInt(args.requestRecord.chainId, 16), type: args.requestRecord.type, typeHex: args.requestRecord.typeHex, } as ConfidentialComputeRecord, diff --git a/src/chains/suave/wallet.ts b/src/chains/suave/wallet.ts index 1c33d4f5..8d681163 100644 --- a/src/chains/suave/wallet.ts +++ b/src/chains/suave/wallet.ts @@ -13,7 +13,7 @@ import { hexToSignature, keccak256, } from '../../index.js' -import { type Hex } from '../../types/misc.js' +import type { Hex } from '../../types/misc.js' import { suaveRigil } from '../index.js' import { serializeConfidentialComputeRecord, diff --git a/src/clients/transports/custom.test.ts b/src/clients/transports/custom.test.ts index a1b58935..69341dc2 100644 --- a/src/clients/transports/custom.test.ts +++ b/src/clients/transports/custom.test.ts @@ -1,7 +1,7 @@ import { assertType, describe, expect, test, vi } from 'vitest' import type { EIP1193RequestFn } from '../../index.js' -import '../../types/window.js' +import '../../types/global.js' import { type CustomTransport, custom } from './custom.js' vi.stubGlobal('window', { diff --git a/src/package.json b/src/package.json index 782d0111..bdd31ca4 100644 --- a/src/package.json +++ b/src/package.json @@ -86,42 +86,18 @@ }, "typesVersions": { "*": { - "abi": [ - "./_types/abi/index.d.ts" - ], - "accounts": [ - "./_types/accounts/index.d.ts" - ], - "actions": [ - "./_types/actions/index.d.ts" - ], - "chains": [ - "./_types/chains/index.d.ts" - ], - "chains/utils": [ - "./_types/chains/utils/index.d.ts" - ], - "contract": [ - "./_types/contract/index.d.ts" - ], - "ens": [ - "./_types/ens/index.d.ts" - ], - "public": [ - "./_types/public/index.d.ts" - ], - "test": [ - "./_types/test/index.d.ts" - ], - "utils": [ - "./_types/utils/index.d.ts" - ], - "wallet": [ - "./_types/wallet/index.d.ts" - ], - "window": [ - "./_types/window/index.d.ts" - ] + "abi": ["./_types/abi/index.d.ts"], + "accounts": ["./_types/accounts/index.d.ts"], + "actions": ["./_types/actions/index.d.ts"], + "chains": ["./_types/chains/index.d.ts"], + "chains/utils": ["./_types/chains/utils/index.d.ts"], + "contract": ["./_types/contract/index.d.ts"], + "ens": ["./_types/ens/index.d.ts"], + "public": ["./_types/public/index.d.ts"], + "test": ["./_types/test/index.d.ts"], + "utils": ["./_types/utils/index.d.ts"], + "wallet": ["./_types/wallet/index.d.ts"], + "window": ["./_types/window/index.d.ts"] } }, "peerDependencies": { @@ -145,22 +121,12 @@ }, "license": "MIT", "repository": "flashbots/suave-viem", - "authors": [ - "awkweb.eth", - "jxom.eth" - ], + "authors": ["awkweb.eth", "jxom.eth"], "funding": [ { "type": "github", "url": "https://github.com/sponsors/wagmi-dev" } ], - "keywords": [ - "eth", - "ethereum", - "dapps", - "wallet", - "web3", - "suave" - ] + "keywords": ["eth", "ethereum", "dapps", "wallet", "web3", "suave"] } diff --git a/src/types/window.ts b/src/types/global.d.ts similarity index 59% rename from src/types/window.ts rename to src/types/global.d.ts index 332c27b3..7e9450c6 100644 --- a/src/types/window.ts +++ b/src/types/global.d.ts @@ -1,4 +1,4 @@ -import type { EIP1193Provider } from './eip1193.js' +import { type EIP1193Provider } from './eip1193.ts' declare global { interface Window { diff --git a/src/utils/abi/decodeAbiParameters.ts b/src/utils/abi/decodeAbiParameters.ts index 7141dbff..e5241c77 100644 --- a/src/utils/abi/decodeAbiParameters.ts +++ b/src/utils/abi/decodeAbiParameters.ts @@ -277,7 +277,7 @@ function decodeBytes( return { consumed: 32, value } } - const value = slice(data, position, position + parseInt(size), { + const value = slice(data, position, position + Number.parseInt(size), { strict: true, }) return { consumed: 32, value } @@ -293,7 +293,7 @@ function decodeNumber( { param }: { param: TParam }, ) { const signed = param.type.startsWith('int') - const size = parseInt(param.type.split('int')[1] || '256') + const size = Number.parseInt(param.type.split('int')[1] || '256') return { consumed: 32, value: diff --git a/src/utils/abi/encodeAbiParameters.ts b/src/utils/abi/encodeAbiParameters.ts index adab236c..a72eb415 100644 --- a/src/utils/abi/encodeAbiParameters.ts +++ b/src/utils/abi/encodeAbiParameters.ts @@ -265,9 +265,9 @@ function encodeBytes( encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_]), } } - if (bytesSize !== parseInt(paramSize)) + if (bytesSize !== Number.parseInt(paramSize)) throw new AbiEncodingBytesSizeMismatchError({ - expectedSize: parseInt(paramSize), + expectedSize: Number.parseInt(paramSize), value, }) return { dynamic: false, encoded: padHex(value, { dir: 'right' }) } diff --git a/src/utils/abi/encodePacked.ts b/src/utils/abi/encodePacked.ts index 7a82451c..394b7c89 100644 --- a/src/utils/abi/encodePacked.ts +++ b/src/utils/abi/encodePacked.ts @@ -107,7 +107,7 @@ function encode( const intMatch = (type as string).match(integerRegex) if (intMatch) { const [_type, baseType, bits = '256'] = intMatch - const size = parseInt(bits) / 8 + const size = Number.parseInt(bits) / 8 return numberToHex(value as number, { size: isArray ? 32 : size, signed: baseType === 'int', @@ -117,9 +117,9 @@ function encode( const bytesMatch = (type as string).match(bytesRegex) if (bytesMatch) { const [_type, size] = bytesMatch - if (parseInt(size) !== ((value as Hex).length - 2) / 2) + if (Number.parseInt(size) !== ((value as Hex).length - 2) / 2) throw new BytesSizeMismatchError({ - expectedSize: parseInt(size), + expectedSize: Number.parseInt(size), givenSize: ((value as Hex).length - 2) / 2, }) return pad(value as Hex, { dir: 'right', size: isArray ? 32 : null }) as Hex diff --git a/src/utils/buildRequest.ts b/src/utils/buildRequest.ts index 50d9f4d3..5d989d46 100644 --- a/src/utils/buildRequest.ts +++ b/src/utils/buildRequest.ts @@ -201,7 +201,8 @@ export function buildRequest Promise>( // If we find a Retry-After header, let's retry after the given time. if (error && error instanceof HttpRequestError) { const retryAfter = error?.headers?.get('Retry-After') - if (retryAfter?.match(/\d/)) return parseInt(retryAfter) * 1000 + if (retryAfter?.match(/\d/)) + return Number.parseInt(retryAfter) * 1000 } // Otherwise, let's retry with an exponential backoff. diff --git a/src/utils/ccip.ts b/src/utils/ccip.ts index 7742e811..04583776 100644 --- a/src/utils/ccip.ts +++ b/src/utils/ccip.ts @@ -2,7 +2,7 @@ import type { Abi, Address } from 'abitype' import { type CallParameters, call } from '../actions/public/call.js' import type { Transport } from '../clients/transports/createTransport.js' -import { type BaseError } from '../errors/base.js' +import type { BaseError } from '../errors/base.js' import { OffchainLookupError, OffchainLookupResponseMalformedError, diff --git a/src/utils/ens/avatar/utils.ts b/src/utils/ens/avatar/utils.ts index 872eee65..97b29e40 100644 --- a/src/utils/ens/avatar/utils.ts +++ b/src/utils/ens/avatar/utils.ts @@ -242,7 +242,7 @@ export function parseNftUri(uri_: string): ParsedNft { throw new EnsAvatarInvalidNftUriError({ reason: 'ERC namespace not found' }) return { - chainID: parseInt(chainID), + chainID: Number.parseInt(chainID), namespace: erc_namespace.toLowerCase(), contractAddress: contractAddress as Address, tokenID, diff --git a/src/utils/promise/withCache.ts b/src/utils/promise/withCache.ts index 720c242e..fa6f8a5a 100644 --- a/src/utils/promise/withCache.ts +++ b/src/utils/promise/withCache.ts @@ -41,7 +41,7 @@ export type WithCacheParameters = { */ export async function withCache( fn: () => Promise, - { cacheKey, cacheTime = Infinity }: WithCacheParameters, + { cacheKey, cacheTime = Number.POSITIVE_INFINITY }: WithCacheParameters, ) { const cache = getCache(cacheKey) diff --git a/src/utils/transaction/serializeAccessList.ts b/src/utils/transaction/serializeAccessList.ts index 92d7cd43..7d5889d4 100644 --- a/src/utils/transaction/serializeAccessList.ts +++ b/src/utils/transaction/serializeAccessList.ts @@ -10,7 +10,7 @@ import type { ErrorType } from '../../errors/utils.js' import type { Hex } from '../../types/misc.js' import type { AccessList } from '../../types/transaction.js' import { type IsAddressErrorType, isAddress } from '../address/isAddress.js' -import { type RecursiveArray } from '../encoding/toRlp.js' +import type { RecursiveArray } from '../encoding/toRlp.js' export type SerializeAccessListErrorType = | InvalidStorageKeySizeErrorType diff --git a/src/utils/typedData.ts b/src/utils/typedData.ts index ee17dc5c..dbf7a3a3 100644 --- a/src/utils/typedData.ts +++ b/src/utils/typedData.ts @@ -57,7 +57,7 @@ export function validateTypedData< // and will throw. numberToHex(value, { signed: base === 'int', - size: parseInt(size_) / 8, + size: Number.parseInt(size_) / 8, }) } @@ -67,9 +67,9 @@ export function validateTypedData< const bytesMatch = type.match(bytesRegex) if (bytesMatch) { const [_type, size_] = bytesMatch - if (size_ && size(value as Hex) !== parseInt(size_)) + if (size_ && size(value as Hex) !== Number.parseInt(size_)) throw new BytesSizeMismatchError({ - expectedSize: parseInt(size_), + expectedSize: Number.parseInt(size_), givenSize: size(value as Hex), }) } diff --git a/src/window/index.ts b/src/window/index.ts index 2aebca79..8a43fab2 100644 --- a/src/window/index.ts +++ b/src/window/index.ts @@ -1 +1 @@ -import '../types/window.js' +import '../types/global.js' diff --git a/test/setup.ts b/test/setup.ts index d0113030..8abbd5eb 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -2,20 +2,23 @@ import { fetchLogs } from '@viem/anvil' import { afterAll, afterEach, beforeAll, beforeEach, vi } from 'vitest' -import { setIntervalMining } from '~viem/test/index.js' +// import { setIntervalMining } from '~viem/test/index.js' import { cleanupCache, listenersCache } from '~viem/utils/observe.js' import { promiseCache, responseCache } from '~viem/utils/promise/withCache.js' import { socketsCache } from '~viem/utils/rpc.js' -import { forkBlockNumber, poolId } from './src/constants.js' -import { setBlockNumber, testClient } from './src/utils.js' +import { + // forkBlockNumber, + poolId, +} from './src/constants.js' +// import { setBlockNumber, testClient } from './src/utils.js' beforeAll(() => { vi.mock('../src/errors/utils.ts', () => ({ getContractAddress: vi .fn() .mockReturnValue('0x0000000000000000000000000000000000000000'), - getUrl: vi.fn().mockReturnValue('http://localhost'), + getUrl: vi.fn().mockReturnValue('http://localhost:8545'), getVersion: vi.fn().mockReturnValue('viem@1.0.2'), })) }) @@ -27,14 +30,16 @@ beforeEach(async () => { cleanupCache.clear() socketsCache.clear() - await setIntervalMining(testClient, { interval: 0 }) + // disabled until suavex-anvil replaces anvil to support suave tx types: + // await setIntervalMining(testClient, { interval: 0 }) }) afterAll(async () => { vi.restoreAllMocks() // Reset the anvil instance to the same state it was in before the tests started. - await setBlockNumber(forkBlockNumber) + // disabled until suavex-anvil replaces anvil to support suave tx types: + /* await setBlockNumber(forkBlockNumber) */ }) afterEach((context) => { diff --git a/test/vitest.config.ts b/test/vitest.config.ts index 50f27498..8926fd46 100644 --- a/test/vitest.config.ts +++ b/test/vitest.config.ts @@ -1,6 +1,8 @@ import { join } from 'node:path' import { defineConfig } from 'vitest/config' +import { JsonReporter } from 'vitest/reporters' +const jr = new JsonReporter({ outputFile: './bench/report.json' }) export default defineConfig({ test: { alias: { @@ -8,8 +10,8 @@ export default defineConfig({ '~test': join(__dirname, '.'), }, benchmark: { - outputFile: './bench/report.json', - reporters: process.env.CI ? ['json'] : ['verbose'], + // outputFile: './bench/report.json', + reporters: process.env.CI ? [jr] : ['verbose'], }, coverage: { reporter: process.env.CI ? ['lcov'] : ['text', 'json', 'html'], @@ -24,6 +26,7 @@ export default defineConfig({ }, environment: 'node', include: ['src/chains/suave/*.test.ts'], + exclude: [], setupFiles: [join(__dirname, './setup.ts')], globalSetup: [join(__dirname, './globalSetup.ts')], testTimeout: 10_000, diff --git a/tsconfig.base.json b/tsconfig.base.json index 22d37e3d..00374872 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -27,15 +27,15 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": false, "forceConsistentCasingInFileNames": true, - "verbatimModuleSyntax": true, + "verbatimModuleSyntax": false, "importHelpers": true, // This is only used for build validation. Since we do not have `tslib` installed, this will fail if we accidentally make use of anything that'd require injection of helpers. // Language and environment - "moduleResolution": "NodeNext", - "module": "NodeNext", - "target": "ES2021", // Setting this to `ES2021` enables native support for `Node v16+`: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping. + // "moduleResolution": "NodeNext", + "module": "node16", + "target": "es2022", // Setting this to `ES2021` enables native support for `Node v16+`: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping. "lib": [ - "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. + "ES2023", // By using ES2022 we get access to the `.cause` property on `Error` instances. "DOM" // We are adding `DOM` here to get the `fetch`, etc. types. This should be removed once these types are available via DefinitelyTyped. ], diff --git a/tsconfig.json b/tsconfig.json index 30e164e1..014e4308 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,13 +2,13 @@ // This configuration is used for local development and type checking. "extends": "./tsconfig.base.json", "include": ["src", "test"], - "exclude": [], + "exclude": ["test/contracts/generated.ts"], "references": [{ "path": "./scripts/tsconfig.json" }], "compilerOptions": { "baseUrl": ".", "paths": { "~viem/*": ["./src/*"], "~test/*": ["./test/*"], - }, + } } } diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json new file mode 100644 index 00000000..e4c3f8aa --- /dev/null +++ b/tsconfig.typecheck.json @@ -0,0 +1,17 @@ +{ + // This file is used to compile the for cjs and esm (see package.json build scripts). It should exclude all test files. + "extends": "./tsconfig.build.json", + "include": ["src"], + "exclude": [ + "src/_types/**/*", + "src/node_modules/**/*", + "src/**/*.test.ts", + "src/**/*.test-d.ts", + "src/**/*.bench.ts" + ], + "compilerOptions": { + "moduleResolution": "node", + "sourceMap": true, + "rootDir": "./src" + } +} diff --git a/vectors/src/transaction.ts b/vectors/src/transaction.ts index 72417714..be77be20 100644 --- a/vectors/src/transaction.ts +++ b/vectors/src/transaction.ts @@ -3,7 +3,7 @@ import { join } from 'node:path' import { generatePrivateKey } from '../../src/accounts/generatePrivateKey.js' import { signTransaction } from '../../src/accounts/utils/signTransaction.js' import { parseTransaction } from '../../src/index.js' -import { +import type { TransactionSerializableEIP1559, TransactionSerializableEIP2930, TransactionSerializableLegacy,