Replies: 1 comment 2 replies
-
There isn't a first-class abstraction to do this yet, as users shouldn't sign raw digests via their wallets (very dangerous) – unless a wallet were to eventually expose a However, if you want to turn on import { toAuthMessage } from 'viem/experimental'
import { client } from './config'
const signature = await client.request({
method: 'eth_sign',
parameters: [keccak256(toAuthMessage({ chainId, commit, nonce, invokerAddress }))]
}) Would that work? If you already have the digest, you can also do: import { toAuthMessage } from 'viem/experimental'
import { client } from './config'
const digest = '0x...'
const signature = await client.request({
method: 'eth_sign',
parameters: [digest]
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want the authority to come to my platform (website), authorise my invoker contract (sign the digest using metamask) to invoke the txs on their behalf. The invoker contract at any later time could execute the tx.
Major issue that I am facing here is - I am unable to find a way for the authority to sign the commit without having to pass the private key. Do you know if there is a way to do it?
Beta Was this translation helpful? Give feedback.
All reactions