This method uses Ethereum’s personal_sign
RPC method. If you are looking for a low-level raw signature over a input hash, see secp256k1_sign.
Use the signMessage
method exported from the useSignMessage
hook to sign a message with an Ethereum embedded wallet.
Message to be signed.
The signature produced by the wallet.
Configure callbacks for Privy’s signMessage
method on the useSignMessage
hook:
As parameters to useSignMessage
, you may include an onSuccess
callback and/or an onError
callback.
While this component is mounted, any invocation of signMessage
will trigger the onSuccess
callback or onError
callback on completion, depending on if the message was successfully signed or not.
If set, the onSuccess
callback will execute after a user has successfully signed the message. Within this callback, you can access a signature
parameter, which is the signature
string value generated by the wallet to sign the message.
If set, the onError
callback will execute after a user attempts to sign a message and there is an error, or if the user exits the signature flow prematurely. Within this callback, you may access an error
code with more information about the error.
Use the signMessage
method exported from the useSignMessage
hook to sign a message with an Ethereum embedded wallet.
Message to be signed.
The signature produced by the wallet.
Configure callbacks for Privy’s signMessage
method on the useSignMessage
hook:
As parameters to useSignMessage
, you may include an onSuccess
callback and/or an onError
callback.
While this component is mounted, any invocation of signMessage
will trigger the onSuccess
callback or onError
callback on completion, depending on if the message was successfully signed or not.
If set, the onSuccess
callback will execute after a user has successfully signed the message. Within this callback, you can access a signature
parameter, which is the signature
string value generated by the wallet to sign the message.
If set, the onError
callback will execute after a user attempts to sign a message and there is an error, or if the user exits the signature flow prematurely. Within this callback, you may access an error
code with more information about the error.
Request a message signature on the wallets Ethereum provider.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The signature produced by the wallet.
Request a message signature on the wallet’s Ethereum provider.
The string to sign with the wallet.
The address of the wallet to sign the message with.
The signature produced by the wallet.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The signature produced by the wallet.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The signature produced by the wallet.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The RPC method executed with the wallet.
Outputs for the RPC method executed with the wallet.
Use the signMessage
method on the Ethereum client to sign a message with an Ethereum wallet.
Unique ID of the wallet to take actions with.
The string or bytes to sign with the wallet.
Idempotency key to identify a unique request.
An encoded string serializing the signature produced by the user’s wallet.
The encoding format for the returned signature
. Currently, only 'hex'
is supported for
Ethereum.
To sign a message make a POST request to
RPC method to execute with the wallet.
Parameters for the RPC method to execute with the wallet.
The RPC method executed with the wallet.
Outputs for the RPC method executed with the wallet.
Looking to send USDC or another ERC-20 token? See our Send USDC recipe.
This method uses Ethereum’s personal_sign
RPC method. If you are looking for a low-level raw signature over a input hash, see secp256k1_sign.
Use the signMessage
method exported from the useSignMessage
hook to sign a message with an Ethereum embedded wallet.
Message to be signed.
The signature produced by the wallet.
Configure callbacks for Privy’s signMessage
method on the useSignMessage
hook:
As parameters to useSignMessage
, you may include an onSuccess
callback and/or an onError
callback.
While this component is mounted, any invocation of signMessage
will trigger the onSuccess
callback or onError
callback on completion, depending on if the message was successfully signed or not.
If set, the onSuccess
callback will execute after a user has successfully signed the message. Within this callback, you can access a signature
parameter, which is the signature
string value generated by the wallet to sign the message.
If set, the onError
callback will execute after a user attempts to sign a message and there is an error, or if the user exits the signature flow prematurely. Within this callback, you may access an error
code with more information about the error.
Use the signMessage
method exported from the useSignMessage
hook to sign a message with an Ethereum embedded wallet.
Message to be signed.
The signature produced by the wallet.
Configure callbacks for Privy’s signMessage
method on the useSignMessage
hook:
As parameters to useSignMessage
, you may include an onSuccess
callback and/or an onError
callback.
While this component is mounted, any invocation of signMessage
will trigger the onSuccess
callback or onError
callback on completion, depending on if the message was successfully signed or not.
If set, the onSuccess
callback will execute after a user has successfully signed the message. Within this callback, you can access a signature
parameter, which is the signature
string value generated by the wallet to sign the message.
If set, the onError
callback will execute after a user attempts to sign a message and there is an error, or if the user exits the signature flow prematurely. Within this callback, you may access an error
code with more information about the error.
Request a message signature on the wallets Ethereum provider.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The signature produced by the wallet.
Request a message signature on the wallet’s Ethereum provider.
The string to sign with the wallet.
The address of the wallet to sign the message with.
The signature produced by the wallet.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The signature produced by the wallet.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The signature produced by the wallet.
The method for the wallet request. For signing messages, this is 'personal_sign'
.
The RPC method executed with the wallet.
Outputs for the RPC method executed with the wallet.
Use the signMessage
method on the Ethereum client to sign a message with an Ethereum wallet.
Unique ID of the wallet to take actions with.
The string or bytes to sign with the wallet.
Idempotency key to identify a unique request.
An encoded string serializing the signature produced by the user’s wallet.
The encoding format for the returned signature
. Currently, only 'hex'
is supported for
Ethereum.
To sign a message make a POST request to
RPC method to execute with the wallet.
Parameters for the RPC method to execute with the wallet.
The RPC method executed with the wallet.
Outputs for the RPC method executed with the wallet.
Looking to send USDC or another ERC-20 token? See our Send USDC recipe.