Versions in this module Expand all Collapse all v0 v0.1.0 Dec 15, 2021 Changes in this version + var IPFSGateway = "http://localhost:5001" + func AddJSONToIPFS(json []byte) (string, error) + func CountLeadingZeroes(b [32]byte) int + func InitIPFS() *ipfs.Shell + type Message struct + Message string + Nonce int + Timestamp int64 + func New(msg string, n int, timestamp int64, timeout time.Duration) (*Message, error) + func (m *Message) Hash() [32]byte + func (m *Message) Lead() int + func (m *Message) SortNum() int64 + func (m *Message) Stamp() string + func (m *Message) String() string + func (msg *Message) ProofOfWork(n int, timeout time.Duration) error + type Messages struct + func MessagesFromIPFS(cid string) (*Messages, error) + func (m *Messages) Add(msg *Message) + func (m *Messages) AddMany(msgs *Messages) + func (m *Messages) AddToIPFS() (string, error) + func (m *Messages) Each(f func(msg *Message)) + func (m *Messages) JSON() ([]byte, error) + func (m *Messages) MessageList() []*Message + func (m *Messages) Remove(stamp string) + func (m *Messages) Trim(n int)