-
Notifications
You must be signed in to change notification settings - Fork 619
Refactor Solana sign transaction API for flexible inputs #8371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reworked the Solana sign transaction API to accept more flexible input types, supporting both instructions and pre-built transactions. Updated type definitions and endpoint URL, and removed the old implementation to improve usability and consistency.
🦋 Changeset detectedLatest commit: 913a04e The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Caution Review failedThe pull request is closed. WalkthroughUpdates the Solana signing workflow: the SDK sign function now requires options and targets Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant SDK
participant EngineAPI
note over SDK,EngineAPI `#D6EAF8`: New sign flow (no broadcast)
Client->>SDK: call signSolanaTransaction(options: SignSolanaTransactionData)
SDK->>EngineAPI: POST /v1/solana/sign/transaction (body: SolanaTransactionInput + executionOptions)
EngineAPI-->>SDK: 200 SuccessResponseSignSolanaTransactionResponse (signature, signedTransaction)
SDK-->>Client: returns signed transaction + signature
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
Comment |
Merge activity
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.changeset/salty-squids-repair.md(1 hunks)packages/engine/src/client/sdk.gen.ts(1 hunks)packages/engine/src/client/types.gen.ts(7 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
.changeset/*.md: Each change inpackages/*must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API
Files:
.changeset/salty-squids-repair.md
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
packages/engine/src/client/sdk.gen.tspackages/engine/src/client/types.gen.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/engine/src/client/sdk.gen.tspackages/engine/src/client/types.gen.ts
🧠 Learnings (3)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API
Applied to files:
.changeset/salty-squids-repair.md
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Applied to files:
.changeset/salty-squids-repair.md
📚 Learning: 2025-08-28T20:50:33.170Z
Learnt from: joaquim-verges
Repo: thirdweb-dev/js PR: 7922
File: apps/playground-web/src/app/ai/ai-sdk/components/chat-container.tsx:167-181
Timestamp: 2025-08-28T20:50:33.170Z
Learning: The SignTransactionInput schema in thirdweb-dev/ai-sdk-provider uses snake_case field names (chain_id) rather than camelCase (chainId).
Applied to files:
.changeset/salty-squids-repair.md
🧬 Code graph analysis (1)
packages/engine/src/client/sdk.gen.ts (2)
packages/engine/src/client/client/types.ts (1)
Options(191-199)packages/engine/src/client/types.gen.ts (2)
SignSolanaTransactionData(1909-1923)SignSolanaTransactionResponses(1925-1930)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Unit Tests
- GitHub Check: Build Packages
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/engine/src/client/sdk.gen.ts (1)
277-302: Updated wrapper aligns with new APIRequired options and the
/v1/solana/sign/transactionpath match the regenerated types—looks good.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8371 +/- ##
=======================================
Coverage 54.61% 54.62%
=======================================
Files 919 919
Lines 60693 60693
Branches 4111 4111
=======================================
+ Hits 33147 33152 +5
+ Misses 27446 27440 -6
- Partials 100 101 +1
🚀 New features to boost your workflow:
|
size-limit report 📦
|
Reworked the Solana sign transaction API to accept more flexible input types, supporting both instructions and pre-built transactions. Updated type definitions and endpoint URL, and removed the old implementation to improve usability and consistency.
PR-Codex overview
This PR focuses on reworking the
signSolanaTransactionAPI to enhance its flexibility and improve the overall structure of Solana transaction handling within the codebase.Detailed summary
signSolanaTransactionfunction to accept more flexible inputs.signSolanaTransactionimplementation.SignSolanaTransactionRequestandSignSolanaTransactionResponsetypes.SolanaTransactionInputtype for transaction input options.Summary by CodeRabbit
Breaking Changes
New Features