messaging

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualMessage

func EqualMessage(a, b Message) bool

EqualMessage is used to compare the values of the union

func UnwrapAs

func UnwrapAs[T any](msg Message) (T, bool)

UnwrapAs returns the message as the given type, unwrapping any wrappers.

Types

type BadSyntheticMessage added in v1.3.0

type BadSyntheticMessage struct {
	Message   Message                    `json:"message,omitempty" form:"message" query:"message" validate:"required"`
	Signature protocol.KeySignature      `json:"signature,omitempty" form:"signature" query:"signature" validate:"required"`
	Proof     *protocol.AnnotatedReceipt `json:"proof,omitempty" form:"proof" query:"proof" validate:"required"`
	// contains filtered or unexported fields
}

func (*BadSyntheticMessage) Copy added in v1.3.0

func (*BadSyntheticMessage) CopyAsInterface added in v1.3.0

func (v *BadSyntheticMessage) CopyAsInterface() interface{}

func (*BadSyntheticMessage) Data added in v1.3.0

func (s *BadSyntheticMessage) Data() *SynthFields

func (*BadSyntheticMessage) Equal added in v1.3.0

func (*BadSyntheticMessage) GetProduced added in v1.3.0

func (m *BadSyntheticMessage) GetProduced() []*url.TxID

func (*BadSyntheticMessage) Hash added in v1.3.0

func (m *BadSyntheticMessage) Hash() [32]byte

func (*BadSyntheticMessage) ID added in v1.3.0

func (m *BadSyntheticMessage) ID() *url.TxID

func (*BadSyntheticMessage) IsValid added in v1.3.0

func (v *BadSyntheticMessage) IsValid() error

func (*BadSyntheticMessage) MarshalBinary added in v1.3.0

func (v *BadSyntheticMessage) MarshalBinary() ([]byte, error)

func (*BadSyntheticMessage) MarshalJSON added in v1.3.0

func (v *BadSyntheticMessage) MarshalJSON() ([]byte, error)

func (*BadSyntheticMessage) Type added in v1.3.0

func (*BadSyntheticMessage) UnmarshalBinary added in v1.3.0

func (v *BadSyntheticMessage) UnmarshalBinary(data []byte) error

func (*BadSyntheticMessage) UnmarshalBinaryFrom added in v1.3.0

func (v *BadSyntheticMessage) UnmarshalBinaryFrom(rd io.Reader) error

func (*BadSyntheticMessage) UnmarshalFieldsFrom added in v1.3.0

func (v *BadSyntheticMessage) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*BadSyntheticMessage) UnmarshalJSON added in v1.3.0

func (v *BadSyntheticMessage) UnmarshalJSON(data []byte) error

func (*BadSyntheticMessage) Unwrap added in v1.3.0

func (m *BadSyntheticMessage) Unwrap() Message

type BlockAnchor

type BlockAnchor struct {
	Signature protocol.KeySignature `json:"signature,omitempty" form:"signature" query:"signature" validate:"required"`
	Anchor    Message               `json:"anchor,omitempty" form:"anchor" query:"anchor" validate:"required"`
	// contains filtered or unexported fields
}

func (*BlockAnchor) Copy

func (v *BlockAnchor) Copy() *BlockAnchor

func (*BlockAnchor) CopyAsInterface

func (v *BlockAnchor) CopyAsInterface() interface{}

func (*BlockAnchor) Equal

func (v *BlockAnchor) Equal(u *BlockAnchor) bool

func (*BlockAnchor) GetProduced

func (m *BlockAnchor) GetProduced() []*url.TxID

func (*BlockAnchor) GetSignature

func (m *BlockAnchor) GetSignature() protocol.Signature

func (*BlockAnchor) GetTxID

func (m *BlockAnchor) GetTxID() *url.TxID

func (*BlockAnchor) Hash

func (m *BlockAnchor) Hash() [32]byte

func (*BlockAnchor) ID

func (m *BlockAnchor) ID() *url.TxID

func (*BlockAnchor) IsValid

func (v *BlockAnchor) IsValid() error

func (*BlockAnchor) MarshalBinary

