Skip to content

Releases: StellarCN/py-stellar-base

13.0.0-beta0

08 Jul 09:27
0734d9b
Compare
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
Compare
Choose a tag to compare

Update:

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

12.2.1

11 Apr 14:20
c48b609
Compare
Choose a tag to compare

Update

  • fix: fix the issue where sending assets using Transaction.append_payment_to_contract_op fails when the sender's account is the same as the asset issuer's account. (#1029)
  • fix: allow SorobanServer.get_events(), .get_transactions(), and .get_ledgers() to be paginated by making the start_ledger argument optional. (#1032)

New Contributors

Full Changelog: 12.2.0...12.2.1

12.2.0

04 Mar 03:05
50b3a86
Compare
Choose a tag to compare

Update

  • feat: add TransactionBuilder.append_payment_to_contract_op and TransactionBuilder.append_restore_asset_balance_entry_op to send assets to contract accounts without relying on Stellar RPC. (#1023)
  • refactor: AssembledTransaction.simulate and AssembledTransactionAsync.simulate will no longer restore the state for read-only transactions. (#1026)

12.1.0

27 Dec 06:29
94b7417
Compare
Choose a tag to compare

Update

  • feat: Add optional support for Shamir Secret Sharing with Keypair.from_shamir_mnemonic_phrases and Keypair.generate_shamir_mnemonic_phrases. (#1010)

12.0.0

28 Nov 03:34
ae0ade2
Compare
Choose a tag to compare

This is the first stable release that supports Protocol 22. While the network has not upgraded yet, you can start integrating the new features into your codebase if you want a head start.

If you are using this SDK to call Soroban contracts, please check stellar-contract-bindings, which can automatically generate contract binding code for you, making it incredibly easy to call contracts.

The following log is the changes since 11.1.0:

Update

  • feat: add stellar_sdk.contract.ContractClient and stellar_sdk.contract.ContractClientAsync, this greatly reduces the difficulty of calling contracts, and you can learn more through the documentation and examples. (#998)
  • feat: add support for Soroban PRC's getLedgers API interfaces. (#992)
  • feat: add support for Soroban PRC's getVersionInfo API interfaces. (#984)
  • feat: Add transaction_hash to GetTransactionResponse and GetTransactionsResponse. (#984)
  • feat: scval.from_enum and scval.to_enum now support multiple values. (#1004)

Breaking changes

  • feat!: support constructors in contract creation via TransactionBuilder.append_create_contract_op, the signature of the function has been changed. (#979)
  • refactor!: The EventInfo.paging_token field has been marked as deprecated, use the cursor in GetEventsResponse instead. (#984)
  • refactor!: The legacy cost field has been removed from SimulateTransactionResponse, parse it from transaction_data instead. (#984)
  • refactor!: Updated signer parameter in auth to accept a callable returning (public_key, signatures) instead of just public_key. (#982)

12.0.0-beta6

26 Nov 12:08
7e1ae05
Compare
Choose a tag to compare
12.0.0-beta6 Pre-release
Pre-release

Update

  • feat: scval.from_enum and scval.to_enum now support multiple values. (#1004)

12.0.0-beta5

23 Nov 05:37
eddca04
Compare
Choose a tag to compare
12.0.0-beta5 Pre-release
Pre-release

Update

  • fix: fix a bug in AssembledTransaction.simulate. (#1000)

12.0.0-beta4

22 Nov 09:43
23b7fdd
Compare
Choose a tag to compare
12.0.0-beta4 Pre-release
Pre-release

This version significantly reduces the difficulty of calling contracts.

Update

  • feat: add stellar_sdk.contract.ContractClient and stellar_sdk.contract.ContractClientAsync, this greatly reduces the difficulty of calling contracts, and you can learn more through the documentation and examples. (#998)
    from stellar_sdk import Network, scval
    from stellar_sdk.contract import ContractClient
    
    assembled = ContractClient(
        contract_id="CACZTW72246RA2MOCNKUBRRRRPT26UZ7LXE5ZHH44OGKIMCTQJ74O4D5",
        rpc_url="https://soroban-testnet.stellar.org:443",
        network_passphrase=Network.TESTNET_NETWORK_PASSPHRASE,
    ).invoke(
        function_name="hello",
        parameters=[scval.to_string("world")],
        parse_result_xdr_fn=lambda result: [
            scval.from_string(s).decode() for s in scval.from_vec(result)
        ],
    )
    
    print(f"Result from simulation: {assembled.result}")

12.0.0-beta3

14 Nov 11:29
a81ed83
Compare
Choose a tag to compare
12.0.0-beta3 Pre-release
Pre-release

Several hours ago, I released version 12.0.0-beta2, which added support for the Soroban RPC's getLedgers API interface.
However, some field names in the implementation need to be renamed.

Update

  • refactor: rename LedgerInfo.ledger_header to LedgerInfo.header_xdr, LedgerInfo.ledger_metadata to LedgerInfo.metadata_xdr. (#994)