Skip to content

feat(wallet): worker-status superpower + signing hardening (calldata decode, EIP-712)#76

Merged
marinom2 merged 1 commit into
mainfrom
feat/wallet-worker-status-and-signing-hardening
Jun 10, 2026
Merged

feat(wallet): worker-status superpower + signing hardening (calldata decode, EIP-712)#76
marinom2 merged 1 commit into
mainfrom
feat/wallet-worker-status-and-signing-hardening

Conversation

@marinom2

Copy link
Copy Markdown
Owner

Further develops the wallet on both axes from the last round.

Superpower: in-wallet worker status (read-only, via lightnode-sdk)

A Worker panel shows whether the connected address is a registered LightChain worker, its stake / min-stake / headroom / claimable rewards, and a below-floor warning, via WorkerOperator.status(). A new background workerStatus op runs the read and returns only number/bool fields (structured clone rejects bigint). Acting links out to lightnode. No other wallet knows LightChain workers exist.

Signing hardening (the "mainnet gate" items, no new deps)

  • Dangerous-calldata decoding: decodeDangerousCall() classifies tx.data; the approval popup hard-warns on UNLIMITED approve/increaseAllowance, setApprovalForAll(true), and permit, labels transfers, and flags unrecognized calls. Includes both safeTransferFrom selectors (3-arg + 4-arg-with-bytes) per the review.
  • eth_signTypedData_v4: was allow-listed but unimplemented (popped, then failed); now signs - bound to chainId 9200/8200 - and the popup renders the EIP-712 domain name, verifyingContract, primaryType, a wrong-chain warning, and a Permit/order warning (review H5).

Verification

10 new pure unit tests (calldata decode + typed-data); 24 wallet tests total; wxt build + tsc green. The SDK bundles cleanly into the extension.

Encrypted inference + bridge remain deferred: the inference session flow (SIWE bearer + on-chain session + WebSocket relay) collides with the MV3 service-worker 30s lifecycle, so a read-only quote slice is the honest next step there.

Root CI unaffected (wallet/ is excluded from the Next app); 491 root tests green.

…decode, EIP-712)

Further develops the wallet on both axes.

Superpower (read-only, via lightnode-sdk):
- In-wallet Worker panel: shows whether the connected address is a registered
  LightChain worker, its stake, min-stake, headroom, claimable rewards, and a
  below-floor warning, via WorkerOperator.status(). Acting links out to
  lightnode. A new background workerStatus op runs the read and returns only
  number/bool fields (structured clone rejects bigint).

Signing hardening (the mainnet-gate items, no new deps):
- Dangerous-calldata decoding: decodeDangerousCall() classifies tx data and the
  approval popup now hard-warns on UNLIMITED approve / increaseAllowance /
  setApprovalForAll(true) / permit, and labels transfers; unrecognized calls are
  flagged "only approve if you trust this site". Includes both safeTransferFrom
  selectors (3-arg + 4-arg-with-bytes) per the review.
- eth_signTypedData_v4: was allow-listed but unimplemented; now signs (binding
  to chainId 9200/8200) and the popup shows the EIP-712 domain name,
  verifyingContract, primaryType, a wrong-chain warning, and a Permit/order warning.

10 new pure unit tests (decode-call + typed-data); 24 wallet tests total. wxt
build + tsc green. Encrypted inference + bridge remain deferred (the inference
session flow collides with the MV3 service-worker lifecycle, per the review).
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightnode Building Building Preview, Comment Jun 10, 2026 3:09pm

Request Review

@marinom2 marinom2 merged commit 2c566f3 into main Jun 10, 2026
5 checks passed
@marinom2 marinom2 deleted the feat/wallet-worker-status-and-signing-hardening branch June 10, 2026 15:13
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.

1 participant