Skip to content

feat(sdk-core): add dynamic reserve swap protocol clients#54

Draft
joshglogau wants to merge 4 commits into
refactor/sysio-contract-proxyfrom
feature/reserve-swap-sdk
Draft

feat(sdk-core): add dynamic reserve swap protocol clients#54
joshglogau wants to merge 4 commits into
refactor/sysio-contract-proxyfrom
feature/reserve-swap-sdk

Conversation

@joshglogau

Copy link
Copy Markdown
Contributor

Summary

  • Aligns the typed sysio.chains discovery client with the shared sysio contract proxy.
  • Adds a normalized sysio.tokens client for token metadata, chain deployments, and active asset discovery.
  • Adds a sysio.uwrit client for configuration, queues, underwriting requests, and WIRE-origin swap submission.
  • Exposes the canonical WIRE route sentinel and typed lifecycle records for downstream integrations.
  • Documents the reserve-swap integration boundaries and public SDK surface.

Why

The next Hub swap flow must derive assets, routes, quotes, and settlement state from deployed system contracts instead of hardcoded pool catalogs. These domain facades keep ABI preparation, protocol typing, and normalization in SDK Core while allowing applications to own their product UX.

Integration model

  • sysio.tokens and sysio.reserv build the active route graph and quotes.
  • External-chain escrow transactions remain in the appropriate chain SDK.
  • WIRE-origin requests and underwriting lifecycle reads use sysio.uwrit.
  • The WIRE endpoint is represented by the protocol's WIRE/WIRE/PRIMARY sentinel.

Validation

  • SDK Core TypeScript compilation passed.
  • 11 focused Jest tests passed across chains, tokens, and underwriting.
  • Focused ESLint checks passed.

Dependency note

This PR is intentionally stacked on refactor/sysio-contract-proxy so the new clients use the shared proxy implementation. Retarget it to master after the proxy PR lands.

Expose a typed sysio.tokens domain facade over the generated system-contract proxy. Normalize canonical token metadata and chain bindings, support active and chain-scoped discovery, join deployable assets, and cover registry reads with focused unit tests.
Add a typed sysio.uwrit facade for WIRE-origin swap submission, queue inspection, normalized request history, and live protocol configuration. Export the canonical WIRE/WIRE/PRIMARY sentinel, document reserve-swap composition, and verify action authorization and lifecycle normalization in unit tests.
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