-
Notifications
You must be signed in to change notification settings - Fork 698
Closed
Description
A decentralized solution / app is usually a combination of on-chain and off-chain logic.
One common way to achieve an on-chain settlement of operations being performed off-chain is to rely on signatures verifications.
If we want to see this kind of hybrid solutions running on Stacks v2, I'd suggest exposing the following native functions in clarity:
(secp256k1-recover (buff 32) (buff 64)) -> (response principal)
: take the message and the signature (compact format), return the recovered principal, orerr
.(secp256k1-verify (buff 32) (buff 64) (buff 33)) -> (bool)
: take the message, the signature (compact format) and the public key, return a boolean.
Buffers lengths are consistent with https://docs.rs/crate/secp256k1/0.15.5/source/src/constants.rs
zone117x, njordhov, psq, Topper88, jcnelson and 1 more