func (v *BlockAnchor) MarshalBinary() ([]byte, error)

func (*BlockAnchor) MarshalJSON

func (v *BlockAnchor) MarshalJSON() ([]byte, error)

func (*BlockAnchor) OldID added in v1.3.0

func (m *BlockAnchor) OldID() *url.TxID

func (*BlockAnchor) Type

func (*BlockAnchor) Type() MessageType

func (*BlockAnchor) UnmarshalBinary

func (v *BlockAnchor) UnmarshalBinary(data []byte) error

func (*BlockAnchor) UnmarshalBinaryFrom

func (v *BlockAnchor) UnmarshalBinaryFrom(rd io.Reader) error

func (*BlockAnchor) UnmarshalFieldsFrom

func (v *BlockAnchor) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*BlockAnchor) UnmarshalJSON

func (v *BlockAnchor) UnmarshalJSON(data []byte) error

type BlockSummary

type BlockSummary struct {

	// Partition is the ID of the partition of the block.
	Partition string `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"`
	// Index is the index of the block.
	Index uint64 `json:"index,omitempty" form:"index" query:"index" validate:"required"`
	// StateTreeHash is the state tree hash after the block.
	StateTreeHash [32]byte `json:"stateTreeHash,omitempty" form:"stateTreeHash" query:"stateTreeHash" validate:"required"`
	// PreviousBlock is the index of the previous block (excludes any empty blocks).
	PreviousBlock    uint64             `json:"previousBlock,omitempty" form:"previousBlock" query:"previousBlock" validate:"required"`
	RecordUpdates    []*RecordUpdate    `json:"recordUpdates,omitempty" form:"recordUpdates" query:"recordUpdates" validate:"required"`
	StateTreeUpdates []*StateTreeUpdate `json:"stateTreeUpdates,omitempty" form:"stateTreeUpdates" query:"stateTreeUpdates" validate:"required"`
	// contains filtered or unexported fields
}

func (*BlockSummary) Copy

func (v *BlockSummary) Copy() *BlockSummary

func (*BlockSummary) CopyAsInterface

func (v *BlockSummary) CopyAsInterface() interface{}

func (*BlockSummary) Equal

func (v *BlockSummary) Equal(u *BlockSummary) bool

func (*BlockSummary) Hash

func (m *BlockSummary) Hash() [32]byte

func (*BlockSummary) ID

func (m *BlockSummary) ID() *url.TxID

func (*BlockSummary) IsSorted

func (s *BlockSummary) IsSorted() bool

Sort sorts the summary's record and state tree update lists.

func (*BlockSummary) IsValid

func (v *BlockSummary) IsValid() error

func (*BlockSummary) MarshalBinary

func (v *BlockSummary) MarshalBinary() ([]byte, error)

func (*BlockSummary) MarshalJSON

func (v *BlockSummary) MarshalJSON() ([]byte, error)

func (*BlockSummary) Sort

func (s *BlockSummary) Sort()

Sort sorts the summary's record and state tree update lists.

func (*BlockSummary) Type

func (*BlockSummary) Type() MessageType

func (*BlockSummary) UnmarshalBinary

func (v *BlockSummary) UnmarshalBinary(data []byte) error

func (*BlockSummary) UnmarshalBinaryFrom

func (v *BlockSummary) UnmarshalBinaryFrom(rd io.Reader) error

func (*BlockSummary) UnmarshalFieldsFrom

func (v *BlockSummary) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*BlockSummary) UnmarshalJSON

func (v *BlockSummary) UnmarshalJSON(data []byte) error

type CreditPayment

type CreditPayment struct {
	Paid  protocol.Fee `json:"paid,omitempty" form:"paid" query:"paid" validate:"required"`
	Payer *url.URL     `json:"payer,omitempty" form:"payer" query:"payer" validate:"required"`
	// Initiator indicates whether the signature initiated the transaction.
	Initiator bool      `json:"initiator,omitempty" form:"initiator" query:"initiator" validate:"required"`
	TxID      *url.TxID `json:"txID,omitempty" form:"txID" query:"txID" validate:"required"`
	Cause     *url.TxID `json:"cause,omitempty" form:"cause" query:"cause" validate:"required"`
	// contains filtered or unexported fields
}

