Skip to content

client: Export all types used by the public API - #4211

Merged
jamie-osec merged 11 commits into
otter-sec:masterfrom
acheroncrypto:client-export-all-types-used-by-the-public-api
Mar 2, 2026
Merged

client: Export all types used by the public API#4211
jamie-osec merged 11 commits into
otter-sec:masterfrom
acheroncrypto:client-export-all-types-used-by-the-public-api

Conversation

@acheroncrypto

Copy link
Copy Markdown
Collaborator

Problem

#4031 removed the solana-sdk export without adding the types that are used by the public API. This practically made the client unusable without adding additional dependencies. Users also don't get any autocomplete for the missing dependencies and need to figure them out themselves.

Summary of changes

  • Export the following types that are used by the public API:

    • solana_commitment_config::CommitmentConfig
    • solana_instruction::Instruction
    • solana_program::hash::Hash
    • solana_pubsub_client::nonblocking::pubsub_client::PubsubClientError
    • solana_rpc_client_api::client_error::Error as SolanaClientError
    • solana_rpc_client_api::config::RpcSendTransactionConfig
    • solana_rpc_client_api::filter::RpcFilterType
    • solana_signer::Signer
    • solana_signer::SignerError
    • solana_transaction::Transaction
  • Remove the redundant dependencies in client/example

@vercel

vercel Bot commented Jan 30, 2026

Copy link
Copy Markdown

@acheroncrypto is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@jamie-osec

Copy link
Copy Markdown
Collaborator

@acheroncrypto I think this PR solves the issue in a cleaner way than mine; can you rebase on master and see if CI passes?

@acheroncrypto

Copy link
Copy Markdown
Collaborator Author

Failures were unrelated but updated.

@jamie-osec

Copy link
Copy Markdown
Collaborator

Would you mind modifying the doctest to be accurate to the new API?

Comment thread client/src/lib.rs
@@ -9,15 +9,10 @@
//! ```ignore

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have this be no_run to avoid any more drift in docs vs real API, but that requires some awkward work (see my PR) and as long as we don't make any other breaking changes to the API it should be fine.

@jamie-osec
jamie-osec merged commit a3d173c into otter-sec:master Mar 2, 2026
112 of 114 checks passed
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
@jamie-osec jamie-osec added this to the v1.0.0 milestone Jun 23, 2026
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Jul 25, 2026
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.

3 participants