Powered By GitBook
Creating an outgoing transaction with a private key
api/v1
Send Hycon from a wallet via a private key to another Hycon wallet. All transactions include a n HYC miner fee.
Request Body - Content-Type: application/json;charset=utf-8
Parameter
Type
Required
Description
privateKey
string
Yes
A Hycon wallet's generated private key
to
string
Yes
A Hycon wallet address of the receiver
amount
string
Yes
Amount of Hycon to send to recipient
fee
string
Yes
Transaction fee, in Hycon, to complete the transaction
nonce
number
No
The transaction number sent from the Hycon address
Response - 200 OK, application/json
Parameter
Type
Description
txHash
string
Hash representation of the transaction after it is created
Response Error Table
Status
Error
Message
404
INVALID_PARAMETER
insufficient wallet balance to send transaction
404
INVALID_PARAMETER
could not queue transaction
POST/api/v1/signedtx
Example request body
1
{
2
"privateKey": "65b4f0c4e5594117e7a7951e60dc81e5701731c61830a30e1bd8199a469f6f90a",
3
"to": "H3zYvzxTDGEF9fZtmzLV78h38J4BR2qnL",
4
"amount": "25.995459977",
5
"fee": "0.000001"
6
}
Copied!
Example request
1
$ curl -X POST http://localhost:2442/api/v1/signedtx \
2
-H 'Content-Type: application/json;charset=utf-8' \
3
-d '{
4
"privateKey": "65b4f0c4e5594117e7a7951e60dc81e5701731c61830a30e1bd8199a469f6f90a",
5
"to": "H3zYvzxTDGEF9fZtmzLV78h38J4BR2qnL",
6
"amount": "25.995459977",
7
"fee": "0.000001"
8
}'
Copied!
Response (Success)
1
{ "txHash": "A3CpvMaSm92mYbShhRwxFuXQYrNba1iZwBeCRrfhoeBn" }
Copied!
Last modified 3mo ago
Copy link