use-ink / useink

A React hooks library for ink!
Apache License 2.0
61 stars 5 forks source link

Request for a new method that signs a message using ECDSA so that it can be verified by ink's method ecdsa_recover. #92

Open corlys opened 1 year ago

corlys commented 1 year ago

Feature Request

Suggestion

add a method that takes an input (could be string, but probably will be bytes) then signs it using ECDSA method.

Motivation

Currently useInk WalletAccount class does not have a method that can generate a signature that can be verified using ink smart contract. Since ink only have ecdsa_recover method (as far as i know) to recover ecdsa siganture it will be nice to have a method that can make ecdsa signature that can be verified using ink's ecdsa_recover method.

Use Cases

meta transaction: user can sign for a transaction that can be run by another user, ex: address A signs a message/data for listing an nft at a marketplace (saved by backend), the user b can use that signature (given by backend) as a proof of listing A listing when buying that nft.