Feat/delta v2#242
Open
andriy-shymkiv wants to merge 63 commits into
Open
Conversation
This reverts commit 6942fb9.
Remove the local-build Delta v1 surface and the unreleased DeltaV2 namespace; the v2 server-built implementation now backs sdk.delta.* and the bare top-level exports. Replace getBridgeInfo with getBridgeRoutes, and point getQuote at /v2/quote returning the v2 route-based DeltaPrice (overloads/modes unchanged). Migrate examples to the v2 flow.
Feat/drop delta v1
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fffd426. Configure here.
Velenir
reviewed
Jun 5, 2026
| ).toString(), | ||
| }; | ||
| if (isTWAPOrder(auction.order) && auction.order.numSlices > 0) { | ||
| return total / auction.order.numSlices; |
Member
There was a problem hiding this comment.
This doesn't look correct.
See this TWAPOrder, 4 txs, 25% filled each, total = sum(txs) /slices = 4 * 25 / 4 ?
Not to mention if you did this for filledPercent in TWAP, why didn't you do the same for tx.receivedAmount in getTransactionAmounts. Doesn't make sense
Member
Author
There was a problem hiding this comment.
Good eye! Now this helper should work as before -- dbefdca
…ndling for TWAP orders
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.

Note
High Risk
Large breaking change to order building, signing, pricing, and read/cancel endpoints that integrators depend on for trading and settlement monitoring.
Overview
Migrates the Delta SDK from v1 (client-built EIP-712 orders) to v2 (server-built orders and
/delta/v2APIs). This is a breaking change for integrators: flows now quote a route-basedDeltaPrice, callbuild*(POST/delta/v2/orders/build) forBuiltDeltaOrder, sign once withsignDeltaOrder, and post withbuilt.toSign.valueinstead of passingdeltaPrice+ token amounts.API and surface changes: pricing, orders, cancel, bridge discovery, and token support move to
/delta/v2/...;getDeltaPricereturns a single v2 shape (noBridgePriceoverload);getBridgeRoutesreplacesgetBridgeInfo;getDeltaOrdersreturnsPaginatedResponseandgetRequiredBalanceForDeltaOrdersreplaces the limit-only helper; cancel helpers rename tosignCancelDeltaOrderRequest/cancelDeltaOrders. Per-familysignExternalDeltaOrder/signTWAPDeltaOrderand local order construction (resolveAmounts,DEFAULT_BRIDGE, etc.) are removed. Public types expand forDeltaAuctionenvelope (DeltaOrderStatus,input/output,COMPLETEDpolling),ProductiveOrder/FillableOrder, andOrderHelpersguards/getters for v2.Docs/examples: README,
DELTA.md,EXTERNAL_ORDERS.md, andCLAUDE.mdare rewritten for route +slippagebps; examples use v2 submit/build/sign and consolidate external/TWAP flows;externalDelta.tsis dropped in favor ofdelta.ts.Reviewed by Cursor Bugbot for commit dbefdca. Bugbot is set up for automated code reviews on this repo. Configure here.