StarknetByExample
StarknetByExample copied to clipboard
feat: recover public key (1.2.0)
In this example, we will demonstrate how to recover the public key from a signature and the signed message hash using recover_public_key_u32
.
I'll take this on!
@enitrat do I use the secp256r1 or secp256k1 curve? Also I'm not entirely sure how to import the function. I tried -
use starknet::secp256_trait:: recover_public_key_u32;
use starknet::secp256k1::{Secp256k1Point, Secp256k1PointImpl};
Identifier not found: secp256_trait, Secp256k1Point, Secp256k1PointImpl.
@HansBhatia I think you will need to upgrade Cairo to v2.x for this one