MPC-TSS
Operations
PIN
Update PIN

Update PIN

API Documentation: Update PIN

Overview

This API endpoint allows you to update Wallet's PIN using Recovery PIN.

  • HTTP Method: PUT
  • Endpoint: /api/v1/wallet/pin

Request Body Parameters

  • walletId (required): The wallet identifier.
  • newPin (required) : The PIN need to be in hashed format (SHA-256).
  • recoveryPin (required) : The Recovery PIN need to be in hashed format (SHA-256).

Example Request Body

{
    "walletId": "76cb25ec-2707-42b0-bdf4-1f957489f864",
    "newPin": "64f46a7526a186d2346552453ae478ca51244674f5b21ba150bd483b39f7c812",
    "recoveryPIN": "be6858673714b49e41757c9a45f1e277421eed5dbb993728268f16acf9619041"
}

Request

Request Headers

  • X-CLIENT-ID: (required): Client ID which was generated when register in Xellar TSS API Service Dashboard.
  • X-SIGNATURE: (required): Calculated signature, please refer to Authorization section.
  • X-TIMESTAMP: (required): Request timestamp in RFC3339 format.

Example Request Syntax

curl -X PUT -H "Content-Type: application/json" -H "x-client-id: $YOUR_CLIENT_ID" -H "x-client-secret: $YOUR_CLIENT_SECRET" -d '{
    "walletId": "76cb25ec-2707-42b0-bdf4-1f957489f864",
    "newPin": "64f46a7526a186d2346552453ae478ca51244674f5b21ba150bd483b39f7c812",
    "recoveryPIN": "be6858673714b49e41757c9a45f1e277421eed5dbb993728268f16acf9619041"
}' <BASE_URL>/api/v1/wallet/pin

Response

The response will include a JSON object with the following properties:

  • status (number): The HTTP status code of the response (e.g., 200 for success).
  • message (string): A message providing additional information about the operation.

Example Response

// HTTP 200 OK
{
    "status": 200,
    "message": "Update PIN successfully"
}
 
// 400 bad Request
{
    "error": "wallet ... not setting pin yet"
}