messages

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubmitMessage

func SubmitMessage(
	nodeUrl string,
	index string,
	content string,
	timeoutInSeconds int,
) bool

Sends a new message to the Tangle Hornet Network, using a specific index.

Types

type Message

type Message struct {
	Index string `json:"index"`
	Data  string `json:"data"`
}

func GetAllMessagesByIndex

func GetAllMessagesByIndex(nodeUrl string, index string) ([]Message, error)

Get all messages available on the node by a given index.

func GetLastHourMessagesByIndex added in v1.5.0

func GetLastHourMessagesByIndex(nodeUrl string, index string, maxMessages int) ([]Message, error)

Get a limited amount of messages created in the last hour, available on the node by a given index.

func GetMessageFormattedByMessageID

func GetMessageFormattedByMessageID(nodeUrl string, messageIdHex string) (Message, error)

Get a message on the node by a given message ID, into a custom message type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL