messages

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SE_IPFS    = "IPFS"
	SE_STORAGE = "STORAGE"
)

Variables

This section is empty.

Functions

func GetVerificationBuffer

func GetVerificationBuffer(msg *BaseMessage) []byte

Types

type BaseMessage

type BaseMessage struct {
	ID            map[string]string     `json:"_id"`
	Channel       string                `json:"channel"`
	Sender        string                `json:"sender"`
	Chain         ChainType             `json:"chain"`
	Type          MessageType           `json:"type"`
	Time          float64               `json:"time"`
	ItemType      ItemType              `json:"item_type,omitempty"`
	ItemContent   string                `json:"item_content"`
	ItemHash      string                `json:"item_hash"`
	Signature     string                `json:"signature"`
	Confirmations []MessageConfirmation `json:"confirmations,omitempty"`
	Confirmed     bool                  `json:"confirmed"`
	Size          uint64                `json:"size"`
	HashType      string                `json:"hash_type,omitempty"`
	Content       BaseMessageContent    `json:"content,omitempty"`
}

type BaseMessageContent

type BaseMessageContent struct {
	Address string  `json:"address"`
	Time    float64 `json:"time"`
}

type ChainType

type ChainType = string
const (
	CT_ETH ChainType = "ETH"
	CT_SOL ChainType = "SOL"
)

type ItemType

type ItemType = string
const (
	IT_INLINE  ItemType = "INLINE"
	IT_IPFS    ItemType = "IPFS"
	IT_STORAGE ItemType = "STORAGE"
)

type MessageConfirmation

type MessageConfirmation struct {
	Chain  string      `json:"chain"`
	Height int64       `json:"height"`
	Hash   interface{} `json:"hash"`
}

type MessageType

type MessageType = string
const (
	MT_AGGREGATE MessageType = "AGGREGATE"
	MT_POST      MessageType = "POST"
	MT_STORE     MessageType = "STORE"
)

type StorageEngine

type StorageEngine = string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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