Skip to content

Conversation

@yilmazbahadir
Copy link
Collaborator

@yilmazbahadir yilmazbahadir commented Dec 2, 2025

Release: v4.0.0 - ESM Migration, Viem Integration, and Enhanced Blockchain Support

🚀 Major Features

ESM Adoption

  • feat: Adopt Pure ESM build with Vite 7 and Vitest 3
  • Adopt ES modules for better tree-shaking and modern JavaScript compatibility
  • Add module interoperability tests for both CJS and ESM

Viem Integration

  • feat: Migrate from ethers.js to viem for Ethereum interactions
  • Add viem signed transaction helper
  • Improve EVM test compatibility with Lattice simulator
  • Update transaction parsing and validation utilities

EIP-7702 Support

  • feat: Add support for EIP-7702 (delegation transactions)
  • Add comprehensive EIP-7702 serialization tests
  • Update transaction schemas and validators

Bitcoin Enhancements

  • feat: Add Bitcoin xpub support
  • feat: Add x/y/zpub helper functions
  • Fix address offset calculation
  • Improve Bitcoin address derivation and validation

Documentation

  • docs: Comprehensive v4.0.0 documentation update
  • Add migration guide from v3 to v4
  • Update signing documentation with new examples
  • Enhance address documentation
  • Improve calldata decoding tutorials

🐛 Bug Fixes

  • fix: Correct address comparison in personal message signing
  • fix: Fix address offset calculation
  • fix: Fix issues with EIP-712 v parameter
  • fix: Fix ESM imports for secp256k1
  • fix: Fix parse derivation path
  • fix: Fix issue with fetching addresses by derivation path
  • fix: Fix types in ESM projects
  • fix: Add istanbul code coverage and remove unreferenced transaction-parsing utils
  • fix: Resolve all ESLint warnings

🧪 Testing

  • test: Revive and harden E2E test suite for simulator
  • test: Add module interoperability tests for CJS and ESM
  • test: Improve Solana E2E test structure and signature validation
  • test: Enhance BLS testing framework and Ethereum validation utilities
  • test: Migrate forge contract tests to viem-compat EIP-712 signature comparison
  • test: Standardize test seed usage and remove deprecated test infrastructure
  • test: Update error messages to match invalid request format
  • Add comprehensive test vectors for EIP-712 and signing operations
  • Improve test determinism and reliability

🔧 Build & Infrastructure

  • chore: Add tsup build system
  • chore: Configure Dependabot for automated dependency updates
  • chore: Add pull request template
  • chore: Add prettier format command
  • ci: Add lattice-simulator E2E tests to PR checks
  • ci: Add pull_request_target support for Dependabot with secrets
  • ci: Only allow internal events to trigger simulator run
  • ci: Update GitHub Actions workflows
  • Remove deprecated forge contract testing infrastructure
  • Update Node.js version requirements

📦 Dependencies

Production Dependencies

  • deps: Bump ox from 0.8.1 to 0.9.14
  • deps: Bump @ethereumjs/tx from 10.0.0 to 10.1.0
  • deps: Bump @ethereumjs/common from 10.0.0 to 10.1.0
  • deps: Bump @ethereumjs/rlp from 10.0.0 to 10.1.0
  • deps: Bump @metamask/eth-sig-util from 8.0.0 to 8.2.0
  • deps: Bump bignumber.js from 9.1.2 to 9.3.1
  • deps: Bump elliptic from 6.5.7 to 6.6.1

Development Dependencies

  • deps-dev: Bump @types/node from 24.5.2 to 24.10.1
  • deps-dev: Bump @eslint/js from 9.13.0 to 9.39.1
  • deps-dev: Bump msw from 2.5.0 to 2.12.0
  • deps-dev: Bump @types/secp256k1 from 4.0.6 to 4.0.7
  • deps-dev: Bump @typescript-eslint/parser from 8.44.1 to 8.46.3
  • deps-dev: Bump dotenv from 16.4.5 to 17.2.3
  • deps-dev: Bump prettier-eslint from 16.3.0 to 16.4.2
  • deps-dev: Bump eslint-config-prettier from 9.1.0 to 10.1.8
  • deps-dev: Bump tsx from 4.20.3 to 4.20.6
  • deps-dev: Bump eslint-plugin-prettier from 5.2.1 to 5.5.4
  • deps-dev: Bump @solana/web3.js from 1.95.4 to 1.98.4
  • deps-dev: Bump vite-plugin-dts from 4.3.0 to 4.5.4
  • deps-dev: Bump @types/jest from 29.5.13 to 30.0.0

