Sign an EIP712 message
How to ask users to sign an EIP712 structured message.
Signing an EIP712 structured message is similar to signing a message.
The object that can ask the user his approval is called a Signer, once we've created a Signer object we can use the Signer to sign the EIP712 message.

Function

1
//Creating the signer
2
venlyConnect.createSigner();
3
​
4
//Asking the signer to sign a message.
5
signer.signMessage({
6
walletId: '<WALLET_ID>',
7
secretType: '<BLOCKCHAIN>',
8
data : "<YOUR JSON STRUCTERED EIP712 DATA>"
9
})
Copied!

Example

1
const signer = venlyConnect.createSigner();
2
​
3
signer.signMessage({
4
walletId: 'c8ec9954-fa1a-4682-9cf8-ef5c1015d1d1',
5
secretType: 'ETHEREUM',
6
data : "I agree with terms and conditions"
7
})
Copied!

Returns

1
{
2
result: {
3
r: "0xc5e7a538a353c53e839ed0a2cf7b726806114b637ad1c527046adfc92fecf0d8"
4
s: "0x551041e78e3b3d4432f653d708965d34aceaf067255d9cc5970283b00d5f95e0"
5
signature: "0xc5e7a538a353c53e839ed0a2cf7b726806114b637ad1c527046adfc92fecf0d8551041e78e3b3d4432f653d708965d34aceaf067255d9cc5970283b00d5f95e01b"
6
v: "0x1b"
7
}
8
status: "SUCCESS"
9
}
Copied!

Function Reference

The function reference describes the different functions that are available in the Widget. For each function you can find the signature, it's parameters, and possible options documented.
​
Last modified 7d ago