HYCON
  • Docs
  • Topics api/v1
    • Introduction
    • Installation
    • Make your first call
    • API Request
    • API Response
      • HTTP success status codes
      • HTTP error status codes
  • Interacting directly with the network api/v1
    • Prerequisites
    • Address Management
      • Generating a new address
      • Generating a new HD wallet root key
    • Querying an address
      • Getting details of an address
      • Getting details of an HD wallet root key
      • Getting the balance
      • Getting a list of transactions
    • Transaction Management
      • Getting the details of a transaction
      • Creating an outgoing transaction with a private key
      • Creating an outgoing transaction with a signature
      • Creating an outgoing transaction from HD wallet root key
  • Interacting with local Hycon Node api/v1
    • Prerequisites
    • Wallet Management
      • Generating a new wallet
      • Generating a new HD wallet
      • Deleting a wallet
      • Recover a wallet
      • Recover an HD wallet
      • Getting details of a wallet
      • Getting details of an HD wallet
      • Getting a list of wallets
      • Making an outgoing transaction
    • Getting Blockchain Information
      • Getting block info at a specific height
      • Getting highest block on current chain
    • Fetching Block(s)
      • Getting the details of a block
      • Getting a list of recently published blocks
    • Fetching Peer(s)
      • Getting a list of peers
    • Miscellaneous Tools
      • Generating a new mnemonic
      • Get network market cap
      • Query if block is an uncle block
      • Amount of mining reward from block
  • Reference api/v1
    • Language Support
    • Blockchain Reorganization
  • Topics api/v3
    • Introduction
    • Installation
    • Make your first call
    • API Request
    • API Response
      • HTTP success status codes
      • HTTP error status codes
  • Address API api/v3
    • Prerequisites (/address)
    • Getting address information
      • Query method (get address)
      • URL method (get address)
      • Response (get address)
  • Block API api/v3
    • Prerequisites (/block)
    • Getting the latest block information
      • Response (latest block)
    • Getting specific block information
      • Query method (specified block)
      • URL method (specified block)
      • Response (specified block)
    • Getting mined block information
      • Query method (mined blocks)
      • URL method (mined blocks)
      • Response (mined blocks)
    • Getting tip information
      • Response (tip info)
  • Network API api/v3
    • Prerequisites (/network)
    • Getting market information
      • Response (market cap info)
    • Getting list of peers
      • Query method (peer list)
      • URL method (peer list)
      • Response (peer list)
    • Getting information of specific peer
      • Query method (specified peer)
      • URL method (specified peer)
      • Response (specified peer)
  • Transaction API api/v3
    • Prerequisites (/tx)
    • Getting specific transaction information
      • Query method (specified tx)
      • URL method (specified tx)
      • Response (specified tx)
    • Getting transactions by address
      • Query method (tx by address)
      • URL method (tx by address)
      • Response (tx by address)
    • Getting pending transactions
      • Query method (pending txs)
      • URL method (pending txs)
      • Response (pending txs)
    • Creating an outgoing transaction
      • Response (created tx)
  • Wallet API api/v3
    • Prerequisites (/wallet)
    • Getting information of wallet list
      • Query method (wallet list)
      • Response (wallet list)
    • Getting information of specific wallet
      • Query method (specified wallet)
      • URL method (specified wallet)
      • Response (specified wallet)
    • Delete Wallet
      • Query method (delete wallet)
      • URL method (delete wallet)
      • Response (delete wallet)
    • Generate random mnemonic
      • Response (random mnemonic)
    • Generate / Recover normal wallet or HD wallet with password or passphrase
      • Response (generate/recover wallet)
    • Decrypt and get an HD wallet information
      • Response (get HD wallet information)
  • Reference api/v3
    • Blockchain Reorganization
    • Language Support
Powered by GitBook
On this page

Was this helpful?

  1. Interacting directly with the network api/v1
  2. Address Management

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

{
	"mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
    "language": "english",
    "index": 0
}

Example request

$ curl -X POST http://localhost:2442/api/v1/HDWallet \
    -H 'Content-Type: application/json;charset=utf-8' \
    -d '{
	  "mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
	  "language": "english",
      "index": 0
    }'

Response (Success)

{
    "rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
    "mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
    "language": "english",
    "index": 0,
    "address": "H34kywGZSMUdPSCa3rqJLeHaRqigS3Bnt"
}
PreviousGenerating a new addressNextQuerying an address

Last updated 3 years ago

Was this helpful?