Signatures

Sign data using your wallet. You can sign an arbitrary message or and EIP712 message.

📘

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.

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.

1. Sign an arbitrary message

Request Endpoint: reference

POST /api/signatures
ParameterParam TypeValueDescriptionExample Value
Signing-MethodHeaderid:valueid: This is the ID of the signing method
value: This is the value of the signing method
756ae7a7-3713-43ee-9936-0dff50306488:123456
ParameterParam TypeDescriptionData TypeMandatory
pincode (Deprecated)BodyPIN related to the wallet IDString
signatureRequestBodyThis object includes the signature requestObject
signatureRequest.typeBodyThis will be MESSAGEString
transactionRequest.secretTypeBodyOn which blockchain the signature will be executedString
signatureRequest.walletIdBodyThe id of the wallet that will sign the messageString
signatureRequest.dataBodyThe message to signString

Request Body:

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

Response Body:

{
  "type" : "HEX_SIGNATURE",
  "r" : "0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd",
  "s" : "0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029",
  "v" : "0x1c",
  "signature" : "0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c"
}

2. Sign an EIP712 message

Request Endpoint: reference

POST /api/signatures
ParameterParam TypeValueDescriptionExample Value
Signing-MethodHeaderid:valueid: This is the ID of the signing method
value: This is the value of the signing method
756ae7a7-3713-43ee-9936-0dff50306488:123456
ParameterParam TypeDescriptionData TypeMandatory
pincode (Deprecated)BodyPIN related to the wallet IDString
signatureRequestBodyThis object includes the signature requestObject
signatureRequest.typeBodyThis will be EIP712String
transactionRequest.secretTypeBodyOn which blockchain the signature will be executedString
signatureRequest.walletIdBodyThe id of the wallet that will sign the messageString
signatureRequest.dataBodyThe JSON of the EIP712 message to signObject

Request Body:

{   
    "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 Body:

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