Appearance
Documentation / react-auth / useSignTypedData
Function: useSignTypedData()
useSignTypedData(
callbacks
?):Object
Use this hook to sign typed data using the embedded wallet, and to attach callbacks for success and errors.
Parameters
• callbacks?: Object
• callbacks.onError?: (error
) => void
Callback that will execute in the case of a non-successful signTypedData.
ParamPrivyErrorCode - the corresponding error code
• callbacks.onSuccess?: (params
) => void
Callback that will execute once a successful signTypedData
completes.
Param the signature (type string) of the embedded wallet used to sign
Returns
Object
signTypedData - prompts the user to sign typed data with their embedded wallet
signTypedData
signTypedData: (
input
,options
?) =>Promise
<Object
>Parameters
• input:
SignTypedDataParams
• options?:
Object
• options.address?:
string
• options.uiOptions?:
SignMessageModalUIOptions
Returns
Promise
<Object
>signature
signature:
string