Skip to content

Conversation

d4mr
Copy link
Member

@d4mr d4mr commented Oct 11, 2025

PR-Codex overview

This PR focuses on adding support for Solana endpoints in the thirdweb-dev/engine package, enhancing the SDK with new functionalities related to Solana accounts, transactions, and activity logs.

Detailed summary

  • Introduced new types for Solana account and transaction data.
  • Added functions for creating and listing Solana accounts.
  • Implemented transaction handling functions: sendSolanaTransaction, signSolanaTransaction.
  • Added search functionalities for Solana transactions and activity logs.
  • Updated existing types to accommodate Solana-specific data structures.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features
    • Added Solana support across the engine: send transactions, sign messages/transactions, create and list accounts.
    • Introduced transaction and activity log retrieval with search and filtering for Solana.
    • Enhanced Solana-specific options like commitment levels and priority fees.
  • Chores
    • Added a changeset for a minor version release referencing the new Solana endpoints.

Copy link

changeset-bot bot commented Oct 11, 2025

🦋 Changeset detected

Latest commit: 85c5a38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@thirdweb-dev/engine Minor
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch
wagmi-inapp Patch

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

Copy link
Contributor

graphite-app bot commented Oct 11, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link

vercel bot commented Oct 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Oct 11, 2025 11:49am
nebula Ready Ready Preview Comment Oct 11, 2025 11:49am
thirdweb_playground Error Error Oct 11, 2025 11:49am
thirdweb-www Ready Ready Preview Comment Oct 11, 2025 11:49am
wallet-ui Ready Ready Preview Comment Oct 11, 2025 11:49am

Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Walkthrough

Adds Solana support to the Engine client: new SDK functions, request/response types, and filters for Solana accounts, signing, transactions, and activity logs. Introduces corresponding Solana REST endpoints in the generated client. Includes a changeset declaring a minor version bump with note "Add Solana endpoints."

Changes

