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:


@socket-security

socket-security Bot commented Jun 24, 2026

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.13 ⏵ 1.0.0-beta.14N/AN/AN/AN/AN/A

View full report

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`.
…feature

The SDA interface (wdk-wallet#46) is merged to main but unreleased, so depend on
the git main branch to obtain it. Regenerate the .d.ts (getSdaProtocol /
SdaProtocolCtor / registerProtocol overload), which the original SDA commit
omitted, and refresh the lockfile (git dep pinned to the #46 merge commit).
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