Skip to content

Releases: StellarCN/py-stellar-base

15.0.0-beta0

17 Jun 07:33
b2785d0

Choose a tag to compare

15.0.0-beta0 Pre-release
Pre-release

Update

  • Add CAP-71 (Protocol 27) Soroban authorization support across the high-level API. (#1189)
    • New credential types (from the Protocol 27 XDR):
      • SOROBAN_CREDENTIALS_ADDRESS_V2 (CAP-71-02) — same fields as the legacy SOROBAN_CREDENTIALS_ADDRESS, but the signed payload is bound to the signer's address.
      • SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES (CAP-71-01) — delegated / multi-party signing via a (possibly nested) tree of delegate signatures.
    • stellar_sdk.auth.authorize_entry (and stellar_sdk.auth.build_authorization_preimage):
      • Sign all three address-based credential types, selecting the signature payload from the credential type: legacy ADDRESS keeps the non-address-bound preimage; ADDRESS_V2 and ADDRESS_WITH_DELEGATES use the address-bound ENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESS preimage. authorize_entry previously returned entries with non-ADDRESS credentials unchanged, without signing them.
      • authorize_entry gains a keyword-only for_address parameter that writes the signature into a specific (possibly nested) delegate node. All signers of one delegated entry sign the same payload, bound to the top-level address, and must use the same valid_until_ledger_sequence.
    • stellar_sdk.auth.authorize_invocation:
      • Still builds legacy ADDRESS entries by default, so its output stays valid on every network regardless of Protocol 27 activation.
      • Gains a keyword-only credentials_type parameter to opt in to ADDRESS_V2. The default will flip to V2 once Protocol 28 makes it mandatory.
    • New stellar_sdk.auth.build_with_delegates_entry / stellar_sdk.auth.DelegateSignature wrap an ADDRESS/ADDRESS_V2 entry together with delegate signers (CAP-71-01), sorting each delegates level by address and rejecting duplicates, as the protocol requires.
    • AssembledTransaction: sign_auth_entries and needs_non_invoker_signing_by (and the async variants) handle all address-based credential types; V2 entries previously crashed with AssertionError.
    • SEP-45 (stellar_sdk.sep.stellar_soroban_web_authentication): challenge parsing and building accept ADDRESS_V2 entries in addition to the legacy type; delegated entries are rejected.
  • chore: upgrade generated XDR definitions to Protocol 27. (#1186)

14.1.0

03 Jun 02:15
9dd5384

Choose a tag to compare

Update

  • Add SEP-46 contract metadata, SEP-47 contract interface discovery, and SEP-48 contract interface specification introspection APIs for Soroban contract Wasm, including ContractMeta, ContractSpec, ContractInfo, and SorobanServer[Async].get_contract_* helpers.
  • Add an Agent Skills compatible stellar-sdk skill with Claude Code plugin marketplace metadata and topic references for transactions, Horizon, Soroban, XDR/SCVal, async workflows, SEP integrations, security, and troubleshooting.

14.0.0

03 May 08:24
bef0398

Choose a tag to compare

Breaking changes

  • Redesign stellar_sdk.auth so any account contract (default Stellar Account, BLS, WebAuthn, threshold, etc.) can authorize Soroban entries. (#1160)
    • stellar_sdk.auth.authorize_entry(entry, signer, valid_until_ledger_sequence, network_passphrase): the signer callable is now Callable[[HashIDPreimage], SCVal] (alias stellar_sdk.auth.AuthorizationSigner) and returns the signature SCVal accepted by the account contract. It was previously Callable[[HashIDPreimage], tuple[str, bytes]] returning (public_key, signature). Passing a Keypair continues to produce the default Stellar Account signature shape.
    • stellar_sdk.auth.authorize_invocation(signer, address, valid_until_ledger_sequence, invocation, network_passphrase): the second positional parameter was renamed from public_key to address. It accepts only classic account (G...) or contract (C...) addresses, including matching Address instances. It remains optional when signer is a Keypair.
    • AssembledTransaction.sign_auth_entries(auth_entries_signer, address=None, valid_until_ledger_sequence=None) and AssembledTransactionAsync.sign_auth_entries(...): auth_entries_signer now also accepts an AuthorizationSigner callable. The new address parameter selects which G... or C... entries to sign, is required for non-Keypair signers, and is inferred from the keypair otherwise. The parameter order is now (signer, address, valid_until_ledger_sequence).
    • AssembledTransaction.sign() and AssembledTransactionAsync.sign() now refuse to sign the transaction envelope while any non-invoker authorization entry is still unsigned, including C... contract account entries.
    • New public helpers: AuthorizationSigner, authorization_payload_hash(preimage), and build_authorization_preimage(entry, valid_until_ledger_sequence, network_passphrase).
  • Add max_content_size to BaseSyncClient.get() and BaseAsyncClient.get() to prevent memory exhaustion from oversized responses. Custom client implementations must update their get() signature to include max_content_size: int | None = None. fetch_stellar_toml, fetch_stellar_toml_async, and federation resolve functions now enforce response size limits. (#1131)
  • Remove deprecated StrKey.encode_muxed_account and StrKey.decode_muxed_account; use stellar_sdk.MuxedAccount instead. (#1135)
  • Remove TransactionBuilder.append_create_stellar_asset_contract_from_address_op; use TransactionBuilder.append_create_contract_op instead. (#1127)
  • Drop support for PyPy 3.10. (#1159)

Update

  • Upgrade generated Stellar XDR definitions to Protocol 26 through stellar-xdr v26.0. (#1149)
  • Improve the stellar_sdk.contract.AssembledTransaction authorization lifecycle for contract account authorization. (#1162)
    • Add AssembledTransaction.authorize(...) and AssembledTransactionAsync.authorize(...) as clearer aliases for signing Soroban authorization entries. They support valid_for_ledger_count for relative authorization expiration.
    • Add AssembledTransaction.prepare() and AssembledTransactionAsync.prepare() to re-simulate and prepare the current built transaction after authorization entries have changed.
    • sign_and_submit() now automatically prepares when a C... contract account authorization was signed, while ordinary G... account authorizations keep the existing single-simulation flow.
    • Raise NeedsPreparationError when exporting XDR, reading the result, checking read-call status, or signing the transaction envelope before required preparation has happened.
  • Expose addl_resources (ResourceLeeway) and auth_mode (AuthMode) parameters on AssembledTransaction, AssembledTransactionAsync, ContractClient.invoke, and ContractClientAsync.invoke. They are forwarded to the assembled transaction's internal simulation calls, including simulate(), prepare(), and post-restore re-simulation. The inner RestoreFootprint transaction created by automatic state restoration intentionally does not receive them. (#1164)
  • Add close_time, header_xdr, and metadata_xdr to GetLatestLedgerResponse. (#1136)
  • Add SEP-0051 XDR-JSON support to the XDR generator. (#1134)
  • Sort SCMap entries by key in scval.to_map following Soroban runtime ordering. (#1141)

Fixes

  • Correct equality checks for SignedPayloadSigner and SignerKey. (#1153)
  • Harden XDR parsing and generation:
    • validate Opaque and String max sizes on unpack.
    • add remaining-input-length checks for variable-length arrays.
    • raise on unmatched union discriminants in pack().
    • raise on unknown union discriminants in unpack().
    • check for trailing data in from_xdr_bytes().
    • add length validation for opaque/string typedef and struct constructors.
    • fix CIRCLE_IMPORT_UNION lazy import tracking.
    • add decoding depth limit (DEFAULT_XDR_MAX_DEPTH = 512) to prevent stack overflow from deeply nested XDR.

Maintenance

  • Migrate the Python XDR generator from xdrgen into this SDK. (#1113)
  • Regenerate XDR classes using the latest generator. (#1137)
  • Add XDR-JSON tests and a script to compare Python XDR-JSON output against the Rust Stellar CLI. (#1139, #1140)
  • Add SBOM submission workflow for PG Atlas. (#1143)
  • Update dependencies and test tooling, including Python 3.14 updates.

13.2.1

21 Jan 00:08
445865f

Choose a tag to compare

Update:

  • fix: get_transactions and get_ledgers with cursor raises AttributeError for missing end_ledger. (#1105)

13.2.0

06 Jan 03:22
cdfd411

Choose a tag to compare

Update:

  • feat: add SEP-45 (Stellar Web Authentication for Contract Accounts) support. Check stellar_sdk.sep.stellar_soroban_web_authentication for more details.
  • fix: remove diagnostic_events_xdr from stellar_sdk.soroban_rpc.Events, use stellar_sdk.soroban_rpc.GetTransactionResponse.diagnostic_events_xdr and stellar_sdk.soroban_rpc.Transaction.diagnostic_events_xdr instead. (#1086)
  • chore: drop support for Python 3.9.
  • chore: update outdated documentation.

13.1.0

25 Sep 07:18
21ff41d

Choose a tag to compare

Update:

  • feat: getEvents RPC method - expose endLedger param. (#1081)

13.0.0

14 Aug 23:44
64129e9

Choose a tag to compare

This release adds support for Protocol 23.

This release contains the exact same content as 13.0.0-beta1. Below is the changelog since 12.3.0.

Update:

  • feat: add liquidity pool and claimable balance support to StrKey. (#1060)
  • feat: add med25519 public keys to StrKey. (#1061)
  • feat: add muxed account, liquidity pool and claimable balance support to Address. (#1062)
  • feat: implement message signing and verification according to SEP-53, check Keypair.sign_message and Keypair.verify_message for more details. (#1067)
  • feat: add a poll_transaction function to Soroban RPC client. (#1038)
  • refactor: use tomllib instead of toml library in Python 3.11 and above. (#1047)
  • refactor: optimize the user experience of call_builder.stream. (#1050)
  • fix: add error handling for incomplete federation responses. (#1051)
  • feat: add support for non-root authorization in SorobanServer[Async].simulate_transaction. (#1069)
  • feat: update transaction meta handling to support v4 in protocol 23. (#1074)
  • fix: correct comparison for Uint32 in xdr.AuthenticatedMessage. (#1076)

Breaking changes

  • chore!: upgrade generated XDR definitions to Protocol 23. (#1057)
  • chore!: drop support for Python 3.8. (#1065)
  • refactor!: rename read_bytes to disk_read_bytes in SorobanDataBuilder and related methods. (#1058)
    • In SorobanDataBuilder, all occurrences of read_bytes have been replaced with disk_read_bytes. This includes method names, variable names, etc.
    • TransactionBuilder.append_payment_to_contract_op now uses disk_read_bytes instead of read_bytes in its function signature.
    • TransactionBuilder.append_restore_asset_balance_entry_op now uses disk_read_bytes instead of read_bytes in its function signature.
  • refactor!: StrKey.decode_muxed_account and StrKey.encode_muxed_account have been marked as deprecated, please use stellar_sdk.MuxedAccount instead. They will be removed in the next major release. (#1061)
  • refactor!: when an invalid account ID is passed into the MuxedAccount.from_account, it raises a ValueError now. (#1063)
  • feat!: adapt to the changes in the Stellar Soroban RPC v23 getEvents interface. (#1070)
    • drop paging_token from EventInfo, use cursor in GetEventsResponse instead.
    • in_successful_contract_call in EventInfo has been marked as deprecated now.
    • add operation_index and transaction_index to EventInfo.
    • add oldest_ledger, latest_ledger_close_time and oldest_ledger_close_time to GetEventsResponse.
  • feat!: adapt to the changes in the Stellar RPC Soroban v23 getTransaction and getTransactions interface. (#1068)
    • diagnosticEvents in GetTransactionsResponse.transactions has been marked as deprecated now, use GetTransactionsResponse.transactions[{id}].events instead.

Full Changelog: 12.3.0...13.0.0

13.0.0-beta1

09 Aug 06:40
054bf7f

Choose a tag to compare

13.0.0-beta1 Pre-release
Pre-release

Update:

  • feat: update transaction meta handling to support v4 in protocol 23. (#1074)
  • fix: correct comparison for Uint32 in xdr.AuthenticatedMessage. (#1076)
  • fix: fix muxed account handling in Address class. (#1077)

Full Changelog: 13.0.0-beta0...13.0.0-beta1

13.0.0-beta0

08 Jul 09:27
0734d9b

Choose a tag to compare

13.0.0-beta0 Pre-release
Pre-release

This release adds support for Protocol 23.

Update:

  • feat: add liquidity pool and claimable balance support to StrKey. (#1060)
  • feat: add med25519 public keys to StrKey. (#1061)
  • feat: add muxed account, liquidity pool and claimable balance support to Address. (#1062)
  • feat: implement message signing and verification according to SEP-53, check Keypair.sign_message and Keypair.verify_message for more details. (#1067)
  • feat: add a poll_transaction function to Soroban RPC client. (#1038)
  • refactor: use tomllib instead of toml library in Python 3.11 and above. (#1047)
  • refactor: optimize the user experience of call_builder.stream. (#1050)
  • fix: add error handling for incomplete federation responses. (#1051)
  • feat: add support for non-root authorization in SorobanServer[Async].simulate_transaction. (#1069)

Breaking changes

  • chore!: upgrade generated XDR definitions to Protocol 23. (#1057)
  • chore!: drop support for Python 3.8. (#1065)
  • refactor!: rename read_bytes to disk_read_bytes in SorobanDataBuilder and related methods. (#1058)
    • In SorobanDataBuilder, all occurrences of read_bytes have been replaced with disk_read_bytes. This includes method names, variable names, etc.
    • TransactionBuilder.append_payment_to_contract_op now uses disk_read_bytes instead of read_bytes in its function signature.
    • TransactionBuilder.append_restore_asset_balance_entry_op now uses disk_read_bytes instead of read_bytes in its function signature.
  • refactor!: StrKey.decode_muxed_account and StrKey.encode_muxed_account have been marked as deprecated, please use stellar_sdk.MuxedAccount instead. They will be removed in the next major release. (#1061)
  • refactor!: when an invalid account ID is passed into the MuxedAccount.from_account, it raises a ValueError now. (#1063)
  • feat!: adapt to the changes in the Stellar Soroban RPC v23 getEvents interface. (#1070)
    • drop paging_token from EventInfo, use cursor in GetEventsResponse instead.
    • in_successful_contract_call in EventInfo has been marked as deprecated now.
    • add operation_index and transaction_index to EventInfo.
    • add oldest_ledger, latest_ledger_close_time and oldest_ledger_close_time to GetEventsResponse.
  • feat!: adapt to the changes in the Stellar RPC Soroban v23 getTransaction and getTransactions interface. (#1068)
    • diagnosticEvents in GetTransactionsResponse.transactions has been marked as deprecated now, use GetTransactionsResponse.transactions[{id}].events instead.

12.3.0

05 Jun 10:54
09440c6

Choose a tag to compare

Update:

  • feat: add get_sac_balance to SorobanServer and SorobanServerAsync. (#1035)