Getting details of an HD wallet root key
api/v1
Request Body - Content-Type: application/json;charset=utf-8
Parameter
Type
Required
Description
rootKey
string
Yes
Root key generated from the mnemonic.
index
number
No
The starting index of the HD wallet to lookup (Default: 0)
count
number
No
The number of wallet addresses to return for the lookup (Default: 10)
Response - 200 OK, application/json
Parameter
Type
Description
address
list
A list of addresses with the following parameters:
balance
string
The amount of Hycon in the address
pendingAmount
string
The amount of Hycon pending in the address
index
number
Index value of the address in the HD walelt
Response Error Table
Status
Error
Message
404
NOT_FOUND
the wallet cannot be found
POST/api/v1/getHDWalletFromRootKey
Example request body
1
{
2
"rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
3
"index": 0,
4
"count": 2
5
}
Copied!
Example request
1
$ curl -X POST http://localhost:2442/api/v1/getHDWalletFromRootKey \
2
-H 'Content-Type: application/json;charset=utf-8' \
3
-d '{
4
"rootkey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
5
"index": 0,
6
"count": 2
7
}'
Copied!
Response (Success)
1
[
2
{
3
"address": "H34kywGZSMUdPSCa3rqJLeHaRqigS3Bnt",
4
"balance": "0",
5
"pendingAmount": "0",
6
"index": 0
7
},
8
{
9
"address": "H2zTphq19pxGWHgHyitKcXgjH9S37JB9L",
10
"balance": "0",
11
"pendingAmount": "0",
12
"index": 1
13
}
14
]
Copied!
Last modified 3mo ago
Copy link