Documentation
¶
Index ¶
- Constants
- func CreateTopic(ctx context.Context, db *sql.DB, topic TopicID, name string, txid string, ...) error
- func EncodeNewsMessage(topic TopicID, headline string, content string) []byte
- func EncodeTopicCreationMessage(topic TopicID, name string, retentionDays int32) []byte
- func OPReturnToReadable(data []byte) string
- func Persist(ctx context.Context, db *sql.DB, values []OPReturn) error
- func TopicExists(ctx context.Context, db *sql.DB, topic TopicID) (bool, error)
- type CoinNews
- type OPReturn
- type Topic
- type TopicID
- type TopicInfo
Constants ¶
View Source
const TopicIdLength = 4
Variables ¶
This section is empty.
Functions ¶
func CreateTopic ¶
func EncodeNewsMessage ¶
Format for OP_RETURN message: <topic (4 bytes)><headline (64 bytes)><message (arbitrary length)>
func EncodeTopicCreationMessage ¶
Format for OP_RETURN message: <topic>new<retention_days_1byte><title> retention_days is stored as a single byte (0-255, where 0 = infinite)
func OPReturnToReadable ¶
Types ¶
type CoinNews ¶
type OPReturn ¶
type Topic ¶
Click to show internal directories.
Click to hide internal directories.