signEip712
Signing an EIP712 structured message
​
This function signs a structured EIP712 message using a specific account.
1
signer.signEip712({
2
walletId: '71dec640-4eb8-4321-adb8-b79461573fc4',
3
secretType: 'ETHEREUM',
4
data : {
5
"types":{
6
"EIP712Domain":[
7
{
8
"name":"name",
9
"type":"string"
10
},
11
{
12
"name":"version",
13
"type":"string"
14
},
15
{
16
"name":"chainId",
17
"type":"uint256"
18
},
19
{
20
"name":"verifyingContract",
21
"type":"address"
22
},
23
{
24
"name":"salt",
25
"type":"bytes32"
26
}
27
],
28
"Bid":[
29
{
30
"name":"amount",
31
"type":"uint256"
32
},
33
{
34
"name":"bidder",
35
"type":"Identity"
36
}
37
],
38
"Identity":[
39
{
40
"name":"userId",
41
"type":"uint256"
42
},
43
{
44
"name":"wallet",
45
"type":"address"
46
}
47
]
48
},
49
"domain":{
50
"name":"My amazing dApp",
51
"version":"2",
52
"chainId":1,
53
"verifyingContract":"0x1C56346CD2A2Bf3202F771f50d3D14a367B48070",
54
"salt":"0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558"
55
},
56
"primaryType":"Bid",
57
"message":{
58
"amount":100,
59
"bidder":{
60
"userId":323,
61
"wallet":"0x3333333333333333333333333333333333333333"
62
}
63
}
64
}
65
})
Copied!

Signature

1
signer.signEip712(eip712SignRequestDto, options?): Promise<SignerResult>
Copied!

Returns

1
Promise<SignerResult>
Copied!
1
{
2
"type" : "HEX_SIGNATURE",
3
"r" : "0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd",
4
"s" : "0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029",
5
"v" : "0x1c",
6
"signature" : "0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c"
7
}
Copied!
​
Parameter
Required
Description
True
EIP712 signature request you want to sign. For more info on how this request should look like, see eip712SignRequestDto .
​options​
False
Redirect options you want to pass. Only available when using a REDIRECT signer​

​

Last modified 1yr ago
Copy link