Powered By GitBook
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
1
{
2
"tx": {
3
"address": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
4
"amount": "0.000000001",
5
"minerFee": "0.000000001"
6
},
7
"rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
8
"index": 0
9
}
Copied!
Example request
1
$ curl -X POST http://localhost:2442/api/v1/sendTxWithHDWalletRootKey \
2
-H 'Content-Type: application/json;charset=utf-8' \
3
-d '{
4
"tx": [
5
{
6
"address": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
7
"amount": "0.000000001",
8
"minerFee": "0.000000001"
9
}
10
],
11
"rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
12
"index": 0
13
}'
Copied!
Response (Success)
1
{ "hash": "3AeeciKEM97w32GLQPeSnU1i6U9G2YxbeyVc7BQb4LQD" }
Copied!
Last modified 3mo ago
Copy link