command
module
Version:
v1.4.0
Opens a new window with list of versions in this module.
Published: Oct 16, 2023
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
tangle-hornet-api
API written in Go to use Tangle Hornet Network.
How to use
Requirements
This library was mainly tested with Go version 1.20.x
We recommend you update Go to the latest stable version to use the library.
Downloading the API
- You can get the latest version of the API by clicking here;
- Give the permission to execute the API:
sudo chmod +x tangle-hornet-api
- If you want to change some parameters, create a file named
tangle-hornet.conf in the /etc/ directory;
- Check the tangle-hornet.conf to see all the parameters you can override.
- Run the API:
./tangle-hornet-api
Build the API by you own
- Clone this repository;
- Download all the dependencies:
go mod tidy
- Execute the project:
go run main.go
Endpoints
| Method |
Enpoint |
Description |
| GET |
/ |
Shows information about Tangle Hornet Network. |
| GET |
/message/messageId/{messageId} |
Get a message by given message ID. |
| GET |
/message/{index} |
Get all messages using a specific index. |
| POST |
/message |
Create and submit a new message. |
POST Body Examples
Routes
/message:
{
"index": "LB_STATUS",
"data": {"available": true, "avgLoad": 3, "createdAt": 1695652263921, "group": "group4", "lastLoad": 4, "publishedAt": 1695652267529, "source": "source4", "type": "LB_STATUS"}
}
License
The MIT license can be found here.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.