Versions in this module Expand all Collapse all v0 v0.2.0 Jun 3, 2021 Changes in this version + var File_protob_message_proto protoreflect.FileDescriptor + func EC() elliptic.Curve + func SetCurve(curve elliptic.Curve) + type BaseParty struct + FirstRound Round + func (p *BaseParty) Running() bool + func (p *BaseParty) String() string + func (p *BaseParty) ValidateMessage(msg ParsedMessage) (bool, *Error) + func (p *BaseParty) WaitingFor() []*PartyID + func (p *BaseParty) WrapError(err error, culprits ...*PartyID) *Error + type Error struct + func BaseStart(p Party, task string, prepare ...func(Round) *Error) *Error + func BaseUpdate(p Party, msg ParsedMessage, task string) (ok bool, err *Error) + func NewError(err error, task string, round int, victim *PartyID, culprits ...*PartyID) *Error + func (err *Error) Cause() error + func (err *Error) Culprits() []*PartyID + func (err *Error) Error() string + func (err *Error) Round() int + func (err *Error) SelfCaused() bool + func (err *Error) Task() string + func (err *Error) Unwrap() error + func (err *Error) Victim() *PartyID + type Message interface + GetFrom func() *PartyID + GetTo func() []*PartyID + IsBroadcast func() bool + IsToOldAndNewCommittees func() bool + IsToOldCommittee func() bool + String func() string + Type func() string + WireBytes func() ([]byte, *MessageRouting, error) + WireMsg func() *MessageWrapper + type MessageContent interface + ValidateBasic func() bool + type MessageImpl struct + func (mm *MessageImpl) Content() MessageContent + func (mm *MessageImpl) GetFrom() *PartyID + func (mm *MessageImpl) GetTo() []*PartyID + func (mm *MessageImpl) IsBroadcast() bool + func (mm *MessageImpl) IsToOldAndNewCommittees() bool + func (mm *MessageImpl) IsToOldCommittee() bool + func (mm *MessageImpl) String() string + func (mm *MessageImpl) Type() string + func (mm *MessageImpl) ValidateBasic() bool + func (mm *MessageImpl) WireBytes() ([]byte, *MessageRouting, error) + func (mm *MessageImpl) WireMsg() *MessageWrapper + type MessageRouting struct + From *PartyID + IsBroadcast bool + IsToOldAndNewCommittees bool + IsToOldCommittee bool + To []*PartyID + type MessageWrapper struct + From *MessageWrapper_PartyID + IsBroadcast bool + IsToOldAndNewCommittees bool + IsToOldCommittee bool + Message *any.Any + To []*MessageWrapper_PartyID + func NewMessageWrapper(routing MessageRouting, content MessageContent) *MessageWrapper + func (*MessageWrapper) Descriptor() ([]byte, []int) + func (*MessageWrapper) ProtoMessage() + func (x *MessageWrapper) GetFrom() *MessageWrapper_PartyID + func (x *MessageWrapper) GetIsBroadcast() bool + func (x *MessageWrapper) GetIsToOldAndNewCommittees() bool + func (x *MessageWrapper) GetIsToOldCommittee() bool + func (x *MessageWrapper) GetMessage() *any.Any + func (x *MessageWrapper) GetTo() []*MessageWrapper_PartyID + func (x *MessageWrapper) ProtoReflect() protoreflect.Message + func (x *MessageWrapper) Reset() + func (x *MessageWrapper) String() string + type MessageWrapper_PartyID struct + Id string + Key []byte + Moniker string + func (*MessageWrapper_PartyID) Descriptor() ([]byte, []int) + func (*MessageWrapper_PartyID) ProtoMessage() + func (mpid *MessageWrapper_PartyID) KeyInt() *big.Int + func (x *MessageWrapper_PartyID) GetId() string + func (x *MessageWrapper_PartyID) GetKey() []byte + func (x *MessageWrapper_PartyID) GetMoniker() string + func (x *MessageWrapper_PartyID) ProtoReflect() protoreflect.Message + func (x *MessageWrapper_PartyID) Reset() + func (x *MessageWrapper_PartyID) String() string + type Parameters struct + func NewParameters(ctx *PeerContext, partyID *PartyID, partyCount, threshold int, ...) *Parameters + func (params *Parameters) Parties() *PeerContext + func (params *Parameters) PartyCount() int + func (params *Parameters) PartyID() *PartyID + func (params *Parameters) SafePrimeGenTimeout() time.Duration + func (params *Parameters) Threshold() int + func (params *Parameters) UNSAFE_KGIgnoreH1H2Dupes() bool + func (params *Parameters) UNSAFE_setKGIgnoreH1H2Dupes(unsafeKGIgnoreH1H2Dupes bool) + type ParsedMessage interface + Content func() MessageContent + ValidateBasic func() bool + func NewMessage(meta MessageRouting, content MessageContent, wire *MessageWrapper) ParsedMessage + func ParseWireMessage(wireBytes []byte, from *PartyID, isBroadcast bool) (ParsedMessage, error) + type Party interface + FirstRound func() Round + PartyID func() *PartyID + Running func() bool + Start func() *Error + StoreMessage func(msg ParsedMessage) (bool, *Error) + String func() string + Update func(msg ParsedMessage) (ok bool, err *Error) + UpdateFromBytes func(wireBytes []byte, from *PartyID, isBroadcast bool) (ok bool, err *Error) + ValidateMessage func(msg ParsedMessage) (bool, *Error) + WaitingFor func() []*PartyID + WrapError func(err error, culprits ...*PartyID) *Error + type PartyID struct + Index int + func NewPartyID(id, moniker string, key *big.Int) *PartyID + func (pid *PartyID) ValidateBasic() bool + func (pid PartyID) String() string + type PeerContext struct + func NewPeerContext(parties SortedPartyIDs) *PeerContext + func (p2pCtx *PeerContext) IDs() SortedPartyIDs + func (p2pCtx *PeerContext) SetIDs(ids SortedPartyIDs) + type ReSharingParameters struct + func NewReSharingParameters(ctx, newCtx *PeerContext, partyID *PartyID, ...) *ReSharingParameters + func (rgParams *ReSharingParameters) IsNewCommittee() bool + func (rgParams *ReSharingParameters) IsOldCommittee() bool + func (rgParams *ReSharingParameters) NewParties() *PeerContext + func (rgParams *ReSharingParameters) NewPartyCount() int + func (rgParams *ReSharingParameters) NewThreshold() int + func (rgParams *ReSharingParameters) OldAndNewParties() []*PartyID + func (rgParams *ReSharingParameters) OldAndNewPartyCount() int + func (rgParams *ReSharingParameters) OldParties() *PeerContext + func (rgParams *ReSharingParameters) OldPartyCount() int + type Round interface + CanAccept func(msg ParsedMessage) bool + CanProceed func() bool + NextRound func() Round + Params func() *Parameters + RoundNumber func() int + Start func() *Error + Update func() (bool, *Error) + WaitingFor func() []*PartyID + WrapError func(err error, culprits ...*PartyID) *Error + type SortedPartyIDs []*PartyID + func GenerateTestPartyIDs(count int, startAt ...int) SortedPartyIDs + func SortPartyIDs(ids UnSortedPartyIDs, startAt ...int) SortedPartyIDs + func (spids SortedPartyIDs) Exclude(exclude *PartyID) SortedPartyIDs + func (spids SortedPartyIDs) FindByKey(key *big.Int) *PartyID + func (spids SortedPartyIDs) Keys() []*big.Int + func (spids SortedPartyIDs) Len() int + func (spids SortedPartyIDs) Less(a, b int) bool + func (spids SortedPartyIDs) Swap(a, b int) + func (spids SortedPartyIDs) ToUnSorted() UnSortedPartyIDs + type UnSortedPartyIDs []*PartyID