func (*CreditPayment) Copy

func (v *CreditPayment) Copy() *CreditPayment

func (*CreditPayment) CopyAsInterface

func (v *CreditPayment) CopyAsInterface() interface{}

func (*CreditPayment) Equal

func (v *CreditPayment) Equal(u *CreditPayment) bool

func (*CreditPayment) GetTxID

func (m *CreditPayment) GetTxID() *url.TxID

func (*CreditPayment) Hash

func (m *CreditPayment) Hash() [32]byte

func (*CreditPayment) ID

func (m *CreditPayment) ID() *url.TxID

func (*CreditPayment) IsValid

func (v *CreditPayment) IsValid() error

func (*CreditPayment) MarshalBinary

func (v *CreditPayment) MarshalBinary() ([]byte, error)

func (*CreditPayment) MarshalJSON

func (v *CreditPayment) MarshalJSON() ([]byte, error)

func (*CreditPayment) Type

func (*CreditPayment) Type() MessageType

func (*CreditPayment) UnmarshalBinary

func (v *CreditPayment) UnmarshalBinary(data []byte) error

func (*CreditPayment) UnmarshalBinaryFrom

func (v *CreditPayment) UnmarshalBinaryFrom(rd io.Reader) error

func (*CreditPayment) UnmarshalFieldsFrom

func (v *CreditPayment) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*CreditPayment) UnmarshalJSON

func (v *CreditPayment) UnmarshalJSON(data []byte) error

type Envelope

type Envelope struct {
	Signatures  []protocol.Signature    `json:"signatures,omitempty" form:"signatures" query:"signatures" validate:"required"`
	TxHash      []byte                  `json:"txHash,omitempty" form:"txHash" query:"txHash"`
	Transaction []*protocol.Transaction `json:"transaction,omitempty" form:"transaction" query:"transaction"`
	Messages    []Message               `json:"messages,omitempty" form:"messages" query:"messages"`
	// contains filtered or unexported fields
}

func (*Envelope) Copy

func (v *Envelope) Copy() *Envelope

func (*Envelope) CopyAsInterface

func (v *Envelope) CopyAsInterface() interface{}

func (*Envelope) Equal

func (v *Envelope) Equal(u *Envelope) bool

func (*Envelope) IsValid

func (v *Envelope) IsValid() error

func (*Envelope) MarshalBinary

func (v *Envelope) MarshalBinary() ([]byte, error)

func (*Envelope) MarshalJSON

func (v *Envelope) MarshalJSON() ([]byte, error)

func (*Envelope) Normalize

func (e *Envelope) Normalize() ([]Message, error)

Normalize converts an envelope into a normalized bundle of messages.

  • Every transaction and signature is converted into a message.
  • If any transaction is not signed, the envelope is rejected.
  • If any signature does _not_ specify a transaction hash, the envelope is rejected unless the envelope specifies a default transaction hash or contains exactly one transaction.
  • If the transaction corresponding to a signature is not present, a placeholder transaction is added.

func (*Envelope) UnmarshalBinary

func (v *Envelope) UnmarshalBinary(data []byte) error

func (*Envelope) UnmarshalBinaryFrom

func (v *Envelope) UnmarshalBinaryFrom(rd io.Reader) error

func (*Envelope) UnmarshalJSON

func (v *Envelope) UnmarshalJSON(data []byte) error

type Message

type Message interface {
	encoding.UnionValue

	// ID is the ID of the message.
	ID() *url.TxID

	// Type is the type of the message.
	Type() MessageType

	// Hash returns the hash of the message.
	Hash() [32]byte
}

A Message is signature, transaction, or other message that may be sent to Accumulate to be processed.

func CopyMessage

func CopyMessage(v Message) Message

CopyMessage copies a Message.

func NewMessage

func NewMessage(typ MessageType) (Message, error)

NewMessage creates a new Message for the specified MessageType.

func UnmarshalMessage

func UnmarshalMessage(data []byte) (Message, error)

