Versions in this module Expand all Collapse all v0 v0.1.0 Jun 4, 2021 Changes in this version + var ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") + func MakeChannelStateCommitmentEntryKey(prefix exported.Prefix, portID, channelID string) string + func MakeClientStateCommitmentEntryKey(prefix exported.Prefix, clientID string) string + func MakeConnectionStateCommitmentEntryKey(prefix exported.Prefix, connectionID string) string + func MakeConsensusStateCommitmentEntryKey(prefix exported.Prefix, clientID string, height exported.Height) string + func MakeCurrentSequenceKey(prefix exported.Prefix) string + func MakeEntryKey(prefix exported.Prefix, key string) string + func MakeNextSequenceRecvEntryKey(prefix exported.Prefix, portID, channelID string) string + func MakePacketAcknowledgementAbsenceEntryKey(prefix exported.Prefix, portID, channelID string, sequence uint64) string + func MakePacketAcknowledgementEntryKey(prefix exported.Prefix, portID, channelID string, sequence uint64) string + func MakePacketCommitmentEntryKey(prefix exported.Prefix, portID, channelID string, sequence uint64) string + func MakeSequenceCommitmentEntryKey(seq uint64) string + func MakeSequenceKey(prefix exported.Prefix, seq uint64) string + type CommitmentConfig struct + MaxTimestampDiff time.Duration + MinTimeInterval time.Duration + func DefaultConfig() CommitmentConfig + type CommitmentEntry struct + Key string + Value string + func (*CommitmentEntry) Descriptor() ([]byte, []int) + func (*CommitmentEntry) ProtoMessage() + func (m *CommitmentEntry) GetKey() string + func (m *CommitmentEntry) GetValue() string + func (m *CommitmentEntry) Marshal() (dAtA []byte, err error) + func (m *CommitmentEntry) MarshalTo(dAtA []byte) (int, error) + func (m *CommitmentEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CommitmentEntry) Reset() + func (m *CommitmentEntry) Size() (n int) + func (m *CommitmentEntry) String() string + func (m *CommitmentEntry) Unmarshal(dAtA []byte) error + func (m *CommitmentEntry) XXX_DiscardUnknown() + func (m *CommitmentEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CommitmentEntry) XXX_Merge(src proto.Message) + func (m *CommitmentEntry) XXX_Size() int + func (m *CommitmentEntry) XXX_Unmarshal(b []byte) error + type Entry struct + Key string + Value []byte + func EntryFromCommitment(ce *CommitmentEntry) (*Entry, error) + func MakeChannelStateCommitmentEntry(prefix exported.Prefix, portID string, channelID string, channelBytes []byte) (*Entry, error) + func MakeClientStateCommitmentEntry(prefix exported.Prefix, clientID string, clientStateBytes []byte) (*Entry, error) + func MakeConnectionStateCommitmentEntry(prefix exported.Prefix, connectionID string, connectionBytes []byte) (*Entry, error) + func MakeConsensusStateCommitmentEntry(prefix exported.Prefix, clientID string, height exported.Height, ...) (*Entry, error) + func MakeNextSequenceRecvEntry(prefix exported.Prefix, portID, channelID string, seq uint64) (*Entry, error) + func MakePacketAcknowledgementAbsenceEntry(prefix exported.Prefix, portID, channelID string, sequence uint64) (*Entry, error) + func MakePacketAcknowledgementEntry(prefix exported.Prefix, portID, channelID string, sequence uint64, ...) (*Entry, error) + func MakePacketCommitmentEntry(prefix exported.Prefix, portID, channelID string, sequence uint64, ...) (*Entry, error) + func MakeSequenceCommitmentEntry(sequence *Sequence) (*Entry, error) + func (e Entry) ToCommitment() *CommitmentEntry + type Sequence struct + Timestamp int64 + Value uint64 + func NewSequence(value uint64, tm int64) Sequence + func (*Sequence) Descriptor() ([]byte, []int) + func (*Sequence) ProtoMessage() + func (m *Sequence) GetTimestamp() int64 + func (m *Sequence) GetValue() uint64 + func (m *Sequence) Marshal() (dAtA []byte, err error) + func (m *Sequence) MarshalTo(dAtA []byte) (int, error) + func (m *Sequence) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Sequence) Reset() + func (m *Sequence) Size() (n int) + func (m *Sequence) String() string + func (m *Sequence) Unmarshal(dAtA []byte) error + func (m *Sequence) XXX_DiscardUnknown() + func (m *Sequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Sequence) XXX_Merge(src proto.Message) + func (m *Sequence) XXX_Size() int + func (m *Sequence) XXX_Unmarshal(b []byte) error + func (seq *Sequence) Bytes() []byte + type SequenceManager interface + GetCurrentSequence func(stub shim.ChaincodeStubInterface) (*Sequence, error) + GetSequence func(stub shim.ChaincodeStubInterface, seq uint64) (*Sequence, error) + InitSequence func(stub shim.ChaincodeStubInterface) (*Sequence, error) + SetClock func(clock func() time.Time) + UpdateSequence func(stub shim.ChaincodeStubInterface) (*Sequence, error) + ValidateTimestamp func(now time.Time, prevSec int64, next *timestamp.Timestamp) error + func NewDefaultSequenceManager() SequenceManager + func NewSequenceManager(config CommitmentConfig, prefix exported.Prefix) SequenceManager