Creating an outgoing transaction from HD wallet root key

api/v1

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

Parameter

Type

Required

Description

tx

object

Yes

Transaction information with the below parameters:

tx.address

string

Yes

A Hycon wallet address of the recipient

tx.amount

string

Yes

Amount of Hycon to send to the recipient

tx.minerFee

string

Yes

Transaction fee in Hycon

tx.nonce

number

No

The transaction number sent from the Hycon address

rootKey

string

Yes

Root key of the wallet you want to use for the transaction

index

number

Yes

HD wallet index to a specific wallet address

Response - 200 OK, application/json

Parameter

Type

Description

hash

string

Hash representation of the transaction after it is created

Response Error Table

Status

Error

Message

400

INVALID_PARAMETER

Invalid address: Please check 'To address'

POST/api/v1/sendTxWithHDWalletRootKey

Example request body

{
    "tx": {
        "address": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
        "amount": "0.000000001",
        "minerFee": "0.000000001"
    },
    "rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
    "index": 0
}

Example request

$ curl -X POST http://localhost:2442/api/v1/sendTxWithHDWalletRootKey \
    -H 'Content-Type: application/json;charset=utf-8' \
    -d '{
        "tx": [
            {
                "address": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
                "amount": "0.000000001",
                "minerFee": "0.000000001"
            }
        ],
        "rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
        "index": 0
    }'

Response (Success)

{ "hash": "3AeeciKEM97w32GLQPeSnU1i6U9G2YxbeyVc7BQb4LQD" }

Last updated