UnmarshalMessage unmarshals a Message.

func UnmarshalMessageFrom

func UnmarshalMessageFrom(rd io.Reader) (Message, error)

UnmarshalMessageFrom unmarshals a Message.

func UnmarshalMessageJSON

func UnmarshalMessageJSON(data []byte) (Message, error)

UnmarshalMessageJson unmarshals a Message.

type MessageForTransaction

type MessageForTransaction interface {
	Message
	GetTxID() *url.TxID
}

type MessageType

type MessageType int

MessageType is the type of a Message.

const MessageTypeBadSynthetic MessageType = 3

MessageTypeBadSynthetic is deprecated.

const MessageTypeBlockAnchor MessageType = 4

MessageTypeBlockAnchor is a block anchor signed by validator.

const MessageTypeBlockSummary MessageType = 8

MessageTypeBlockSummary is a summary of a block.

const MessageTypeCreditPayment MessageType = 7

MessageTypeCreditPayment is a payment of credits towards a transaction's fee.

const MessageTypeSequenced MessageType = 5

MessageTypeSequenced is a message that is part of a sequence.

const MessageTypeSignature MessageType = 2

MessageTypeSignature is a signature.

const MessageTypeSignatureRequest MessageType = 6

MessageTypeSignatureRequest is a request for additional signatures.

const MessageTypeSynthetic MessageType = 9

MessageTypeSynthetic is a message produced by the protocol, requiring proof.

const MessageTypeTransaction MessageType = 1

MessageTypeTransaction is a transaction.

func MessageTypeByName

func MessageTypeByName(name string) (MessageType, bool)

MessageTypeByName returns the named Message Type.

func (MessageType) GetEnumValue

func (v MessageType) GetEnumValue() uint64

GetEnumValue returns the value of the Message Type

func (MessageType) MarshalJSON

