Skip to content

feat: add @wraith-protocol/sdk-react hooks package#39

Open
Zarmaijemimah wants to merge 1 commit into
wraith-protocol:developfrom
Zarmaijemimah:main
Open

feat: add @wraith-protocol/sdk-react hooks package#39
Zarmaijemimah wants to merge 1 commit into
wraith-protocol:developfrom
Zarmaijemimah:main

Conversation

@Zarmaijemimah
Copy link
Copy Markdown

@Zarmaijemimah Zarmaijemimah commented May 31, 2026

Closes #20


feat: add @wraith-protocol/sdk-react hooks package

- Implement 5 production-ready React hooks for Stellar stealth addresses
- Add useStellarStealthKeys for key derivation with memoization
- Add useStellarAnnouncementScan for payment scanning with auto-polling
- Add useStellarSendStealthPayment for declarative payment sending
- Add useStellarName for name resolution with debouncing
- Add useStellarBalance for balance fetching with auto-polling
- Include comprehensive test suite with @testing-library/react
- Add example React app demonstrating all hooks
- Configure pnpm workspace for monorepo structure
- Add full documentation (README, CONTRIBUTING, CHANGELOG)
- Target bundle size  5 KB gzipped
- React 18+ Strict Mode compatible
- Reduces integration code by ~90% (600+ lines to ~50 lines)
@Zarmaijemimah
Copy link
Copy Markdown
Author

close #20

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@Zarmaijemimah Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify truthixify changed the base branch from main to develop June 1, 2026 15:34
@truthixify
Copy link
Copy Markdown
Contributor

The packages/sdk-react/ package itself is what we want: all 5 hooks (useStellarStealthKeys, useStellarAnnouncementScan, useStellarSendStealthPayment, useStellarName, useStellarBalance), tests per hook, proper tsup + vitest + pnpm-workspace wiring.

GitHub flags this as mergeable, but the actual diff is touching src/chains/stellar/* in ways that revert the JSDoc additions from #14 (net 600+ line deletions across scalar.ts, scan.ts, spend.ts, stealth.ts, etc). The hooks package itself is net-new and would land cleanly on its own; the stellar/* changes shouldn't be in this PR.

Could you rebase and drop those?

git fetch origin
git rebase origin/develop
# in the rebase, drop any of your changes to src/chains/stellar/* and test/chains/stellar/*
# keep only packages/sdk-react/* and the pnpm-workspace.yaml edit
git push --force-with-lease

Once the diff is just the new package, this is ready. Thanks @Zarmaijemimah.

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.

@wraith-protocol/sdk-react companion package with hooks

2 participants