Skip to content

Releases: kaspanet/kaspa-python-sdk

1.1.0

04 Mar 22:19
b86a4d5

Choose a tag to compare

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 GetVirtualChainFromBlockV2 RPC method.
  • Added classes UtxoProcessor and UtxoContext bindings 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, and estimate_transactions reordered parameters to keep required arguments first (entries, change_address, network_id optional). Positional callers must update.

Added

  • Enum PyAddressVersion exposed to Python as AddressVersion
  • Enum PyNetworkType exposed to Python as NetworkType
  • Enum PyEncoding exposed to Python as Encoding
  • Enum PyNotificationEvent exposed to Python as NotificationEvent
  • Documentation site using MkDocs, Material for MkDocs, and mike.
  • Automatic generation of (most of) the stub (.pyi) file using pyo3-stub-gen crate and a binary. RPC TypedDicts (Request/Response structures, RPC types) are manually maintained in kaspa_rpc.pyi still.
  • Unit and integration tests with [pytest]https://docs.pytest.org/en/stable/.
  • GetVirtualChainFromBlockV2 RPC method.
  • to_dict() method for Transaction, TransactionInput, TransactionOutput, TransactionOutpoint, UtxoEntry, UtxoEntries, and UtxoEntryReference.
  • from_dict() method for Transaction, TransactionInput, TransactionOutput, TransactionOutpoint, and UtxoEntry.
  • Classes UtxoProcessor and UtxoContext bindings for UTXO tracking and mature range access.
  • Enum PyUtxoProcessorEvent exposed to Python as UtxoProcessorEvent.
  • Submodule exceptions where custom exceptions will be located. Currently empty given no custom exceptions exist (yet).
  • version getter for ScriptPublicKey.
  • Added to GeneratorSummary: to_dict() method, properties network_id, mass, and stages.

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. Opcodes is the exception to this.
  • Standardize internal Rust method names for getters/setters to comply with pyo3 and pyo3-stub-gen. Prefix all with get_ or set_. Remove unnecessary name overrides.
  • All setters changed to use consistent value for parameter name.
  • PrivateKeyGenerator constructor accepts xprv parameter as both a str or XPrv instance now.
  • PublicKeyGenerator.from_master_xprv() accepts xprv parameter as both a str or XPrv instance now.
  • Generator, create_transactions, and estimate_transactions now accept UtxoContext entries (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_ops functions. add_op incorrectly allowed mulitple ops to be passed. add_ops incorrectly allowed a single op to be passed.

New Contributors

1.1.0rc2

20 Jan 18:53
cc12cc1

Choose a tag to compare

1.1.0rc2 Pre-release
Pre-release

What's Changed

Full Changelog: v1.1.0rc1...v1.1.0rc2

1.1.0rc1

19 Jan 21:31
4543ac1

Choose a tag to compare

1.1.0rc1 Pre-release
Pre-release

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 PyAddressVersion exposed to Python as AddressVersion
  • Enum PyNetworkType exposed to Python as NetworkType
  • Enum PyEncoding exposed to Python as Encoding
  • Enum PyNotificationEvent exposed to Python as NotificationEvent
  • Documentation site using MkDocs, Material for MkDocs, and mike.
  • Automatic generation of (most of) the stub (.pyi) file using pyo3-stub-gen crate and a binary. RPC TypedDicts (Request/Response structures, RPC types) are manually maintained in kaspa_rpc.pyi still.
  • Unit and integration tests with [pytest]https://docs.pytest.org/en/stable/.
  • GetVirtualChainFromBlockV2 RPC 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. Opcodes is the exception to this.
  • Standardize internal Rust method names for getters/setters to comply with pyo3 and pyo3-stub-gen. Prefix all with get_ or set_. Remove unnecessary name overrides.
  • All setters changed to use consistent value for parameter name.
  • PrivateKeyGenerator constructor accepts xprv parameter as both a str or XPrv instance now.
  • PublicKeyGenerator.from_master_xprv() accepts xprv parameter as both a str or XPrv instance now.
  • Python 3.9 is no longer supported. Minimum supported version is now 3.10.