2. 토큰 발급
본 API는 Unhosted Wallet 검증을 위한 토큰과 walletVerificationId를 발급합니다.
token은 일회용이며 24시간 동안 유효하여 검증 위젯을 실행할 수 있습니다.
walletVerificationId는 각 요청마다 새로 발급되는 검증 세션의 고유 식별자로, 검증 결과를 조회하는 데 사용할 수 있습니다.
Endpoint
POST /v1/code/unhosted-wallet-verification/widget/token
요청 매개변수
Body 매개변수
| 이름 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
| blockchain | string | 필수 | 블록체인 네트워크 (예: ETH). |
| asset | string | 필수 | 토큰 티커 (예: ETH). |
| address | string | 필수 | 사용자의 지갑 주소. |
| customerIdentification | string | 필수 | 사용자 식별 번호. |
| widgetRenderingOrigin | string | 필수 | 위젯이 호스팅되는 원본 (프로토콜 + 도메인 + 포트). |
| callbackUrl | string | 선택 | 검증 결과에 대한 콜백 URL. |
응답
필드
| 이름 | 타입 | 설명 |
|---|---|---|
| token | string | 검증 위젯 토큰. |
| walletVerificationId | string | 검증 세션 ID. |
예시
요청
curl --request POST \
--url https://trapi-dev.codevasp.com/v1/code/unhosted-wallet-verification/widget/token \
--header 'X-Code-Req-Datetime: 2026-03-04T15:10Z' \
--header 'X-Code-Req-Nonce: 989166249' \
--header 'X-Code-Req-PubKey: YourPubkey' \
--header 'X-Code-Req-Signature: Signature' \
--header 'X-Request-Origin: code:yourVaspEntityId' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"blockchain": "ETH",
"asset": "ETH",
"address": "0x...",
"customerIdentification": "codevasp-user-1",
"widgetRenderingOrigin": "https://widget.codevasp.com",
"callbackUrl": "https://widget.codevasp.com/callback"
}
'
응답
{
"token": "widget-token",
"walletVerificationId": "7c7cb929-b274-4841-9476-5dd43630a08a"
}