entity

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message interface {
	GetType() string
}

Message sets the default methods a real message must implement.

type Seal

type Seal struct {
	Signature *ED25519.Signature `json:"signature"`
	Signer    *ED25519.PublicKey `json:"signer"`
}

Seal is a wrapper to an ED25519 signature and its corresponding ED25519 public key.

type SealState

type SealState struct {
	Message   Message `json:"message"`
	ChainID   string  `json:"chain_id"`
	NonceTime *Time   `json:"nonce_time"`
}

SealState wraps a message and additional values in order to define the unique message state to be signed.

func (*SealState) GetSignBytes

func (ss *SealState) GetSignBytes() ([]byte, error)

GetSignBytes returns the sorted and marshaled values of a seal state.

type Time

type Time struct {
	time.Time
}

Time is a time.Time wrapper.

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON converts a Time into a time.Time and marshals its UTC rounded value.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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