Documentation ¶
Index ¶
Constants ¶
View Source
const MaxSize = 64636
MaxPayloadSize = MaxMessageSize -
(version(1) + parentsBlocksCount(1) + 3 * (parentsType(1) + parentsCount(1) + 8 * reference(32)) + issuerPK(32) + issuanceTime(8) + seqNum(8) + payloadLength(4) + nonce(8) + signature(64) = MaxMessageSize - 1158 bytes = 64378
Variables ¶
View Source
var GenericDataPayloadType = NewType(0, "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 Messages of the Tangle.
Click to show internal directories.
Click to hide internal directories.