nspcc-dev / neofs-sdk-go

Go implementation of NeoFS SDK
Apache License 2.0
5 stars 14 forks source link

WalletConnect: Support versioned signature schemes #531

Open cthulhu-rider opened 10 months ago

cthulhu-rider commented 10 months ago

Context

NeoFS supports WalletConnect signature scheme implemented here. It was added almost 2y ago and follows algo from neon-js lib of those days

since then neon-js library has moved forward, and, starting from this, now it supports multiple signature versions

Proposal

version the signature scheme similarly to neon-js: add the version to the signature and use it during verification. Missing token will still be treated as legacy schema

roman-khimov commented 9 months ago

signMessageNew() looks interesting, signing arbitrary data without any prefixes/suffixes.

roman-khimov commented 7 months ago

It still adds some salt though. And there is also signMessageWithoutSalt provided by DAPI that doesn't do that, but it adds prefix (010001f0).