CI Dependencies

  • ci(deps): Bump peaceiris/actions-gh-pages from 3 to 4
  • ci(deps): Bump actions/checkout from 3 to 5

🔄 Refactoring

  • refactor: Standardize test seed usage and remove deprecated test infrastructure
  • Migrate from ethers.js to viem throughout codebase
  • Update transaction parsing utilities
  • Improve code organization and structure
  • Remove unused imports and dead code

📊 Statistics

  • 115 files changed
  • 10,852 insertions(+), 5,907 deletions(-)
  • Major version bump: v3.x.x → v4.0.0

⚠️ Breaking Changes

This release includes breaking changes. Please refer to the migration guide for details on upgrading from v3 to v4.

Key Breaking Changes:

  • Migration from ethers.js to viem
  • Updated API signatures for signing operations
  • Changes to transaction parsing and validation

🔗 Related Issues & PRs

This release consolidates work from multiple PRs including:

netbonus and others added 30 commits July 30, 2024 15:19
* fix parse derivation path

* fix eslint errors with hardened values in strings

* exports parseDerivationPath
* fixes issue with fetching addrs by derivation path

* fix unit tests
* bumps dependencies

* update integration test

* bump node in test

* revert eip712 `v` change

* bumps node version to 18

* update getMessageToSign to latest ethers version

* adds iteration index and test

* update iteration

* remove eslint

* remove unused imports

* updates snapshot

* bumps upload artifacts

