---
updatedAt: 2025-11-05T21:53:38.000Z
agentTools:
  projectIndex: https://docs.venly.io/llms.txt
---

# Build Signature Request

Transforms a generic signature request into a blockchain-specific signature request 
with all necessary parameters populated for the target network.

**Supported operations:**
- **Plain Message signing**
- **EIP-712 structured data signing**

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Wallet API",
    "description": "Wallet API Documentation.",
    "contact": {
      "name": "Venly",
      "url": "https://venly.io",
      "email": "contact@venly.io"
    },
    "version": "0.62.0"
  },
  "servers": [
    {
      "url": "https://api-wallet-sandbox.venly.io",
      "description": "Sandbox environment for testing and development"
    },
    {
      "url": "https://api-wallet.venly.io",
      "description": "Production environment for live applications"
    }
  ],
  "paths": {
    "/api/signatures/build": {
      "post": {
        "tags": [
          "Signatures"
        ],
        "operationId": "buildSignature",
        "summary": "Build Signature Request",
        "description": "Transforms a generic signature request into a blockchain-specific signature request \nwith all necessary parameters populated for the target network.\n\n**Supported operations:**\n- **Plain Message signing**\n- **EIP-712 structured data signing**\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuildSignatureRequest_OneOf"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "JsonNode": {
        "type": "object"
      },
      "BuildSignatureRequest_OneOf": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/BuildEip712SignatureRequest"
          },
          {
            "$ref": "#/components/schemas/BuildMessageSignatureRequest"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "EIP712": "#/components/schemas/BuildEip712SignatureRequest",
            "MESSAGE": "#/components/schemas/BuildMessageSignatureRequest"
          }
        }
      },
      "BuildSignatureRequestBase": {
        "required": [
          "secretType",
          "walletId",
          "type"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Controls the execution behavior of the signature request:\n- **Omit field**: Signature is executed immediately and completed in this request\n- `SAVED`: Creates a draft signature request with assigned UUID for later execution\n- `READY`: Prepares the signature request with assigned UUID, ready for immediate signing\n",
            "enum": [
              "SAVED",
              "READY"
            ]
          },
          "type": {
            "description": "The cryptographic signature method to be used:\n- `MESSAGE`: Plain message signing (personal_sign)\n- `EIP712`: Structured data signing following EIP-712 standard for typed data\n",
            "type": "string",
            "enum": [
              "MESSAGE",
              "EIP712"
            ]
          },
          "secretType": {
            "description": "The blockchain of the signature request",
            "type": "string",
            "enum": [
              "AETERNITY",
              "AVAC",
              "BITCOIN",
              "BSC",
              "ETHEREUM",
              "GOCHAIN",
              "HEDERA",
              "LITECOIN",
              "VECHAIN",
              "MATIC",
              "NEO",
              "IMX",
              "ARBITRUM",
              "OPTIMISM",
              "BASE",
              "XPLA",
              "SOLANA",
              "SUI"
            ]
          },
          "walletId": {
            "description": "The `UUID` of the wallet that will sign the message",
            "type": "string",
            "format": "uuid"
          }
        },
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "EIP712": "#/components/schemas/BuildEip712SignatureRequest",
            "MESSAGE": "#/components/schemas/BuildMessageSignatureRequest"
          }
        }
      },
      "BuildEip712SignatureRequest": {
        "title": "Build EIP712 Signature Request",
        "required": [
          "secretType",
          "walletId",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BuildSignatureRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "EIP712"
                ],
                "description": "Must be 'EIP712' for structured data signatures"
              },
              "secretType": {
                "description": "The EVM-compatible blockchain network for EIP-712 signatures",
                "type": "string",
                "enum": [
                  "AETERNITY",
                  "AVAC",
                  "BITCOIN",
                  "BSC",
                  "ETHEREUM",
                  "GOCHAIN",
                  "HEDERA",
                  "LITECOIN",
                  "VECHAIN",
                  "MATIC",
                  "NEO",
                  "IMX",
                  "ARBITRUM",
                  "OPTIMISM",
                  "BASE",
                  "XPLA"
                ]
              },
              "data": {
                "$ref": "#/components/schemas/JsonNode",
                "description": "The structured data to be signed, following EIP-712 format"
              }
            }
          }
        ]
      },
      "BuildMessageSignatureRequest": {
        "title": "Build Message Signature Request",
        "required": [
          "secretType",
          "walletId",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BuildSignatureRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MESSAGE"
                ],
                "description": "Must be 'MESSAGE' for plain data signatures"
              },
              "data": {
                "type": "string",
                "description": "The message to be signed"
              }
            }
          }
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates whether the request was successful",
            "example": false
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorBody"
            },
            "description": "List of errors that occurred"
          },
          "result": {
            "type": "object",
            "description": "Present only if success == true. Contains the actual result. Set to null or omitted when success == false.\n"
          }
        }
      },
      "ErrorBody": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Machine-readable error code (e.g., VALIDATION_ERROR, UNAUTHORIZED)",
            "example": "VALIDATION_ERROR"
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the error",
            "example": "The wallet ID must be a valid UUID."
          },
          "traceCode": {
            "type": "string",
            "description": "Unique identifier for tracing the error in logs"
          }
        }
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login-staging.venly.io/auth/realms/Arkane/protocol/openid-connect/token",
            "scopes": {
              "openid": "openid"
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Request validation failed (400)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "invalidInput": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "VALIDATION_ERROR",
                      "message": "The 'walletId' is not a valid UUID.",
                      "field": "walletId"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Authentication required or failed (401)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "auth": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "UNAUTHORIZED",
                      "message": "Missing or invalid OAuth2 token."
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "User lacks required permissions (403)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "forbidden": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "FORBIDDEN",
                      "message": "User does not have permission to access this wallet."
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found (404)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "notFound": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "NOT_FOUND",
                      "message": "Wallet with ID 'abc123' was not found."
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "HTTP method not supported (405)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "method": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "METHOD_NOT_SUPPORTED",
                      "message": "HttpMethod is not supported. Supported methods are [GET, POST]."
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "Request body is not valid JSON or wrong media type (415)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "media": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "INVALID_MEDIA_TYPE",
                      "message": "Request must be application/json."
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error (500)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "server": {
                "value": {
                  "success": false,
                  "errors": [
                    {
                      "code": "INTERNAL_SERVER_ERROR",
                      "message": "An unexpected error occurred. Please try again later."
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```