Documentation ¶
Index ¶
Constants ¶
View Source
const MaxSize = 65536 - 1172
MaxSize = MaxBlockSize -
(version(1) + parentsBlocksCount(1) + 3 * (parentsType(1) + parentsCount(1) + 8 * reference(40)) + issuerPK(32) + issuanceTime(8) + seqNum(8) + payloadLength(4) + + ECRecordI(8) + RootsID(32) + PrevID(32) + LatestConfirmedSlot(8) + nonce(8) + signature(64) = MaxBlockSize - 1172 bytes = 64364
Variables ¶
View Source
var GenericDataPayloadType = NewType(payloadtype.GenericData, "GenericDataPayloadType")
GenericDataPayloadType is the Type of a generic GenericDataPayload.
Functions ¶
This section is empty.
Types ¶
type GenericDataPayload ¶
type GenericDataPayload struct { model.Immutable[GenericDataPayload, *GenericDataPayload, genericDataPayloadInner] `serix:"0"` }
GenericDataPayload represents a payload which just contains a blob of data.
func NewGenericDataPayload ¶
func NewGenericDataPayload(data []byte) *GenericDataPayload
NewGenericDataPayload creates new GenericDataPayload.
func (*GenericDataPayload) Blob ¶
func (g *GenericDataPayload) Blob() []byte
Blob returns the contained data of the GenericDataPayload (without its type and size headers).
func (*GenericDataPayload) Type ¶
func (g *GenericDataPayload) Type() Type
Type returns the Type of the Payload.
type Payload ¶
type Payload interface { // Type returns the Type of the Payload. Type() Type // Bytes returns a marshaled version of the Payload. Bytes() ([]byte, error) // String returns a human-readable version of the Payload. String() string }
Payload represents the generic interface for an object that can be embedded in Blocks of the Mesh.
Click to show internal directories.
Click to hide internal directories.