Skip to content

feat(perps): update latest hyperliquid sdk#28672

Open
abretonc7s wants to merge 3 commits intomainfrom
feat/tat-2906-update-latest-hyperliquid-sdk
Open

feat(perps): update latest hyperliquid sdk#28672
abretonc7s wants to merge 3 commits intomainfrom
feat/tat-2906-update-latest-hyperliquid-sdk

Conversation

@abretonc7s
Copy link
Copy Markdown
Contributor

@abretonc7s abretonc7s commented Apr 10, 2026

Description

Bumps @nktkas/hyperliquid from 0.30.2 to 0.32.2 (latest). No breaking changes were found affecting the codebase — all existing type imports and runtime behavior remain compatible. Sub-dependencies updated: @nktkas/rews 1.2.3 → 2.1.0, valibot 1.2.0 → 1.3.1. The CLI binary and micro-eth-signer dependency were removed from the SDK in this release.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2906

Manual testing steps

Feature: Hyperliquid SDK update

  Scenario: user opens the perps market list
    Given the wallet is unlocked and perps feature is enabled

    When user navigates to the PerpsTrendingView
    Then market data loads successfully (229+ markets including BTC)
    And prices are displayed correctly

Screenshots/Recordings

Before

No UI changes — dependency update only.

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
## **Validation Recipe**
{
  "title": "Hyperliquid SDK update — verify market data loads with SDK 0.32.2",
  "description": "Smoke test: validates that the Hyperliquid SDK 0.32.2 integration works correctly by confirming market data is available via the perps controller.",
  "validate": {
    "runtime": {
      "pre_conditions": [
        "wallet.unlocked",
        "perps.feature_enabled"
      ],
      "steps": [
        {
          "id": "nav-market-list",
          "action": "navigate",
          "target": "PerpsTrendingView"
        },
        {
          "id": "wait-route",
          "action": "wait_for",
          "route": "PerpsTrendingView"
        },
        {
          "id": "wait-market-data",
          "action": "wait_for",
          "expression": "Engine.context.PerpsController.getMarketDataWithPrices().then(function(ms){return JSON.stringify({count:ms.length})})",
          "assert": {
            "operator": "gt",
            "field": "count",
            "value": 0
          },
          "timeout_ms": 30000
        },
        {
          "id": "assert-btc-in-markets",
          "action": "eval_async",
          "expression": "Engine.context.PerpsController.getMarketDataWithPrices().then(function(ms){var m=ms.find(function(x){return x.symbol==='BTC'});return JSON.stringify({found:!!m,symbol:m?m.symbol:null})})",
          "assert": {
            "operator": "eq",
            "field": "found",
            "value": true
          }
        },
        {
          "id": "evidence-market-loaded",
          "action": "screenshot",
          "filename": "evidence-market-loaded.png"
        }
      ]
    }
  }
}

Result: 5/5 steps passed ✅


Note

Medium Risk
Dependency-only upgrade, but it updates a perps trading SDK and its transitive deps (and removes some previously shipped modules), which could affect runtime behavior or build resolution if the app relied on them implicitly.

Overview
Updates the @nktkas/hyperliquid dependency from 0.30.2 to 0.32.2.

Refreshes the lockfile for the new SDK release, including transitive dependency changes such as @nktkas/rews moving to major version 2 and valibot bumping to 1.3.1, and drops previously included packages that are no longer required by the SDK.

Reviewed by Cursor Bugbot for commit 7327cb4. Bugbot is set up for automated code reviews on this repo. Configure here.

@abretonc7s abretonc7s added DO-NOT-MERGE Pull requests that should not be merged agentic labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-perps Perps team label Apr 10, 2026
@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 10, 2026

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​nktkas/​hyperliquid@​0.30.2 ⏵ 0.32.298100100 +796100

View full report

@abretonc7s
Copy link
Copy Markdown
Contributor Author

Automated dev run — TAT-2906

Metric Value
Run 7d9c7333
Duration ?
Model claude/sonnet
Nudges 0
Cost estimate $4.86
Worker report

Report — TAT-2906: Update Hyperliquid SDK

Summary

Updated @nktkas/hyperliquid from 0.30.2 to 0.32.2. No API-breaking changes were found affecting the codebase — all existing type imports and method signatures remain compatible. All 288 perps test suites pass (1467 controller + 5503 UI tests).

Changes

File Change
package.json Bumped @nktkas/hyperliquid from ^0.30.2 to ^0.32.2
yarn.lock Updated lock entry; @nktkas/rews bumped from 1.2.3 → 2.1.0, valibot from 1.2.0 → 1.3.1, micro-eth-signer removed (no longer a dep), CLI bin removed

Test Plan

  • TypeScript: tsc --noEmit — no errors
  • Unit tests: yarn jest app/controllers/perps/ — 29 suites, 1467 tests passed
  • Unit tests: yarn jest app/components/UI/Perps/ — 259 suites, 5503 tests passed
  • Recipe: 5/5 steps passed (navigate → wait route → wait market data → assert BTC found → screenshot)

Evidence Artifacts

  • evidence-market-loaded.png — markets list loaded successfully with SDK 0.32.2

Ticket

https://consensyssoftware.atlassian.net/browse/TAT-2906

@abretonc7s abretonc7s marked this pull request as ready for review April 10, 2026 15:14
@abretonc7s abretonc7s enabled auto-merge April 10, 2026 15:20
@abretonc7s abretonc7s removed the DO-NOT-MERGE Pull requests that should not be merged label Apr 10, 2026
@github-actions github-actions bot added the risk-medium Moderate testing recommended · Possible bug introduction risk label Apr 10, 2026
@abretonc7s abretonc7s force-pushed the feat/tat-2906-update-latest-hyperliquid-sdk branch from c703bba to 9727fc2 Compare April 11, 2026 07:05
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 11, 2026
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: @PerformancePreps
  • Risk Level: medium
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The only code change in this PR is a version bump of @nktkas/hyperliquid from ^0.30.2 to ^0.32.2 in package.json (with yarn.lock updated accordingly). This package is the HyperLiquid SDK used exclusively by the Perps feature. Investigation confirmed it is imported in: app/controllers/perps/services/HyperLiquidClientService.ts, HyperLiquidSubscriptionService.ts, hyperLiquidOrderBookProcessor.ts, standaloneInfoClient.ts, and hyperliquid-types.ts. A two-minor-version bump (0.30 → 0.32) could introduce API changes affecting Perps trading functionality. Selected tags: SmokePerps (directly affected), SmokeWalletPlatform (required by SmokePerps description — Perps is a section inside Trending), SmokeConfirmations (required by SmokePerps description — Add Funds deposits are on-chain transactions).

Performance Test Selection:
The @nktkas/hyperliquid SDK version bump could affect perps market loading, position management, add funds flow, and order execution performance — all covered by @PerformancePreps. The SDK is used in core HyperLiquid client services that handle real-time data and trading operations.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
11 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic risk-medium Moderate testing recommended · Possible bug introduction risk size-XS team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants