Documentation ¶
Overview ¶
Package beacon implements the combined beacon and epochtime application.
Index ¶
Constants ¶
View Source
const ( // AppID is the unique application identifier. AppID uint8 = 0x40 // AppName is the ABCI application name. // Run before all other applications. AppName string = "000_beacon" // AppPriority is the base priority for the app's transactions. AppPriority int64 = 100000 )
Variables ¶
View Source
var ( // EventType is the ABCI event type for beacon/epoch events. EventType = api.EventTypeForApp(AppName) // QueryApp is the query for filtering events procecessed by the // beacon application. QueryApp = api.QueryForApp(AppName) // MethodSetEpoch is the method name for setting epochs. MethodSetEpoch = transaction.NewMethodName(AppName, "SetEpoch", beacon.EpochTime(0)) // Methods is a list of all methods supported by the beacon application. Methods = []transaction.MethodName{ MethodSetEpoch, beacon.MethodVRFProve, } )
Functions ¶
func MustGetChainContext ¶
MustGetChainContext returns the global blockchain chain context or panics.
XXX: This lives here because making it a method of `api.Context` import loops.
Types ¶
type Query ¶
type Query interface { Beacon(context.Context) ([]byte, error) Epoch(context.Context) (beacon.EpochTime, int64, error) FutureEpoch(context.Context) (*beacon.EpochTimeState, error) Genesis(context.Context) (*beacon.Genesis, error) ConsensusParameters(context.Context) (*beacon.ConsensusParameters, error) VRFState(context.Context) (*beacon.VRFState, error) }
Query is the beacon query interface.
type QueryFactory ¶
type QueryFactory struct {
// contains filtered or unexported fields
}
QueryFactory is the beacon query factory.
func NewQueryFactory ¶
func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory
NewQueryFactory returns a new QueryFactory backed by the given state instance.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.