Skip to content

feat: add SDA protocol support (getSdaProtocol)#73

Draft
AlonzoRicardo wants to merge 2 commits into
mainfrom
feat/sda-protocol
Draft

feat: add SDA protocol support (getSdaProtocol)#73
AlonzoRicardo wants to merge 2 commits into
mainfrom
feat/sda-protocol

Conversation

@AlonzoRicardo

@AlonzoRicardo AlonzoRicardo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Wires the new SdaProtocol category into the WDK so SDA providers can be registered and retrieved alongside swap / bridge / lending / fiat / swidge. Part 2 of 3.

⚠️ Stacked PR — merge after tetherto/wdk-wallet#46. The published @tetherto/wdk-wallet does not yet export SdaProtocol, so CI temporarily pins the dependency to the feat/sda-protocol branch (commit "chore: temporarily depend on wdk-wallet feat/sda-protocol for CI"). Before merge: revert that to a published @tetherto/wdk-wallet version that includes SdaProtocol, once #46 is merged and released.

What's in it

  • getSdaProtocol(label) on IWalletAccountWithProtocols, and typeof SdaProtocol added to the registerProtocol template union.
  • wdk.js: an sda bucket in both protocol registries, the instanceof SdaProtocol dispatch branch in registerProtocol, and the per-account account.getSdaProtocol getter.
  • getSdaProtocol → 'sda' mapping in the policy account proxy.

Mirrors the existing swidge wiring exactly.

Validation

A reference provider registered via wdk.registerProtocol(..., RhinoProtocol, ...) is retrievable via account.getSdaProtocol(label) and executes through the policy proxy; cross-package instanceof SdaProtocol identity holds. Verified end-to-end against three providers (Rhino, Orchestra/Flashnet, Relay).

Notes

  • Depends on the SdaProtocol interface in tetherto/wdk-wallet (imports SdaProtocol / ISdaProtocol from @tetherto/wdk-wallet/protocols).
  • Source-only; generated .d.ts via npm run build:types.
  • Draft pending the wdk-wallet interface PR and the P002 spec.

Related PRs

This is one of a 3-PR set:


Wire the new `SdaProtocol` category into the WDK so SDA providers can be
registered and retrieved alongside swap/bridge/lending/fiat/swidge.

- `getSdaProtocol(label)` on `IWalletAccountWithProtocols`.
- `registerProtocol` dispatch and per-account getter in `wdk.js`
  (an `sda` bucket in both protocol registries, plus the
  `instanceof SdaProtocol` branch).
- `getSdaProtocol` -> `sda` mapping in the policy account proxy.

Part 2 of 3. Depends on the `SdaProtocol` interface in
tetherto/wdk-wallet.

Generated `.d.ts` are produced by `npm run build:types`.
The published @tetherto/wdk-wallet does not yet export SdaProtocol, so CI
cannot resolve the import and the test suites fail to load. Point the
dependency at the wdk-wallet feat/sda-protocol branch so CI is green and
the wiring is reviewable.

REVERT BEFORE MERGE: bump @tetherto/wdk-wallet back to a published version
that includes SdaProtocol once tetherto/wdk-wallet#46 is merged and released.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​tetherto/​wdk-wallet@​1.0.0-beta.10 ⏵ 1.0.0-beta.1100000

View full report

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