spacemeshos / svm

SVM - Spacemesh Virtual Machine
https://spacemesh.io
MIT License
85 stars 14 forks source link

Extend SDK with `Digital Signature Verify` API #452

Open YaronWittenstein opened 2 years ago

YaronWittenstein commented 2 years ago

Depends on #444 #451

So once we've got the svm_sig_verify function working, we'd like to make it pleasantly accessed within the SVM SDK. The steps to implement this PR:

Add to the Host trait under sdk-host the following:

pub trait Host {
    fn dig_verify(&self, msg_ptr: &[u8], sig: Blob64, pub_key: Blob32) -> bool
}

In case, we've decided to go for the svm_tx_verify host function (as explained at #451) then the Host trait will have:

pub trait Host {
    fn tx_verify(&self, sig: Blob64, pub_key: Blob32) -> bool
}

Notes