Releases: kaspanet/kaspa-python-sdk
Releases · kaspanet/kaspa-python-sdk
1.1.0
This is the first release built from this repository.
The full changelog for the kaspa Python package can be found on the docs site here.
Notable Changes
- Moved Kaspa Python SDK out of Rusty-Kaspa (as a workspace member crate) to this own dedicated repository. The internals of this project have changed significantly as a result. However, all APIs exposed to Python are largely unchanged
- Added
GetVirtualChainFromBlockV2RPC method. - Added classes
UtxoProcessorandUtxoContextbindings for UTXO tracking and mature range access. - Python 3.9 is no longer supported. Minimum supported version is now 3.10.
Changes
Breaking Changes
- Python 3.9 is no longer supported. Minimum supported version is now 3.10.
Generator,create_transactions, andestimate_transactionsreordered parameters to keep required arguments first (entries, change_address, network_id optional). Positional callers must update.
Added
- Enum
PyAddressVersionexposed to Python asAddressVersion - Enum
PyNetworkTypeexposed to Python asNetworkType - Enum
PyEncodingexposed to Python asEncoding - Enum
PyNotificationEventexposed to Python asNotificationEvent - Documentation site using MkDocs, Material for MkDocs, and mike.
- Automatic generation of (most of) the stub (.pyi) file using
pyo3-stub-gencrate and a binary. RPC TypedDicts (Request/Response structures, RPC types) are manually maintained inkaspa_rpc.pyistill. - Unit and integration tests with [pytest]https://docs.pytest.org/en/stable/.
GetVirtualChainFromBlockV2RPC method.to_dict()method forTransaction,TransactionInput,TransactionOutput,TransactionOutpoint,UtxoEntry,UtxoEntries, andUtxoEntryReference.from_dict()method forTransaction,TransactionInput,TransactionOutput,TransactionOutpoint, andUtxoEntry.- Classes
UtxoProcessorandUtxoContextbindings for UTXO tracking and mature range access. - Enum
PyUtxoProcessorEventexposed to Python asUtxoProcessorEvent. - Submodule
exceptionswhere custom exceptions will be located. Currently empty given no custom exceptions exist (yet). versiongetter forScriptPublicKey.- Added to
GeneratorSummary:to_dict()method, propertiesnetwork_id,mass, andstages.
Changed
- Moved Kaspa Python SDK out of Rusty-Kaspa (as a workspace member crate) to its own dedicated repository. The internals of this project have changed significantly as a result. However, all APIs exposed to Python remain unchanged.
- Bumped rusty-kaspa dependency version to commit e97070f.
- All Python-exposed structs and enums are prefixed with
Py(e.g.PyAddress) internally. The corresponding Python class name has not changed (prefix is dropped in Python). - All Python-exposed functions are prefixed with
py_(e.g.py_sign_message) internally. The corresponding Python function name has not changed (prefix is dropped in Python). - All enum parameter types across all functions/methods can be passed as a string (for backwards compatibility) or enum variant. Prior, only a string was accepted.
Opcodesis the exception to this. - Standardize internal Rust method names for getters/setters to comply with pyo3 and pyo3-stub-gen. Prefix all with
get_orset_. Remove unnecessary name overrides. - All setters changed to use consistent
valuefor parameter name. PrivateKeyGeneratorconstructor acceptsxprvparameter as both astrorXPrvinstance now.PublicKeyGenerator.from_master_xprv()acceptsxprvparameter as both astrorXPrvinstance now.Generator,create_transactions, andestimate_transactionsnow acceptUtxoContextentries (network_id optional for context inputs).- Python 3.9 is no longer supported. Minimum supported version is now 3.10.
- Fix ScriptBuilder
add_op/add_opsfunctions.add_opincorrectly allowed mulitple ops to be passed.add_opsincorrectly allowed a single op to be passed.
New Contributors
- @elldeeone made their first contribution in #10
1.1.0rc2
1.1.0rc1
Release candidate for version 1.1.0.
Docs: https://kaspanet.github.io/kaspa-python-sdk/1.1.0rc1/
Breaking Changes
- Python 3.9 is no longer supported. Minimum supported version is now 3.10.
Added
- Enum
PyAddressVersionexposed to Python asAddressVersion - Enum
PyNetworkTypeexposed to Python asNetworkType - Enum
PyEncodingexposed to Python asEncoding - Enum
PyNotificationEventexposed to Python asNotificationEvent - Documentation site using MkDocs, Material for MkDocs, and mike.
- Automatic generation of (most of) the stub (.pyi) file using
pyo3-stub-gencrate and a binary. RPC TypedDicts (Request/Response structures, RPC types) are manually maintained inkaspa_rpc.pyistill. - Unit and integration tests with [pytest]https://docs.pytest.org/en/stable/.
GetVirtualChainFromBlockV2RPC method.
Changed
- Bumped rusty-kaspa version to commit 48f4d03 (1.1.0 RC).
- Moved Kaspa Python SDK out of Rusty-Kaspa (as a workspace member crate) to its own dedicated repository. The internals of this project have changed significantly as a result. However, all APIs exposed to Python remain unchanged.
- All Python-exposed structs and enums are prefixed with
Py(e.g.PyAddress) internally. The corresponding Python class name has not changed (prefix is dropped in Python). - All Python-exposed functions are prefixed with
py_(e.g.py_sign_message) internally. The corresponding Python function name has not changed (prefix is dropped in Python). - All enum parameter types across all functions/methods can be passed as a string (for backwards compatibility) or enum variant. Prior, only a string was accepted.
Opcodesis the exception to this. - Standardize internal Rust method names for getters/setters to comply with pyo3 and pyo3-stub-gen. Prefix all with
get_orset_. Remove unnecessary name overrides. - All setters changed to use consistent
valuefor parameter name. PrivateKeyGeneratorconstructor acceptsxprvparameter as both astrorXPrvinstance now.PublicKeyGenerator.from_master_xprv()acceptsxprvparameter as both astrorXPrvinstance now.- Python 3.9 is no longer supported. Minimum supported version is now 3.10.