Cohort / File(s) Summary
Release metadata
\.changeset/small-mails-joke.md
New changeset indicating a minor bump for @thirdweb-dev/engine with note to add Solana endpoints.
SDK client: Solana endpoints
packages/engine/src/client/sdk.gen.ts
Adds exported types and functions for Solana: send transaction, list/create accounts, sign message/transaction, get/search transactions, get/search activity logs. Registers corresponding REST routes under /v1/solana/*.
Types: Solana models and filters
packages/engine/src/client/types.gen.ts
Introduces Solana-specific request/response models, execution options, RPC error structures, priority fee types, commitment levels, filters, and activity log types used by the new SDK APIs.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor App
  participant SDK as Engine SDK Client
  participant API as Engine HTTP API
  participant RPC as Solana RPC

  rect rgb(237,245,255)
    note over App,SDK: Send Solana transaction
    App->>SDK: sendSolanaTransaction(data)
    SDK->>API: POST /v1/solana/transaction
    API->>RPC: submit transaction
    RPC-->>API: signature/result
    API-->>SDK: Queued/Success response
    SDK-->>App: SendSolanaTransactionResponses
  end

  rect rgb(242,255,245)
    note over App,SDK: Account ops
    App->>SDK: listSolanaAccounts()
    SDK->>API: GET /v1/solana/accounts
    API-->>SDK: ListSolanaAccountsResponse
    SDK-->>App: Accounts
    App->>SDK: createSolanaAccount(opts)
    SDK->>API: POST /v1/solana/accounts
    API-->>SDK: CreateSolanaAccountResponse
    SDK-->>App: Account
  end

  rect rgb(255,248,237)
    note over App,SDK: Sign message/transaction
    App->>SDK: signSolanaMessage(payload)
    SDK->>API: POST /v1/solana/sign-message
    API-->>SDK: Signature
    SDK-->>App: SignSolanaMessageResponses
    App->>SDK: signSolanaTransaction(tx)
    SDK->>API: POST /v1/solana/sign-transaction
    API-->>SDK: Signed tx
    SDK-->>App: SignSolanaTransactionResponses
  end

  rect rgb(250,243,255)
    note over App,SDK: Query transactions and activity logs
    App->>SDK: getSolanaTransactions(params)
    SDK->>API: GET /v1/solana/transactions
    API-->>SDK: Transactions
    SDK-->>App: GetSolanaTransactionsResponses
    App->>SDK: searchSolanaActivityLogs(filters)
    SDK->>API: POST /v1/solana/transactions/activity-logs/search
    API-->>SDK: Activity logs
    SDK-->>App: SearchSolanaActivityLogsResponses
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description does not follow the repository’s required template, as it lacks the formatted title header, Linear issue tag, “Notes for the reviewer” section, and “How to test” instructions; instead it only contains a PR-Codex overview block. Please update the description to match the provided template by adding a properly formatted title line, an issue tag if available, a “Notes for the reviewer” section to highlight important details, and a “How to test” section with clear testing instructions.
Title Check ❓ Inconclusive The title “Engine SDK updates” is overly broad and does not convey the key change of adding Solana endpoints, making it difficult to understand the main update at a glance. It uses a generic term “updates” without specifying what was updated, which qualifies as a vague description under the template guidelines. Please revise the title to clearly and concisely summarize the main change, for example “[SDK] Feature: Add Solana endpoints to Engine SDK,” aligning with the repository’s title format and highlighting the primary enhancement.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pb/engine-sdk

📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 869bbcf and 85c5a38.

📒 Files selected for processing (3)
  • .changeset/small-mails-joke.md (1 hunks)
  • packages/engine/src/client/sdk.gen.ts (5 hunks)
  • packages/engine/src/client/types.gen.ts (14 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

.changeset/*.md: Each change in packages/* must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API

Files:

  • .changeset/small-mails-joke.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 @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless 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 @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless 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/types.gen.ts
  • packages/engine/src/client/sdk.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/types.gen.ts
  • packages/engine/src/client/sdk.gen.ts
🧬 Code graph analysis (1)
packages/engine/src/client/sdk.gen.ts (1)
packages/engine/src/client/types.gen.ts (18)
  • SendSolanaTransactionData (1824-1838)
  • SendSolanaTransactionResponses (1840-1845)
  • ListSolanaAccountsData (1950-1964)
  • ListSolanaAccountsResponses (1966-1988)
  • CreateSolanaAccountData (1993-2006)
  • CreateSolanaAccountResponses (2008-2037)
  • SignSolanaMessageData (2042-2060)
  • SignSolanaMessageResponses (2062-2074)
  • SignSolanaTransactionData (2079-2099)
  • SignSolanaTransactionResponses (2101-2117)
  • GetSolanaTransactionsData (2491-2506)
  • GetSolanaTransactionsResponses (2508-2560)
  • SearchSolanaTransactionsData (2565-2579)
  • SearchSolanaTransactionsResponses (2581-2633)
  • GetSolanaActivityLogsData (2638-2652)
  • GetSolanaActivityLogsResponses (2665-2698)
  • SearchSolanaActivityLogsData (2703-2719)
  • SearchSolanaActivityLogsResponses (2728-2757)
⏰ 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: Build Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
.changeset/small-mails-joke.md (1)

1-5: LGTM! Changeset correctly declares minor version bump.

The minor version bump is appropriate for adding new Solana endpoints to the public API, as per the coding guidelines.

packages/engine/src/client/types.gen.ts (1)

1-2761: LGTM! Auto-generated Solana types are consistent with existing patterns.

The generated Solana types follow the same structure as the existing EVM types, with appropriate integration into error unions and response types. The additions include:

  • Filter types for Solana transactions
  • Execution options for Solana chains
  • Account and transaction management types
  • Activity log types specific to Solana
  • Error handling types with Solana RPC error kinds

All types are appropriately integrated into the existing type system.

packages/engine/src/client/sdk.gen.ts (1)

14-58: LGTM! Auto-generated Solana SDK functions are consistent and complete.

The generated Solana SDK functions follow the established patterns:

  • Proper import of all necessary types from types.gen.ts
  • Consistent function signatures with ThrowOnError generic
  • Correct HTTP methods (GET for retrieval, POST for mutations)
  • Appropriate security configuration with x-secret-key
  • Proper Content-Type headers for POST requests
  • Consistent use of client options pattern

The nine new functions cover the complete Solana surface:

  • Transaction management (send, get, search)
  • Account management (list, create)
  • Signing operations (message, transaction)
  • Activity logs (get, search)

All functions integrate seamlessly with the existing SDK architecture.

Also applies to: 250-275, 350-452, 610-708


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

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.51 KB (0%) 1.3 s (0%) 411 ms (+133.61% 🔺) 1.8 s
thirdweb (cjs) 366.04 KB (0%) 7.4 s (0%) 1.7 s (+13.46% 🔺) 9 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 201 ms (+2942.73% 🔺) 316 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 132 ms (+3423.53% 🔺) 143 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 146 ms (+1379.64% 🔺) 528 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants