Venly API
Search…
⌃K

Signatures

Sign data using your wallet
🧙 The signatures endpoint supports the EIP-712 standard, Ethereum typed structured data hashing and signing. This EIP aims to improve the usability of off-chain message signing for use on-chain.
post
https://api-wallet.venly.io
/api/signatures
Sign a message (arbitrary data)

Example

Request

POST : https://api-wallet.venly.io/api/signatures

Request Body

{
"pincode" : "1234",
"signatureRequest" :
{
"type" : "MESSAGE",
"secretType" : "ETHEREUM",
"walletId" : "1def2753-a428-4fd2-9993-fc06917897c6",
"data" : "I agree with terms and conditions"
}
}

Response

{
"type" : "HEX_SIGNATURE",
"r" : "0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd",
"s" : "0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029",
"v" : "0x1c",
"signature" : "0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c"
}
post
https://api-wallet.venly.io
/api/signatures
Sign an EIP712 message

Example

Request

POST : https://api-wallet.venly.io/api/signatures

Request Body

{
"pincode": 1234,
"signatureRequest": {
"type": "EIP712",
"secretType": "ETHEREUM",
"walletId": "d6c73e54-dce3-4ec4-974f-93942e177d5b",
"data": {
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
},
{
"name": "salt",
"type": "bytes32"
}
],
"Bid": [
{
"name": "amount",
"type": "uint256"
},
{
"name": "bidder",
"type": "Identity"
}
],
"Identity": [
{
"name": "userId",
"type": "uint256"
},
{
"name": "wallet",
"type": "address"
}
]
},
"domain": {
"name": "My amazing dApp",
"version": "2",
"chainId": 1,
"verifyingContract": "0x1C56346CD2A2Bf3202F771f50d3D14a367B48070",
"salt": "0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558"
},
"primaryType": "Bid",
"message": {
"amount": 100,
"bidder": {
"userId": 323,
"wallet": "0x3333333333333333333333333333333333333333"
}
}
}
}
}

Response

{
"success": true,
"result": {
"type": "HEX_SIGNATURE",
"r": "0xc3708e09824e67af571b0c4d2d9a98c4ec5eb2831946674da7db5d6bc1a35635",
"s": "0x53174e2c71cdac33b447974f54cddcf63bd2644106edad6ee53665c032f370b1",
"v": "0x1b",
"signature": "0xc3708e09824e67af571b0c4d2d9a98c4ec5eb2831946674da7db5d6bc1a3563553174e2c71cdac33b447974f54cddcf63bd2644106edad6ee53665c032f370b11b"
}
}