Generating a new address

api/v1

The first step to be able to send and receive Hycon is by creating a new wallet.

Request Body - Content-Type: application/json;charset=utf-8

Parameter

Type

Required

Description

mnemonic

string

No

A 12- to 24-word BIP39 phrase to seed your wallet's private key

language

string

No

Regional language to generate your wallet's mnemonic phrase (Default: English)

Please check Appendix > Language Support for more information. $language is not case-sensitive.

Response - 200 OK, application/json

Parameter

Type

Description

mnemonic

string

A 12- to 24-word BIP39 phrase to seed your wallet's private key

privateKey

string

The generated private key from the mnemonic

address

string

The generated Hycon wallet address

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/wallet

Example request body

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

Example request

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

Response (Success)

{
    "mnemonic": "someone window crucial magic shoulder latin satisfy total siege curtain candy trip",
    "privateKey": "7bf8ec7059c3f5237ec2651dbb1997f0288a260e1f9335ecf33df49b148b0710",
    "address": "H34kywGZSMUdPSCa3rqJLeHaRqigS3Bnt"
}

Last updated