rocklabs-io / ic-py

Python Agent Library for the DFINITY Internet Computer
MIT License
128 stars 27 forks source link

validate signature #64

Closed letmejustputthishere closed 2 years ago

letmejustputthishere commented 2 years ago

it would be nice if we could verify signatures that were created with the dfinity agent

Myse1f commented 2 years ago

Did you mean #56 ?

letmejustputthishere commented 2 years ago

no i want to validate a secp256k1 or ed25519 signature made with @dfinity/identity

https://erxue-5aaaa-aaaab-qaagq-cai.ic0.app/identity/classes/Ed25519KeyIdentity.html#sign

https://erxue-5aaaa-aaaab-qaagq-cai.ic0.app/identity/classes/Secp256k1KeyIdentity.html#sign

Myse1f commented 2 years ago

Added at #65. You can use Identity.verify(msg, signature: bytes) to verify the signature, where msg is is bytes or bytes in string format, and signature is bytes.

letmejustputthishere commented 2 years ago

awesome, thank you!