feat: add SDA protocol support (getSdaProtocol)#73
Draft
AlonzoRicardo wants to merge 2 commits into
Draft
Conversation
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`.
This was referenced Jun 24, 2026
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.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires the new
SdaProtocolcategory into the WDK so SDA providers can be registered and retrieved alongside swap / bridge / lending / fiat / swidge. Part 2 of 3.What's in it
getSdaProtocol(label)onIWalletAccountWithProtocols, andtypeof SdaProtocoladded to theregisterProtocoltemplate union.wdk.js: ansdabucket in both protocol registries, theinstanceof SdaProtocoldispatch branch inregisterProtocol, and the per-accountaccount.getSdaProtocolgetter.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 viaaccount.getSdaProtocol(label)and executes through the policy proxy; cross-packageinstanceof SdaProtocolidentity holds. Verified end-to-end against three providers (Rhino, Orchestra/Flashnet, Relay).Notes
SdaProtocolinterface in tetherto/wdk-wallet (importsSdaProtocol/ISdaProtocolfrom@tetherto/wdk-wallet/protocols)..d.tsvianpm run build:types.Related PRs
This is one of a 3-PR set:
SdaProtocolinterface: feat(protocols): add SDA (Smart Deposit Address) protocol interface wdk-wallet#46getSdaProtocolsupport (this PR)sdamodule type + template: feat: add sda module type and template create-wdk-module#14