Demos
Sign Message
Sign Message
This example shows how to sign a message.
Sign Message
Sign a message using the Starknet wallet
The useSignTypedData hook
The useSignTypeData hook implements signature in the spirit of
EIP-712.
The hook accepts 4 arguments:
types: type definitions used inmessage. Must contain theStarkNetDomaintype defined below.primaryType: the root type ofmessage.domain: its structure must followStarkNetDomain.message: the message to sign and that will be displayed in the wallet.
Example data
The following snippet contains an example JSON document.
This how you can use the hook to request the user to sign a piece of data.