Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added crate
kaspa-python-core
(similar tokaspa-wasm-core
) to store certain Python specific interface types.New Rust struct
PyBinary
to help provide a standard/flexible interface to Python for binary data.PyBinary
itself is not exposed to Python as a Python class. Rather, it is used as a parameter type in functions exposed to Python. Specifically for parameters that are of a binary type such as hex string or byte array.PyBinary
implementspyo3::conversion::FromPyObject
and allows the Python user to pass three different Python types:str
(of what should be valid hex, will cause error if not)list[int]
(where int is u8, will cause error if not)bytes
This is modeled after
BinaryT
WASM interface type.