specialEntries

package
v6.5.1-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeRegisterServerManagement = "Register Server Management"
	TypeNewBlockSigningKey       = "New Block Signing Key"
	TypeNewBitcoinKey            = "New Bitcoin Key"
	TypeNewMatryoshkaHash        = "New Matryoshka Hash"
	TypeIdentityChain            = "Identity Chain"
	TypeServerManagement         = "Server Management"

	IdentityChainID = "888888001750ede0eff4b05f0c3f557890b256450cabbb84cada937f9c258327"
)

String representations of the different identity types

Variables

This section is empty.

Functions

func CheckExternalIDsLength

func CheckExternalIDsLength(extIDs [][]byte, reqLengths []int) bool

CheckExternalIDsLength checks that the input external ids match the input required lengths

func GetIdentityType

func GetIdentityType(ent interfaces.IEBEntry) string

GetIdentityType returns the input entry's external id as a string type, returns "" if nil, or bad, or unknown type

func ValidateIdentityChain

func ValidateIdentityChain(ent interfaces.IEBEntry) error

ValidateIdentityChain validates that the input entry is consistent with the identity chain type

func ValidateIdentityEntry

func ValidateIdentityEntry(ent interfaces.IEBEntry) error

ValidateIdentityEntry validates the input entry's external ids

func ValidateNewBitcoinKey

func ValidateNewBitcoinKey(ent interfaces.IEBEntry) error

ValidateNewBitcoinKey validates that the input entry is consistent with the new bitcoin key type

func ValidateNewBlockSigningKey

func ValidateNewBlockSigningKey(ent interfaces.IEBEntry) error

ValidateNewBlockSigningKey validates that the input entry is consistent with the new block signing key type

func ValidateNewMatryoshkaHash

func ValidateNewMatryoshkaHash(ent interfaces.IEBEntry) error

ValidateNewMatryoshkaHash validates that the input entry is consistent with the Matryoshka Hash type

func ValidateRegisterServerManagement

func ValidateRegisterServerManagement(ent interfaces.IEBEntry) error

ValidateRegisterServerManagement validates that the input entry is consistent with the register server managment type

func ValidateServerManagement

func ValidateServerManagement(ent interfaces.IEBEntry) error

ValidateServerManagement validates that the input entry is consistent with server management type

Types

type FEREntry

type FEREntry struct {
	Version string `json:"version"` // This appears unused

	// The directory block height the FER request will be cancelled if not performed. Must be >= current directory block height
	// and <= current directory block height + 12
	ExpirationHeight uint32 `json:"expiration_height"`

	// The directory block height set by the state machine when the entry is processed. Used only for validity checking the expiration height
	ResidentHeight uint32 `json:"resident_height"`

	// The directory block height the FER change should occur. Must be >= expiration height - 6
	TargetActivationHeight uint32 `json:"target_activation_height"`

	Priority    uint32 `json:"priority"`     // Higher priorities take precedence over lower priorities
	TargetPrice uint64 `json:"target_price"` // The actual FER in Factoshis per EC (Entry Credit)
}

FEREntry stands for 'Factoid Exchange Rate' (FER) entry.

func (*FEREntry) GetExpirationHeight

func (fer *FEREntry) GetExpirationHeight() uint32

GetExpirationHeight returns the expiration height

func (*FEREntry) GetPriority

func (fer *FEREntry) GetPriority() uint32

GetPriority returns the priority

func (*FEREntry) GetResidentHeight

func (fer *FEREntry) GetResidentHeight() uint32

GetResidentHeight returns the resident height

func (*FEREntry) GetTargetActivationHeight

func (fer *FEREntry) GetTargetActivationHeight() uint32

GetTargetActivationHeight returns the target activation height

func (*FEREntry) GetTargetPrice

func (fer *FEREntry) GetTargetPrice() uint64

GetTargetPrice returns the target price

func (*FEREntry) GetVersion

func (fer *FEREntry) GetVersion() string

GetVersion returns the version

func (*FEREntry) JSONByte

func (fer *FEREntry) JSONByte() ([]byte, error)

JSONByte returns the json encoded byte array

func (*FEREntry) JSONString

func (fer *FEREntry) JSONString() (string, error)

JSONString returns the json encoded string

func (*FEREntry) MarshalBinary

func (fer *FEREntry) MarshalBinary() (rval []byte, err error)

MarshalBinary marshals this object

func (*FEREntry) SetExpirationHeight

func (fer *FEREntry) SetExpirationHeight(passedExpirationHeight uint32) interfaces.IFEREntry

SetExpirationHeight sets the expiration height to the input value

func (*FEREntry) SetPriority

func (fer *FEREntry) SetPriority(passedPriority uint32) interfaces.IFEREntry

SetPriority sets the priority to the input value

func (*FEREntry) SetResidentHeight

func (fer *FEREntry) SetResidentHeight(passedResidentHeight uint32) interfaces.IFEREntry

SetResidentHeight sets the resident height to the input value

func (*FEREntry) SetTargetActivationHeight

func (fer *FEREntry) SetTargetActivationHeight(passedTargetActivationHeight uint32) interfaces.IFEREntry

SetTargetActivationHeight sets the target activation height to the input value

func (*FEREntry) SetTargetPrice

func (fer *FEREntry) SetTargetPrice(passedTargetPrice uint64) interfaces.IFEREntry

SetTargetPrice sets the target price to the input value

func (*FEREntry) SetVersion

func (fer *FEREntry) SetVersion(passedVersion string) interfaces.IFEREntry

SetVersion sets the version to the input value

func (*FEREntry) String

func (fer *FEREntry) String() string

String returns this object as a string

func (*FEREntry) UnmarshalBinary

func (fer *FEREntry) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary unmarshals the input data into this object

func (*FEREntry) UnmarshalBinaryData

func (fer *FEREntry) UnmarshalBinaryData(data []byte) (newData []byte, err error)

UnmarshalBinaryData unmarshals the input data into this object

Jump to

Keyboard shortcuts

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