Account 생성 및 조회

Smart Contract를 배포하기 위한 Account를 생성하고 결과를 조회합니다.

사전 조건

1. ChainZ API Service를 사용하기 위한 인증이 되어 있어야 합니다. 자세한 사항은 Getting Started > 인증 정보 생성 Getting Started > 액세스 토큰 발급 항목을 참고하시기 바랍니다.

2. 발급된 액세스 토큰이 유효 기간 내에 있어야 합니다.

Account 생성 및 조회

Account 생성

1. API 정보

Account API의 createAccount를 사용합니다(참고 링크).

2. 입력 정보

  • 액세스 토큰 & API 키

  • userID - 사업자의 계정 식별 정보

  • chainID - Blockchain 식별 정보

3. 사용자의 Blockchain account 생성 예시

# Account API(Account 생성) 사용 예시 - Request
curl -X POST \
  "https://account-api.chainz.biz/api/v1/accounts" \
  -H  "accept: application/json" \
  -H  "Authorization: Bearer {액세스 토큰}" \
  -H  "x-api-key: {API 키}"
  -H 'Content-Type: application/json' \
  -d '{
  "userId": "test-user-20210930-01",
  "chainId": "8768cb29-2417-4281-84b1-924b82ebb720"
}'
# Account API(Account 생성) 사용 예시 - Response
{
    "id": "27a3dd91-d59e-40ce-8b66-13429613de8d",
    "userId": "test-user-20210930-01",
    "chainId": "8768cb29-2417-4281-84b1-924b82ebb720",
    "address": "0xbdc1776dd12feda8cc0f85fec65ea9e6ec906791",
    "status": "ACTIVE"
}

Account 조회

1. API 정보

Account API의 getAccount를 사용합니다(참고 링크).

2. 입력 정보

  • 액세스 토큰 & API 키

  • userID - 사업자의 계정 식별 정보

  • chainID - Blockchain 식별 정보

3. 사용자의 Blockchain account 정보 조회 예시

# Account API(Account 조회) 사용 예시 - Request
curl -X GET \
    "https://account-api.chainz.biz/api/v1/accounts?userId=user0001&chainId=5a9d9e56-ef2b-401c-a026-cedeed1ce457" \
    -H  "accept: application/json" \
    -H  "Authorization: Bearer {액세스 토큰}" \
    -H  "x-api-key: {API 키}"
# Account API(Account 조회) 사용 예시 - Response
{
  "totalCount": 1,
  "data": [
  {
    "id": "27a3dd91-d59e-40ce-8b66-13429613de8d",
    "userId": "test-user-20210930-01",
    "chainId": "8768cb29-2417-4281-84b1-924b82ebb720",
    "address": "0xbdc1776dd12feda8cc0f85fec65ea9e6ec906791",
    "status": "ACTIVE"
  }
  ]
}

Last updated

Was this helpful?