Skip to content

Support EVM signing: Add typescript [1/N]#123

Draft
janjakubnanista wants to merge 1 commit into
mainfrom
jan/evm
Draft

Support EVM signing: Add typescript [1/N]#123
janjakubnanista wants to merge 1 commit into
mainfrom
jan/evm

Conversation

@janjakubnanista

@janjakubnanista janjakubnanista commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

In this PR

Adding TypeScript to export-and-sign to improve the dev experience before we add new functionality.

https://linear.app/turnkey/issue/REQ-418/export-and-sign-add-support-for-evm

@socket-security

socket-security Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​swc/​register@​0.1.101001008050100
Added@​types/​node@​26.1.11001008196100
Addedts-node@​10.9.29610010082100
Updatedtypescript@​5.9.3 ⏵ 5.4.3100 +110090 +196 -390
Addedts-loader@​9.6.29910010093100

View full report

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces TypeScript support to the export-and-sign frame to improve developer experience ahead of planned EVM signing work.

Changes:

  • Switch webpack entrypoint to TypeScript and add TS compilation via ts-loader.
  • Add TypeScript project configuration (tsconfig.json) plus minimal ambient typings for CSS imports.
  • Add Jest config (TS) and update dependencies / rebuild committed dist artifacts.

Reviewed changes

Copilot reviewed 5 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
export-and-sign/webpack.config.ts Moves webpack config to TS, changes entry to src/index.ts, and adds ts-loader + TS extensions.
export-and-sign/tsconfig.json Introduces TypeScript compiler configuration for the package.
export-and-sign/src/index.ts Converts entry to TS, adjusts module import to extensionless ./event-handlers, and adds global typing for window.TKHQ.
export-and-sign/src/globals.d.ts Adds ambient module declaration for *.css imports.
export-and-sign/src/event-handlers.ts Adds an EVM transaction-type branch in signing logic (currently a Solana copy).
export-and-sign/package.json Adds TS-related tooling dependencies (typescript, ts-loader, ts-node, etc.).
export-and-sign/package-lock.json Lockfile updates corresponding to dependency changes.
export-and-sign/jest.config.ts Adds a Jest configuration file in TypeScript.
export-and-sign/dist/index.html Updates built HTML output to reference newly built bundles.
export-and-sign/dist/bundle.e56c39bc6a2a3cd0b44a.js Newly generated production bundle.
export-and-sign/dist/bundle.e56c39bc6a2a3cd0b44a.js.map Source map for the new production bundle.
export-and-sign/dist/bundle.e56c39bc6a2a3cd0b44a.js.LICENSE.txt License file for the new bundle.
export-and-sign/dist/bundle.539e9a91965e314c7b7e.js Removes an older generated bundle.
Files not reviewed (1)
  • export-and-sign/package-lock.json: Generated file
Comments suppressed due to low confidence (2)

export-and-sign/src/event-handlers.ts:258

  • The new "EVM" signing branch is currently just a copy of the Solana path: it deserializes with Solana's VersionedTransaction and signs with a Solana Keypair. This will produce an invalid EVM signature/transaction and is unsafe to ship as "EVM" support. If EVM signing isn't implemented yet in this PR, it should fail fast rather than returning a misleading signed payload.
    export-and-sign/src/index.ts:6
  • This file now exports from "./event-handlers" (TS), but the repo still has at least one consumer importing "./src/event-handlers.js" (see export-and-sign/index.test.js). Since src/event-handlers.js no longer exists, Jest will fail module resolution. Update the test imports (and any other callers) or add a small src/event-handlers.js shim that re-exports from the TS module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +13
"target": "esnext",
"allowJs": true,
"types": ["jest", "node"],
"paths": {
"@shared/*": ["../shared/*"]
}
Comment on lines 28 to 34
"@babel/core": "7.23.0",
"@babel/preset-env": "7.22.20",
"@swc/register": "0.1.10",
"@testing-library/dom": "9.3.3",
"@testing-library/jest-dom": "6.1.3",
"@types/node": "26.1.1",
"babel-jest": "29.7.0",
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.

2 participants