Skip to content

Update hl api - #167

Merged
nktkas merged 6 commits into
mainfrom
refactor/update-hl-api
Jul 15, 2026
Merged

nktkas merged 6 commits into
mainfrom
refactor/update-hl-api

Conversation

@nktkas

@nktkas nktkas commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Type of change

  • Bug fix
  • New API method / feature
  • Schema/type update to match the Hyperliquid API
  • Breaking change

@nktkas
nktkas merged commit 0671381 into main Jul 15, 2026
2 checks passed
@nktkas
nktkas deleted the refactor/update-hl-api branch July 15, 2026 19:45
Naz-Ovh pushed a commit to 0x-fork/metamask-core that referenced this pull request Sep 30, 2026
…k#10591)

## Explanation

Bumps `@nktkas/hyperliquid` from `^0.33.1` to `^0.33.3` in
`@metamask/perps-controller`
([v0.33.2](https://github.com/nktkas/hyperliquid/releases/tag/v0.33.2),
[v0.33.3](https://github.com/nktkas/hyperliquid/releases/tag/v0.33.3)).

- **Yarn patch dropped.** The patch (MetaMask#9471) stripped `/// <amd-module
name="file:///home/runner/...">` directives from the SDK's `.d.ts`
files. `0.33.3` no longer ships them, so the patch and its root
`resolutions` entry are gone. The built `dist` has no `file:///`
references.
- **`dexAbstraction` migration removed.** `0.33.2` dropped
`dexAbstraction` from `userAbstraction` / `userSetAbstraction` to match
the API: HyperLiquid retired the mode (the live `userAbstraction`
endpoint now returns `"default"` for the SDK's former `dexAbstraction`
fixture users). The `userSetAbstraction` main-wallet migration and its
"don't re-prompt after a rejection" cache were dead, so they are
removed. `default` / `disabled` accounts still migrate through
`agentSetAbstraction`, and deferral with `allowUserSigning: false` is
unchanged. An unexpected `dexAbstraction` response now takes the
existing unknown-mode bail.
- **New order types.** `FrontendOrder.orderType` adds `Twap Slice`,
`Vault Close` and `Spot Dust Conversion`. They are mapped explicitly to
`'market'` in historical orders, which is what the fallback already
returned.
- **Type-only breaks:** `OrderFill.liquidation.liquidatedUser` is now
optional (HyperLiquid omits it on some liquidation fills), and the
re-exported `FrontendOrder.orderType` union gains the three values
above. Mobile (`PerpsFillTag`) and Extension (`perps-fill-tag`) already
guard `liquidatedUser` at runtime; their local `transactionHistory`
types declare it as `string` and may need `?` when adopting this
release.
- **Historical order statuses.** Every `OrderProcessingStatus` from the
SDK now maps explicitly (exhaustive `satisfies` map): the specific
`*Rejected` statuses report `rejected` and `outcomeSettledCanceled` /
`internalCancel` report `canceled`, where they previously fell through
to `queued`.
- **Unified-account migration lock.** Waiters re-check the in-flight
lock after each wait (same pattern as the referral lock), so an attempt
that ends without caching a result (e.g. deferred at init for a hardware
wallet) no longer lets every waiter run `agentSetAbstraction`
concurrently.

## References

- Fixes
[TAT-4044](https://consensyssoftware.atlassian.net/browse/TAT-4044)
- Mobile validation (draft, preview build `18.0.1-preview-2848be6`,
device recipe evidence):
MetaMask/metamask-mobile#37025
- Upstream schema change: nktkas/hyperliquid#167

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them


[TAT-4044]:
https://consensyssoftware.atlassian.net/browse/TAT-4044?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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