This repository was archived by the owner on May 6, 2025. It is now read-only.
Api node hornet 2 #1942
Unanswered
dariolicci
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I started a docker container, as instructions on my mac, the hornet node starts correctly, I added the port 14265 binding to be able to interact via API calls.
The only correct call I can get is the following.
request:
curl localhost:14265/api/core/v2/info
response:
{"name":"HORNET","version":"2.0.1","status":{"isHealthy":false,"latestMilestone":{"index":1095352},"confirmedMilestone":{"index" :1095352},"pruningIndex":1095352},"supportedProtocolVersions":[2],"protocol":{"version":2,"networkName":"testnet-2","bech32Hrp":"rms","minPowScore ":1500,"belowMaxDepth":15,"rentStructure":{"vByteCost":100,"vByteFactorData":1,"vByteFactorKey":10},"tokenSupply":"288230376151711743"},"pendingProtocolParameters":[], "baseToken":{"name":"IOTA","tickerSymbol":"IOTA","unit":"IOTA","subunit":"micro","decimals":6,"useMetricPrefix":false}, "metrics":{"blocksPerSecond":0,"referencedBlocksPerSecond":0,"referencedRate":0},"features":[]}
I did not find in the documentation the list of all the API calls that the service exposes.
For example, how can I enter a transaction?
I found something like this on the web but it doesn't work
Create a transaction (example)
curl -X POST -H "Content-Type: application/json" -d '{
"command": "transfer",
"transfers": [
{
"address": "address_of_the_recipient",
"value": 1,
"message": "Hello, IOTA!",
"tag": "MYTAG"
}
]
}' http://ip_address_of_your_node:port
Get the transaction hash from the transaction creation result
Now broadcast the transaction on the network
curl -X POST -H "Content-Type: application/json" -d '{
"command": "broadcastTransactions",
"trytes": ["trytes_of_your_transaction"]
}' http://ip_address_of_your_node:port
thanks in advance for a reply
Greetings
Dario
Beta Was this translation helpful? Give feedback.
All reactions