func (v MessageType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Message Type to JSON as a string.

func (*MessageType) SetEnumValue

func (v *MessageType) SetEnumValue(id uint64) bool

SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.

func (MessageType) String

func (v MessageType) String() string

String returns the name of the Message Type.

func (*MessageType) UnmarshalJSON

func (v *MessageType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the Message Type from JSON as a string.

type MessageWithCauses

type MessageWithCauses interface {
	Message
	GetCauses() []*url.TxID
}

type MessageWithProduced

type MessageWithProduced interface {
	Message
	GetProduced() []*url.TxID
}

type MessageWithSignature

type MessageWithSignature interface {
	MessageForTransaction
	GetSignature() protocol.Signature
}

type MessageWithTransaction

type MessageWithTransaction interface {
	Message
	GetTransaction() *protocol.Transaction
}

type RecordUpdate

type RecordUpdate struct {
	Key   *record.Key `json:"key,omitempty" form:"key" query:"key" validate:"required"`
	Value []byte      `json:"value,omitempty" form:"value" query:"value" validate:"required"`
	// contains filtered or unexported fields
}

func (*RecordUpdate) Copy

func (v *RecordUpdate) Copy() *RecordUpdate

func (*RecordUpdate) CopyAsInterface

func (v *RecordUpdate) CopyAsInterface() interface{}

func (*RecordUpdate) Equal

func (v *RecordUpdate) Equal(u *RecordUpdate) bool

func (*RecordUpdate) IsValid

func (v *RecordUpdate) IsValid() error

func (*RecordUpdate) MarshalBinary

func (v *RecordUpdate) MarshalBinary() ([]byte, error)

func (*RecordUpdate) MarshalJSON

func (v *RecordUpdate) MarshalJSON() ([]byte, error)

func (*RecordUpdate) UnmarshalBinary

func (v *RecordUpdate) UnmarshalBinary(data []byte) error

func (*RecordUpdate) UnmarshalBinaryFrom

func (v *RecordUpdate) UnmarshalBinaryFrom(rd io.Reader) error

func (*RecordUpdate) UnmarshalJSON

func (v *RecordUpdate) UnmarshalJSON(data []byte) error

type SequencedMessage

type SequencedMessage struct {
	Message Message `json:"message,omitempty" form:"message" query:"message" validate:"required"`
	// Source is the source that produced the transaction.
	Source *url.URL `json:"source,omitempty" form:"source" query:"source"`
	// Destination is the destination that the transaction is sent to.
	Destination *url.URL `json:"destination,omitempty" form:"destination" query:"destination"`
	// Number is the sequence number of the transaction.
	Number uint64 `json:"number,omitempty" form:"number" query:"number"`
	// contains filtered or unexported fields
}

func (*SequencedMessage) Copy

func (*SequencedMessage) CopyAsInterface

func (v *SequencedMessage) CopyAsInterface() interface{}

func (*SequencedMessage) Equal

func (v *SequencedMessage) Equal(u *SequencedMessage) bool

func (*SequencedMessage) GetProduced

func (m *SequencedMessage) GetProduced() []*url.TxID

func (*SequencedMessage) Hash

func (m *SequencedMessage) Hash() [32]byte

func (*SequencedMessage) ID

func (m *SequencedMessage) ID() *url.TxID

func (*SequencedMessage) IsValid

func (v *SequencedMessage) IsValid() error

func (*SequencedMessage) MarshalBinary

func (v *SequencedMessage) MarshalBinary() ([]byte, error)

func (*SequencedMessage) MarshalJSON

func (v *SequencedMessage) MarshalJSON() ([]byte, error)

func (*SequencedMessage) Type

func (*SequencedMessage) Type() MessageType

func (*SequencedMessage) UnmarshalBinary

func (v *SequencedMessage) UnmarshalBinary(data []byte) error

func (*SequencedMessage) UnmarshalBinaryFrom

func (v *SequencedMessage) UnmarshalBinaryFrom(rd io.Reader) error

func (*SequencedMessage) UnmarshalFieldsFrom

func (v *SequencedMessage) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*SequencedMessage) UnmarshalJSON

func (v *SequencedMessage) UnmarshalJSON(data []byte) error

func (*SequencedMessage) Unwrap

func (m *SequencedMessage) Unwrap() Message

type SignatureMessage

type SignatureMessage struct {
	Signature protocol.Signature `json:"signature,omitempty" form:"signature" query:"signature" validate:"required"`
	TxID      *url.TxID          `json:"txID,omitempty" form:"txID" query:"txID" validate:"required"`
	// contains filtered or unexported fields
}

func (*SignatureMessage) Copy

func (*SignatureMessage) CopyAsInterface

func (v *SignatureMessage) CopyAsInterface() interface{}

func (*SignatureMessage) Equal

func (v *SignatureMessage) Equal(u *SignatureMessage) bool

func (*SignatureMessage) GetSignature

func (m *SignatureMessage) GetSignature() protocol.Signature

func (*SignatureMessage) GetTxID

func (m *SignatureMessage) GetTxID() *url.TxID

func (*SignatureMessage) Hash

func (m *SignatureMessage) Hash() [32]byte

func (*SignatureMessage) ID

func (m *SignatureMessage) ID() *url.TxID

func (*SignatureMessage) IsValid

func (v *SignatureMessage) IsValid() error

func (*SignatureMessage) MarshalBinary

func (v *SignatureMessage) MarshalBinary() ([]byte, error)

func (*SignatureMessage) MarshalJSON

func (v *SignatureMessage) MarshalJSON() ([]byte, error)

func (*SignatureMessage) Type

func (*SignatureMessage) Type() MessageType

func (*SignatureMessage) UnmarshalBinary

func (v *SignatureMessage) UnmarshalBinary(data []byte) error

func (*SignatureMessage) UnmarshalBinaryFrom

func (v *SignatureMessage) UnmarshalBinaryFrom(rd io.Reader) error

func (*SignatureMessage) UnmarshalFieldsFrom

func (v *SignatureMessage) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*SignatureMessage) UnmarshalJSON

func (v *SignatureMessage) UnmarshalJSON(data []byte) error

type SignatureRequest

type SignatureRequest struct {
	Authority *url.URL  `json:"authority,omitempty" form:"authority" query:"authority" validate:"required"`
	TxID      *url.TxID `json:"txID,omitempty" form:"txID" query:"txID" validate:"required"`
	Cause     *url.TxID `json:"cause,omitempty" form:"cause" query:"cause" validate:"required"`
	// contains filtered or unexported fields
}

