> For the complete documentation index, see [llms.txt](https://codevasp.gitbook.io/code-api-docs-ko/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codevasp.gitbook.io/code-api-docs-ko/code-cipher/api-specification/id-connect.md).

# ID Connect

## ID Connect 요건에 맞게 사용자 정보 암호화 및 필요 정보를 구성합니다.

<mark style="color:green;">`POST`</mark> `/api/v1/code/connect/hash`

Response에서 받은 Body값을 그대로 다음 API(본인 인증)에 사용합니다.

이름은 성, 이름이 반드시 분리되어있어야 합니다. 한글/영문 모두 가능하나 반드시 각 VASP의 이름이 동일 해야합니다.

Input Body

* firstName (Required): 이름
* lastName (Required): 성
* dateOfBirth (Required): 생년월일(예: 1990-01-01)&#x20;
  * 형식이 반드시 일치해야합니다. yyyy-MM-dd 형식으로 해주세요.
* accountNumber (Required): 가상 자산 지갑 주소 (beneficiary address)
  * 요청자의 가상 지갑 주소.
  * 예를들어 VASP A 에서 VASP B 요청 시, VASP A 주소를 넣고, \
    반대로 VASP B 에서  VASP A 로 보낼때는 VASP A주소를 넣어야 합니다.
* tag (Optional): 가상 자산 2차 주소 (예: XRP의 메모)
* currency : (Required): 가상 자산의 심볼. (예: Ethereum 또는 Ether 대신 ETH)
* network (Optional): 블록체인 network (VASP List API에 enum이 제공 됩니다)
* txId (Optional): 블록체인 트랜잭션 아이디
  * 블록체인 수신(입금) 시 (Required)
* requestId (Required): unique 요청 ID
  * UUID v4

```json
{
    "txId": "b170572d0-8b48-425c-b062-bd93f6a1cf90",
    "firstName": "Simon",
    "lastName": "Sanderson",
    "dateOfBirth": "1999-01-01",
    "accountNumber": "mifKeopCpgYhQiXK9kgeT4nFnzgc36zWxB",
    "network": "BTC",
    "currency": "BTC",
    "requestId": "681f27dd-43e4-4ea3-9bcc-607426d6349f",
    "tag": ""
}
```

Example Request

```
curl --location 'localhost:8787/api/v1/code/connect/hash' \
--data '{
    "txId": "b170572d0-8b48-425c-b062-bd93f6a1cf90",
    "firstName": "Simon",
    "lastName": "Sanderson",
    "dateOfBirth": "1999-01-01",
    "accountNumber": "mifKeopCpgYhQiXK9kgeT4nFnzgc36zWxB",
    "network": "BTC",
    "currency": "BTC",
    "requestId": "681f27dd-43e4-4ea3-9bcc-607426d6349f",
    "tag": ""
}'
```

Example Response

200 OK

```json
{
    "signature": "9z7d4n3w4DQUjdbbRmRfDPxnGFRZG0JikUO/RS1Lw0JuZSep8BDYjZPu6p/2Ul5a3z8JlPX6jFlIPqjx1yrlDA==",
    "nonce": 1258508432,
    "dateTime": "2023-07-28T01:26:16Z",
    "publicKey": "SK7C3UW65sKd8MqSwtbPW4evbUJ9NHTrksXg/pFjERg=",
    "body": "{\"fullName\":\"0257d352a0f459ac484559de4d3e95860504e1004c48ce3179c4eef79d34e9de\",\"dateOfBirth\":\"fcde00b12839f0529c9d00048f80f8b0ce8e1da7d1807d2da2847b099c8b123b\",\"hashSalt\":\"ad30d9ef-780e-4449-886b-d6c371cd3473\",\"network\":\"BTC\",\"txId\":\"b170572d0-8b48-425c-b062-bd93f6a1cf90\",\"requestId\":\"681f27dd-43e4-4ea3-9bcc-607426d6349f\",\"currency\":\"BTC\",\"accountNumber\":\"mifKeopCpgYhQiXK9kgeT4nFnzgc36zWxB\",\"tag\":\"\"}"
}
```

400 Bad Request

```json
{
  "errorType": "MISSING_REQUIRED_MSG_FIELD",
  "errorMsg": "[requestId is required and not allow empty value]"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://codevasp.gitbook.io/code-api-docs-ko/code-cipher/api-specification/id-connect.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
