Skip to content

Releases: StellarCN/py-stellar-base

6.1.0

17 Nov 01:18
538e7b0
Compare
Choose a tag to compare

PyPi Package: https://pypi.org/project/stellar-sdk/6.1.0/
Documentation: https://stellar-sdk.readthedocs.io/en/6.1.0/

Add

  • feat: add a way to filter liquidity pools by participating account. (#558)

6.0.1

15 Nov 14:05
1e10b32
Compare
Choose a tag to compare

PyPi Package: https://pypi.org/project/stellar-sdk/6.0.1/
Documentation: https://stellar-sdk.readthedocs.io/en/6.0.1/

Update

  • Upgrade outdated third-party dependencies.

6.0.0

13 Nov 13:40
d1d3176
Compare
Choose a tag to compare

PyPi Package: https://pypi.org/project/stellar-sdk/6.0.0/
Documentation: https://stellar-sdk.readthedocs.io/en/6.0.0/

I've upgraded django-polaris to stellar-sdk 6.0.0, perhaps this can be used as a reference for the upgrade.

This update includes breaking changes.

Note

  • As we introduced in the 5.0.0 release log, this release contains almost no new features, but contains a lot of refactorings, which improve the quality of the code and reduce the chance of users making mistakes.
  • I would like to draw your attention to the changes in TransactionBuilder. This update changes some functions that have not been changed since v0.1.x, and I know that this change will affect many existing tutorials and programs, so please pay particular attention to this.

Update

  • Added a py.typed file so that mypy will know to use our type annotations, I strongly recommend that you use it in development. (#543)
  • Strictly check whether the type of data input by the user meets the requirements, and if it does not, TypeError will be thrown. (#542) (#544)
  • universal_account_id attribute has been added to stellar_sdk.MuxedAccount and stellar_sdk.Account, please turn to the documentation to find out more. (#548)
  • Improve document.

Breaking changes

  • stellar_sdk.Server can now only be used to send synchronous requests, if you need to send asynchronous requests, use stellar_sdk.ServerAsync instead. (#540)

  • The signature of the following function contained in stellar_sdk.TransactionBuilder has changed: (#547)

    • append_change_trust_op
    • append_payment_op
    • append_path_payment_strict_receive_op
    • append_path_payment_strict_send_op
    • append_manage_buy_offer_op
    • append_manage_sell_offer_op
    • append_create_passive_sell_offer_op
    # The most obvious change is that now you need to pass in an Asset object.
    # Before
    transaction_builder.append_payment_op(destination=destination_id, amount="10", asset_code="XLM", asset_issuer=None)
    # Now
    transaction_builder.append_payment_op(destination=destination_id, asset=Asset.native(), amount="10")
  • append_change_trust_liquidity_pool_asset_op in stellar_sdk.TransactionBuilder has been removed, please use append_change_trust_op instead. (#547)

  • The initialization function for stellar_sdk.Account has changed, previously it was def __init__(self, account_id: Union[str, MuxedAccount], sequence: int) and now it is def __init__(self, account: Union[str, MuxedAccount], sequence: int, raw_data: Dict[str, Any]). (#548)

  • stellar_sdk.exceptions.ValueError, stellar_sdk.exceptions.TypeError and stellar_sdk.exceptions.AttributeError are no longer subclass of stellar_sdk.exceptions.SdkError, they are now aliases for Python's built-in functions. (#549)

  • The previous type of stellar_sdk.BaseTransactionEnvelope.signatures was stellar_sdk.xdr.DecoratedSignature, now it is stellar_sdk.DecoratedSignature. (#538)

  • stellar_sdk.sep.federation.resolve_stellar_address and stellar_sdk.sep.federation.resolve_account_id can also only be used to send synchronization requests, please stellar_sdk.sep.federation.resolve_stellar_address_async and stellar_sdk.sep.federation.resolve_account_id_async to send asynchronous requests. (#540)

  • stellar_sdk.sep.stellar_toml.fetch_stellar_toml can also only be used to send synchronization requests, please stellar_sdk.sep.stellar_toml.fetch_stellar_toml_async to send asynchronous requests. (#540)

  • The initialization function for stellar_sdk.SignerKey has changed, previously it was def __init__(self, signer_key: stellar_xdr.SignerKey) and now it is def __init__(self, signer_key: bytes, signer_key_type: SignerKeyType), the attribute contained therein has been changed accordingly. (#537)

  • clear_flags and set_flags in stellar_sdk.operation.SetOptions have been changed to stellar_sdk.operation.AuthorizationFlag type, previously it was int. (#528)

  • the client's USER_AGENT and IDENTIFICATION_HEADERS are changed to "py-stellar-base" (#550)

  • The types of the following attribute may have previously varied with the type of the parameters entered by the user, but now they are deterministic: (#528)

    attribute current type
    stellar_sdk.operation.ChangeTrust.limit str
    stellar_sdk.operation.Clawback.amount str
    stellar_sdk.operation.CreateAccount.starting_balance str
    stellar_sdk.operation.CreateClaimableBalance.amount str
    stellar_sdk.operation.CreatePassiveSellOffer.amount str
    stellar_sdk.operation.CreatePassiveSellOffer.price Price
    stellar_sdk.operation.LiquidityPoolDeposit.max_amount_a str
    stellar_sdk.operation.LiquidityPoolDeposit.max_amount_b str
    stellar_sdk.operation.LiquidityPoolDeposit.min_price Price
    stellar_sdk.operation.LiquidityPoolDeposit.max_price Price
    stellar_sdk.operation.LiquidityPoolWithdraw.amount str
    stellar_sdk.operation.LiquidityPoolWithdraw.min_amount_a str
    stellar_sdk.operation.LiquidityPoolWithdraw.min_amount_b str
    stellar_sdk.operation.ManageBuyOffer.amount str
    stellar_sdk.operation.ManageBuyOffer.price Price
    stellar_sdk.operation.ManageSellOffer.amount str
    stellar_sdk.operation.ManageSellOffer.price Price
    stellar_sdk.operation.PathPaymentStrictReceive.send_max str
    stellar_sdk.operation.PathPaymentStrictReceive.dest_amount str
    stellar_sdk.operation.PathPaymentStrictSend.send_amount str
    stellar_sdk.operation.PathPaymentStrictSend.dest_min str
    stellar_sdk.operation.Payment.amount str

5.0.1

09 Nov 23:50
baadf50
Compare
Choose a tag to compare

PyPi Package: https://pypi.org/project/stellar-sdk/5.0.1/
Documentation: https://stellar-sdk.readthedocs.io/en/5.0.1/

Update

  • Upgrade outdated third-party dependencies.

6.0.0-beta3

01 Nov 07:30
9c77a3d
Compare
Choose a tag to compare
6.0.0-beta3 Pre-release
Pre-release

PyPi Package: https://pypi.org/project/stellar-sdk/6.0.0b3/
Documentation: https://stellar-sdk.readthedocs.io/en/6.0.0-beta3/

This is a pre-release version, please do not use it in production.

I've upgraded django-polaris to stellar-sdk 6.0.0b1, perhaps this can be used as a reference for the upgrade.

You can find the changelog for 6.0.0b0, 6.0.0b1 and 6.0.0b2 here, most of the changes are in 6.0.0b0.

Update

  • Added more test cases.

6.0.0-beta2

29 Oct 08:41
9bb829b
Compare
Choose a tag to compare
6.0.0-beta2 Pre-release
Pre-release

PyPi Package: https://pypi.org/project/stellar-sdk/6.0.0b2/
Documentation: https://stellar-sdk.readthedocs.io/en/6.0.0-beta2/

This is a pre-release version, please do not use it in production.

You can find the 6.0.0b0 and 6.0.0b1 change log here.

Update

  • Improve documentation.
  • refactor: optimize the implementation of StrKey. (#551)

6.0.0-beta1

26 Oct 02:10
65c294b
Compare
Choose a tag to compare
6.0.0-beta1 Pre-release
Pre-release

PyPi Package: https://pypi.org/project/stellar-sdk/6.0.0b1/
Documentation: https://stellar-sdk.readthedocs.io/en/6.0.0-beta1/

This update includes breaking changes.
This is a pre-release version, please do not use it in production.

You can find the 6.0.0b0 change log here.

Breaking changes

  • refactor: the client's USER_AGENT and IDENTIFICATION_HEADERS are changed to "py-stellar-base" (#550)

6.0.0-beta0

25 Oct 12:04
e9844b9
Compare
Choose a tag to compare
6.0.0-beta0 Pre-release
Pre-release

PyPi Package: https://pypi.org/project/stellar-sdk/6.0.0b0/
Documentation: https://stellar-sdk.readthedocs.io/en/6.0.0-beta0/

This update includes breaking changes.
This is a pre-release version, please do not use it in production.

Note

  • As we introduced in the 5.0.0 release log, this release contains almost no new features, but contains a lot of refactorings, which improve the quality of the code and reduce the chance of users making mistakes.
  • I've upgraded django-polaris to stellar-sdk 6.0.0b1, perhaps this can be used as a reference for the upgrade.

Update

  • Added a py.typed file so that mypy will know to use our type annotations, I strongly recommend that you use it in development. (#543)
  • Strictly check whether the type of data input by the user meets the requirements, and if it does not, TypeError will be thrown. (#542) (#544)
  • universal_account_id attribute has been added to stellar_sdk.MuxedAccount and stellar_sdk.Account, please turn to the documentation to find out more. (#548)
  • Improve document.

Breaking changes

  • stellar_sdk.Server can now only be used to send synchronous requests, if you need to send asynchronous requests, use stellar_sdk.ServerAsync instead. (#540)

  • The signature of the following function contained in stellar_sdk.TransactionBuilder has changed: (#547)

    • append_change_trust_op
    • append_payment_op
    • append_path_payment_strict_receive_op
    • append_path_payment_strict_send_op
    • append_manage_buy_offer_op
    • append_manage_sell_offer_op
    • append_create_passive_sell_offer_op
    # The most obvious change is that now you need to pass in an Asset object.
    # Before
    transaction_builder.append_payment_op(destination=destination_id, amount="10", asset_code="XLM", asset_issuer=None)
    # Now
    transaction_builder.append_payment_op(destination=destination_id, asset=Asset.native(), amount="10")
  • append_change_trust_liquidity_pool_asset_op in stellar_sdk.TransactionBuilder has been removed, please use append_change_trust_op instead. (#547)

  • The initialization function for stellar_sdk.Account has changed, previously it was def __init__(self, account_id: Union[str, MuxedAccount], sequence: int) and now it is def __init__(self, account: Union[str, MuxedAccount], sequence: int, raw_data: Dict[str, Any]). (#548)

  • stellar_sdk.exceptions.ValueError, stellar_sdk.exceptions.TypeError and stellar_sdk.exceptions.AttributeError are no longer subclass of stellar_sdk.exceptions.SdkError, they are now aliases for Python's built-in functions. (#549)

  • The previous type of stellar_sdk.BaseTransactionEnvelope.signatures was stellar_sdk.xdr.DecoratedSignature, now it is stellar_sdk.DecoratedSignature. (#538)

  • stellar_sdk.sep.federation.resolve_stellar_address and stellar_sdk.sep.federation.resolve_account_id can also only be used to send synchronization requests, please stellar_sdk.sep.federation.resolve_stellar_address_async and stellar_sdk.sep.federation.resolve_account_id_async to send asynchronous requests. (#540)

  • stellar_sdk.sep.stellar_toml.fetch_stellar_toml can also only be used to send synchronization requests, please stellar_sdk.sep.stellar_toml.fetch_stellar_toml_async to send asynchronous requests. (#540)

  • The initialization function for stellar_sdk.SignerKey has changed, previously it was def __init__(self, signer_key: stellar_xdr.SignerKey) and now it is def __init__(self, signer_key: bytes, signer_key_type: SignerKeyType), the attribute contained therein has been changed accordingly. (#537)

  • clear_flags and set_flags in stellar_sdk.operation.SetOptions have been changed to stellar_sdk.operation.AuthorizationFlag type, previously it was int. (#528)

  • The types of the following attribute may have previously varied with the type of the parameters entered by the user, but now they are deterministic: (#528)

    attribute current type
    stellar_sdk.operation.ChangeTrust.limit str
    stellar_sdk.operation.Clawback.amount str
    stellar_sdk.operation.CreateAccount.starting_balance str
    stellar_sdk.operation.CreateClaimableBalance.amount str
    stellar_sdk.operation.CreatePassiveSellOffer.amount str
    stellar_sdk.operation.CreatePassiveSellOffer.price Price
    stellar_sdk.operation.LiquidityPoolDeposit.max_amount_a str
    stellar_sdk.operation.LiquidityPoolDeposit.max_amount_b str
    stellar_sdk.operation.LiquidityPoolDeposit.min_price Price
    stellar_sdk.operation.LiquidityPoolDeposit.max_price Price
    stellar_sdk.operation.LiquidityPoolWithdraw.amount str
    stellar_sdk.operation.LiquidityPoolWithdraw.min_amount_a str
    stellar_sdk.operation.LiquidityPoolWithdraw.min_amount_b str
    stellar_sdk.operation.ManageBuyOffer.amount str
    stellar_sdk.operation.ManageBuyOffer.price Price
    stellar_sdk.operation.ManageSellOffer.amount str
    stellar_sdk.operation.ManageSellOffer.price Price
    stellar_sdk.operation.PathPaymentStrictReceive.send_max str
    stellar_sdk.operation.PathPaymentStrictReceive.dest_amount str
    stellar_sdk.operation.PathPaymentStrictSend.send_amount str
    stellar_sdk.operation.PathPaymentStrictSend.dest_min str
    stellar_sdk.operation.Payment.amount str

5.0.0

06 Oct 15:17
cde39e9
Compare
Choose a tag to compare

This update includes breaking changes.

PyPi Package: https://pypi.org/project/stellar-sdk/5.0.0/
Documentation: https://stellar-sdk.readthedocs.io/en/5.0.0/

Protocol 18 Upgrade Guide By SDF

Note

  • This release adds support for Automated Market Makers. For details, you can refer to CAP-38 for XDR changes and this document for detailed changes to the Horizon API. (Download Horizon Liquidity Pool API.pdf)
  • You can get a simple example of CAP-38 here.
  • Although this update is a major version update, but only the stellar.xdr module contains breaking changes, if you don’t directly rely on this module in your code, you should be able to migrate easily.
  • I want to make some improvements to the SDK, but I don’t want to introduce too many breaking changes in this version, so I plan to postpone it to the next major version. The next major version features will not include feature updates, I will do my best to make it easy to migrate.
  • I will not be adding Stellar Protocol 18 support to v2.x. I will only provide the necessary security updates and will end support for it on 2022.01.01.

Add (#512 #517 #518)

  • Introduced new CAP-38 operations LiquidityPoolDeposit and LiquidityPoolWithdraw.
  • Introduced two new types of assets, LiquidityPoolId and LiquidityPoolAsset.
  • The following functions have been added to TransactionBuilder:
    • append_liquidity_pool_deposit_op
    • append_liquidity_pool_withdraw_op
    • append_revoke_liquidity_pool_sponsorship_op
    • append_change_trust_liquidity_pool_asset_op
  • Introduced a LiquidityPoolsCallBuilder to make calls to a new endpoint, you can use Server.liquidity_pools to build it.
  • Expanded the TransactionsCallBuilder, OperationsCallBuilder, TradesCallBuilder and EffectsCallBuilder to apply to specific liquidity pools.
  • Expanded the TradesCallBuilder to support fetching liquidity pool trades and accepts a new trade_type filter.
  • Update SEP-11 to support CAP-38

Breaking changes (#512)

  • This XDR file contains breaking changes, you can click here to view the changes.

5.0.0-beta3

23 Sep 00:51
b8ced67
Compare
Choose a tag to compare
5.0.0-beta3 Pre-release
Pre-release

This is a pre-release version, please do not use it in production.

PyPi Package: https://pypi.org/project/stellar-sdk/5.0.0b3/
Documentation: https://stellar-sdk.readthedocs.io/en/5.0.0-beta3/

Update

  • fix: SEP-10, fix case where muxed accounts are not enabled. (#530

If you want to get all the change logs of 5.0.0, please check 5.0.0-beta1 and 5.0.0-beta2.