Skip to content

v0.40.0

Latest

Choose a tag to compare

@michaelhly michaelhly released this 27 Jun 15:04

Added

  • Add AsyncClient.send_rpc_request(...) for custom JSON-RPC methods backed by Pydantic request serializers, result models, and an optional custom JSON-RPC error parser hook.
  • Add transaction_details, rewards, and commitment parameters to AsyncClient.get_block (#684).
  • Add an exclude_non_circulating_accounts_list parameter to AsyncClient.get_supply (#684).

Removed

  • BREAKING: Remove deprecated Client (sync RPC client) — use solana.rpc.async_api.AsyncClient instead.
  • BREAKING: Remove deprecated Token (sync SPL Token client) and AsyncToken (async SPL Token client) — use AsyncClient with spl.token.instructions directly instead.
  • BREAKING: Remove deprecated _TokenCore, AccountInfo, and MintInfo from spl.token.core — use spl.token.models instead.
  • BREAKING: Remove sync HTTP provider (solana.rpc.providers.http.HTTPProvider) and sync base provider (solana.rpc.providers.base.BaseProvider) — use solana.rpc.providers.async_http.AsyncHTTPProvider instead.
  • BREAKING: Remove deprecated NamedTuple compatibility types from solana.rpc.types, solana.vote_program, spl.memo.instructions, and spl.token.instructions. Use model types from solana.rpc.models, solana.models, spl.memo.models, and spl.token.models.
  • BREAKING: Remove PydanticModel.from_namedtuple and all API boundary coercion paths. RPC and instruction helpers now accept only the Pydantic model params/options types.
  • Remove HTTP batch request plumbing from the HTTP provider path; use individual async requests and compose concurrency with asyncio.gather when needed.
  • Remove integration test test_http_client.py and unit test test_client.py.
  • Remove obsolete documentation pages (docs/rpc/api.md, docs/spl/token/client.md, docs/spl/token/async_client.md, docs/spl/token/core.md).
  • Remove obsolete docs/rpc/types.md.
  • Update random_funded_keypair fixture to be async.

Changed

  • Simplify AsyncClient RPC plumbing by removing unnecessary internal abstractions while preserving the existing solders request/response path for built-in RPC methods.
  • Rewrite test_spl_token.py to use AsyncClient with spl.token.instructions directly instead of the removed Token/AsyncToken classes.
  • Rewrite test_spl_memo.py to use AsyncClient with spl.memo.instructions directly instead of the removed Client class.
  • Update README.md code examples to use AsyncClient.
  • Update mkdocs.yml navigation to remove deleted doc pages.
  • Update docs/cookbook/token-operations/get-token-mint.md to import from spl.token.models instead of spl.token.core.

Docs

  • Add a Client to AsyncClient migration guide and fix local docs serving (#683).

Full Changelog: https://github.com/michaelhly/solana-py/blob/master/CHANGELOG.md


Thanks to @kingsznhone for driving the bulk of this release.