Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateTopicID = func(client *hedera.Client) func(c *gin.Context) { return func(c *gin.Context) { topic, err := hcs.CreateTopicID(c, client) if err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": "failed to create topic-id"}) return } c.JSON(http.StatusOK, gin.H{ "topicID": topic, }) } }
View Source
var SubmitMessage = func(client *hedera.Client) func(c *gin.Context) { return func(c *gin.Context) { topicid := c.Param("topicid") htx := &hcs.HCSTx{} err := c.ShouldBindJSON(&htx) if err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": "cannot bind the request"}) return } tx, err := hcs.HCSSubmitMessage(c, client, topicid, htx.Message) if err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": "hedera consenses service failed to submit message"}) return } c.JSON(http.StatusOK, tx) } }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.