1
Requesting a Message Signature
To request a signature for an Ethereum message, use the Important Considerations:
POST /v1/signs
endpoint. This process is asynchronous and requires approval through our Proof of Action (PoA) mechanism.- Endpoint:
POST /v1/signs
- Request Signature API Reference - Summary: Request message signing (custody-based with callback).
- Description: Submits a request to sign an Ethereum message using private keys securely stored within the OmniSafe custody system.
message
(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 therequestId
:
400 Bad Request
: Returned for invalid requests (e.g., missing parameters, invalid address, invalid Base64 message). The response includes an error message. Example:
- Asynchronous Signing: The signing process is asynchronous. After submitting the request, you will receive a
requestId
. You must use therequestId
to check the signing status. You will also receive the signing result via the specifiedcallbackUrl
. - Proof of Action (PoA): Signing requires approval from the wallet owner(s) through our PoA mechanism. This approval process is initiated after the request is submitted.
- Base64 Encoding: The
message
field must be Base64 encoded. - Callback URL: Ensure your
callbackUrl
is properly configured to receive the signing result (signature or error).
2
Getting Signing Request Status
To retrieve the status of a specific signing request, use the
GET /v1/signs/{request-id}
endpoint.- Endpoint:
GET /v1/signs/{request-id}
- Get Signature Status API Reference - Summary: Gets the status of a specific signing request.
- Description: Retrieves the status of a specific signing request. Returns the signing status (PENDING, DONE, or FAILED). If DONE, includes the generated signature.
request-id
(path parameter, required): The ID of the signing request, obtained from thePOST /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 ifstatus
is"DONE"
. Example:"0x..."
error
(string, optional): An error message, only present ifstatus
is"FAILED"
. Example:"Signing failed"
- Pending:
- Success:
- Failure:
404 Not Found
: Returned if therequest-id
is not found.