Documentation ¶
Index ¶
- Constants
- func CommitDKShare(ks *tcrypto.DKShare, pubKeys []kyber.Point) error
- func GetDKShare(addr *address.Address) (*tcrypto.DKShare, bool, error)
- func GetProgramCode(progHash *hashing.HashValue) ([]byte, bool, error)
- func GetRewardAddress(scaddr *address.Address) address.Address
- func InitFlags()
- func InitLogger()
- func LoadDKShare(addr *address.Address, maskPrivate bool) (*tcrypto.DKShare, error)
- func SaveBootupData(bd *BootupData) error
- func SaveDKShareToRegistry(ks *tcrypto.DKShare) error
- func SaveProgramCode(programCode []byte) (ret hashing.HashValue, err error)
- func SaveProgramMetadata(md *ProgramMetadata) error
- type BootupData
- func ActivateBootupData(addr *address.Address) (*BootupData, error)
- func DeactivateBootupData(addr *address.Address) (*BootupData, error)
- func GetBootupData(addr *address.Address) (*BootupData, error)
- func GetBootupRecords() ([]*BootupData, error)
- func UpdateBootupData(addr *address.Address, f func(*BootupData) bool) (*BootupData, error)
- type ProgramMetadata
Constants ¶
View Source
const (
// CfgBindAddress defines the config flag of the web API binding address.
CfgRewardAddress = "reward.address"
)
Variables ¶
This section is empty.
Functions ¶
func CommitDKShare ¶
func GetProgramCode ¶
TODO save program code in the smart contract state
func InitLogger ¶
func InitLogger()
func LoadDKShare ¶
func SaveBootupData ¶
func SaveBootupData(bd *BootupData) error
func SaveDKShareToRegistry ¶
func SaveProgramMetadata ¶
func SaveProgramMetadata(md *ProgramMetadata) error
Types ¶
type BootupData ¶
type BootupData struct { Address address.Address OwnerAddress address.Address // only needed for committee nodes, can be nil for access nodes Color balance.Color // origin tx hash CommitteeNodes []string // "host_addr:port" AccessNodes []string // "host_addr:port" Active bool }
BootupData is a minimum data needed to load a committee for the smart contract it is up to the node (not smart contract) to check authorisations to create/update this record
func ActivateBootupData ¶
func ActivateBootupData(addr *address.Address) (*BootupData, error)
func DeactivateBootupData ¶
func DeactivateBootupData(addr *address.Address) (*BootupData, error)
func GetBootupData ¶
func GetBootupData(addr *address.Address) (*BootupData, error)
func GetBootupRecords ¶
func GetBootupRecords() ([]*BootupData, error)
func UpdateBootupData ¶
func UpdateBootupData(addr *address.Address, f func(*BootupData) bool) (*BootupData, error)
func (*BootupData) String ¶
func (bd *BootupData) String() string
type ProgramMetadata ¶
type ProgramMetadata struct { // program hash. Persist in key ProgramHash hashing.HashValue // it is interpreted by the loader to locate and cache program's code Location string // VM type. It is used to distinguish between several types of VMs VMType string // description any text Description string }
func GetProgramMetadata ¶
func GetProgramMetadata(progHash *hashing.HashValue) (*ProgramMetadata, bool, error)
Click to show internal directories.
Click to hide internal directories.