Skip to content

fix(stellar): restore wallet-compatible sponsored authorization - #11

Open
Utilitycoder wants to merge 3 commits into
mainfrom
feat/gasless-usdc-approval
Open

Utilitycoder wants to merge 3 commits into
mainfrom
feat/gasless-usdc-approval

Conversation

@Utilitycoder

@Utilitycoder Utilitycoder commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Fixes sponsored Stellar signing by sending the Soroban authorization preimage to the wallet, then inserting the returned signature into the relayer authorization entry. This restores the signing sequence used by the previously working integration and retains typed sponsorship intents.\n\nValidation: 22 tests passed, 3 testnet integration tests skipped; TypeScript typecheck and package build passed; npm pack dry run passed.

Summary by CodeRabbit

  • New Features

    • Added support for sponsored token approval operations, enabling gasless Lockup funding.
    • Improved wallet-based Soroban authorization signing for sponsored transactions.
    • Authorization entries are now prepared for relayer submission before transactions are sent.
  • Documentation

    • Added release notes for version 0.2.2, documenting sponsored token approvals and authorization signing.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ca4bbc2f-141c-41a2-a0b9-e74ce95b6d1b

📥 Commits

Reviewing files that changed from the base of the PR and between 0002bee and 8e15654.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • package.json
  • src/stellar/client.test.ts
  • src/stellar/client.ts
  • src/stellar/sponsorship-client.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The package adds token approval sponsorship intents, updates Soroban authorization-entry signing, strengthens signing tests with real XDR, and releases version 0.2.2 with changelog documentation.

Changes

Stellar sponsorship flow

Layer / File(s) Summary
Approval sponsorship contract
src/stellar/sponsorship-client.ts
StellarSponsorIntent now includes an approve variant with owner, token, spender, amount, and expiration ledger fields.
Authorization-entry signing flow
src/stellar/client.ts, src/stellar/client.test.ts
The client parses authorization-entry XDR, signs its preimage through authorizeEntry, and returns the signed entry as base64. Tests now construct real authorization XDR and verify the returned signature structure.
Release metadata
package.json, CHANGELOG.md
The package version changes to 0.2.2. The changelog records the sponsorship and authorization updates.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant signSponsorshipAuthorization
  participant authorizeEntry
  participant config.signAuthEntry
  signSponsorshipAuthorization->>authorizeEntry: pass authorization entry and expiration ledger
  authorizeEntry->>config.signAuthEntry: request signature for base64 preimage
  config.signAuthEntry-->>authorizeEntry: return signed authorization entry
  authorizeEntry-->>signSponsorshipAuthorization: return signed entry bytes
Loading

Merge Risk: ⚪ Minimal · up to 8e156

The new approval sponsorship intent and wallet-compatible authorization signing flow have no identified current-head defect. The change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: restoring wallet-compatible sponsored Stellar authorization. This matches the updated signing flow and the pull request objective.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gasless-usdc-approval

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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