CodeVASPCodeVASP
Travel RuleAPI Reference04-CodeVASP-Cipher

04-Decrypt

This decryption function can be used universally. It decrypts with an algorithm that meets the requirements of CodeVASP travel rule.

remotePublicKey is the value of the header's X-Code-Req-PubKey.

Endpoint

POST /api/v1/code/decrypt

Request Parameters

Headers

NameTypeRequiredDescription
acceptstringOptionalapplication/json
content-typestringRequiredapplication/json

Body Parameters

NameTypeRequiredDescription
allianceNamestringRequiredTravel Rule protocol code (default: CODE)
datastringRequiredAny data you want to decrypt
remotePublicKeystringRequiredCounter VASP's public key

Response

Fields

NameTypeDescription
bodyStringstringDecrypted string
bodyobjectDecrypted ivms101 object

Examples

Request

curl --request POST \
     --url https://your-server-host.com/api/v1/code/decrypt \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "allianceName": "CODE",
  "remotePublicKey": "8DJomhrvr0zD11+m3nwG3ZeO9OsSY8uLHdA7WgoaX0g=",
  "data": "jf6V5hL6VxjYD6+RdMm7NIRKCrFAn4HQ5ZumHgBS7ywcczAB0jK7/hMKHQBFm1RECbKOYGXroA8h+cSvMUABof+dIzqt3intiS9qfXe2bYfq9fdpicrcyhZOHnJT3tOz3HLM1SuxXSFNHrcmrIRE4KL80uV3gRcH7Z6gtbgFhlNDzzL/"
}'

Response

{
  "body": {
    "ivms101": {
      "Beneficiary": {
        "beneficiaryPersons": [],
        "accountNumber": [
          "3432fwsf3q4qweqwef"
        ]
      }
    }
  },
  "bodyString": "{\"ivms101\":{\"Beneficiary\":{\"beneficiaryPersons\":[],\"accountNumber\":[\"3432fwsf3q4qweqwef\"]}}}"
}

On this page