Add support for EIP-712 typed data signing in livepeer_cli #2157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this pull request do? Explain your changes. (required)
This PR adds support for EIP-712 typed data signing in
livepeer_cli
.Prior to this PR, the "Sign message" option in
livepeer_cli
sent a request to the/signMessage
endpoint on the node's server in order to sign an arbitrary user provided message. The L1Migrator contract for the Confluence LIP allows signature based authorization, but uses the more recent EIP-712 signing standard which describes a standard way to sign the hash of structured data.Specific updates (required)
In order to support EIP-712 signing in
livepeer_cli
I've made the following updates:SignTypedData()
method to complement the existingSign()
method in theeth.AccountManager
implementation/signMessage
handler by setting aSigFormat
headerlivepeer_cli
to complement the existing "Sign message" optionHow did you test each of these updates (required)
Updated unit tests and manually tested EIP-712 signing with
livepeer_cli
.Does this pull request close any open issues?
Fixes #2141
Checklist:
make
runs successfully./test.sh
pass