Skip to content

Add support for migration and upgraded trading api#9

Open
jgeary wants to merge 2 commits intomainfrom
migration-aware-settlementv2-sdk
Open

Add support for migration and upgraded trading api#9
jgeary wants to merge 2 commits intomainfrom
migration-aware-settlementv2-sdk

Conversation

@jgeary
Copy link
Copy Markdown
Contributor

@jgeary jgeary commented Apr 2, 2026

Summary

  • add a new migration module for the public /account/migration/* endpoints
  • regenerate SDK types and endpoints from the patched public OpenAPI
  • add support for the migrated signed-order flow used by the current API
  • remove legacy order-signing behavior from the SDK instead of preserving it behind defaults
  • update account and signing behavior so the SDK matches the post-migration API/protocol model

Changes

  • add ctx.migration.getStatus(), start(), dismissOrders(), migrateFunds(), and restoreOrders()
  • add signSponsoredMigrateFunds(), signRestoreOrder(), buildRestoreOrdersBody(), and restorePendingOrders()
  • make chain config and address/domain resolution version-aware where migration signing still needs that context
  • add support for the current signed-order model, including IOC market-style order payloads
  • make migrated signing the default on both chain presets
  • remove legacy limit-order signing support
  • remove legacy market-order intent signing support
  • remove legacy cancel signing support
  • make explicit legacy order/cancel signing requests fail instead of silently working
  • keep the holdings-side migration signature flow needed for one-time fund migration
  • keep createMarket() as a high-level market-order API while mapping buy-side requests to the current signed-order model
  • treat buy-side createMarket() sizing as a pre-fee collateral budget and document that maxFee is added by the signing layer
  • update restore signing to use remainingSize semantics from migration drafts
  • update account flows to use the correct versioned holdings/settlement addresses
  • make gasless deposit explicitly unavailable, matching the current public API contract
  • remove stale market quote/oracle-quote helpers that are not part of the current public API
  • update examples to stop using removed quote helpers
  • update generator key overrides so migration endpoints come from generated OpenAPI output instead of local hand-augmentation
  • replace the local endpoint shim with direct generated endpoint exports
  • add tests for migration routes and signing helpers
  • add tests for migrated default signing behavior
  • add tests proving legacy order/cancel signing is rejected
  • update API validation and module tests to match the current public API surface

@jgeary jgeary force-pushed the migration-aware-settlementv2-sdk branch from 9f48074 to cbe464d Compare April 3, 2026 04:25
@jgeary jgeary force-pushed the migration-aware-settlementv2-sdk branch from cbe464d to e7a4af8 Compare April 3, 2026 04:57
@jgeary jgeary force-pushed the migration-aware-settlementv2-sdk branch from 0e1934e to 063568d Compare April 3, 2026 21:59
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