func (*SignatureRequest) Copy

func (*SignatureRequest) CopyAsInterface

func (v *SignatureRequest) CopyAsInterface() interface{}

func (*SignatureRequest) Equal

func (v *SignatureRequest) Equal(u *SignatureRequest) bool

func (*SignatureRequest) GetCauses

func (m *SignatureRequest) GetCauses() []*url.TxID

func (*SignatureRequest) GetProduced

func (m *SignatureRequest) GetProduced() []*url.TxID

func (*SignatureRequest) GetTxID

func (m *SignatureRequest) GetTxID() *url.TxID

func (*SignatureRequest) Hash

func (m *SignatureRequest) Hash() [32]byte

func (*SignatureRequest) ID

func (m *SignatureRequest) ID() *url.TxID

func (*SignatureRequest) IsValid

func (v *SignatureRequest) IsValid() error

func (*SignatureRequest) MarshalBinary

func (v *SignatureRequest) MarshalBinary() ([]byte, error)

func (*SignatureRequest) MarshalJSON

func (v *SignatureRequest) MarshalJSON() ([]byte, error)

func (*SignatureRequest) Type

func (*SignatureRequest) Type() MessageType

func (*SignatureRequest) UnmarshalBinary

func (v *SignatureRequest) UnmarshalBinary(data []byte) error

func (*SignatureRequest) UnmarshalBinaryFrom

func (v *SignatureRequest) UnmarshalBinaryFrom(rd io.Reader) error

func (*SignatureRequest) UnmarshalFieldsFrom

func (v *SignatureRequest) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*SignatureRequest) UnmarshalJSON

func (v *SignatureRequest) UnmarshalJSON(data []byte) error

type StateTreeUpdate

type StateTreeUpdate struct {
	Key  *record.Key `json:"key,omitempty" form:"key" query:"key" validate:"required"`
	Hash [32]byte    `json:"hash,omitempty" form:"hash" query:"hash" validate:"required"`
	// contains filtered or unexported fields
}

func (*StateTreeUpdate) Copy

func (v *StateTreeUpdate) Copy() *StateTreeUpdate

func (*StateTreeUpdate) CopyAsInterface

func (v *StateTreeUpdate) CopyAsInterface() interface{}

func (*StateTreeUpdate) Equal

func (v *StateTreeUpdate) Equal(u *StateTreeUpdate) bool

func (*StateTreeUpdate) IsValid

func (v *StateTreeUpdate) IsValid() error

func (*StateTreeUpdate) MarshalBinary

func (v *StateTreeUpdate) MarshalBinary() ([]byte, error)

func (*StateTreeUpdate) MarshalJSON

func (v *StateTreeUpdate) MarshalJSON() ([]byte, error)

func (*StateTreeUpdate) UnmarshalBinary

func (v *StateTreeUpdate) UnmarshalBinary(data []byte) error

func (*StateTreeUpdate) UnmarshalBinaryFrom

func (v *StateTreeUpdate) UnmarshalBinaryFrom(rd io.Reader) error

func (*StateTreeUpdate) UnmarshalJSON

func (v *StateTreeUpdate) UnmarshalJSON(data []byte) error

type SynthFields added in v1.3.0

type SynthFields struct {
	Message   Message                    `json:"message,omitempty" form:"message" query:"message" validate:"required"`
	Signature protocol.KeySignature      `json:"signature,omitempty" form:"signature" query:"signature" validate:"required"`
	Proof     *protocol.AnnotatedReceipt `json:"proof,omitempty" form:"proof" query:"proof" validate:"required"`
}

SynthFields contains the fields of a synthetic message.

func (*SynthFields) Copy added in v1.3.0

func (v *SynthFields) Copy() *SynthFields

func (*SynthFields) CopyAsInterface added in v1.3.0

func (v *SynthFields) CopyAsInterface() interface{}

func (*SynthFields) Equal added in v1.3.0

