Releases: StellarCN/py-stellar-base
12.2.0
Update
- feat: add
TransactionBuilder.append_payment_to_contract_op
andTransactionBuilder.append_restore_asset_balance_entry_op
to send assets to contract accounts without relying on Stellar RPC. (#1023) - refactor:
AssembledTransaction.simulate
andAssembledTransactionAsync.simulate
will no longer restore the state for read-only transactions. (#1026)
12.1.0
12.0.0
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
andstellar_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
toGetTransactionResponse
andGetTransactionsResponse
. (#984) - feat:
scval.from_enum
andscval.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 thecursor
inGetEventsResponse
instead. (#984) - refactor!: The legacy
cost
field has been removed fromSimulateTransactionResponse
, parse it fromtransaction_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
Update
- feat:
scval.from_enum
andscval.to_enum
now support multiple values. (#1004)
12.0.0-beta5
Update
- fix: fix a bug in
AssembledTransaction.simulate
. (#1000)
12.0.0-beta4
This version significantly reduces the difficulty of calling contracts.
Update
- feat: add
stellar_sdk.contract.ContractClient
andstellar_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
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
toLedgerInfo.header_xdr
,LedgerInfo.ledger_metadata
toLedgerInfo.metadata_xdr
. (#994)
12.0.0-beta2
Update
- feat: add support for Soroban PRC's
getLedgers
API interface. (#992)
12.0.0-beta1
Update
- refactor: add
paging_token
back toEventInfo
. This is to ensure compatibility with older versions of Soroban-RPC. We still recommend using theGetEventsResponse.cursor
field after upgrading Soroban-RPC. (#990)
12.0.0-beta0
This is the first 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.
Update
- feat: add support for Soroban PRC's
getVersionInfo
API interfaces. - feat: add
transaction_hash
toGetTransactionResponse
andGetTransactionsResponse
.
Breaking changes
- refactor!: the
paging_token
field has been removed fromEventInfo
, use thecursor
inGetEventsResponse
instead. - refactor!: the legacy
cost
field has been removed fromSimulateTransactionResponse
, parse it fromtransaction_data
instead. - feat!: support constructors in contract creation via
TransactionBuilder.append_create_contract_op
, the signature of the function has been changed. - refactor!: updated
signer
parameter in auth to accept a callable returning (public_key, signatures) instead of just public_key.