-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add common signature encoding #107
Conversation
|
||
const r = Buffer.from(sig.r.toArray('be', 32)) | ||
const s = Buffer.from(sig.s.toArray('be', 32)) | ||
return Buffer.concat([r, s, Buffer.from([sig.recoveryParam])]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the same order in which ethereum expects them? Is there some standard format that defines this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order is the same, however with ETH the recovery param is not included in the binary part: https://github.com/ExodusMovement/assets/blob/690593e3a17d8465a10d3b3b0f669742d60f7b15/ethereum/ethereum-lib/src/unsigned-tx/sign-unsigned-tx.js#L18
@mvayngrib , @kewde are you guys OK with this? I already have 4 assets that follow this pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post utACK
This signature encoding seems to be popping up frequently. I'm wondering if we should include it here.
The binary encoding comes in handy so far for: filecoin, theta, tron, vechain, ...