Generate cryptographic key pair using HSM
One-time setup endpoint that generates a seed public key from HSM using BIP44 derivation. The user then derives their final key pair locally using this seed.
POST
/auth/create-key
curl \
--request POST 'https://pay-api-dev.aiic.nz/v1/auth/create-key' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"ledgerPath":"NZD/main","secretNumber":"1234"}'
Request examples
{
"ledgerPath": "NZD/main",
"secretNumber": "1234"
}
Response examples (201)
{
"success": true,
"seedPublicKey": "04a1b2c3d4e5f6...",
"keyId": "550e8400-e29b-41d4-a716-446655440000",
"message": "Use this seed public key to derive your key pair locally"
}
Response examples (400)
{
"success": false,
"error": "Invalid request parameters",
"errorCode": "INVALID_PARAMETERS",
"details": {},
"timestamp": "2025-05-04T09:42:00Z"
}
Response examples (500)
{
"success": false,
"error": "Invalid request parameters",
"errorCode": "INVALID_PARAMETERS",
"details": {},
"timestamp": "2025-05-04T09:42:00Z"
}