Understanding message signing within the OmniSafe API.
Requesting a Message Signature
POST /v1/signs
endpoint. This process is asynchronous and requires approval through our Proof of Action (PoA) mechanism.POST /v1/signs
- Request Signature API Referencemessage
(string, required): The message to be signed, Base64 encoded. Example: "SGVsbG8gV29ybGQh"
(which decodes to “Hello World!”).address
(string, required): The user’s wallet address. Example: "0x..."
callbackUrl
(string, required): URL to receive the signing result via webhook. Example: "https://example.com/callback"
chainId
(integer, required, Ethereum Specific): Ethereum chain ID (EIP-155). Example: 1
202 Accepted
: Signing request accepted. Returns a JSON object with the requestId
:400 Bad Request
: Returned for invalid requests (e.g., missing parameters, invalid address, invalid Base64 message). The response includes an error message. Example:requestId
. You must use the requestId
to check the signing status. You will also receive the signing result via the specified callbackUrl
.message
field must be Base64 encoded.callbackUrl
is properly configured to receive the signing result (signature or error).Getting Signing Request Status
GET /v1/signs/{request-id}
endpoint.GET /v1/signs/{request-id}
- Get Signature Status API Referencerequest-id
(path parameter, required): The ID of the signing request, obtained from the POST /v1/signs
response.200 OK
: Returns a JSON object with the signing status. The response includes:status
(string): The signing status (either "PENDING"
, "DONE"
, or "FAILED"
).signature
(string, optional): The signature (hexadecimal), only present if status
is "DONE"
. Example: "0x..."
error
(string, optional): An error message, only present if status
is "FAILED"
. Example: "Signing failed"
404 Not Found
: Returned if the request-id
is not found.