* fix parse derivation path (#568)

* fix parse derivation path

* fix eslint errors with hardened values in strings

* exports parseDerivationPath

* bumps to v2.7.0 (#570)

* remove extra test files
* adds client interoperability for apis

* skip interop right now
* feat(client): adjust function calls to async/await

* feat(repo): add nightly builds to pkg.pr.new

* fix merge conflicts

* remove nightly

---------

Co-authored-by: netbonus <151201453+netbonus@users.noreply.github.com>
* swap .d.ts type files for .ts files

* fixes type errors

* fix encoding
* automatically fetches calldata from `sign()`

* remove vitest form tsconfig to fix build

* remove extra script
* automatically fetches calldata from `sign()`

* remove vitest form tsconfig to fix build

* remove extra script

* updates packages to latest and cleans up build output

* update to use pnpm

* update patched vitest loader

* fix linting issues

* fix patch

* fix deps for docs

* fix test paths

* bump node version

* re-add the bn.js pckg

* fix rejected tx
yilmazbahadir and others added 18 commits November 7, 2025 15:31
Add a structured PR template to standardize pull request submissions with sections for
summary, context, test plan, screenshots, and a checklist to ensure consistent quality and
documentation.
- Remove unused eslint-disable directives
- Add error logging to all unused error variables in catch blocks
- Remove unused imports and variables
- Fix prettier formatting issues
- add tests to verify require() and import() work correctly
- test both commonjs and esm module resolution
- validate that connect and Client exports are available in both formats
Bumps [@ethereumjs/rlp](https://github.com/ethereumjs/ethereumjs-monorepo) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/ethereumjs/ethereumjs-monorepo/releases)
- [Commits](https://github.com/ethereumjs/ethereumjs-monorepo/compare/@ethereumjs/rlp@10.0.0...@ethereumjs/rlp@10.1.0)

---
updated-dependencies:
- dependency-name: "@ethereumjs/rlp"
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…661)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.44.1 to 8.46.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.3/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.46.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/secp256k1](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/secp256k1) from 4.0.6 to 4.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/secp256k1)

---
updated-dependencies:
- dependency-name: "@types/secp256k1"
  dependency-version: 4.0.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@ethereumjs/common](https://github.com/ethereumjs/ethereumjs-monorepo) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/ethereumjs/ethereumjs-monorepo/releases)
- [Commits](https://github.com/ethereumjs/ethereumjs-monorepo/compare/@ethereumjs/common@10.0.0...@ethereumjs/common@10.1.0)

---
updated-dependencies:
- dependency-name: "@ethereumjs/common"
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@ethereumjs/tx](https://github.com/ethereumjs/ethereumjs-monorepo) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/ethereumjs/ethereumjs-monorepo/releases)
- [Commits](https://github.com/ethereumjs/ethereumjs-monorepo/compare/@ethereumjs/tx@10.0.0...@ethereumjs/tx@10.1.0)

---
updated-dependencies:
- dependency-name: "@ethereumjs/tx"
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [msw](https://github.com/mswjs/msw) from 2.5.0 to 2.12.0.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md)
- [Commits](mswjs/msw@v2.5.0...v2.12.0)

---
updated-dependencies:
- dependency-name: msw
  dependency-version: 2.12.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#642)

* test: migrate forge contract tests to viem-compat EIP-712 signature comparison

Replaces forge-dependent contract deployment tests with pure signature
comparison approach. Signs EIP-712 messages with both Lattice and viem,
then verifies byte-for-byte signature equality.

Adds comprehensive test coverage with 13 EIP-712 message vectors including
negative amounts, complex nested structures, edge cases (max/min values,
empty strings), and real-world patterns (Permit, Vote, Mail, Order).

Removes entire forge infrastructure including Solidity contracts, Anvil
setup scripts, and deployment utilities. Tests now run without external
dependencies, providing faster execution and consistent test patterns
across the EVM signing test suite.

* fix: handle JSON parsing errors gracefully when fetching calldata

- Wrap JSON.parse in try-catch to handle non-JSON API responses
- Fix linter warnings for unused error variables in catch blocks
- Add error message preview when JSON parsing fails

* fix: handle BigInt serialization in error logging

- Add custom JSON.stringify replacer to convert BigInt to string
- Prevents 'Do not know how to serialize a BigInt' errors in logs

* fix: improve typed data cloning and bigint support

- replace JSON.parse/stringify with proper deep clone for EIP-712 payloads
- add cloneTypedDataPayload function that handles Buffer, Uint8Array, BN, Date
- use native structuredClone when available, fallback to manual cloning
- extend ensureHexBuffer to support bigint type
- fix type assertion in basicTypedDataClone for BN clone method

* fix: lint

* fix: revert package.json

---------

Co-authored-by: baha <yilmazbahadir@gmail.com>
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.13.0 to 9.39.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ox](https://github.com/wevm/ox) from 0.8.1 to 0.9.14.
- [Release notes](https://github.com/wevm/ox/releases)
- [Commits](https://github.com/wevm/ox/compare/ox@0.8.1...ox@0.9.14)

---
updated-dependencies:
- dependency-name: ox
  dependency-version: 0.9.14
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.5.2 to 24.10.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…astructure (#686)

* test: update determinism to use test seed

* test: update solana e2e tests to use test mnemonic

* test: update runGeneric function to use test seed

* test: use test seed for e2e-btc test

* refactor: remove unused wallet-jobs test and update tests to use test seed

Remove deprecated test infrastructure:
- Delete wallet-jobs.test.ts and related e2e-wj script
- Remove initializeClient.ts utility (no longer used)
- Clean up unused imports and functions from test utilities
- Simplify test runners by removing unused EVM test helpers

Update tests to use test seed:
- Update BLS test to use TEST_SEED constant instead of deriving from mnemonic
- Remove wallet seed retrieval test from BLS suite

This cleanup removes 1378 lines of unused test code and standardizes test seed usage.

* fix: lint

* refactor: replace FOUNDRY_TEST_SEED with TEST_SEED

* fix: lint

* docs: add test mnemonic setup instructions and validation

Add SafeCard setup documentation with required test mnemonic.
Enhance test error messages to indicate incorrect mnemonic usage.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 5, 2025

Open in StackBlitz

npm i https://pkg.pr.new/GridPlus/gridplus-sdk@688

commit: 8b80098

@yilmazbahadir yilmazbahadir marked this pull request as ready for review December 8, 2025 15:43
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@yilmazbahadir yilmazbahadir changed the title chore(release): v4.0.0 - ESM migration, viem integration, and enhanced blockchain support v4.0.0 Dec 8, 2025
@yilmazbahadir yilmazbahadir merged commit 83ec80f into main Dec 8, 2025
10 checks passed
@GridPlus GridPlus deleted a comment from yilmazbahadir Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants