Feat/delta v2#239
Conversation
size-limit report 📦
|
6aa833f to
e01e0a4
Compare
| */ | ||
| function isExecutedAuction< | ||
| T extends Pick<DeltaAuction, 'order' | 'status' | 'transactions'> | ||
| T extends Pick<DeltaAuction, 'order' | 'status' | 'transactions'>, |
There was a problem hiding this comment.
Run linter on the whole repo, maybe?
There was a problem hiding this comment.
In a separate PR, for cleaner diff
Co-authored-by: Velenir <Velenir@users.noreply.github.com>
|
|
||
| export type OnChainOrderMap = { | ||
| Order: DeltaAuctionOrder; | ||
| FillableOrder: DeltaAuctionOrder; |
There was a problem hiding this comment.
So you added FillableOrders...
Are they also BE-only? Or are they possible to produce with SDK?
I think users can create FillableOrders too (though I don't really remember), but we don't have methods for them in SDK. Yet
There was a problem hiding this comment.
hmm, I think we have partiallyFillable flag somewhere so this type of order can be created but I never tried
and it has the same shape as DeltaAuctionOrder btw
There was a problem hiding this comment.
flag yes, but I'm pretty sure FillableOrder has a different typedData shape to sign too
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 3fba7a5. Configure here.
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

Run tests against the orders API to pass
closes FRNT-1332
Note
High Risk
Large breaking change across order building, signing, types, and HTTP paths that integrators must adopt; touches core trading flows and public exports.
Overview
This PR migrates the SDK’s Delta and quote surfaces to v2 APIs with a breaking change in how orders are created and what types consumers see.
Delta orders are no longer built locally from
deltaPrice+ token amounts. Standard, external, and TWAP flows nowPOST /delta/v2/orders/buildwith aroute(from v2 pricing) andside, returningBuiltDeltaOrder(toSign+orderHash). A singlesignDeltaOrdersigns any family;post*and submit helpers postbuilt.toSign.value. Partner fee fields are forwarded to the server instead of being resolved in the client.Reads and pricing move to
/delta/v2/...: route-basedDeltaPrice, paginatedgetDeltaOrders(PaginatedResponse), v2DeltaAuctionenvelope (DeltaOrderStatus,input/output,transactions, explicitside),getBridgeRoutes(replaces bridge-info),getAgentsList, and renamed cancel helpers targeting/delta/v2/orders/cancel.getRequiredBalanceForDeltaOrdersreplaces the limit-orders-named helper.OrderHelpersand on-chain modules are updated for the new auction shape (e.g. completion viaCOMPLETED).Quote uses
GET /v2/quote; delta branch returns v2DeltaPrice(no separateBridgePriceoverload shape). Public exports drop per-family sign modules and v1 auction/bridge metadata types;ProductiveOrder/FillableOrderare wired for reads only.Docs,
CLAUDE.md, examples (consolidateddelta.ts, removedexternalDelta.ts), and status polling helpers are aligned with the v2 flow.Reviewed by Cursor Bugbot for commit 0edcde8. Bugbot is set up for automated code reviews on this repo. Configure here.