Skip to content
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

Allow passing multiple parameters to be hashed #17

Open
CallumGrindle opened this issue Sep 29, 2022 · 1 comment
Open

Allow passing multiple parameters to be hashed #17

CallumGrindle opened this issue Sep 29, 2022 · 1 comment

Comments

@CallumGrindle
Copy link
Contributor

CallumGrindle commented Sep 29, 2022

Feature Request

When signing an LSP6ExecuteRelayCall transaction it would be useful to be able to pass multiple parameters to be hashed.

Currently sign only accepts 1 string parameter to be signed which means developers need to hash executeRelayCall parameters using some other soliditySha3 utils function from a separate library before using lsp6-signer.js.

e.g:

const message = web3.utils.soliditySha3(chainId, keyManagerAddress, nonce, {
  t: 'bytes',
  v: abiPayload,
});

const signature = lsp6Signer.sign(message, PRIVATE_KEY);

It would be useful if lsp6-signer could do all of this so the separate library was not needed

e.g.

const signature = lsp6Signer.hashAndSign(chainId, keyManagerAddress, nonce, abiPayload, PRIVATE_KEY)
@Hugoo
Copy link
Contributor

Hugoo commented Sep 29, 2022

Let's ask @frozeman feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants