chainx

package module
v0.0.0-...-d0f2503 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 11 Imported by: 0

README

chain

Any Things On Chain

Documentation

Index

Constants

View Source
const (
	TellMeYourWaitTopic      = "tell.me.your.wait"
	ReplyTellMeYourWaitTopic = "reply." + TellMeYourWaitTopic
)
View Source
const (
	DeliverTopic = "deliver"
)

Variables

This section is empty.

Functions

func Deliver

func Deliver(chn chain.Chain, data chain.Cid)

func NewDeliverLetter

func NewDeliverLetter(p DeliverPayload) *letter.Letter

func NewReplyTellMeYourWaitLetter

func NewReplyTellMeYourWaitLetter(p ReplyTellMeYourWaitPayload) *letter.Letter

func NewTellMeYoursLetter

func NewTellMeYoursLetter(p TellMeYourWaitPayload) *letter.Letter

Types

type ChainX

type ChainX struct {
	Link []string
	// contains filtered or unexported fields
}

func New

func New(chn chain.Chain) (*ChainX, *errors.Error)

func (*ChainX) Consensus

func (x *ChainX) Consensus()

func (*ChainX) Deal

func (x *ChainX) Deal(ltr letter.ILetter) *errors.Error

func (*ChainX) GetTopic

func (x *ChainX) GetTopic() []string

func (*ChainX) GetWait

func (x *ChainX) GetWait() *Wait

func (*ChainX) IsSameWait

func (x *ChainX) IsSameWait(signalling string, serializeStr string) bool

func (*ChainX) StartUp

func (x *ChainX) StartUp() *errors.Error

func (*ChainX) Submit

func (x *ChainX) Submit(data chain.Cid) *errors.Error

func (*ChainX) Tail

func (x *ChainX) Tail() *Tail

type DeliverPayload

type DeliverPayload struct {
	Chn  chain.Chain `bson:"c" json:"c"`
	Data chain.Cid   `bson:"d" json:"d"`
}

func DeliverPayloadOf

func DeliverPayloadOf(str string) (*DeliverPayload, *errors.Error)

type ReplyTellMeYourWaitPayload

type ReplyTellMeYourWaitPayload struct {
	Chn            chain.Chain `bson:"c" json:"c"`
	Signalling     string      `bson:"s" json:"s"`
	BlockNumb      int64       `bson:"bn" json:"bn"`
	BlockSerialize string      `bson:"bs" json:"bs"`
}

func ReplyTellMeYourWaitPayloadOf

func ReplyTellMeYourWaitPayloadOf(str string) (*ReplyTellMeYourWaitPayload, *errors.Error)

type Tail

type Tail struct {
	// contains filtered or unexported fields
}

func (*Tail) Next

func (t *Tail) Next(data chain.Cid) *chain.Block

type TellMeYourWaitPayload

type TellMeYourWaitPayload struct {
	Chn        chain.Chain `bson:"c" json:"c"`
	Signalling string      `bson:"s" json:"s"`
	BlockNumb  int64       `bson:"bn" json:"bn"`
}

func TellMeYourWaitPayloadOf

func TellMeYourWaitPayloadOf(str string) (*TellMeYourWaitPayload, *errors.Error)

type Wait

type Wait struct {
	// contains filtered or unexported fields
}

func NewWait

func NewWait(block *chain.Block) *Wait

func (*Wait) GetBlock

func (w *Wait) GetBlock() *chain.Block

func (*Wait) GetSignalling

func (w *Wait) GetSignalling() string

func (*Wait) SomeOneConfirmed

func (w *Wait) SomeOneConfirmed()

func (*Wait) Wait

func (w *Wait) Wait()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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