From f438fafbd396248283876eba220f4c661c47bfd2 Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Sat, 9 Nov 2024 13:53:39 +1100 Subject: [PATCH] chore: mv modules to `core/` (#17) * chore: move modules to core/ * chore: changeset * chore: tweak package.json * chore: tweak package.json --- .changeset/quiet-horses-sniff.md | 5 + .github/workflows/snapshot.yml | 23 ++-- scripts/utils/exports.ts | 1 + src/{ => core}/Abi.ts | 0 src/{ => core}/AbiConstructor.ts | 0 src/{ => core}/AbiError.ts | 0 src/{ => core}/AbiEvent.ts | 0 src/{ => core}/AbiFunction.ts | 0 src/{ => core}/AbiItem.ts | 0 src/{ => core}/AbiParameters.ts | 0 src/{ => core}/AccessList.ts | 0 src/{ => core}/AccountProof.ts | 2 +- src/{ => core}/Address.ts | 0 src/{ => core}/AesGcm.ts | 0 src/{ => core}/Authorization.ts | 0 src/{ => core}/Base58.ts | 0 src/{ => core}/Base64.ts | 0 src/{ => core}/Blobs.ts | 0 src/{ => core}/Block.ts | 0 src/{ => core}/Bloom.ts | 0 src/{ => core}/Bls.ts | 0 src/{ => core}/BlsPoint.ts | 0 src/{ => core}/Bytes.ts | 0 src/{ => core}/Caches.ts | 0 src/{ => core}/ContractAddress.ts | 0 src/{ => core}/Ens.ts | 0 src/{ => core}/Errors.ts | 0 src/{ => core}/Fee.ts | 0 src/{ => core}/Filter.ts | 0 src/{ => core}/Hash.ts | 0 src/{ => core}/HdKey.ts | 0 src/{ => core}/Hex.ts | 0 src/{ => core}/Json.ts | 0 src/{ => core}/Kzg.ts | 0 src/{ => core}/Log.ts | 0 src/{ => core}/Mnemonic.ts | 0 src/{ => core}/P256.ts | 0 src/{ => core}/PersonalMessage.ts | 0 src/{ => core}/Provider.ts | 0 src/{ => core}/PublicKey.ts | 0 src/{ => core}/Rlp.ts | 0 src/{ => core}/RpcRequest.ts | 2 +- src/{ => core}/RpcResponse.ts | 2 +- src/{ => core}/RpcSchema.ts | 0 src/{ => core}/RpcTransport.ts | 0 src/{ => core}/Secp256k1.ts | 0 src/{ => core}/Signature.ts | 0 src/{ => core}/Siwe.ts | 0 src/{ => core}/Solidity.ts | 0 src/{ => core}/Transaction.ts | 0 src/{ => core}/TransactionEnvelope.ts | 0 src/{ => core}/TransactionEnvelopeEip1559.ts | 0 src/{ => core}/TransactionEnvelopeEip2930.ts | 0 src/{ => core}/TransactionEnvelopeEip4844.ts | 0 src/{ => core}/TransactionEnvelopeEip7702.ts | 0 src/{ => core}/TransactionEnvelopeLegacy.ts | 0 src/{ => core}/TransactionReceipt.ts | 0 src/{ => core}/TransactionRequest.ts | 0 src/{ => core}/TypedData.ts | 0 src/{ => core}/ValidatorData.ts | 0 src/{ => core}/Value.ts | 0 src/{ => core}/WebAuthnP256.ts | 0 src/{ => core}/WebCryptoP256.ts | 0 src/{ => core}/Withdrawal.ts | 0 src/{ => core}/_test/Abi.test-d.ts | 0 src/{ => core}/_test/Abi.test.ts | 0 src/{ => core}/_test/AbiConstructor.test-d.ts | 0 src/{ => core}/_test/AbiConstructor.test.ts | 8 +- src/{ => core}/_test/AbiError.test-d.ts | 0 src/{ => core}/_test/AbiError.test.ts | 6 +- src/{ => core}/_test/AbiEvent.snap-d.ts | 2 +- src/{ => core}/_test/AbiEvent.test.ts | 6 +- src/{ => core}/_test/AbiFunction.snap-d.ts | 4 +- src/{ => core}/_test/AbiFunction.test.ts | 6 +- src/{ => core}/_test/AbiItem.snap-d.ts | 2 +- src/{ => core}/_test/AbiItem.test.ts | 0 src/{ => core}/_test/AbiParameters.bench.ts | 4 +- .../_test/AbiParameters.decode.test.ts | 4 +- .../_test/AbiParameters.encode.test.ts | 4 +- src/{ => core}/_test/AbiParameters.snap-d.ts | 0 src/{ => core}/_test/AbiParameters.test.ts | 2 +- src/{ => core}/_test/AccessList.test.ts | 0 src/{ => core}/_test/AccountProof.test.ts | 0 src/{ => core}/_test/Address.bench.ts | 0 src/{ => core}/_test/Address.test.ts | 0 src/{ => core}/_test/AesGcm.test.ts | 0 src/{ => core}/_test/Authorization.test.ts | 2 +- src/{ => core}/_test/Base58.bench.ts | 0 src/{ => core}/_test/Base58.test.ts | 0 src/{ => core}/_test/Base64.test.ts | 0 src/{ => core}/_test/Blobs.test.ts | 2 +- src/{ => core}/_test/Block.test.ts | 2 +- src/{ => core}/_test/Bloom.test.ts | 0 src/{ => core}/_test/Bls.test.ts | 0 src/{ => core}/_test/BlsPoint.test.ts | 0 src/{ => core}/_test/Bytes.test.ts | 0 src/{ => core}/_test/Caches.test.ts | 0 src/{ => core}/_test/ContractAddress.test.ts | 0 src/{ => core}/_test/Ens.test.ts | 0 src/{ => core}/_test/Errors.test.ts | 0 src/{ => core}/_test/Fee.test.ts | 0 src/{ => core}/_test/Filter.test.ts | 0 src/{ => core}/_test/Hash.test.ts | 0 src/{ => core}/_test/HdKey.test.ts | 2 +- src/{ => core}/_test/Hex.bench.ts | 2 +- src/{ => core}/_test/Hex.test-d.ts | 0 src/{ => core}/_test/Hex.test.ts | 0 src/{ => core}/_test/Json.test.ts | 0 src/{ => core}/_test/Kzg.test.ts | 8 +- src/{ => core}/_test/Log.test.ts | 2 +- src/{ => core}/_test/Mnemonic.test.ts | 0 src/{ => core}/_test/P256.test.ts | 2 +- src/{ => core}/_test/PersonalMessage.test.ts | 2 +- src/{ => core}/_test/Provider.test.ts | 4 +- src/{ => core}/_test/PublicKey.test-d.ts | 0 src/{ => core}/_test/PublicKey.test.ts | 0 src/{ => core}/_test/Rlp.bench.ts | 0 src/{ => core}/_test/Rlp.test-d.ts | 0 src/{ => core}/_test/Rlp.test.ts | 0 src/{ => core}/_test/RpcRequest.test.ts | 2 +- src/{ => core}/_test/RpcResponse.test.ts | 2 +- src/{ => core}/_test/RpcSchema.test.ts | 0 src/{ => core}/_test/RpcTransport.test.ts | 4 +- src/{ => core}/_test/Secp256k1.test.ts | 2 +- src/{ => core}/_test/Signature.snap-d.ts | 0 src/{ => core}/_test/Signature.test.ts | 0 src/{ => core}/_test/Siwe.test.ts | 0 src/{ => core}/_test/Solidity.test.ts | 0 src/{ => core}/_test/Transaction.test.ts | 4 +- .../_test/TransactionEnvelope.test.ts | 0 .../TransactionEnvelopeEip1559.test-d.ts | 0 .../_test/TransactionEnvelopeEip1559.test.ts | 4 +- .../TransactionEnvelopeEip2930.test-d.ts | 0 .../_test/TransactionEnvelopeEip2930.test.ts | 4 +- .../TransactionEnvelopeEip4844.test-d.ts | 0 .../_test/TransactionEnvelopeEip4844.test.ts | 6 +- .../TransactionEnvelopeEip7702.test-d.ts | 0 .../_test/TransactionEnvelopeEip7702.test.ts | 6 +- .../_test/TransactionEnvelopeLegacy.test-d.ts | 0 .../_test/TransactionEnvelopeLegacy.test.ts | 4 +- .../_test/TransactionReceipt.test.ts | 2 +- .../_test/TransactionRequest.test.ts | 2 +- src/{ => core}/_test/TypedData.test-d.ts | 0 src/{ => core}/_test/TypedData.test.ts | 2 +- src/{ => core}/_test/ValidatorData.test.ts | 2 +- src/{ => core}/_test/Value.test.ts | 0 src/{ => core}/_test/WebAuthnP256.test.ts | 0 src/{ => core}/_test/WebCryptoP256.test.ts | 0 src/{ => core}/_test/Withdrawal.test.ts | 0 src/{ => core}/_test/_snap/Block.test.ts.snap | 0 .../TransactionEnvelopeEip4844.test.ts.snap | 0 src/{ => core}/_test/index.test.ts | 2 +- src/{ => core}/_test/internal/base58.test.ts | 0 src/{ => core}/_test/internal/cursor.test.ts | 0 src/{ => core}/_test/internal/ens.test.ts | 0 src/{ => core}/_test/internal/lru.test.ts | 0 src/{ => core}/_test/internal/promise.test.ts | 2 +- .../_test/internal/rpcTransport.test.ts | 0 src/{ => core}/_test/internal/uid.test.ts | 0 .../_test/internal/webauthn.test.ts | 0 src/{ => core}/internal/abi.ts | 0 src/{ => core}/internal/abiConstructor.ts | 0 src/{ => core}/internal/abiError.ts | 0 src/{ => core}/internal/abiEvent.ts | 0 src/{ => core}/internal/abiFunction.ts | 0 src/{ => core}/internal/abiItem.ts | 0 src/{ => core}/internal/abiParameters.ts | 0 src/{ => core}/internal/base58.ts | 0 src/{ => core}/internal/bytes.ts | 0 src/{ => core}/internal/cursor.ts | 0 src/{ => core}/internal/ens.ts | 2 +- src/{ => core}/internal/errors.ts | 0 src/{ => core}/internal/hdKey.ts | 0 src/{ => core}/internal/hex.ts | 0 src/{ => core}/internal/lru.ts | 0 src/{ => core}/internal/mnemonic/wordlists.ts | 0 src/{ => core}/internal/promise.ts | 0 src/{ => core}/internal/register.ts | 0 src/{ => core}/internal/rpcSchema.ts | 0 src/{ => core}/internal/rpcSchemas/eth.ts | 0 src/{ => core}/internal/rpcSchemas/wallet.ts | 0 src/{ => core}/internal/rpcTransport.ts | 0 src/{ => core}/internal/types.ts | 0 src/{ => core}/internal/uid.ts | 0 src/{ => core}/internal/webauthn.ts | 0 src/{ => core}/version.ts | 0 src/index.ts | 124 +++++++++--------- src/package.json | 6 +- src/window/index.ts | 2 +- test/setup.ts | 4 +- test/vitest.config.ts | 4 +- 191 files changed, 151 insertions(+), 152 deletions(-) create mode 100644 .changeset/quiet-horses-sniff.md rename src/{ => core}/Abi.ts (100%) rename src/{ => core}/AbiConstructor.ts (100%) rename src/{ => core}/AbiError.ts (100%) rename src/{ => core}/AbiEvent.ts (100%) rename src/{ => core}/AbiFunction.ts (100%) rename src/{ => core}/AbiItem.ts (100%) rename src/{ => core}/AbiParameters.ts (100%) rename src/{ => core}/AccessList.ts (100%) rename src/{ => core}/AccountProof.ts (96%) rename src/{ => core}/Address.ts (100%) rename src/{ => core}/AesGcm.ts (100%) rename src/{ => core}/Authorization.ts (100%) rename src/{ => core}/Base58.ts (100%) rename src/{ => core}/Base64.ts (100%) rename src/{ => core}/Blobs.ts (100%) rename src/{ => core}/Block.ts (100%) rename src/{ => core}/Bloom.ts (100%) rename src/{ => core}/Bls.ts (100%) rename src/{ => core}/BlsPoint.ts (100%) rename src/{ => core}/Bytes.ts (100%) rename src/{ => core}/Caches.ts (100%) rename src/{ => core}/ContractAddress.ts (100%) rename src/{ => core}/Ens.ts (100%) rename src/{ => core}/Errors.ts (100%) rename src/{ => core}/Fee.ts (100%) rename src/{ => core}/Filter.ts (100%) rename src/{ => core}/Hash.ts (100%) rename src/{ => core}/HdKey.ts (100%) rename src/{ => core}/Hex.ts (100%) rename src/{ => core}/Json.ts (100%) rename src/{ => core}/Kzg.ts (100%) rename src/{ => core}/Log.ts (100%) rename src/{ => core}/Mnemonic.ts (100%) rename src/{ => core}/P256.ts (100%) rename src/{ => core}/PersonalMessage.ts (100%) rename src/{ => core}/Provider.ts (100%) rename src/{ => core}/PublicKey.ts (100%) rename src/{ => core}/Rlp.ts (100%) rename src/{ => core}/RpcRequest.ts (99%) rename src/{ => core}/RpcResponse.ts (99%) rename src/{ => core}/RpcSchema.ts (100%) rename src/{ => core}/RpcTransport.ts (100%) rename src/{ => core}/Secp256k1.ts (100%) rename src/{ => core}/Signature.ts (100%) rename src/{ => core}/Siwe.ts (100%) rename src/{ => core}/Solidity.ts (100%) rename src/{ => core}/Transaction.ts (100%) rename src/{ => core}/TransactionEnvelope.ts (100%) rename src/{ => core}/TransactionEnvelopeEip1559.ts (100%) rename src/{ => core}/TransactionEnvelopeEip2930.ts (100%) rename src/{ => core}/TransactionEnvelopeEip4844.ts (100%) rename src/{ => core}/TransactionEnvelopeEip7702.ts (100%) rename src/{ => core}/TransactionEnvelopeLegacy.ts (100%) rename src/{ => core}/TransactionReceipt.ts (100%) rename src/{ => core}/TransactionRequest.ts (100%) rename src/{ => core}/TypedData.ts (100%) rename src/{ => core}/ValidatorData.ts (100%) rename src/{ => core}/Value.ts (100%) rename src/{ => core}/WebAuthnP256.ts (100%) rename src/{ => core}/WebCryptoP256.ts (100%) rename src/{ => core}/Withdrawal.ts (100%) rename src/{ => core}/_test/Abi.test-d.ts (100%) rename src/{ => core}/_test/Abi.test.ts (100%) rename src/{ => core}/_test/AbiConstructor.test-d.ts (100%) rename src/{ => core}/_test/AbiConstructor.test.ts (96%) rename src/{ => core}/_test/AbiError.test-d.ts (100%) rename src/{ => core}/_test/AbiError.test.ts (99%) rename src/{ => core}/_test/AbiEvent.snap-d.ts (99%) rename src/{ => core}/_test/AbiEvent.test.ts (99%) rename src/{ => core}/_test/AbiFunction.snap-d.ts (98%) rename src/{ => core}/_test/AbiFunction.test.ts (99%) rename src/{ => core}/_test/AbiItem.snap-d.ts (97%) rename src/{ => core}/_test/AbiItem.test.ts (100%) rename src/{ => core}/_test/AbiParameters.bench.ts (99%) rename src/{ => core}/_test/AbiParameters.decode.test.ts (99%) rename src/{ => core}/_test/AbiParameters.encode.test.ts (99%) rename src/{ => core}/_test/AbiParameters.snap-d.ts (100%) rename src/{ => core}/_test/AbiParameters.test.ts (99%) rename src/{ => core}/_test/AccessList.test.ts (100%) rename src/{ => core}/_test/AccountProof.test.ts (100%) rename src/{ => core}/_test/Address.bench.ts (100%) rename src/{ => core}/_test/Address.test.ts (100%) rename src/{ => core}/_test/AesGcm.test.ts (100%) rename src/{ => core}/_test/Authorization.test.ts (99%) rename src/{ => core}/_test/Base58.bench.ts (100%) rename src/{ => core}/_test/Base58.test.ts (100%) rename src/{ => core}/_test/Base64.test.ts (100%) rename src/{ => core}/_test/Blobs.test.ts (99%) rename src/{ => core}/_test/Block.test.ts (99%) rename src/{ => core}/_test/Bloom.test.ts (100%) rename src/{ => core}/_test/Bls.test.ts (100%) rename src/{ => core}/_test/BlsPoint.test.ts (100%) rename src/{ => core}/_test/Bytes.test.ts (100%) rename src/{ => core}/_test/Caches.test.ts (100%) rename src/{ => core}/_test/ContractAddress.test.ts (100%) rename src/{ => core}/_test/Ens.test.ts (100%) rename src/{ => core}/_test/Errors.test.ts (100%) rename src/{ => core}/_test/Fee.test.ts (100%) rename src/{ => core}/_test/Filter.test.ts (100%) rename src/{ => core}/_test/Hash.test.ts (100%) rename src/{ => core}/_test/HdKey.test.ts (98%) rename src/{ => core}/_test/Hex.bench.ts (97%) rename src/{ => core}/_test/Hex.test-d.ts (100%) rename src/{ => core}/_test/Hex.test.ts (100%) rename src/{ => core}/_test/Json.test.ts (100%) rename src/{ => core}/_test/Kzg.test.ts (89%) rename src/{ => core}/_test/Log.test.ts (99%) rename src/{ => core}/_test/Mnemonic.test.ts (100%) rename src/{ => core}/_test/P256.test.ts (98%) rename src/{ => core}/_test/PersonalMessage.test.ts (95%) rename src/{ => core}/_test/Provider.test.ts (96%) rename src/{ => core}/_test/PublicKey.test-d.ts (100%) rename src/{ => core}/_test/PublicKey.test.ts (100%) rename src/{ => core}/_test/Rlp.bench.ts (100%) rename src/{ => core}/_test/Rlp.test-d.ts (100%) rename src/{ => core}/_test/Rlp.test.ts (100%) rename src/{ => core}/_test/RpcRequest.test.ts (98%) rename src/{ => core}/_test/RpcResponse.test.ts (99%) rename src/{ => core}/_test/RpcSchema.test.ts (100%) rename src/{ => core}/_test/RpcTransport.test.ts (98%) rename src/{ => core}/_test/Secp256k1.test.ts (99%) rename src/{ => core}/_test/Signature.snap-d.ts (100%) rename src/{ => core}/_test/Signature.test.ts (100%) rename src/{ => core}/_test/Siwe.test.ts (100%) rename src/{ => core}/_test/Solidity.test.ts (100%) rename src/{ => core}/_test/Transaction.test.ts (99%) rename src/{ => core}/_test/TransactionEnvelope.test.ts (100%) rename src/{ => core}/_test/TransactionEnvelopeEip1559.test-d.ts (100%) rename src/{ => core}/_test/TransactionEnvelopeEip1559.test.ts (99%) rename src/{ => core}/_test/TransactionEnvelopeEip2930.test-d.ts (100%) rename src/{ => core}/_test/TransactionEnvelopeEip2930.test.ts (99%) rename src/{ => core}/_test/TransactionEnvelopeEip4844.test-d.ts (100%) rename src/{ => core}/_test/TransactionEnvelopeEip4844.test.ts (99%) rename src/{ => core}/_test/TransactionEnvelopeEip7702.test-d.ts (100%) rename src/{ => core}/_test/TransactionEnvelopeEip7702.test.ts (99%) rename src/{ => core}/_test/TransactionEnvelopeLegacy.test-d.ts (100%) rename src/{ => core}/_test/TransactionEnvelopeLegacy.test.ts (99%) rename src/{ => core}/_test/TransactionReceipt.test.ts (99%) rename src/{ => core}/_test/TransactionRequest.test.ts (97%) rename src/{ => core}/_test/TypedData.test-d.ts (100%) rename src/{ => core}/_test/TypedData.test.ts (99%) rename src/{ => core}/_test/ValidatorData.test.ts (96%) rename src/{ => core}/_test/Value.test.ts (100%) rename src/{ => core}/_test/WebAuthnP256.test.ts (100%) rename src/{ => core}/_test/WebCryptoP256.test.ts (100%) rename src/{ => core}/_test/Withdrawal.test.ts (100%) rename src/{ => core}/_test/_snap/Block.test.ts.snap (100%) rename src/{ => core}/_test/_snap/TransactionEnvelopeEip4844.test.ts.snap (100%) rename src/{ => core}/_test/index.test.ts (96%) rename src/{ => core}/_test/internal/base58.test.ts (100%) rename src/{ => core}/_test/internal/cursor.test.ts (100%) rename src/{ => core}/_test/internal/ens.test.ts (100%) rename src/{ => core}/_test/internal/lru.test.ts (100%) rename src/{ => core}/_test/internal/promise.test.ts (93%) rename src/{ => core}/_test/internal/rpcTransport.test.ts (100%) rename src/{ => core}/_test/internal/uid.test.ts (100%) rename src/{ => core}/_test/internal/webauthn.test.ts (100%) rename src/{ => core}/internal/abi.ts (100%) rename src/{ => core}/internal/abiConstructor.ts (100%) rename src/{ => core}/internal/abiError.ts (100%) rename src/{ => core}/internal/abiEvent.ts (100%) rename src/{ => core}/internal/abiFunction.ts (100%) rename src/{ => core}/internal/abiItem.ts (100%) rename src/{ => core}/internal/abiParameters.ts (100%) rename src/{ => core}/internal/base58.ts (100%) rename src/{ => core}/internal/bytes.ts (100%) rename src/{ => core}/internal/cursor.ts (100%) rename src/{ => core}/internal/ens.ts (97%) rename src/{ => core}/internal/errors.ts (100%) rename src/{ => core}/internal/hdKey.ts (100%) rename src/{ => core}/internal/hex.ts (100%) rename src/{ => core}/internal/lru.ts (100%) rename src/{ => core}/internal/mnemonic/wordlists.ts (100%) rename src/{ => core}/internal/promise.ts (100%) rename src/{ => core}/internal/register.ts (100%) rename src/{ => core}/internal/rpcSchema.ts (100%) rename src/{ => core}/internal/rpcSchemas/eth.ts (100%) rename src/{ => core}/internal/rpcSchemas/wallet.ts (100%) rename src/{ => core}/internal/rpcTransport.ts (100%) rename src/{ => core}/internal/types.ts (100%) rename src/{ => core}/internal/uid.ts (100%) rename src/{ => core}/internal/webauthn.ts (100%) rename src/{ => core}/version.ts (100%) diff --git a/.changeset/quiet-horses-sniff.md b/.changeset/quiet-horses-sniff.md new file mode 100644 index 00000000..6166e473 --- /dev/null +++ b/.changeset/quiet-horses-sniff.md @@ -0,0 +1,5 @@ +--- +"ox": patch +--- + +Moved modules to `core/`. diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 756fc270..2c909308 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -20,15 +20,16 @@ jobs: - name: Install dependencies uses: ./.github/actions/install-dependencies - - name: Setup .npmrc file - uses: actions/setup-node@v4 - with: - registry-url: 'https://registry.npmjs.org' - - - name: Publish to npm - run: | - cd src && pnpm version $(npm pkg get version | sed 's/"//g')-$(date +'%Y%m%dT%H%M%S') && cd ../ - pnpm changeset:prepublish - cd src && pnpm publish --no-git-checks --provenance false && cd ../ + - name: Publish Snapshots + continue-on-error: true env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + snapshot=$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//') + npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" + pnpm clean + pnpm changeset version --no-git-tag --snapshot $snapshot + pnpm changeset:prepublish + pnpm changeset publish --no-git-tag --snapshot $snapshot --tag $snapshot + diff --git a/scripts/utils/exports.ts b/scripts/utils/exports.ts index 69ae28a5..54316752 100644 --- a/scripts/utils/exports.ts +++ b/scripts/utils/exports.ts @@ -27,6 +27,7 @@ export function getExports({ if (!parentEntry.isDirectory()) { if (parentEntry.name.endsWith('test.ts')) continue if (parentEntry.name === 'jsr.json') continue + if (parentEntry.name === 'tsdoc.json') continue if ( !parentEntry.name.endsWith('.ts') && !parentEntry.name.endsWith('.json') diff --git a/src/Abi.ts b/src/core/Abi.ts similarity index 100% rename from src/Abi.ts rename to src/core/Abi.ts diff --git a/src/AbiConstructor.ts b/src/core/AbiConstructor.ts similarity index 100% rename from src/AbiConstructor.ts rename to src/core/AbiConstructor.ts diff --git a/src/AbiError.ts b/src/core/AbiError.ts similarity index 100% rename from src/AbiError.ts rename to src/core/AbiError.ts diff --git a/src/AbiEvent.ts b/src/core/AbiEvent.ts similarity index 100% rename from src/AbiEvent.ts rename to src/core/AbiEvent.ts diff --git a/src/AbiFunction.ts b/src/core/AbiFunction.ts similarity index 100% rename from src/AbiFunction.ts rename to src/core/AbiFunction.ts diff --git a/src/AbiItem.ts b/src/core/AbiItem.ts similarity index 100% rename from src/AbiItem.ts rename to src/core/AbiItem.ts diff --git a/src/AbiParameters.ts b/src/core/AbiParameters.ts similarity index 100% rename from src/AbiParameters.ts rename to src/core/AbiParameters.ts diff --git a/src/AccessList.ts b/src/core/AccessList.ts similarity index 100% rename from src/AccessList.ts rename to src/core/AccessList.ts diff --git a/src/AccountProof.ts b/src/core/AccountProof.ts similarity index 96% rename from src/AccountProof.ts rename to src/core/AccountProof.ts index e94d21e6..74ef26ab 100644 --- a/src/AccountProof.ts +++ b/src/core/AccountProof.ts @@ -1,4 +1,4 @@ -import type { Address, Hex } from './index.js' +import type { Address, Hex } from '../index.js' /** An Account Proof as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/state.yaml). */ export type AccountProof = { diff --git a/src/Address.ts b/src/core/Address.ts similarity index 100% rename from src/Address.ts rename to src/core/Address.ts diff --git a/src/AesGcm.ts b/src/core/AesGcm.ts similarity index 100% rename from src/AesGcm.ts rename to src/core/AesGcm.ts diff --git a/src/Authorization.ts b/src/core/Authorization.ts similarity index 100% rename from src/Authorization.ts rename to src/core/Authorization.ts diff --git a/src/Base58.ts b/src/core/Base58.ts similarity index 100% rename from src/Base58.ts rename to src/core/Base58.ts diff --git a/src/Base64.ts b/src/core/Base64.ts similarity index 100% rename from src/Base64.ts rename to src/core/Base64.ts diff --git a/src/Blobs.ts b/src/core/Blobs.ts similarity index 100% rename from src/Blobs.ts rename to src/core/Blobs.ts diff --git a/src/Block.ts b/src/core/Block.ts similarity index 100% rename from src/Block.ts rename to src/core/Block.ts diff --git a/src/Bloom.ts b/src/core/Bloom.ts similarity index 100% rename from src/Bloom.ts rename to src/core/Bloom.ts diff --git a/src/Bls.ts b/src/core/Bls.ts similarity index 100% rename from src/Bls.ts rename to src/core/Bls.ts diff --git a/src/BlsPoint.ts b/src/core/BlsPoint.ts similarity index 100% rename from src/BlsPoint.ts rename to src/core/BlsPoint.ts diff --git a/src/Bytes.ts b/src/core/Bytes.ts similarity index 100% rename from src/Bytes.ts rename to src/core/Bytes.ts diff --git a/src/Caches.ts b/src/core/Caches.ts similarity index 100% rename from src/Caches.ts rename to src/core/Caches.ts diff --git a/src/ContractAddress.ts b/src/core/ContractAddress.ts similarity index 100% rename from src/ContractAddress.ts rename to src/core/ContractAddress.ts diff --git a/src/Ens.ts b/src/core/Ens.ts similarity index 100% rename from src/Ens.ts rename to src/core/Ens.ts diff --git a/src/Errors.ts b/src/core/Errors.ts similarity index 100% rename from src/Errors.ts rename to src/core/Errors.ts diff --git a/src/Fee.ts b/src/core/Fee.ts similarity index 100% rename from src/Fee.ts rename to src/core/Fee.ts diff --git a/src/Filter.ts b/src/core/Filter.ts similarity index 100% rename from src/Filter.ts rename to src/core/Filter.ts diff --git a/src/Hash.ts b/src/core/Hash.ts similarity index 100% rename from src/Hash.ts rename to src/core/Hash.ts diff --git a/src/HdKey.ts b/src/core/HdKey.ts similarity index 100% rename from src/HdKey.ts rename to src/core/HdKey.ts diff --git a/src/Hex.ts b/src/core/Hex.ts similarity index 100% rename from src/Hex.ts rename to src/core/Hex.ts diff --git a/src/Json.ts b/src/core/Json.ts similarity index 100% rename from src/Json.ts rename to src/core/Json.ts diff --git a/src/Kzg.ts b/src/core/Kzg.ts similarity index 100% rename from src/Kzg.ts rename to src/core/Kzg.ts diff --git a/src/Log.ts b/src/core/Log.ts similarity index 100% rename from src/Log.ts rename to src/core/Log.ts diff --git a/src/Mnemonic.ts b/src/core/Mnemonic.ts similarity index 100% rename from src/Mnemonic.ts rename to src/core/Mnemonic.ts diff --git a/src/P256.ts b/src/core/P256.ts similarity index 100% rename from src/P256.ts rename to src/core/P256.ts diff --git a/src/PersonalMessage.ts b/src/core/PersonalMessage.ts similarity index 100% rename from src/PersonalMessage.ts rename to src/core/PersonalMessage.ts diff --git a/src/Provider.ts b/src/core/Provider.ts similarity index 100% rename from src/Provider.ts rename to src/core/Provider.ts diff --git a/src/PublicKey.ts b/src/core/PublicKey.ts similarity index 100% rename from src/PublicKey.ts rename to src/core/PublicKey.ts diff --git a/src/Rlp.ts b/src/core/Rlp.ts similarity index 100% rename from src/Rlp.ts rename to src/core/Rlp.ts diff --git a/src/RpcRequest.ts b/src/core/RpcRequest.ts similarity index 99% rename from src/RpcRequest.ts rename to src/core/RpcRequest.ts index fbc52b68..04b6837e 100644 --- a/src/RpcRequest.ts +++ b/src/core/RpcRequest.ts @@ -1,5 +1,5 @@ +import type { Errors } from '../index.js' import type * as RpcSchema from './RpcSchema.js' -import type { Errors } from './index.js' import type * as RpcSchema_internal from './internal/rpcSchema.js' import type { Compute } from './internal/types.js' diff --git a/src/RpcResponse.ts b/src/core/RpcResponse.ts similarity index 99% rename from src/RpcResponse.ts rename to src/core/RpcResponse.ts index 462553c8..86ac50c3 100644 --- a/src/RpcResponse.ts +++ b/src/core/RpcResponse.ts @@ -1,4 +1,4 @@ -import type { Errors, RpcRequest } from './index.js' +import type { Errors, RpcRequest } from '../index.js' import type { Compute, IsNarrowable, diff --git a/src/RpcSchema.ts b/src/core/RpcSchema.ts similarity index 100% rename from src/RpcSchema.ts rename to src/core/RpcSchema.ts diff --git a/src/RpcTransport.ts b/src/core/RpcTransport.ts similarity index 100% rename from src/RpcTransport.ts rename to src/core/RpcTransport.ts diff --git a/src/Secp256k1.ts b/src/core/Secp256k1.ts similarity index 100% rename from src/Secp256k1.ts rename to src/core/Secp256k1.ts diff --git a/src/Signature.ts b/src/core/Signature.ts similarity index 100% rename from src/Signature.ts rename to src/core/Signature.ts diff --git a/src/Siwe.ts b/src/core/Siwe.ts similarity index 100% rename from src/Siwe.ts rename to src/core/Siwe.ts diff --git a/src/Solidity.ts b/src/core/Solidity.ts similarity index 100% rename from src/Solidity.ts rename to src/core/Solidity.ts diff --git a/src/Transaction.ts b/src/core/Transaction.ts similarity index 100% rename from src/Transaction.ts rename to src/core/Transaction.ts diff --git a/src/TransactionEnvelope.ts b/src/core/TransactionEnvelope.ts similarity index 100% rename from src/TransactionEnvelope.ts rename to src/core/TransactionEnvelope.ts diff --git a/src/TransactionEnvelopeEip1559.ts b/src/core/TransactionEnvelopeEip1559.ts similarity index 100% rename from src/TransactionEnvelopeEip1559.ts rename to src/core/TransactionEnvelopeEip1559.ts diff --git a/src/TransactionEnvelopeEip2930.ts b/src/core/TransactionEnvelopeEip2930.ts similarity index 100% rename from src/TransactionEnvelopeEip2930.ts rename to src/core/TransactionEnvelopeEip2930.ts diff --git a/src/TransactionEnvelopeEip4844.ts b/src/core/TransactionEnvelopeEip4844.ts similarity index 100% rename from src/TransactionEnvelopeEip4844.ts rename to src/core/TransactionEnvelopeEip4844.ts diff --git a/src/TransactionEnvelopeEip7702.ts b/src/core/TransactionEnvelopeEip7702.ts similarity index 100% rename from src/TransactionEnvelopeEip7702.ts rename to src/core/TransactionEnvelopeEip7702.ts diff --git a/src/TransactionEnvelopeLegacy.ts b/src/core/TransactionEnvelopeLegacy.ts similarity index 100% rename from src/TransactionEnvelopeLegacy.ts rename to src/core/TransactionEnvelopeLegacy.ts diff --git a/src/TransactionReceipt.ts b/src/core/TransactionReceipt.ts similarity index 100% rename from src/TransactionReceipt.ts rename to src/core/TransactionReceipt.ts diff --git a/src/TransactionRequest.ts b/src/core/TransactionRequest.ts similarity index 100% rename from src/TransactionRequest.ts rename to src/core/TransactionRequest.ts diff --git a/src/TypedData.ts b/src/core/TypedData.ts similarity index 100% rename from src/TypedData.ts rename to src/core/TypedData.ts diff --git a/src/ValidatorData.ts b/src/core/ValidatorData.ts similarity index 100% rename from src/ValidatorData.ts rename to src/core/ValidatorData.ts diff --git a/src/Value.ts b/src/core/Value.ts similarity index 100% rename from src/Value.ts rename to src/core/Value.ts diff --git a/src/WebAuthnP256.ts b/src/core/WebAuthnP256.ts similarity index 100% rename from src/WebAuthnP256.ts rename to src/core/WebAuthnP256.ts diff --git a/src/WebCryptoP256.ts b/src/core/WebCryptoP256.ts similarity index 100% rename from src/WebCryptoP256.ts rename to src/core/WebCryptoP256.ts diff --git a/src/Withdrawal.ts b/src/core/Withdrawal.ts similarity index 100% rename from src/Withdrawal.ts rename to src/core/Withdrawal.ts diff --git a/src/_test/Abi.test-d.ts b/src/core/_test/Abi.test-d.ts similarity index 100% rename from src/_test/Abi.test-d.ts rename to src/core/_test/Abi.test-d.ts diff --git a/src/_test/Abi.test.ts b/src/core/_test/Abi.test.ts similarity index 100% rename from src/_test/Abi.test.ts rename to src/core/_test/Abi.test.ts diff --git a/src/_test/AbiConstructor.test-d.ts b/src/core/_test/AbiConstructor.test-d.ts similarity index 100% rename from src/_test/AbiConstructor.test-d.ts rename to src/core/_test/AbiConstructor.test-d.ts diff --git a/src/_test/AbiConstructor.test.ts b/src/core/_test/AbiConstructor.test.ts similarity index 96% rename from src/_test/AbiConstructor.test.ts rename to src/core/_test/AbiConstructor.test.ts index d32d4396..342c6aba 100644 --- a/src/_test/AbiConstructor.test.ts +++ b/src/core/_test/AbiConstructor.test.ts @@ -1,10 +1,10 @@ import { AbiConstructor } from 'ox' import { describe, expect, test } from 'vitest' -import { Constructor } from '../../contracts/generated.js' -import { anvilMainnet } from '../../test/anvil.js' -import { seaportContractConfig } from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +import { Constructor } from '../../../contracts/generated.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { seaportContractConfig } from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' describe('decode', () => { test('default', () => { diff --git a/src/_test/AbiError.test-d.ts b/src/core/_test/AbiError.test-d.ts similarity index 100% rename from src/_test/AbiError.test-d.ts rename to src/core/_test/AbiError.test-d.ts diff --git a/src/_test/AbiError.test.ts b/src/core/_test/AbiError.test.ts similarity index 99% rename from src/_test/AbiError.test.ts rename to src/core/_test/AbiError.test.ts index 28adce3e..69dc02de 100644 --- a/src/_test/AbiError.test.ts +++ b/src/core/_test/AbiError.test.ts @@ -1,8 +1,8 @@ import { Abi, AbiError, AbiFunction, AbiItem } from 'ox' import { describe, expect, test } from 'vitest' -import { Errors } from '../../contracts/generated.js' -import { anvilMainnet } from '../../test/anvil.js' -import { seaportContractConfig } from '../../test/constants/abis.js' +import { Errors } from '../../../contracts/generated.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { seaportContractConfig } from '../../../test/constants/abis.js' describe('decode', () => { test('behavior: no args', () => { diff --git a/src/_test/AbiEvent.snap-d.ts b/src/core/_test/AbiEvent.snap-d.ts similarity index 99% rename from src/_test/AbiEvent.snap-d.ts rename to src/core/_test/AbiEvent.snap-d.ts index ce5dae49..cf071875 100644 --- a/src/_test/AbiEvent.snap-d.ts +++ b/src/core/_test/AbiEvent.snap-d.ts @@ -4,7 +4,7 @@ import { describe, test } from 'vitest' import { seaportContractConfig, wagmiContractConfig, -} from '../../test/constants/abis.js' +} from '../../../test/constants/abis.js' describe('decode', () => { test('behavior: named', () => { diff --git a/src/_test/AbiEvent.test.ts b/src/core/_test/AbiEvent.test.ts similarity index 99% rename from src/_test/AbiEvent.test.ts rename to src/core/_test/AbiEvent.test.ts index 6dd34a60..e0ab867b 100644 --- a/src/_test/AbiEvent.test.ts +++ b/src/core/_test/AbiEvent.test.ts @@ -1,9 +1,9 @@ import { Abi, AbiEvent, Hex } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { wagmiContractConfig } from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { wagmiContractConfig } from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' describe('assertArgs', () => { test('default', () => { diff --git a/src/_test/AbiFunction.snap-d.ts b/src/core/_test/AbiFunction.snap-d.ts similarity index 98% rename from src/_test/AbiFunction.snap-d.ts rename to src/core/_test/AbiFunction.snap-d.ts index 8d408f52..8a1a3b88 100644 --- a/src/_test/AbiFunction.snap-d.ts +++ b/src/core/_test/AbiFunction.snap-d.ts @@ -1,8 +1,8 @@ import { attest } from '@ark/attest' import { Abi, AbiFunction, AbiParameters } from 'ox' import { describe, test } from 'vitest' -import { erc20Abi, wagmiContractConfig } from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +import { erc20Abi, wagmiContractConfig } from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' describe('decodeData', () => { test('default', () => { diff --git a/src/_test/AbiFunction.test.ts b/src/core/_test/AbiFunction.test.ts similarity index 99% rename from src/_test/AbiFunction.test.ts rename to src/core/_test/AbiFunction.test.ts index 29405baf..ad9b36b1 100644 --- a/src/_test/AbiFunction.test.ts +++ b/src/core/_test/AbiFunction.test.ts @@ -1,9 +1,9 @@ import { Abi, AbiFunction, AbiParameters } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { erc20Abi, wagmiContractConfig } from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { erc20Abi, wagmiContractConfig } from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' describe('decodeData', () => { test('default', () => { diff --git a/src/_test/AbiItem.snap-d.ts b/src/core/_test/AbiItem.snap-d.ts similarity index 97% rename from src/_test/AbiItem.snap-d.ts rename to src/core/_test/AbiItem.snap-d.ts index 55f00e67..3283325f 100644 --- a/src/_test/AbiItem.snap-d.ts +++ b/src/core/_test/AbiItem.snap-d.ts @@ -2,7 +2,7 @@ import { attest } from '@ark/attest' import { Abi, AbiFunction, AbiItem } from 'ox' import { describe, test } from 'vitest' -import { wagmiContractConfig } from '../../test/constants/abis.js' +import { wagmiContractConfig } from '../../../test/constants/abis.js' describe('fromAbi', () => { test('default', () => { diff --git a/src/_test/AbiItem.test.ts b/src/core/_test/AbiItem.test.ts similarity index 100% rename from src/_test/AbiItem.test.ts rename to src/core/_test/AbiItem.test.ts diff --git a/src/_test/AbiParameters.bench.ts b/src/core/_test/AbiParameters.bench.ts similarity index 99% rename from src/_test/AbiParameters.bench.ts rename to src/core/_test/AbiParameters.bench.ts index c0bb5641..6b09ea43 100644 --- a/src/_test/AbiParameters.bench.ts +++ b/src/core/_test/AbiParameters.bench.ts @@ -3,8 +3,8 @@ import { AbiItem } from 'ox' import { bench, describe } from 'vitest' import { Web3 } from 'web3' -import { seaportContractConfig } from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +import { seaportContractConfig } from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' import { decode, encode } from '../AbiParameters.js' const fulfillAdvancedOrder = AbiItem.fromAbi( diff --git a/src/_test/AbiParameters.decode.test.ts b/src/core/_test/AbiParameters.decode.test.ts similarity index 99% rename from src/_test/AbiParameters.decode.test.ts rename to src/core/_test/AbiParameters.decode.test.ts index 67659274..dfb98877 100644 --- a/src/_test/AbiParameters.decode.test.ts +++ b/src/core/_test/AbiParameters.decode.test.ts @@ -4,8 +4,8 @@ import { assertType, describe, expect, test } from 'vitest' import { multicall3Abi, seaportContractConfig, -} from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +} from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' describe('static', () => { test('blank', () => { diff --git a/src/_test/AbiParameters.encode.test.ts b/src/core/_test/AbiParameters.encode.test.ts similarity index 99% rename from src/_test/AbiParameters.encode.test.ts rename to src/core/_test/AbiParameters.encode.test.ts index 9fd02df9..405c85fe 100644 --- a/src/_test/AbiParameters.encode.test.ts +++ b/src/core/_test/AbiParameters.encode.test.ts @@ -1,8 +1,8 @@ import { AbiItem, AbiParameters } from 'ox' import { describe, expect, test } from 'vitest' -import { seaportContractConfig } from '../../test/constants/abis.js' -import { address } from '../../test/constants/addresses.js' +import { seaportContractConfig } from '../../../test/constants/abis.js' +import { address } from '../../../test/constants/addresses.js' import { getArrayComponents } from '../internal/abiParameters.js' describe('static', () => { diff --git a/src/_test/AbiParameters.snap-d.ts b/src/core/_test/AbiParameters.snap-d.ts similarity index 100% rename from src/_test/AbiParameters.snap-d.ts rename to src/core/_test/AbiParameters.snap-d.ts diff --git a/src/_test/AbiParameters.test.ts b/src/core/_test/AbiParameters.test.ts similarity index 99% rename from src/_test/AbiParameters.test.ts rename to src/core/_test/AbiParameters.test.ts index 6081e6a2..97ba9792 100644 --- a/src/_test/AbiParameters.test.ts +++ b/src/core/_test/AbiParameters.test.ts @@ -1,6 +1,6 @@ import { AbiParameters } from 'ox' import { describe, expect, test } from 'vitest' -import { address } from '../../test/constants/addresses.js' +import { address } from '../../../test/constants/addresses.js' describe('encodePacked', () => { test.each([ diff --git a/src/_test/AccessList.test.ts b/src/core/_test/AccessList.test.ts similarity index 100% rename from src/_test/AccessList.test.ts rename to src/core/_test/AccessList.test.ts diff --git a/src/_test/AccountProof.test.ts b/src/core/_test/AccountProof.test.ts similarity index 100% rename from src/_test/AccountProof.test.ts rename to src/core/_test/AccountProof.test.ts diff --git a/src/_test/Address.bench.ts b/src/core/_test/Address.bench.ts similarity index 100% rename from src/_test/Address.bench.ts rename to src/core/_test/Address.bench.ts diff --git a/src/_test/Address.test.ts b/src/core/_test/Address.test.ts similarity index 100% rename from src/_test/Address.test.ts rename to src/core/_test/Address.test.ts diff --git a/src/_test/AesGcm.test.ts b/src/core/_test/AesGcm.test.ts similarity index 100% rename from src/_test/AesGcm.test.ts rename to src/core/_test/AesGcm.test.ts diff --git a/src/_test/Authorization.test.ts b/src/core/_test/Authorization.test.ts similarity index 99% rename from src/_test/Authorization.test.ts rename to src/core/_test/Authorization.test.ts index 6cec2aea..b9027c46 100644 --- a/src/_test/Authorization.test.ts +++ b/src/core/_test/Authorization.test.ts @@ -1,6 +1,6 @@ import { Authorization, Secp256k1 } from 'ox' import { describe, expect, expectTypeOf, test } from 'vitest' -import { accounts } from '../../test/constants/accounts.js' +import { accounts } from '../../../test/constants/accounts.js' describe('from', () => { test('default', () => { diff --git a/src/_test/Base58.bench.ts b/src/core/_test/Base58.bench.ts similarity index 100% rename from src/_test/Base58.bench.ts rename to src/core/_test/Base58.bench.ts diff --git a/src/_test/Base58.test.ts b/src/core/_test/Base58.test.ts similarity index 100% rename from src/_test/Base58.test.ts rename to src/core/_test/Base58.test.ts diff --git a/src/_test/Base64.test.ts b/src/core/_test/Base64.test.ts similarity index 100% rename from src/_test/Base64.test.ts rename to src/core/_test/Base64.test.ts diff --git a/src/_test/Blobs.test.ts b/src/core/_test/Blobs.test.ts similarity index 99% rename from src/_test/Blobs.test.ts rename to src/core/_test/Blobs.test.ts index d67a20d1..2148f24e 100644 --- a/src/_test/Blobs.test.ts +++ b/src/core/_test/Blobs.test.ts @@ -1,6 +1,6 @@ import { Blobs, Bytes, Hex } from 'ox' import { describe, expect, test } from 'vitest' -import { blobData, kzg } from '../../test/kzg.js' +import { blobData, kzg } from '../../../test/kzg.js' describe('commitmentsToVersionedHashes', () => { test('from hex', () => { diff --git a/src/_test/Block.test.ts b/src/core/_test/Block.test.ts similarity index 99% rename from src/_test/Block.test.ts rename to src/core/_test/Block.test.ts index bf5eabb4..40bfa64b 100644 --- a/src/_test/Block.test.ts +++ b/src/core/_test/Block.test.ts @@ -1,6 +1,6 @@ import { Block } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' +import { anvilMainnet } from '../../../test/anvil.js' describe('fromRpc', () => { test('default', () => { diff --git a/src/_test/Bloom.test.ts b/src/core/_test/Bloom.test.ts similarity index 100% rename from src/_test/Bloom.test.ts rename to src/core/_test/Bloom.test.ts diff --git a/src/_test/Bls.test.ts b/src/core/_test/Bls.test.ts similarity index 100% rename from src/_test/Bls.test.ts rename to src/core/_test/Bls.test.ts diff --git a/src/_test/BlsPoint.test.ts b/src/core/_test/BlsPoint.test.ts similarity index 100% rename from src/_test/BlsPoint.test.ts rename to src/core/_test/BlsPoint.test.ts diff --git a/src/_test/Bytes.test.ts b/src/core/_test/Bytes.test.ts similarity index 100% rename from src/_test/Bytes.test.ts rename to src/core/_test/Bytes.test.ts diff --git a/src/_test/Caches.test.ts b/src/core/_test/Caches.test.ts similarity index 100% rename from src/_test/Caches.test.ts rename to src/core/_test/Caches.test.ts diff --git a/src/_test/ContractAddress.test.ts b/src/core/_test/ContractAddress.test.ts similarity index 100% rename from src/_test/ContractAddress.test.ts rename to src/core/_test/ContractAddress.test.ts diff --git a/src/_test/Ens.test.ts b/src/core/_test/Ens.test.ts similarity index 100% rename from src/_test/Ens.test.ts rename to src/core/_test/Ens.test.ts diff --git a/src/_test/Errors.test.ts b/src/core/_test/Errors.test.ts similarity index 100% rename from src/_test/Errors.test.ts rename to src/core/_test/Errors.test.ts diff --git a/src/_test/Fee.test.ts b/src/core/_test/Fee.test.ts similarity index 100% rename from src/_test/Fee.test.ts rename to src/core/_test/Fee.test.ts diff --git a/src/_test/Filter.test.ts b/src/core/_test/Filter.test.ts similarity index 100% rename from src/_test/Filter.test.ts rename to src/core/_test/Filter.test.ts diff --git a/src/_test/Hash.test.ts b/src/core/_test/Hash.test.ts similarity index 100% rename from src/_test/Hash.test.ts rename to src/core/_test/Hash.test.ts diff --git a/src/_test/HdKey.test.ts b/src/core/_test/HdKey.test.ts similarity index 98% rename from src/_test/HdKey.test.ts rename to src/core/_test/HdKey.test.ts index 1ed72373..b2798731 100644 --- a/src/_test/HdKey.test.ts +++ b/src/core/_test/HdKey.test.ts @@ -1,6 +1,6 @@ import { Address, HdKey, Mnemonic } from 'ox' import { describe, expect, test } from 'vitest' -import { accounts } from '../../test/constants/accounts.js' +import { accounts } from '../../../test/constants/accounts.js' import * as exports from '../HdKey.js' const seed = Mnemonic.toSeed( diff --git a/src/_test/Hex.bench.ts b/src/core/_test/Hex.bench.ts similarity index 97% rename from src/_test/Hex.bench.ts rename to src/core/_test/Hex.bench.ts index c2008d20..54cc3c01 100644 --- a/src/_test/Hex.bench.ts +++ b/src/core/_test/Hex.bench.ts @@ -1,8 +1,8 @@ import { bytesToHex as bytesToHex_ethjs } from '@ethereumjs/util' import * as ethers from 'ethers' import { bench, describe } from 'vitest' +import { Bytes } from '../../index.js' import * as Hex from '../Hex.js' -import { Bytes } from '../index.js' // TODO: random hex describe('concat (hex)', () => { diff --git a/src/_test/Hex.test-d.ts b/src/core/_test/Hex.test-d.ts similarity index 100% rename from src/_test/Hex.test-d.ts rename to src/core/_test/Hex.test-d.ts diff --git a/src/_test/Hex.test.ts b/src/core/_test/Hex.test.ts similarity index 100% rename from src/_test/Hex.test.ts rename to src/core/_test/Hex.test.ts diff --git a/src/_test/Json.test.ts b/src/core/_test/Json.test.ts similarity index 100% rename from src/_test/Json.test.ts rename to src/core/_test/Json.test.ts diff --git a/src/_test/Kzg.test.ts b/src/core/_test/Kzg.test.ts similarity index 89% rename from src/_test/Kzg.test.ts rename to src/core/_test/Kzg.test.ts index 3e7e9f7e..2c52b446 100644 --- a/src/_test/Kzg.test.ts +++ b/src/core/_test/Kzg.test.ts @@ -5,18 +5,16 @@ import { Hex, Kzg } from 'ox' import { Paths } from 'ox/trusted-setups' import { describe, expect, test } from 'vitest' -import * as exports from '../Kzg.js' - describe('from', () => { const blobToKzgCommitmentCases = JSON.parse( readFileSync( - resolve(__dirname, '../../test/kzg/blob-to-kzg-commitment.json'), + resolve(__dirname, '../../../test/kzg/blob-to-kzg-commitment.json'), 'utf8', ), ) const computeBlobKzgProofCases = JSON.parse( readFileSync( - resolve(__dirname, '../../test/kzg/compute-blob-kzg-proof.json'), + resolve(__dirname, '../../../test/kzg/compute-blob-kzg-proof.json'), 'utf8', ), ) @@ -83,7 +81,7 @@ describe('from', () => { }) test('exports', () => { - expect(Object.keys(exports)).toMatchInlineSnapshot(` + expect(Object.keys(Kzg)).toMatchInlineSnapshot(` [ "versionedHashVersion", "from", diff --git a/src/_test/Log.test.ts b/src/core/_test/Log.test.ts similarity index 99% rename from src/_test/Log.test.ts rename to src/core/_test/Log.test.ts index 5d374a23..5e8404de 100644 --- a/src/_test/Log.test.ts +++ b/src/core/_test/Log.test.ts @@ -1,6 +1,6 @@ import { AbiEvent, Hex, Log } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' +import { anvilMainnet } from '../../../test/anvil.js' describe('fromRpc', () => { test('default', () => { diff --git a/src/_test/Mnemonic.test.ts b/src/core/_test/Mnemonic.test.ts similarity index 100% rename from src/_test/Mnemonic.test.ts rename to src/core/_test/Mnemonic.test.ts diff --git a/src/_test/P256.test.ts b/src/core/_test/P256.test.ts similarity index 98% rename from src/_test/P256.test.ts rename to src/core/_test/P256.test.ts index 3cc49276..eb9d1621 100644 --- a/src/_test/P256.test.ts +++ b/src/core/_test/P256.test.ts @@ -1,6 +1,6 @@ import { Bytes, P256 } from 'ox' import { describe, expect, test } from 'vitest' -import { accounts } from '../../test/constants/accounts.js' +import { accounts } from '../../../test/constants/accounts.js' describe('getPublicKey', () => { const privateKey = diff --git a/src/_test/PersonalMessage.test.ts b/src/core/_test/PersonalMessage.test.ts similarity index 95% rename from src/_test/PersonalMessage.test.ts rename to src/core/_test/PersonalMessage.test.ts index 418d07f9..e07aa7fe 100644 --- a/src/_test/PersonalMessage.test.ts +++ b/src/core/_test/PersonalMessage.test.ts @@ -1,6 +1,6 @@ import { Bytes, Hex, PersonalMessage, Secp256k1 } from 'ox' import { describe, expect, test } from 'vitest' -import { accounts } from '../../test/constants/accounts.js' +import { accounts } from '../../../test/constants/accounts.js' describe('encode', () => { test('default', () => { diff --git a/src/_test/Provider.test.ts b/src/core/_test/Provider.test.ts similarity index 96% rename from src/_test/Provider.test.ts rename to src/core/_test/Provider.test.ts index 5645a264..ef0b061b 100644 --- a/src/_test/Provider.test.ts +++ b/src/core/_test/Provider.test.ts @@ -1,7 +1,7 @@ import { Provider, RpcRequest, RpcResponse } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { address } from '../../test/constants/addresses.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { address } from '../../../test/constants/addresses.js' describe('createEmitter', () => { test('default', () => { diff --git a/src/_test/PublicKey.test-d.ts b/src/core/_test/PublicKey.test-d.ts similarity index 100% rename from src/_test/PublicKey.test-d.ts rename to src/core/_test/PublicKey.test-d.ts diff --git a/src/_test/PublicKey.test.ts b/src/core/_test/PublicKey.test.ts similarity index 100% rename from src/_test/PublicKey.test.ts rename to src/core/_test/PublicKey.test.ts diff --git a/src/_test/Rlp.bench.ts b/src/core/_test/Rlp.bench.ts similarity index 100% rename from src/_test/Rlp.bench.ts rename to src/core/_test/Rlp.bench.ts diff --git a/src/_test/Rlp.test-d.ts b/src/core/_test/Rlp.test-d.ts similarity index 100% rename from src/_test/Rlp.test-d.ts rename to src/core/_test/Rlp.test-d.ts diff --git a/src/_test/Rlp.test.ts b/src/core/_test/Rlp.test.ts similarity index 100% rename from src/_test/Rlp.test.ts rename to src/core/_test/Rlp.test.ts diff --git a/src/_test/RpcRequest.test.ts b/src/core/_test/RpcRequest.test.ts similarity index 98% rename from src/_test/RpcRequest.test.ts rename to src/core/_test/RpcRequest.test.ts index c3998508..8dc9af2e 100644 --- a/src/_test/RpcRequest.test.ts +++ b/src/core/_test/RpcRequest.test.ts @@ -1,6 +1,6 @@ import { RpcRequest, RpcResponse } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' +import { anvilMainnet } from '../../../test/anvil.js' describe('createStore', () => { test('default', async () => { diff --git a/src/_test/RpcResponse.test.ts b/src/core/_test/RpcResponse.test.ts similarity index 99% rename from src/_test/RpcResponse.test.ts rename to src/core/_test/RpcResponse.test.ts index a8823023..6642129d 100644 --- a/src/_test/RpcResponse.test.ts +++ b/src/core/_test/RpcResponse.test.ts @@ -1,6 +1,6 @@ import { type Hex, RpcRequest, RpcResponse } from 'ox' import { assertType, describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' +import { anvilMainnet } from '../../../test/anvil.js' describe('from', () => { test('default', async () => { diff --git a/src/_test/RpcSchema.test.ts b/src/core/_test/RpcSchema.test.ts similarity index 100% rename from src/_test/RpcSchema.test.ts rename to src/core/_test/RpcSchema.test.ts diff --git a/src/_test/RpcTransport.test.ts b/src/core/_test/RpcTransport.test.ts similarity index 98% rename from src/_test/RpcTransport.test.ts rename to src/core/_test/RpcTransport.test.ts index 34c4b729..54e07e1b 100644 --- a/src/_test/RpcTransport.test.ts +++ b/src/core/_test/RpcTransport.test.ts @@ -2,8 +2,8 @@ import { setTimeout } from 'node:timers/promises' import { RpcTransport } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { createHttpServer } from '../../test/http.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { createHttpServer } from '../../../test/http.js' describe('fromHttp', () => { test('default', async () => { diff --git a/src/_test/Secp256k1.test.ts b/src/core/_test/Secp256k1.test.ts similarity index 99% rename from src/_test/Secp256k1.test.ts rename to src/core/_test/Secp256k1.test.ts index 407869fd..33d3feab 100644 --- a/src/_test/Secp256k1.test.ts +++ b/src/core/_test/Secp256k1.test.ts @@ -1,6 +1,6 @@ import { Address, Bytes, PublicKey, Secp256k1 } from 'ox' import { describe, expect, test } from 'vitest' -import { accounts } from '../../test/constants/accounts.js' +import { accounts } from '../../../test/constants/accounts.js' describe('getPublicKey', () => { test('default', () => { diff --git a/src/_test/Signature.snap-d.ts b/src/core/_test/Signature.snap-d.ts similarity index 100% rename from src/_test/Signature.snap-d.ts rename to src/core/_test/Signature.snap-d.ts diff --git a/src/_test/Signature.test.ts b/src/core/_test/Signature.test.ts similarity index 100% rename from src/_test/Signature.test.ts rename to src/core/_test/Signature.test.ts diff --git a/src/_test/Siwe.test.ts b/src/core/_test/Siwe.test.ts similarity index 100% rename from src/_test/Siwe.test.ts rename to src/core/_test/Siwe.test.ts diff --git a/src/_test/Solidity.test.ts b/src/core/_test/Solidity.test.ts similarity index 100% rename from src/_test/Solidity.test.ts rename to src/core/_test/Solidity.test.ts diff --git a/src/_test/Transaction.test.ts b/src/core/_test/Transaction.test.ts similarity index 99% rename from src/_test/Transaction.test.ts rename to src/core/_test/Transaction.test.ts index 3239a0ca..658ff1f9 100644 --- a/src/_test/Transaction.test.ts +++ b/src/core/_test/Transaction.test.ts @@ -6,8 +6,8 @@ import { TransactionEnvelopeLegacy, } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { accounts } from '../../test/constants/accounts.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { accounts } from '../../../test/constants/accounts.js' describe('fromRpc', () => { describe('legacy', () => { diff --git a/src/_test/TransactionEnvelope.test.ts b/src/core/_test/TransactionEnvelope.test.ts similarity index 100% rename from src/_test/TransactionEnvelope.test.ts rename to src/core/_test/TransactionEnvelope.test.ts diff --git a/src/_test/TransactionEnvelopeEip1559.test-d.ts b/src/core/_test/TransactionEnvelopeEip1559.test-d.ts similarity index 100% rename from src/_test/TransactionEnvelopeEip1559.test-d.ts rename to src/core/_test/TransactionEnvelopeEip1559.test-d.ts diff --git a/src/_test/TransactionEnvelopeEip1559.test.ts b/src/core/_test/TransactionEnvelopeEip1559.test.ts similarity index 99% rename from src/_test/TransactionEnvelopeEip1559.test.ts rename to src/core/_test/TransactionEnvelopeEip1559.test.ts index 4942f91f..7fa95def 100644 --- a/src/_test/TransactionEnvelopeEip1559.test.ts +++ b/src/core/_test/TransactionEnvelopeEip1559.test.ts @@ -1,7 +1,7 @@ import { Hex, Rlp, Secp256k1, TransactionEnvelopeEip1559, Value } from 'ox' import { assertType, describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { accounts } from '../../test/constants/accounts.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { accounts } from '../../../test/constants/accounts.js' describe('assert', () => { test('fee cap too high', () => { diff --git a/src/_test/TransactionEnvelopeEip2930.test-d.ts b/src/core/_test/TransactionEnvelopeEip2930.test-d.ts similarity index 100% rename from src/_test/TransactionEnvelopeEip2930.test-d.ts rename to src/core/_test/TransactionEnvelopeEip2930.test-d.ts diff --git a/src/_test/TransactionEnvelopeEip2930.test.ts b/src/core/_test/TransactionEnvelopeEip2930.test.ts similarity index 99% rename from src/_test/TransactionEnvelopeEip2930.test.ts rename to src/core/_test/TransactionEnvelopeEip2930.test.ts index 065d60c5..68918ca8 100644 --- a/src/_test/TransactionEnvelopeEip2930.test.ts +++ b/src/core/_test/TransactionEnvelopeEip2930.test.ts @@ -1,7 +1,7 @@ import { Rlp, Secp256k1, TransactionEnvelopeEip2930, Value } from 'ox' import { assertType, describe, expect, expectTypeOf, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { accounts } from '../../test/constants/accounts.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { accounts } from '../../../test/constants/accounts.js' describe('assert', () => { test('fee cap too high', () => { diff --git a/src/_test/TransactionEnvelopeEip4844.test-d.ts b/src/core/_test/TransactionEnvelopeEip4844.test-d.ts similarity index 100% rename from src/_test/TransactionEnvelopeEip4844.test-d.ts rename to src/core/_test/TransactionEnvelopeEip4844.test-d.ts diff --git a/src/_test/TransactionEnvelopeEip4844.test.ts b/src/core/_test/TransactionEnvelopeEip4844.test.ts similarity index 99% rename from src/_test/TransactionEnvelopeEip4844.test.ts rename to src/core/_test/TransactionEnvelopeEip4844.test.ts index ca293829..35fb24e2 100644 --- a/src/_test/TransactionEnvelopeEip4844.test.ts +++ b/src/core/_test/TransactionEnvelopeEip4844.test.ts @@ -7,9 +7,9 @@ import { Value, } from 'ox' import { assertType, describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { accounts } from '../../test/constants/accounts.js' -import { kzg } from '../../test/kzg.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { accounts } from '../../../test/constants/accounts.js' +import { kzg } from '../../../test/kzg.js' describe('assert', () => { test('empty blobs', () => { diff --git a/src/_test/TransactionEnvelopeEip7702.test-d.ts b/src/core/_test/TransactionEnvelopeEip7702.test-d.ts similarity index 100% rename from src/_test/TransactionEnvelopeEip7702.test-d.ts rename to src/core/_test/TransactionEnvelopeEip7702.test-d.ts diff --git a/src/_test/TransactionEnvelopeEip7702.test.ts b/src/core/_test/TransactionEnvelopeEip7702.test.ts similarity index 99% rename from src/_test/TransactionEnvelopeEip7702.test.ts rename to src/core/_test/TransactionEnvelopeEip7702.test.ts index 3129a72b..673a3a18 100644 --- a/src/_test/TransactionEnvelopeEip7702.test.ts +++ b/src/core/_test/TransactionEnvelopeEip7702.test.ts @@ -8,9 +8,9 @@ import { Value, } from 'ox' import { assertType, describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { wagmiContractConfig } from '../../test/constants/abis.js' -import { accounts } from '../../test/constants/accounts.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { wagmiContractConfig } from '../../../test/constants/abis.js' +import { accounts } from '../../../test/constants/accounts.js' describe('assert', () => { test('invalid chainId', () => { diff --git a/src/_test/TransactionEnvelopeLegacy.test-d.ts b/src/core/_test/TransactionEnvelopeLegacy.test-d.ts similarity index 100% rename from src/_test/TransactionEnvelopeLegacy.test-d.ts rename to src/core/_test/TransactionEnvelopeLegacy.test-d.ts diff --git a/src/_test/TransactionEnvelopeLegacy.test.ts b/src/core/_test/TransactionEnvelopeLegacy.test.ts similarity index 99% rename from src/_test/TransactionEnvelopeLegacy.test.ts rename to src/core/_test/TransactionEnvelopeLegacy.test.ts index 0307493e..30528988 100644 --- a/src/_test/TransactionEnvelopeLegacy.test.ts +++ b/src/core/_test/TransactionEnvelopeLegacy.test.ts @@ -1,7 +1,7 @@ import { Hex, Rlp, Secp256k1, TransactionEnvelopeLegacy, Value } from 'ox' import { assertType, describe, expect, expectTypeOf, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' -import { accounts } from '../../test/constants/accounts.js' +import { anvilMainnet } from '../../../test/anvil.js' +import { accounts } from '../../../test/constants/accounts.js' describe('assert', () => { test('fee cap too high', () => { diff --git a/src/_test/TransactionReceipt.test.ts b/src/core/_test/TransactionReceipt.test.ts similarity index 99% rename from src/_test/TransactionReceipt.test.ts rename to src/core/_test/TransactionReceipt.test.ts index 0898d0aa..0286c9ce 100644 --- a/src/_test/TransactionReceipt.test.ts +++ b/src/core/_test/TransactionReceipt.test.ts @@ -1,6 +1,6 @@ import { TransactionReceipt } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' +import { anvilMainnet } from '../../../test/anvil.js' describe('fromRpc', () => { test('default', () => { diff --git a/src/_test/TransactionRequest.test.ts b/src/core/_test/TransactionRequest.test.ts similarity index 97% rename from src/_test/TransactionRequest.test.ts rename to src/core/_test/TransactionRequest.test.ts index 1b279993..49b2897c 100644 --- a/src/_test/TransactionRequest.test.ts +++ b/src/core/_test/TransactionRequest.test.ts @@ -1,6 +1,6 @@ import { TransactionRequest, Value } from 'ox' import { describe, expect, test } from 'vitest' -import { anvilMainnet } from '../../test/anvil.js' +import { anvilMainnet } from '../../../test/anvil.js' describe('toRpc', () => { test('default', () => { diff --git a/src/_test/TypedData.test-d.ts b/src/core/_test/TypedData.test-d.ts similarity index 100% rename from src/_test/TypedData.test-d.ts rename to src/core/_test/TypedData.test-d.ts diff --git a/src/_test/TypedData.test.ts b/src/core/_test/TypedData.test.ts similarity index 99% rename from src/_test/TypedData.test.ts rename to src/core/_test/TypedData.test.ts index 24e6cbd0..fbbe2540 100644 --- a/src/_test/TypedData.test.ts +++ b/src/core/_test/TypedData.test.ts @@ -1,6 +1,6 @@ import { Hex, TypedData } from 'ox' import { describe, expect, test } from 'vitest' -import * as typedData from '../../test/constants/typedData.js' +import * as typedData from '../../../test/constants/typedData.js' describe('assert', () => { test('default', () => { diff --git a/src/_test/ValidatorData.test.ts b/src/core/_test/ValidatorData.test.ts similarity index 96% rename from src/_test/ValidatorData.test.ts rename to src/core/_test/ValidatorData.test.ts index a77a8d65..1f53696f 100644 --- a/src/_test/ValidatorData.test.ts +++ b/src/core/_test/ValidatorData.test.ts @@ -1,6 +1,6 @@ import { Bytes, Hex, Secp256k1, ValidatorData } from 'ox' import { describe, expect, test } from 'vitest' -import { accounts } from '../../test/constants/accounts.js' +import { accounts } from '../../../test/constants/accounts.js' describe('encode', () => { test('default', () => { diff --git a/src/_test/Value.test.ts b/src/core/_test/Value.test.ts similarity index 100% rename from src/_test/Value.test.ts rename to src/core/_test/Value.test.ts diff --git a/src/_test/WebAuthnP256.test.ts b/src/core/_test/WebAuthnP256.test.ts similarity index 100% rename from src/_test/WebAuthnP256.test.ts rename to src/core/_test/WebAuthnP256.test.ts diff --git a/src/_test/WebCryptoP256.test.ts b/src/core/_test/WebCryptoP256.test.ts similarity index 100% rename from src/_test/WebCryptoP256.test.ts rename to src/core/_test/WebCryptoP256.test.ts diff --git a/src/_test/Withdrawal.test.ts b/src/core/_test/Withdrawal.test.ts similarity index 100% rename from src/_test/Withdrawal.test.ts rename to src/core/_test/Withdrawal.test.ts diff --git a/src/_test/_snap/Block.test.ts.snap b/src/core/_test/_snap/Block.test.ts.snap similarity index 100% rename from src/_test/_snap/Block.test.ts.snap rename to src/core/_test/_snap/Block.test.ts.snap diff --git a/src/_test/_snap/TransactionEnvelopeEip4844.test.ts.snap b/src/core/_test/_snap/TransactionEnvelopeEip4844.test.ts.snap similarity index 100% rename from src/_test/_snap/TransactionEnvelopeEip4844.test.ts.snap rename to src/core/_test/_snap/TransactionEnvelopeEip4844.test.ts.snap diff --git a/src/_test/index.test.ts b/src/core/_test/index.test.ts similarity index 96% rename from src/_test/index.test.ts rename to src/core/_test/index.test.ts index 77167ef7..a33b1cf0 100644 --- a/src/_test/index.test.ts +++ b/src/core/_test/index.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import * as exports from '../index.js' +import * as exports from '../../index.js' test('exports', () => { expect(Object.keys(exports)).toMatchInlineSnapshot(` diff --git a/src/_test/internal/base58.test.ts b/src/core/_test/internal/base58.test.ts similarity index 100% rename from src/_test/internal/base58.test.ts rename to src/core/_test/internal/base58.test.ts diff --git a/src/_test/internal/cursor.test.ts b/src/core/_test/internal/cursor.test.ts similarity index 100% rename from src/_test/internal/cursor.test.ts rename to src/core/_test/internal/cursor.test.ts diff --git a/src/_test/internal/ens.test.ts b/src/core/_test/internal/ens.test.ts similarity index 100% rename from src/_test/internal/ens.test.ts rename to src/core/_test/internal/ens.test.ts diff --git a/src/_test/internal/lru.test.ts b/src/core/_test/internal/lru.test.ts similarity index 100% rename from src/_test/internal/lru.test.ts rename to src/core/_test/internal/lru.test.ts diff --git a/src/_test/internal/promise.test.ts b/src/core/_test/internal/promise.test.ts similarity index 93% rename from src/_test/internal/promise.test.ts rename to src/core/_test/internal/promise.test.ts index e322eec0..0e0ffcb5 100644 --- a/src/_test/internal/promise.test.ts +++ b/src/core/_test/internal/promise.test.ts @@ -1,7 +1,7 @@ import { setTimeout } from 'node:timers/promises' import { describe, expect, test } from 'vitest' -import { createHttpServer } from '../../../test/http.js' +import { createHttpServer } from '../../../../test/http.js' import { withTimeout } from '../../internal/promise.js' describe('withTimeout', () => { diff --git a/src/_test/internal/rpcTransport.test.ts b/src/core/_test/internal/rpcTransport.test.ts similarity index 100% rename from src/_test/internal/rpcTransport.test.ts rename to src/core/_test/internal/rpcTransport.test.ts diff --git a/src/_test/internal/uid.test.ts b/src/core/_test/internal/uid.test.ts similarity index 100% rename from src/_test/internal/uid.test.ts rename to src/core/_test/internal/uid.test.ts diff --git a/src/_test/internal/webauthn.test.ts b/src/core/_test/internal/webauthn.test.ts similarity index 100% rename from src/_test/internal/webauthn.test.ts rename to src/core/_test/internal/webauthn.test.ts diff --git a/src/internal/abi.ts b/src/core/internal/abi.ts similarity index 100% rename from src/internal/abi.ts rename to src/core/internal/abi.ts diff --git a/src/internal/abiConstructor.ts b/src/core/internal/abiConstructor.ts similarity index 100% rename from src/internal/abiConstructor.ts rename to src/core/internal/abiConstructor.ts diff --git a/src/internal/abiError.ts b/src/core/internal/abiError.ts similarity index 100% rename from src/internal/abiError.ts rename to src/core/internal/abiError.ts diff --git a/src/internal/abiEvent.ts b/src/core/internal/abiEvent.ts similarity index 100% rename from src/internal/abiEvent.ts rename to src/core/internal/abiEvent.ts diff --git a/src/internal/abiFunction.ts b/src/core/internal/abiFunction.ts similarity index 100% rename from src/internal/abiFunction.ts rename to src/core/internal/abiFunction.ts diff --git a/src/internal/abiItem.ts b/src/core/internal/abiItem.ts similarity index 100% rename from src/internal/abiItem.ts rename to src/core/internal/abiItem.ts diff --git a/src/internal/abiParameters.ts b/src/core/internal/abiParameters.ts similarity index 100% rename from src/internal/abiParameters.ts rename to src/core/internal/abiParameters.ts diff --git a/src/internal/base58.ts b/src/core/internal/base58.ts similarity index 100% rename from src/internal/base58.ts rename to src/core/internal/base58.ts diff --git a/src/internal/bytes.ts b/src/core/internal/bytes.ts similarity index 100% rename from src/internal/bytes.ts rename to src/core/internal/bytes.ts diff --git a/src/internal/cursor.ts b/src/core/internal/cursor.ts similarity index 100% rename from src/internal/cursor.ts rename to src/core/internal/cursor.ts diff --git a/src/internal/ens.ts b/src/core/internal/ens.ts similarity index 97% rename from src/internal/ens.ts rename to src/core/internal/ens.ts index 30873053..0284afd0 100644 --- a/src/internal/ens.ts +++ b/src/core/internal/ens.ts @@ -1,7 +1,7 @@ +import { Bytes } from '../../index.js' import * as Ens from '../Ens.js' import type * as Errors from '../Errors.js' import * as Hex from '../Hex.js' -import { Bytes } from '../index.js' /** * @internal diff --git a/src/internal/errors.ts b/src/core/internal/errors.ts similarity index 100% rename from src/internal/errors.ts rename to src/core/internal/errors.ts diff --git a/src/internal/hdKey.ts b/src/core/internal/hdKey.ts similarity index 100% rename from src/internal/hdKey.ts rename to src/core/internal/hdKey.ts diff --git a/src/internal/hex.ts b/src/core/internal/hex.ts similarity index 100% rename from src/internal/hex.ts rename to src/core/internal/hex.ts diff --git a/src/internal/lru.ts b/src/core/internal/lru.ts similarity index 100% rename from src/internal/lru.ts rename to src/core/internal/lru.ts diff --git a/src/internal/mnemonic/wordlists.ts b/src/core/internal/mnemonic/wordlists.ts similarity index 100% rename from src/internal/mnemonic/wordlists.ts rename to src/core/internal/mnemonic/wordlists.ts diff --git a/src/internal/promise.ts b/src/core/internal/promise.ts similarity index 100% rename from src/internal/promise.ts rename to src/core/internal/promise.ts diff --git a/src/internal/register.ts b/src/core/internal/register.ts similarity index 100% rename from src/internal/register.ts rename to src/core/internal/register.ts diff --git a/src/internal/rpcSchema.ts b/src/core/internal/rpcSchema.ts similarity index 100% rename from src/internal/rpcSchema.ts rename to src/core/internal/rpcSchema.ts diff --git a/src/internal/rpcSchemas/eth.ts b/src/core/internal/rpcSchemas/eth.ts similarity index 100% rename from src/internal/rpcSchemas/eth.ts rename to src/core/internal/rpcSchemas/eth.ts diff --git a/src/internal/rpcSchemas/wallet.ts b/src/core/internal/rpcSchemas/wallet.ts similarity index 100% rename from src/internal/rpcSchemas/wallet.ts rename to src/core/internal/rpcSchemas/wallet.ts diff --git a/src/internal/rpcTransport.ts b/src/core/internal/rpcTransport.ts similarity index 100% rename from src/internal/rpcTransport.ts rename to src/core/internal/rpcTransport.ts diff --git a/src/internal/types.ts b/src/core/internal/types.ts similarity index 100% rename from src/internal/types.ts rename to src/core/internal/types.ts diff --git a/src/internal/uid.ts b/src/core/internal/uid.ts similarity index 100% rename from src/internal/uid.ts rename to src/core/internal/uid.ts diff --git a/src/internal/webauthn.ts b/src/core/internal/webauthn.ts similarity index 100% rename from src/internal/webauthn.ts rename to src/core/internal/webauthn.ts diff --git a/src/version.ts b/src/core/version.ts similarity index 100% rename from src/version.ts rename to src/core/version.ts diff --git a/src/index.ts b/src/index.ts index 8fe5bf0f..7ad469d4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -113,7 +113,7 @@ * * @category ABI */ -export * as Abi from './Abi.js' +export * as Abi from './core/Abi.js' /** * Utilities & types for working with [Constructors](https://docs.soliditylang.org/en/latest/abi-spec.html#json) on ABIs. @@ -189,7 +189,7 @@ export * as Abi from './Abi.js' * * @category ABI */ -export * as AbiConstructor from './AbiConstructor.js' +export * as AbiConstructor from './core/AbiConstructor.js' /** * Utilities & types for working with [Errors](https://docs.soliditylang.org/en/latest/abi-spec.html#json) on ABIs. @@ -261,7 +261,7 @@ export * as AbiConstructor from './AbiConstructor.js' * * @category ABI */ -export * as AbiError from './AbiError.js' +export * as AbiError from './core/AbiError.js' /** * Utilities & types for working with [Events](https://docs.soliditylang.org/en/latest/abi-spec.html#json) on ABIs. @@ -376,7 +376,7 @@ export * as AbiError from './AbiError.js' * * @category ABI */ -export * as AbiEvent from './AbiEvent.js' +export * as AbiEvent from './core/AbiEvent.js' /** * Utilities & types for working with [Functions](https://docs.soliditylang.org/en/latest/abi-spec.html#json) on ABIs. @@ -470,7 +470,7 @@ export * as AbiEvent from './AbiEvent.js' * * @category ABI */ -export * as AbiFunction from './AbiFunction.js' +export * as AbiFunction from './core/AbiFunction.js' /** * Utilities & types for working with [ABI Items](https://docs.soliditylang.org/en/latest/abi-spec.html#json) @@ -548,7 +548,7 @@ export * as AbiFunction from './AbiFunction.js' * * @category ABI */ -export * as AbiItem from './AbiItem.js' +export * as AbiItem from './core/AbiItem.js' /** * Utilities & types for encoding, decoding, and working with [ABI Parameters](https://docs.soliditylang.org/en/latest/abi-spec.html#types) @@ -652,21 +652,21 @@ export * as AbiItem from './AbiItem.js' * * @category ABI */ -export * as AbiParameters from './AbiParameters.js' +export * as AbiParameters from './core/AbiParameters.js' /** * Utilities & types for working with Access Lists as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/4140e528360fea53c34a766d86a000c6c039100e/src/schemas/transaction.yaml#L73) * * @category Execution Spec */ -export * as AccessList from './AccessList.js' +export * as AccessList from './core/AccessList.js' /** * Utilities & types for working with Account Proofs as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/state.yaml) * * @category Execution Spec */ -export * as AccountProof from './AccountProof.js' +export * as AccountProof from './core/AccountProof.js' /** * Utility functions for working with Ethereum addresses. @@ -721,7 +721,7 @@ export * as AccountProof from './AccountProof.js' * * @category Addresses */ -export * as Address from './Address.js' +export * as Address from './core/Address.js' /** * Utilities & types for working with AES-GCM encryption. Internally uses the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API). @@ -758,7 +758,7 @@ export * as Address from './Address.js' * * @category Crypto */ -export * as AesGcm from './AesGcm.js' +export * as AesGcm from './core/AesGcm.js' /** * Utility functions for working with [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) Authorization lists & tuples. @@ -832,7 +832,7 @@ export * as AesGcm from './AesGcm.js' * * @category Authorization (EIP-7702) */ -export * as Authorization from './Authorization.js' +export * as Authorization from './core/Authorization.js' /** * Utility functions for working with [Base58](https://digitalbazaar.github.io/base58-spec/) values. @@ -887,7 +887,7 @@ export * as Authorization from './Authorization.js' * * @category Data */ -export * as Base58 from './Base58.js' +export * as Base58 from './core/Base58.js' /** * Utility functions for working with [RFC-4648](https://datatracker.ietf.org/doc/html/rfc4648) Base64. @@ -941,14 +941,14 @@ export * as Base58 from './Base58.js' * * @category Data */ -export * as Base64 from './Base64.js' +export * as Base64 from './core/Base64.js' /** * Utility functions for working with [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) Blobs. * * @category Blobs (EIP-4844) */ -export * as Blobs from './Blobs.js' +export * as Blobs from './core/Blobs.js' /** * Utilities & types for working with Blocks as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/block.yaml) @@ -980,14 +980,14 @@ export * as Blobs from './Blobs.js' * * @category Execution Spec */ -export * as Block from './Block.js' +export * as Block from './core/Block.js' /** * Utility functions for working with Bloom Filters as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/block.yaml) * * @category Execution Spec */ -export * as Bloom from './Bloom.js' +export * as Bloom from './core/Bloom.js' /** * Utility functions for [BLS12-381](https://hackmd.io/@benjaminion/bls12-381) cryptography. @@ -1103,7 +1103,7 @@ export * as Bloom from './Bloom.js' * * @category Crypto */ -export * as Bls from './Bls.js' +export * as Bls from './core/Bls.js' /** * Utility functions for working with BLS12-381 points. @@ -1148,7 +1148,7 @@ export * as Bls from './Bls.js' * * @category Crypto */ -export * as BlsPoint from './BlsPoint.js' +export * as BlsPoint from './core/BlsPoint.js' /** * A set of Ethereum-related utility functions for working with [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instances. @@ -1276,9 +1276,9 @@ export * as BlsPoint from './BlsPoint.js' * * @category Data */ -export * as Bytes from './Bytes.js' +export * as Bytes from './core/Bytes.js' -export * as Caches from './Caches.js' +export * as Caches from './core/Caches.js' /** * Utility functions for computing Contract Addresses. @@ -1316,7 +1316,7 @@ export * as Caches from './Caches.js' * * @category Addresses */ -export * as ContractAddress from './ContractAddress.js' +export * as ContractAddress from './core/ContractAddress.js' /** * Utility functions for working with ENS names. @@ -1347,16 +1347,16 @@ export * as ContractAddress from './ContractAddress.js' * * @category ENS */ -export * as Ens from './Ens.js' +export * as Ens from './core/Ens.js' -export * as Errors from './Errors.js' +export * as Errors from './core/Errors.js' /** * Utilities & types for working with Filters as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/filter.yaml) * * @category Execution Spec */ -export * as Filter from './Filter.js' +export * as Filter from './core/Filter.js' /** * Utility functions for hashing (keccak256, sha256, etc). @@ -1371,7 +1371,7 @@ export * as Filter from './Filter.js' * * @category Crypto */ -export * as Hash from './Hash.js' +export * as Hash from './core/Hash.js' /** * Utility functions for generating and working with [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) HD Wallets. @@ -1385,7 +1385,7 @@ export * as Hash from './Hash.js' * * @category Crypto */ -export * as HdKey from './HdKey.js' +export * as HdKey from './core/HdKey.js' /** * A set of Ethereum-related utility functions for working with hexadecimal string values (e.g. `"0xdeadbeef"`). @@ -1500,12 +1500,12 @@ export * as HdKey from './HdKey.js' * * @category Data */ -export * as Hex from './Hex.js' +export * as Hex from './core/Hex.js' /** * @category Execution Spec */ -export * as Fee from './Fee.js' +export * as Fee from './core/Fee.js' /** * Utility functions for working with JSON (with support for `bigint`). @@ -1539,7 +1539,7 @@ export * as Fee from './Fee.js' * * @category JSON */ -export * as Json from './Json.js' +export * as Json from './core/Json.js' /** * Utility functions for working with KZG Commitments. @@ -1548,7 +1548,7 @@ export * as Json from './Json.js' * * @category Blobs (EIP-4844) */ -export * as Kzg from './Kzg.js' +export * as Kzg from './core/Kzg.js' /** * Utilities & types for working with Logs as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/receipt.yaml) @@ -1607,7 +1607,7 @@ export * as Kzg from './Kzg.js' * * @category Execution Spec */ -export * as Log from './Log.js' +export * as Log from './core/Log.js' /** * Utility functions for generating and working with [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) mnemonics. @@ -1668,7 +1668,7 @@ export * as Log from './Log.js' * * @category Crypto */ -export * as Mnemonic from './Mnemonic.js' +export * as Mnemonic from './core/Mnemonic.js' /** * Utilities & types for working with [EIP-191 Personal Messages](https://eips.ethereum.org/EIPS/eip-191#version-0x45-e) @@ -1688,7 +1688,7 @@ export * as Mnemonic from './Mnemonic.js' * * @category Signed & Typed Data */ -export * as PersonalMessage from './PersonalMessage.js' +export * as PersonalMessage from './core/PersonalMessage.js' /** * Utilities & types for working with [EIP-1193 Providers](https://eips.ethereum.org/EIPS/eip-1193) @@ -1772,7 +1772,7 @@ export * as PersonalMessage from './PersonalMessage.js' * * @category Providers (EIP-1193) */ -export * as Provider from './Provider.js' +export * as Provider from './core/Provider.js' /** * Utility functions for working with ECDSA public keys. @@ -1813,9 +1813,9 @@ export * as Provider from './Provider.js' * * @category Crypto */ -export * as PublicKey from './PublicKey.js' +export * as PublicKey from './core/PublicKey.js' -export type { Register } from './internal/register.js' +export type { Register } from './core/internal/register.js' /** * Utility functions for encoding and decoding [Recursive Length Prefix](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/) structures. @@ -1833,14 +1833,14 @@ export type { Register } from './internal/register.js' * * @category Data */ -export * as Rlp from './Rlp.js' +export * as Rlp from './core/Rlp.js' /** * Utility types for working with Ethereum JSON-RPC namespaces & schemas. * * @category JSON-RPC */ -export * as RpcSchema from './RpcSchema.js' +export * as RpcSchema from './core/RpcSchema.js' /** * Utility types & functions for working with [JSON-RPC 2.0 Requests](https://www.jsonrpc.org/specification#request_object) and Ethereum JSON-RPC methods as @@ -1875,7 +1875,7 @@ export * as RpcSchema from './RpcSchema.js' * * @category JSON-RPC */ -export * as RpcRequest from './RpcRequest.js' +export * as RpcRequest from './core/RpcRequest.js' /** * Utility types & functions for working with [JSON-RPC 2.0 Responses](https://www.jsonrpc.org/specification#response_object) @@ -1958,7 +1958,7 @@ export * as RpcRequest from './RpcRequest.js' * * @category JSON-RPC */ -export * as RpcResponse from './RpcResponse.js' +export * as RpcResponse from './core/RpcResponse.js' /** * Utility functions for working with JSON-RPC Transports. @@ -1984,7 +1984,7 @@ export * as RpcResponse from './RpcResponse.js' * * @category JSON-RPC */ -export * as RpcTransport from './RpcTransport.js' +export * as RpcTransport from './core/RpcTransport.js' /** * Utility functions for [secp256k1](https://www.secg.org/sec2-v2.pdf) ECDSA cryptography. @@ -2057,7 +2057,7 @@ export * as RpcTransport from './RpcTransport.js' * * @category Crypto */ -export * as Secp256k1 from './Secp256k1.js' +export * as Secp256k1 from './core/Secp256k1.js' /** * Utility functions for [NIST P256](https://csrc.nist.gov/csrc/media/events/workshop-on-elliptic-curve-cryptography-standards/documents/papers/session6-adalier-mehmet.pdf) ECDSA cryptography. @@ -2130,7 +2130,7 @@ export * as Secp256k1 from './Secp256k1.js' * * @category Crypto */ -export * as P256 from './P256.js' +export * as P256 from './core/P256.js' /** * Utility functions for working with ECDSA signatures. @@ -2165,7 +2165,7 @@ export * as P256 from './P256.js' * * @category Crypto */ -export * as Signature from './Signature.js' +export * as Signature from './core/Signature.js' /** * Utility functions for working with @@ -2266,9 +2266,9 @@ export * as Signature from './Signature.js' * * @category Sign-In with Ethereum (EIP-4361) */ -export * as Siwe from './Siwe.js' +export * as Siwe from './core/Siwe.js' -export * as Solidity from './Solidity.js' +export * as Solidity from './core/Solidity.js' /** * Utilities & types for working with **Transactions** as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml) @@ -2307,7 +2307,7 @@ export * as Solidity from './Solidity.js' * * @category Execution Spec */ -export * as Transaction from './Transaction.js' +export * as Transaction from './core/Transaction.js' /** * Errors & Types for working with Transaction Envelopes. @@ -2323,7 +2323,7 @@ export * as Transaction from './Transaction.js' * * @category Transaction Envelopes */ -export * as TransactionEnvelope from './TransactionEnvelope.js' +export * as TransactionEnvelope from './core/TransactionEnvelope.js' /** * Utility functions for working @@ -2478,7 +2478,7 @@ export * as TransactionEnvelope from './TransactionEnvelope.js' * * @category Transaction Envelopes */ -export * as TransactionEnvelopeLegacy from './TransactionEnvelopeLegacy.js' +export * as TransactionEnvelopeLegacy from './core/TransactionEnvelopeLegacy.js' /** * Utility functions for working with [EIP-1559 Typed Transaction Envelopes](https://eips.ethereum.org/EIPS/eip-1559) @@ -2645,7 +2645,7 @@ export * as TransactionEnvelopeLegacy from './TransactionEnvelopeLegacy.js' * * @category Transaction Envelopes */ -export * as TransactionEnvelopeEip1559 from './TransactionEnvelopeEip1559.js' +export * as TransactionEnvelopeEip1559 from './core/TransactionEnvelopeEip1559.js' /** * Utility functions for working with [EIP-2930 Typed Transaction Envelopes](https://eips.ethereum.org/EIPS/eip-2930) @@ -2804,7 +2804,7 @@ export * as TransactionEnvelopeEip1559 from './TransactionEnvelopeEip1559.js' * * @category Transaction Envelopes */ -export * as TransactionEnvelopeEip2930 from './TransactionEnvelopeEip2930.js' +export * as TransactionEnvelopeEip2930 from './core/TransactionEnvelopeEip2930.js' /** * Utility functions for working with [EIP-4844 Typed Transaction Envelopes](https://eips.ethereum.org/EIPS/eip-4844) @@ -2988,7 +2988,7 @@ export * as TransactionEnvelopeEip2930 from './TransactionEnvelopeEip2930.js' * * @category Transaction Envelopes */ -export * as TransactionEnvelopeEip4844 from './TransactionEnvelopeEip4844.js' +export * as TransactionEnvelopeEip4844 from './core/TransactionEnvelopeEip4844.js' /** * Utility functions for working with [EIP-7702 Typed Transaction Envelopes](https://eips.ethereum.org/EIPS/eip-7702) @@ -3121,7 +3121,7 @@ export * as TransactionEnvelopeEip4844 from './TransactionEnvelopeEip4844.js' * * @category Transaction Envelopes */ -export * as TransactionEnvelopeEip7702 from './TransactionEnvelopeEip7702.js' +export * as TransactionEnvelopeEip7702 from './core/TransactionEnvelopeEip7702.js' /** * Utilities & types for working with **Transaction Receipts** as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/receipt.yaml) @@ -3166,7 +3166,7 @@ export * as TransactionEnvelopeEip7702 from './TransactionEnvelopeEip7702.js' * * @category Execution Spec */ -export * as TransactionReceipt from './TransactionReceipt.js' +export * as TransactionReceipt from './core/TransactionReceipt.js' /** * Utilities & types for working with **Transaction Requests** as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/4aca1d7a3e5aab24c8f6437131289ad386944eaa/src/schemas/transaction.yaml#L358-L423) @@ -3191,7 +3191,7 @@ export * as TransactionReceipt from './TransactionReceipt.js' * * @category Execution Spec */ -export * as TransactionRequest from './TransactionRequest.js' +export * as TransactionRequest from './core/TransactionRequest.js' /** * Utility functions for working with [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) @@ -3241,14 +3241,14 @@ export * as TransactionRequest from './TransactionRequest.js' * * @category Signed & Typed Data */ -export * as TypedData from './TypedData.js' +export * as TypedData from './core/TypedData.js' /** * Utilities & types for working with [EIP-191 Validator Data](https://eips.ethereum.org/EIPS/eip-191#0x00) * * @category Signed & Typed Data */ -export * as ValidatorData from './ValidatorData.js' +export * as ValidatorData from './core/ValidatorData.js' /** * Utility functions for displaying and parsing Ethereum Values as defined under **2.1. Value** in the [Ethereum Yellow Paper](https://ethereum.github.io/yellowpaper/paper.pdf) @@ -3270,7 +3270,7 @@ export * as ValidatorData from './ValidatorData.js' * * @category Data */ -export * as Value from './Value.js' +export * as Value from './core/Value.js' /** * Utility functions for [NIST P256](https://csrc.nist.gov/csrc/media/events/workshop-on-elliptic-curve-cryptography-standards/documents/papers/session6-adalier-mehmet.pdf) ECDSA cryptography using the [Web Authentication API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API) @@ -3352,7 +3352,7 @@ export * as Value from './Value.js' * * @category Crypto */ -export * as WebAuthnP256 from './WebAuthnP256.js' +export * as WebAuthnP256 from './core/WebAuthnP256.js' /** * Utility functions for [NIST P256](https://csrc.nist.gov/csrc/media/events/workshop-on-elliptic-curve-cryptography-standards/documents/papers/session6-adalier-mehmet.pdf) ECDSA cryptography using the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) @@ -3417,11 +3417,11 @@ export * as WebAuthnP256 from './WebAuthnP256.js' * * @category Crypto */ -export * as WebCryptoP256 from './WebCryptoP256.js' +export * as WebCryptoP256 from './core/WebCryptoP256.js' /** * Utilities & types for working with Withdrawals as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/main/src/schemas/withdrawal.yaml) * * @category Execution Spec */ -export * as Withdrawal from './Withdrawal.js' +export * as Withdrawal from './core/Withdrawal.js' diff --git a/src/package.json b/src/package.json index f088894e..3f7aebfe 100644 --- a/src/package.json +++ b/src/package.json @@ -10,11 +10,7 @@ "sideEffects": false, "files": [ "*", - "!**/*.bench.ts", - "!**/*.bench-d.ts", - "!**/*.test.ts", - "!**/*.test.ts.snap", - "!**/*.test-d.ts", + "!**/_test/**", "!**/*.tsbuildinfo", "!tsconfig.build.json", "!jsr.json" diff --git a/src/window/index.ts b/src/window/index.ts index 20608e9f..aff4cb85 100644 --- a/src/window/index.ts +++ b/src/window/index.ts @@ -1,4 +1,4 @@ -import type { Provider } from '../Provider.js' +import type { Provider } from '../core/Provider.js' declare global { interface Window { diff --git a/test/setup.ts b/test/setup.ts index 453ec8aa..f7c068cf 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -3,8 +3,8 @@ import { afterAll, beforeAll, beforeEach, vi } from 'vitest' import * as instances from './anvil.js' beforeAll(() => { - vi.mock('../src/internal/errors.ts', async () => ({ - ...(await vi.importActual('../src/internal/errors.ts')), + vi.mock('../src/core/internal/errors.ts', async () => ({ + ...(await vi.importActual('../src/core/internal/errors.ts')), getVersion: vi.fn().mockReturnValue('x.y.z'), getUrl: vi.fn().mockReturnValue('https://oxlib.sh/rpc'), })) diff --git a/test/vitest.config.ts b/test/vitest.config.ts index 12822245..6e8fcefb 100644 --- a/test/vitest.config.ts +++ b/test/vitest.config.ts @@ -21,9 +21,7 @@ export default defineConfig({ ? [join(__dirname, './globalSetup.types.ts')] : [join(__dirname, './globalSetup.ts')], include: [ - ...(process.env.TYPES - ? ['src/_test/**/*.snap-d.ts'] - : ['src/_test/**/*.test.ts']), + ...(process.env.TYPES ? ['src/**/*.snap-d.ts'] : ['src/**/*.test.ts']), ], passWithNoTests: true, resolveSnapshotPath: (path, ext) =>