func (v *SynthFields) Equal(u *SynthFields) bool

func (*SynthFields) MarshalJSON added in v1.3.0

func (v *SynthFields) MarshalJSON() ([]byte, error)

func (*SynthFields) UnmarshalJSON added in v1.3.0

func (v *SynthFields) UnmarshalJSON(data []byte) error

type SyntheticMessage

type SyntheticMessage struct {
	Message   Message                    `json:"message,omitempty" form:"message" query:"message" validate:"required"`
	Signature protocol.KeySignature      `json:"signature,omitempty" form:"signature" query:"signature" validate:"required"`
	Proof     *protocol.AnnotatedReceipt `json:"proof,omitempty" form:"proof" query:"proof" validate:"required"`
	// contains filtered or unexported fields
}

func (*SyntheticMessage) Copy

func (*SyntheticMessage) CopyAsInterface

func (v *SyntheticMessage) CopyAsInterface() interface{}

func (*SyntheticMessage) Data added in v1.3.0

func (s *SyntheticMessage) Data() *SynthFields

func (*SyntheticMessage) Equal

func (v *SyntheticMessage) Equal(u *SyntheticMessage) bool

func (*SyntheticMessage) GetProduced

func (m *SyntheticMessage) GetProduced() []*url.TxID

func (*SyntheticMessage) Hash

func (m *SyntheticMessage) Hash() [32]byte

func (*SyntheticMessage) ID

func (m *SyntheticMessage) ID() *url.TxID

func (*SyntheticMessage) IsValid

func (v *SyntheticMessage) IsValid() error

func (*SyntheticMessage) MarshalBinary

func (v *SyntheticMessage) MarshalBinary() ([]byte, error)

func (*SyntheticMessage) MarshalJSON

func (v *SyntheticMessage) MarshalJSON() ([]byte, error)

func (*SyntheticMessage) Type

func (*SyntheticMessage) Type() MessageType

func (*SyntheticMessage) UnmarshalBinary

func (v *SyntheticMessage) UnmarshalBinary(data []byte) error

func (*SyntheticMessage) UnmarshalBinaryFrom

func (v *SyntheticMessage) UnmarshalBinaryFrom(rd io.Reader) error

func (*SyntheticMessage) UnmarshalFieldsFrom

func (v *SyntheticMessage) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*SyntheticMessage) UnmarshalJSON

func (v *SyntheticMessage) UnmarshalJSON(data []byte) error

func (*SyntheticMessage) Unwrap

func (m *SyntheticMessage) Unwrap() Message

type TransactionMessage

type TransactionMessage struct {
	Transaction *protocol.Transaction `json:"transaction,omitempty" form:"transaction" query:"transaction" validate:"required"`
	// contains filtered or unexported fields
}

func (*TransactionMessage) Copy

func (*TransactionMessage) CopyAsInterface

func (v *TransactionMessage) CopyAsInterface() interface{}

func (*TransactionMessage) Equal

func (*TransactionMessage) GetTransaction

func (m *TransactionMessage) GetTransaction() *protocol.Transaction

func (*TransactionMessage) Hash

func (m *TransactionMessage) Hash() [32]byte

func (*TransactionMessage) ID

func (m *TransactionMessage) ID() *url.TxID

func (*TransactionMessage) IsValid

func (v *TransactionMessage) IsValid() error

func (*TransactionMessage) MarshalBinary

func (v *TransactionMessage) MarshalBinary() ([]byte, error)

func (*TransactionMessage) MarshalJSON

func (v *TransactionMessage) MarshalJSON() ([]byte, error)

func (*TransactionMessage) Type

func (*TransactionMessage) UnmarshalBinary

func (v *TransactionMessage) UnmarshalBinary(data []byte) error

func (*TransactionMessage) UnmarshalBinaryFrom

func (v *TransactionMessage) UnmarshalBinaryFrom(rd io.Reader) error

func (*TransactionMessage) UnmarshalFieldsFrom

func (v *TransactionMessage) UnmarshalFieldsFrom(reader *encoding.Reader) error

func (*TransactionMessage) UnmarshalJSON

func (v *TransactionMessage) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL