Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeValue ¶
func DecodeValue(value string, ev TypedAttribute) error
DecodeValue decodes the attribute event value.
func EncodeValue ¶
func EncodeValue(ev TypedAttribute) string
EncodeValue encodes the attribute event value.
func IsAttributeKind ¶
func IsAttributeKind(key string, kind TypedAttribute) bool
IsAttributeKind checks whether the given attribute key corresponds to the passed typed attribute.
func NewEventName ¶ added in v0.2400.0
NewEventName creates a new event name.
Module and event must be unique. If they are not, this method will panic.
Types ¶
type CustomTypedAttribute ¶
type CustomTypedAttribute interface { TypedAttribute // EventValue returns a string representation of this events value. EventValue() string // DecodeValue decodes the value encoded vy the EventValue. DecodeValue(value string) error }
CustomTypedAttribute is an interface implemented by types which can be transparently used as event attributes with custom value encoding.
type Provable ¶ added in v0.2300.0
type Provable interface { // ShouldProve returns true iff the event should be included in the event proof tree. ShouldProve() bool // ProvableRepresentation returns the provable representation of an event. // // Since this representation is part of commitments that are included in consensus layer state // any changes to this representation are consensus-breaking. ProvableRepresentation() any }
Provable is an interface implemented by event types which can be proven.
type TypedAttribute ¶
type TypedAttribute interface { // EventKind returns a string representation of this event's kind. EventKind() string }
TypedAttribute is an interface implemented by types which can be transparently used as event attributes with CBOR-marshalled value.
Click to show internal directories.
Click to hide internal directories.