def calculate_partial(secp: Secp256k1, excess: SecretKey, nonce: SecretKey, public_excess_sum: PublicKey, public_nonce_sum: PublicKey, fee: int, lock_height: int) -> Signature: message = Message.from_bytearray(kernel_sig_msg(fee, lock_height)) return aggsig.sign_single(secp, message, excess, nonce, public_nonce_sum, public_excess_sum, public_nonce_sum, None)
def verify_partial(secp: Secp256k1, signature: Signature, public_excess: PublicKey, public_excess_sum: PublicKey, public_nonce_sum: PublicKey, fee: int, lock_height: int) -> bool: message = Message.from_bytearray(kernel_sig_msg(fee, lock_height)) return aggsig.verify_single(secp, signature, message, public_excess, public_excess_sum, public_nonce_sum, None, True)