Skip to content

Commit

Permalink
.pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
smartgoo committed Oct 27, 2024
1 parent 89f28c4 commit 2ad3c68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions python/kaspa.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,11 @@ class Opcodes(Enum):
OpInvalidOpCode = 0xff


def sign_message(message: str, private_key: PrivateKey) -> str: ...

def verify_message(message: str, signature: str, public_key: PublicKey) -> bool: ...


class Generator:

def __init__(
Expand Down
8 changes: 4 additions & 4 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ cfg_if::cfg_if! {

m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::message::py_sign_message, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::message::py_verify_message, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::signer::py_sign_transaction, m)?)?;
m.add_class::<kaspa_wallet_core::python::tx::generator::generator::Generator>()?;
m.add_class::<kaspa_wallet_core::python::tx::generator::pending::PendingTransaction>()?;
m.add_class::<kaspa_wallet_core::python::tx::generator::summary::GeneratorSummary>()?;
m.add_class::<kaspa_wallet_core::tx::payment::PaymentOutput>()?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::tx::utils::create_transaction_py, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::tx::utils::create_transactions_py, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::utils::kaspa_to_sompi, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::utils::sompi_to_kaspa, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::utils::sompi_to_kaspa_string_with_suffix, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::tx::utils::create_transaction_py, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::tx::utils::create_transactions_py, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::python::signer::py_sign_transaction, m)?)?;
m.add_class::<kaspa_wallet_core::tx::payment::PaymentOutput>()?;

m.add_class::<kaspa_wallet_keys::derivation_path::DerivationPath>()?;
m.add_class::<kaspa_wallet_keys::keypair::Keypair>()?;
Expand Down

0 comments on commit 2ad3c68

Please sign in to comment.