Creating and Searching Account
Creating an Account for deploying the Smart Contract and searching the results.
Prerequisites
1. You must be authenticated to use the ChainZ API Service. For more details, refer to Getting Started > Creating Credentials and Getting Started > Issuing Access Tokens.
2. The issued access token must be within its validity period.
Creating and Searching Account
Creating Account
1. API information
Use createAccount of the Account API (Link to Reference).
2. Input Information
Access Tokens & API Keys
UserId - Account identification information for the operator
ChainID - Blockchain Identification Information
3. Example of creating a blockchain account for a user
curl -X POST \
"https://account-api.chainz.biz/api/v1/accounts" \
-H "accept: application/json" \
-H "Authorization: Bearer {access token}" \
-H "x-api-key: {API key}"
-H 'Content-Type: application/json' \
-d '{
"userId": "test-user-20210930-01",
"chainId": "8768cb29-2417-4281-84b1-924b82ebb720"
}'
{
"id": "27a3dd91-d59e-40ce-8b66-13429613de8d",
"userId": "test-user-20210930-01",
"chainId": "8768cb29-2417-4281-84b1-924b82ebb720",
"address": "0xbdc1776dd12feda8cc0f85fec65ea9e6ec906791",
"status": "ACTIVE"
}
Searching Account
1. API information
Use getAccount of the Account API (Link to Reference).
2. Input Information
Access Tokens & API Keys
UserId - Account identification information for the operator
ChainID - Blockchain Identification Information
3. Example of searching a user's Blockchain account information
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 {access token}" \
-H "x-api-key: {API key}"
{
"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