Skip to content

Commit

Permalink
signer fns
Browse files Browse the repository at this point in the history
  • Loading branch information
smartgoo committed Dec 7, 2024
1 parent 65850d5 commit 2da757d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/kaspa.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ def verify_message(message: str, signature: str, public_key: PublicKey) -> bool:

def sign_transaction(tx: Transaction, signer: list[PrivateKey], verify_sig: bool) -> Transaction: ...

def create_input_signature(tx: Transaction, input_index: int, private_key: PrivateKey, sighash_type: Optional[SighashType] = None) -> str: ...

def sign_script_hash(script_hash: str, privkey: PrivateKey) -> str: ...

class Generator:

def __init__(
Expand Down
2 changes: 2 additions & 0 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ cfg_if::cfg_if! {
m.add_function(wrap_pyfunction!(kaspa_wallet_core::bindings::python::message::py_sign_message, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::bindings::python::message::py_verify_message, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::bindings::python::signer::py_sign_transaction, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::bindings::python::signer::create_input_signature, m)?)?;
m.add_function(wrap_pyfunction!(kaspa_wallet_core::bindings::python::signer::sign_script_hash, m)?)?;
m.add_class::<kaspa_wallet_core::bindings::python::tx::generator::generator::Generator>()?;
m.add_class::<kaspa_wallet_core::bindings::python::tx::generator::pending::PendingTransaction>()?;
m.add_class::<kaspa_wallet_core::bindings::python::tx::generator::summary::GeneratorSummary>()?;
Expand Down

0 comments on commit 2da757d

Please sign in to comment.