feat(sdk): add Svelte adapter with writable store and SvelteKit example - #191
feat(sdk): add Svelte adapter with writable store and SvelteKit example#191Muhammadcodes112 wants to merge 5 commits into
Conversation
|
Someone is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Muhammadcodes112 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! 🚀 |
Miracle656
left a comment
There was a problem hiding this comment.
Strong work on the architectural refactor — extracting InvisibleWalletCore so framework-specific adapters can share the logic is the right pattern. Two blockers before merge:
1. Compiled output is committed (must remove)
The diff includes 12 generated files under sdk/svelte/dist/:
sdk/svelte/dist/src/InvisibleWalletCore.{d.ts,js}
sdk/svelte/dist/src/__tests__/useInvisibleWallet.test.{d.ts,js}
sdk/svelte/dist/src/index.{d.ts,js}
sdk/svelte/dist/src/useInvisibleWallet.{d.ts,js}
sdk/svelte/dist/src/utils.{d.ts,js}
sdk/svelte/dist/svelte/src/index.{d.ts,js}
These are TypeScript build artifacts and should never be in the repo.
Fix:
git rm -r --cached sdk/svelte/dist
echo "dist/" >> sdk/svelte/.gitignore
git add sdk/svelte/.gitignore
git commit -m "chore(sdk/svelte): gitignore dist build output"2. Verify the React hook still works
The refactor moves ~1000 lines from useInvisibleWallet.ts into a new InvisibleWalletCore class. The React hook is in production at https://veil-ezry.vercel.app — any regression breaks the live wallet.
Please confirm by running:
cd sdk
npm install
npm test # must pass — exercises the hook end-to-end with mocked SDK…and paste the green output in a PR comment.
Once both are addressed I'll merge straight away. The Svelte adapter itself looks great.
Alright I'll do so right away |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 33210559 | Triggered | Generic Password | 03f3904 | examples/nextjs/src/lib/network.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
Changes implemented sir, Pls Review |
|
Following up: the recent activity here is merges from |
|
Friendly nudge — same note as the Vue adapter: #315 landed the React adapter using a shared If you're still up for it, please rebase on the latest |
- Add send method to InvisibleWalletCore for shared transfer logic - Refactor Svelte adapter to delegate to core.send() instead of duplicating signing logic - Export InvisibleWalletCore from main SDK entry point - Update README documentation to reflect Svelte adapter architecture Addresses review feedback to consume shared core instead of duplicating signing logic.
I'm really sorry maintainer |
|
I have made the changes sir |
Miracle656
left a comment
There was a problem hiding this comment.
Thanks for the follow-up push — the sdk/svelte/dist/ build artifacts are gone and the InvisibleWalletCore refactor now reads cleanly. All GitHub Actions checks are green.
One blocker left: this branch no longer merges into main.
CONFLICT (content): Merge conflict in README.md
CONFLICT (content): Merge conflict in sdk/src/index.ts
CONFLICT (content): Merge conflict in sdk/src/useInvisibleWallet.ts
main has moved on since the two Merge branch 'main' commits on this branch. Please rebase instead of merging, so the history stays linear and the conflicts get resolved once:
git remote add upstream https://github.com/Miracle656/veil.git # if not already
git fetch upstream main
git rebase upstream/main
# resolve README.md, sdk/src/index.ts, sdk/src/useInvisibleWallet.ts
git push --force-with-leaseWhen resolving sdk/src/index.ts and sdk/src/useInvisibleWallet.ts, keep the exports that are on main and add your new InvisibleWalletCore export — don't drop either side.
After the rebase, please also confirm the React hook is unregressed (this is what's live at https://veil-ezry.vercel.app):
cd sdk && npm install && npm testTwo notes that are not blockers, just FYI:
- The three
Vercel – …check failures say "Authorization required to deploy" — that's a fork-permission thing on our side, not your code. - GitGuardian is red; I looked through the diff and found no real credentials (only
feePayerSecretvariable names in the SvelteKit example), so I'm treating it as a false positive.
Ping me once the rebase is pushed and I'll merge.
Alright mate |
|
Thanks for the work here. Closing this one in favour of your own newer PR #555, which targets the same issue (#174) with a much cleaner diff. Reasons this branch can't be merged as-is: 1. Merge conflicts — the branch is 2. Out-of-scope damage to the root
3. GitGuardian: 4. Large unrelated refactor — moving 855 lines out of 5. Committed lockfiles — #555 avoids all of 1, 2, 4 and 5: its README change is purely additive (+22/-0), it adds no lockfiles, and it's |
Summary
Type of change
Component
Checklist
cargo testpasses (contracts)npm run typecheckpasses (wallet / sdk / agent)npm run buildpasses (wallet / agent)Closes #174