Repository navigation
Webhooks, CVD, HIP-3 oracle, HIP-4 questions, wallet classification, symbols - #19
Merged
Merged
Conversation
…symbols Brings the SDK to parity with the customer-facing API for 1.12.0. Webhooks: client.webhooks covers all 21 /v1/webhooks routes: the event catalog and plan limits, endpoints (list, create, delete, enable, rotate secret, test), the delivery log and repeat delivery, subscriptions (list, create, update, delete, resume one, resume all), the estimate and dry-run previews, and watched addresses. It is ported from the earlier feat/webhooks-resource work and reconciled with the current spec: limits, the two resume routes and the subscription pause fields are new, and the redelivery, cost floor and estimate basis shapes follow the spec. The signature verifier takes the raw body (string, Buffer, Uint8Array or ArrayBuffer) and refuses a parsed object, accepts any v1 in 0xa-signature against any secret passed so a rotation verifies with either secret, compares in constant time, and enforces a 300 second replay window. A NaN tolerance or clock is refused rather than silently disabling the check. The HTTP layer gains PATCH and DELETE on one shared request path, can keep free-form subtrees (webhook filters, payloads, catalog maps, symbol coverage maps) exactly as sent, and now reads the request id that error responses carry at the top level. Also added: CVD for Hyperliquid core and HIP-3 (cursor paged), HIP-3 oracle external price and discovery bounds, HIP-4 questions, wallet classification for core and HIP-3, and client.symbols.list(). The orderbook_full and hip3_orderbook_full WebSocket channels are typed for live use; the API does not replay them, so replay requests for them are refused before sending. Fixes hip4.outcomes.list() sending isSettled, which the API ignores; it now sends is_settled. Folds in the order-flow paging docs from docs/order-flow-paging.
0xFantomMenace
force-pushed
the
feat/surface-parity
branch
from
September 29, 2026 03:13
7d21fc5 to
4559002
Compare
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the SDK to parity with the customer-facing API for 1.12.0. Everything is added under the existing
## 1.12.0 (2026-09-28)CHANGELOG section; the version is unchanged.Added
Webhooks (
client.webhooks, all 21/v1/webhooksroutes)eventTypes()GET /v1/webhooks/event-typeslimits()GET /v1/webhooks/limitslistEndpoints()GET /v1/webhooks/endpointscreateEndpoint(params)POST /v1/webhooks/endpointsdeleteEndpoint(id)DELETE /v1/webhooks/endpoints/{id}enableEndpoint(id)POST /v1/webhooks/endpoints/{id}/enablerotateSecret(id)POST /v1/webhooks/endpoints/{id}/rotatetestEndpoint(id)POST /v1/webhooks/endpoints/{id}/testlistDeliveries(id, params?)GET /v1/webhooks/endpoints/{id}/deliveriesredeliver(id)POST /v1/webhooks/deliveries/{id}/redeliverlistSubscriptions()GET /v1/webhooks/subscriptionscreateSubscription(params)POST /v1/webhooks/subscriptionsupdateSubscription(id, params)PATCH /v1/webhooks/subscriptions/{id}deleteSubscription(id)DELETE /v1/webhooks/subscriptions/{id}resumeSubscription(id)POST /v1/webhooks/subscriptions/{id}/resumeresumeAllSubscriptions()POST /v1/webhooks/subscriptions/resumedryRun(params)POST /v1/webhooks/subscriptions/dry-runestimate(params)POST /v1/webhooks/subscriptions/estimatelistAddresses()GET /v1/webhooks/addressesaddAddress(params)POST /v1/webhooks/addressesdeleteAddress(id)DELETE /v1/webhooks/addresses/{id}This ports the resource from
feat/webhooks-resource(#9) onto current master and reconciles it with the spec:limits(), both resume routes and the subscription pause fields are new, and the redelivery result, cost floor and estimate basis follow the spec shapes.Signature verification:
constructWebhookEvent(),verifyWebhookSignature()andassertWebhookSignature(), pluscreateWebhookSignatureHeader(),parseWebhookSignatureHeader()andreadWebhookHeader(). They take the raw body (string,Buffer,Uint8Array,ArrayBuffer) and refuse a parsed object, accept anyv1in0xa-signatureagainst any secret passed (both signatures during a rotation), compare in constant time, and enforce a 300 second replay window in both directions. A NaN tolerance or clock throws instead of switching the check off. The README publishes fixed test vectors, which the tests check against an independent HMAC.Market data
hyperliquid.cvd.history(symbol, params?)GET /v1/hyperliquid/cvd/{symbol}hyperliquid.hip3.cvd.history(symbol, params?)GET /v1/hyperliquid/hip3/cvd/{symbol}hyperliquid.hip3.oracle.discoveryBounds(symbol)GET /v1/hyperliquid/hip3/oracle/discovery-bounds/{symbol}hyperliquid.hip3.oracle.externalPrice(symbol)GET /v1/hyperliquid/hip3/oracle/external-price/{symbol}hyperliquid.hip4.questions.list(params?)(andhip4.listQuestions())GET /v1/hyperliquid/hip4/questionshyperliquid.hip4.questions.get(id)(andhip4.getQuestion())GET /v1/hyperliquid/hip4/questions/{question_id}hyperliquid.wallets.classify(params?)GET /v1/hyperliquid/wallets/classifyhyperliquid.hip3.wallets.classify(params?)GET /v1/hyperliquid/hip3/wallets/classifysymbols.list()GET /v1/symbolsCVD and questions return
nextCursor, passed back unchanged. Types and Zod schemas cover every new response.WebSocket:
orderbook_fullandhip3_orderbook_fulljoinWsChannelandWsChannelSchema, withWsL2FullDepthSnapshot/WsL2FullDepthBatchtypes for thel4_snapshot+l4_batchmessages these channels send. The API answers a replay of either channel with "does not support historical replay", soreplay()andmultiReplay()refuse them before sending, the same way the live-only L4 channels are handled.Changed / fixed
PATCHandDELETE, one shared request path for every verb, and the option to keep free-form subtrees (webhookfilters,payload, occurrencedata, catalog maps, symbol coverage maps) exactly as sent.OxArchiveError.requestIdis now set on errors; the error envelope carriesrequest_idat the top level, not undermeta.hip4.outcomes.list({ isSettled })sentisSettled, which the API ignores, so the filter never applied. It now sendsis_settled.nextCursorwith the same window.orders.flow()on core, HIP-3 and HIP-4 already forwardscursor; tests cover all three.Checks
npm run build,npx tsc --noEmit -p .: cleannpx vitest run: 248 passed (96 new: 31 webhooks resource, 37 signature verifier, 28 market data and WebSocket)dist,README.md,LICENSE,package.jsononlyvalidate: true. Webhook write routes are covered by mocked tests only.