Generating a new HD wallet root key
api/v1
Request Body - Content-Type: application/json;charset=utf-8
Parameter
Type
Required
Description
rootKey
string
No
Root key generated from the mnemonic. If present, response will only contain this root key.
mnemonic
string
No
A 12- to 24-word BIP39 phrase to seed your wallet's root key
language
string
No
Regional language to generate your wallet's mnemonic phrase (Default: English)
passphrase
string
No
Passphrase of your HD wallet
index
number
No
The index of the HD wallet to lookup. If present, a specific wallet address will be returned from this HD wallet.
Please check Appendix > Language Support for more information. $language is not case-sensitive.
Response - 200 OK, application/json
Parameter
Type
Description
rootKey
string
Root key generated from the mnemonic. If present, response will only contain this root key.
mnemonic
string
A 12- to 24-word BIP39 phrase to seed your wallet's root key
language
string
Regional language to generate your wallet's mnemonic phrase (Default: English)
index
string
Index of the HD wallet (Present if index parameter is sent in the request)
address
number
The generated Hycon wallet address. (Present if index parameter is sent in the request
Response Error Table
Status
Error
Message
400
INVALID_PARAMETER
mnemonic or language is invalid/mismatched
404
NOT_FOUND
the resource cannot be found / currently unavailable
POST/api/v1/HDWallet
Example request body
1
{
2
"mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
3
"language": "english",
4
"index": 0
5
}
Copied!
Example request
1
$ curl -X POST http://localhost:2442/api/v1/HDWallet \
2
-H 'Content-Type: application/json;charset=utf-8' \
3
-d '{
4
"mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
5
"language": "english",
6
"index": 0
7
}'
Copied!
Response (Success)
1
{
2
"rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
3
"mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
4
"language": "english",
5
"index": 0,
6
"address": "H34kywGZSMUdPSCa3rqJLeHaRqigS3Bnt"
7
}
Copied!
Last modified 3mo ago
Copy link