Documentation ¶
Index ¶
- Constants
- func CheckExternalIDsLength(extIDs [][]byte, reqLengths []int) bool
- func GetIdentityType(ent interfaces.IEBEntry) string
- func ValidateIdentityChain(ent interfaces.IEBEntry) error
- func ValidateIdentityEntry(ent interfaces.IEBEntry) error
- func ValidateNewBitcoinKey(ent interfaces.IEBEntry) error
- func ValidateNewBlockSigningKey(ent interfaces.IEBEntry) error
- func ValidateNewMatryoshkaHash(ent interfaces.IEBEntry) error
- func ValidateRegisterServerManagement(ent interfaces.IEBEntry) error
- func ValidateServerManagement(ent interfaces.IEBEntry) error
- type FEREntry
- func (fer *FEREntry) GetExpirationHeight() uint32
- func (fer *FEREntry) GetPriority() uint32
- func (fer *FEREntry) GetResidentHeight() uint32
- func (fer *FEREntry) GetTargetActivationHeight() uint32
- func (fer *FEREntry) GetTargetPrice() uint64
- func (fer *FEREntry) GetVersion() string
- func (fer *FEREntry) JSONByte() ([]byte, error)
- func (fer *FEREntry) JSONString() (string, error)
- func (fer *FEREntry) MarshalBinary() (rval []byte, err error)
- func (fer *FEREntry) SetExpirationHeight(passedExpirationHeight uint32) interfaces.IFEREntry
- func (fer *FEREntry) SetPriority(passedPriority uint32) interfaces.IFEREntry
- func (fer *FEREntry) SetResidentHeight(passedResidentHeight uint32) interfaces.IFEREntry
- func (fer *FEREntry) SetTargetActivationHeight(passedTargetActivationHeight uint32) interfaces.IFEREntry
- func (fer *FEREntry) SetTargetPrice(passedTargetPrice uint64) interfaces.IFEREntry
- func (fer *FEREntry) SetVersion(passedVersion string) interfaces.IFEREntry
- func (fer *FEREntry) String() string
- func (fer *FEREntry) UnmarshalBinary(data []byte) (err error)
- func (fer *FEREntry) UnmarshalBinaryData(data []byte) (newData []byte, err error)
Constants ¶
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 ¶
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 ¶
GetExpirationHeight returns the expiration height
func (*FEREntry) GetPriority ¶
GetPriority returns the priority
func (*FEREntry) GetResidentHeight ¶
GetResidentHeight returns the resident height
func (*FEREntry) GetTargetActivationHeight ¶
GetTargetActivationHeight returns the target activation height
func (*FEREntry) GetTargetPrice ¶
GetTargetPrice returns the target price
func (*FEREntry) GetVersion ¶
GetVersion returns the version
func (*FEREntry) JSONString ¶
JSONString returns the json encoded string
func (*FEREntry) MarshalBinary ¶
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) UnmarshalBinary ¶
UnmarshalBinary unmarshals the input data into this object