Releases: StellarCN/py-stellar-base
8.0.0-beta1
Update
- refactor: remove runtime type checking in
stellar_sdk.xdr
package (#584)
PyPi Package: https://pypi.org/project/stellar-sdk/8.0.0b1/
Documentation: https://stellar-sdk.readthedocs.io/en/8.0.0-beta1/
8.0.0-beta0
This is a pre-release version, please do not use it in production.
It includes CAP-21 (new transaction preconditions) and CAP-40 (signed payload signers).
Breaking changes
Transaction.time_bounds
is moved toTransaction.preconditions.time_bounds
.- Some breaking updates are included in XDR, you can check the changes here.
Add
-
Support for converting signed payloads (CAP-40) to and from their StrKey (
P...
) representation, you can find the example here. -
Support for creating transactions with the new preconditions (CAP-21) via
TransactionBuilder
, you can find the example here.-
TransactionBuilder.set_ledger_bounds(min_ledger: int, max_ledger: int)
-
TransactionBuilder.set_min_sequence_number(min_sequence_number: int)
-
TransactionBuilder.set_min_sequence_age(min_sequence_age: int)
-
TransactionBuilder.set_min_sequence_ledger_gap(min_sequence_ledger_gap: int)
-
TransactionBuilder.add_extra_signer(signer_key: Union[SignerKey, SignedPayloadSigner, str])
-
-
Support for Signing transactions containing the ed25519 payload extra signer, you can find the example here.
Keypair.sign_payload_decorated(data: bytes)
TransactionEnvelope.sign_extra_signers_payload(signer: Union[Keypair, str])
-
Support for CAP-21 has been added to
stellar_sdk.sep.txrep
.
PyPi Package: https://pypi.org/project/stellar-sdk/8.0.0b0/
Documentation: https://stellar-sdk.readthedocs.io/en/8.0.0-beta0/
7.0.2
Update
- fix: fixed-length arrays pack/unpack should not include length, but the previous releases incorrectly include it. (#581)
PyPi Package: https://pypi.org/project/stellar-sdk/7.0.2/
Documentation: https://stellar-sdk.readthedocs.io/en/7.0.2/
7.0.1
Update
- feat: make stellar_sdk.Asset hashable. (#576)
PyPi Package: https://pypi.org/project/stellar-sdk/7.0.1/
Documentation: https://stellar-sdk.readthedocs.io/en/7.0.1/
7.0.0
This update includes breaking changes.
This release introduces unconditional support for muxed accounts. (#574)
Breaking changes
- In v4.0.0, we introduced opt-in support for muxed accounts, you would need to set
ENABLE_SEP_0023
totrue
in the environment variable to enable support for this feature. In the new release, this feature will be enabled by default. (#574)
Add
-
Introduced a helper function which lets you pre-determine the hex claimable balance ID of a CreateClaimableBalance operation prior to submission to the network: (#575)
class Transaction: def get_claimable_balance_id(self, operation_index: int) -> str: pass
Update
- When the user builds a transaction through TransactionBuilder but does not set TimeBounds, the SDK will give a warning. (#565)
stellar_sdk.xdr
module adds some validation to the data. (#564)
PyPi Package: https://pypi.org/project/stellar-sdk/7.0.0/
Documentation: https://stellar-sdk.readthedocs.io/en/7.0.0/
6.1.1
PyPi Package: https://pypi.org/project/stellar-sdk/6.1.1/
Documentation: https://stellar-sdk.readthedocs.io/en/6.1.1/
Some users encountered an error when initializing RequestsClient
, this release may be able to solve this issue.
Update
- Specify the version of urllib3 >= 1.26.7 and < 2.0.0. (#563)
6.1.0
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
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
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 tostellar_sdk.MuxedAccount
andstellar_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, usestellar_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
instellar_sdk.TransactionBuilder
has been removed, please useappend_change_trust_op
instead. (#547) -
The initialization function for
stellar_sdk.Account
has changed, previously it wasdef __init__(self, account_id: Union[str, MuxedAccount], sequence: int)
and now it isdef __init__(self, account: Union[str, MuxedAccount], sequence: int, raw_data: Dict[str, Any])
. (#548) -
stellar_sdk.exceptions.ValueError
,stellar_sdk.exceptions.TypeError
andstellar_sdk.exceptions.AttributeError
are no longer subclass ofstellar_sdk.exceptions.SdkError
, they are now aliases for Python's built-in functions. (#549) -
The previous type of
stellar_sdk.BaseTransactionEnvelope.signatures
wasstellar_sdk.xdr.DecoratedSignature
, now it isstellar_sdk.DecoratedSignature
. (#538) -
stellar_sdk.sep.federation.resolve_stellar_address
andstellar_sdk.sep.federation.resolve_account_id
can also only be used to send synchronization requests, pleasestellar_sdk.sep.federation.resolve_stellar_address_async
andstellar_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, pleasestellar_sdk.sep.stellar_toml.fetch_stellar_toml_async
to send asynchronous requests. (#540) -
The initialization function for
stellar_sdk.SignerKey
has changed, previously it wasdef __init__(self, signer_key: stellar_xdr.SignerKey)
and now it isdef __init__(self, signer_key: bytes, signer_key_type: SignerKeyType)
, the attribute contained therein has been changed accordingly. (#537) -
clear_flags
andset_flags
instellar_sdk.operation.SetOptions
have been changed tostellar_sdk.operation.AuthorizationFlag
type, previously it wasint
. (#528) -
the client's
USER_AGENT
andIDENTIFICATION_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
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.