rooch-network / rooch

VApp Container with Move Language for Bitcoin ecosystem
https://rooch.network
Apache License 2.0
158 stars 83 forks source link

[CLI]Need rooch sign and validator command #2381

Closed v1xingyue closed 5 days ago

v1xingyue commented 1 month ago

Rooch cli tools need sign and validator command.

feliciss commented 1 month ago

Is this issue available for handling?

jolestar commented 1 month ago

Is this issue available for handling?

@v1xingyue is handle this

v1xingyue commented 1 month ago

Okay I'll handle this

jolestar commented 1 week ago
  1. The rooch account sign command should add a prefix to the message,

Bitcoin Signed Message:\n

https://github.com/rooch-network/rooch/blob/46dedc44f88f31994ec3ec41f2fc039357e8a01b/frameworks/rooch-framework/sources/auth_validator/auth_payload.move#L11-L12

We can wrap it into a struct, like AuthPayload, and we need to ensure the signed result is the same as the Bitcoin wallet result.

  1. Provide a verify command and verify message move function.

@feliciss

feliciss commented 1 week ago
  1. The rooch account sign command should add a prefix to the message,

Bitcoin Signed Message:\n

https://github.com/rooch-network/rooch/blob/46dedc44f88f31994ec3ec41f2fc039357e8a01b/frameworks/rooch-framework/sources/auth_validator/auth_payload.move#L11-L12

We can wrap it into a struct, like AuthPayload, and we need to ensure the signed result is the same as the Bitcoin wallet result.

  1. Provide a verify command and verify message move function.

@feliciss

It doesn't relate to any message signing format of the Bitcoin-QT or the RFC2440 on the wiki mentioned there: https://en.bitcoin.it/wiki/Message_signing#Displaying_signed_messages.