Documentation ¶
Index ¶
- Constants
- func FlagsOf(n uint32) uint
- func IsValidAsPulseNumber(n int) bool
- type Data
- func (r Data) CreateNextEphemeralPulse() Data
- func (r Data) CreateNextExpected() Data
- func (r Data) CreateNextPulsarPulse(delta uint16, entropyGen EntropyFunc) Data
- func (r Data) CreateNextPulse(entropyGen EntropyFunc) Data
- func (r Data) EnsureEphemeralData()
- func (r Data) EnsurePulsarData()
- func (r Data) EnsurePulseData()
- func (r Data) GetNextPulseDelta() uint16
- func (r Data) GetNextPulseNumber() Number
- func (r Data) GetPrevPulseDelta() uint16
- func (r Data) GetPrevPulseNumber() Number
- func (r Data) GetPulseNumber() Number
- func (r Data) GetStartOfEpoch() Number
- func (r Data) GetTimestamp() uint64
- func (r Data) IsEmpty() bool
- func (r Data) IsEmptyWithEpoch(epoch uint32) bool
- func (r Data) IsExpectedPulse() bool
- func (r Data) IsFirstPulse() bool
- func (r Data) IsFromEphemeral() bool
- func (r Data) IsFromPulsar() bool
- func (r Data) IsValidEphemeralData() bool
- func (r Data) IsValidExpectedPulseData() bool
- func (r Data) IsValidNext(n Data) bool
- func (r Data) IsValidPrev(p Data) bool
- func (r Data) IsValidPulsarData() bool
- func (r Data) IsValidPulseData() bool
- func (r Data) String() string
- type DataExt
- type DataHolder
- type DataReader
- type EntropyFunc
- type Number
- func (n Number) AsApproximateTime() (time.Time, error)
- func (n Number) AsUint32() uint32
- func (n Number) Bytes() []byte
- func (n Number) Equal(other Number) bool
- func (n Number) IsJet() bool
- func (n Number) IsSpecial() bool
- func (n Number) IsSpecialOrTimePulse() bool
- func (n Number) IsTimePulse() bool
- func (n Number) IsUnknown() bool
- func (n Number) IsUnknownOrEqualTo(o Number) bool
- func (n Number) IsUnknownOrTimePulse() bool
- func (n Number) MarshalTo(data []byte) (int, error)
- func (n Number) Next(delta uint16) Number
- func (n Number) Prev(delta uint16) Number
- func (n Number) Size() int
- func (n Number) String() string
- func (n *Number) Unmarshal(data []byte) error
- func (n Number) WithFlags(flags uint8) uint32
Constants ¶
View Source
const ( Unknown Number = 0 LocalRelative = 65536 // MinTimePulse is the hardcoded first pulse number. Because first 65536 numbers are saved for the system's needs MinTimePulse = LocalRelative + 1 MaxTimePulse = 1<<30 - 1 // Jet is a special pulse number value that signifies jet ID. Jet Number = 1 // BuiltinContract declares special pulse number that creates namespace for builtin contracts BuiltinContract Number = 200 // PulseNumberSize declares the number of bytes in the pulse number NumberSize int = 4 )
View Source
const EphemeralPulseEpoch = InvalidPulseEpoch + 1
View Source
const InvalidPulseEpoch uint32 = 0
View Source
const UnixTimeOfMaxTimePulse = UnixTimeOfMinTimePulse - MinTimePulse + MaxTimePulse // 2053-01-08 19:24:46 +0000 UTC
View Source
const UnixTimeOfMinTimePulse = 1546300800 // 2019-01-01 00:00:00 +0000 UTC
Variables ¶
This section is empty.
Functions ¶
func IsValidAsPulseNumber ¶
Types ¶
type Data ¶
func NewFirstEphemeralData ¶
func NewFirstEphemeralData() Data
func NewPulsarData ¶
func (Data) CreateNextEphemeralPulse ¶
func (Data) CreateNextExpected ¶
func (Data) CreateNextPulsarPulse ¶
func (r Data) CreateNextPulsarPulse(delta uint16, entropyGen EntropyFunc) Data
func (Data) CreateNextPulse ¶
func (r Data) CreateNextPulse(entropyGen EntropyFunc) Data
func (Data) EnsureEphemeralData ¶
func (r Data) EnsureEphemeralData()
func (Data) EnsurePulsarData ¶
func (r Data) EnsurePulsarData()
func (Data) EnsurePulseData ¶
func (r Data) EnsurePulseData()
func (Data) GetNextPulseDelta ¶
func (Data) GetNextPulseNumber ¶
func (Data) GetPrevPulseDelta ¶
func (Data) GetPrevPulseNumber ¶
func (Data) GetPulseNumber ¶
func (Data) GetStartOfEpoch ¶
func (Data) GetTimestamp ¶
func (Data) IsEmptyWithEpoch ¶
func (Data) IsExpectedPulse ¶
func (Data) IsFirstPulse ¶
func (Data) IsFromEphemeral ¶
func (Data) IsFromPulsar ¶
func (Data) IsValidEphemeralData ¶
func (Data) IsValidExpectedPulseData ¶
func (Data) IsValidNext ¶
func (Data) IsValidPrev ¶
func (Data) IsValidPulsarData ¶
func (Data) IsValidPulseData ¶
type DataHolder ¶
type DataHolder interface { GetPulseNumber() Number GetPulseData() Data GetPulseDataDigest() cryptkit.DigestHolder }
type DataReader ¶
type EntropyFunc ¶
type Number ¶
type Number uint32
func OfUnixTime ¶
func (Number) IsSpecialOrTimePulse ¶
func (Number) IsTimePulse ¶
func (Number) IsUnknownOrEqualTo ¶
func (Number) IsUnknownOrTimePulse ¶
Click to show internal directories.
Click to hide internal directories.