Skip to main content
POST
/
v1
/
signature
/
sign-hash
Sign Hash
curl --request POST \
  --url https://api.example.com/v1/signature/sign-hash \
  --header 'Content-Type: application/json' \
  --data '
{
  "keyId": "<string>",
  "hash": "<string>",
  "coinType": 123,
  "accountIndex": 123,
  "algorithm": "<string>"
}
'
{
  "signature": "<string>",
  "algorithm": "<string>"
}

Sign Hash

Sign a raw hash without protocol-specific processing. Use this for custom signing scenarios or when you’ve already computed the message hash.

Request

keyId
string
required
KMS key identifier
hash
string
required
Hash to sign in hex format (32 bytes for secp256k1)
coinType
integer
required
BIP-44 coin type
accountIndex
integer
required
Account index for key derivation
algorithm
string
Signing algorithm (default: secp256k1)

Response

signature
string
Signature in hex format
algorithm
string
Algorithm used

Example

curl -X POST https://api.axonvault.io/v1/signature/sign-hash \
  -H "X-Access-Key: ak_live_abc123" \
  -H "X-Signature: 5d41402abc4b2a76b9719d911017c592" \
  -H "X-Timestamp: 2024-01-15T10:30:00Z" \
  -H "Content-Type: application/json" \
  -d '{
    "keyId": "key_xyz789",
    "hash": "0xabc123def456789...",
    "coinType": 60,
    "accountIndex": 0,
    "algorithm": "secp256k1"
  }'

Response Example

{
  "signature": "0x1234567890abcdef...",
  "algorithm": "secp256k1"
}

Use Cases

Use CaseDescription
EIP-712Sign typed data messages
Personal SignSign arbitrary messages
Custom ProtocolsSign for non-standard chains

Errors

Error TypeStatusDescription
invalid_request400Invalid hash format
key_not_found404Key ID not found
unsupported_algorithm400Algorithm not supported