ruler

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ActionSign is the action of signing data.
	ActionSign = "Sign"
	// ActionSignBeaconAttestation is the action of signing a beacon attestation.
	ActionSignBeaconAttestation = "Sign beacon attestation"
	// ActionSignBeaconProposal is the action of signing a beacon proposal.
	ActionSignBeaconProposal = "Sign beacon proposal"
	// ActionAccessAccount is the action of accessing an account.
	ActionAccessAccount = "Access account"
)

Functions

This section is empty.

Types

type AccessAccountData

type AccessAccountData struct {
	Paths []string
}

AccessAccountData is passed to 'AccessAccount' ruler requests.

type Checkpoint

type Checkpoint struct {
	Epoch uint64
	Root  []byte
}

Checkpoint is part of SignBeaconAttestationData.

type Service

type Service interface {
	// RunRules runs a set of rules for the given information.
	RunRules(context.Context, string, string, string, []byte, interface{}) core.RulesResult
}

Service provides an interface to check requests against a rules engine.

type SignBeaconAttestationData

type SignBeaconAttestationData struct {
	Domain          []byte
	Slot            uint64
	CommitteeIndex  uint64
	BeaconBlockRoot []byte
	Source          *Checkpoint
	Target          *Checkpoint
}

SignBeaconAttestationData is passed to 'SignBeaconAttestation' ruler requests.

type SignBeaconProposalData

type SignBeaconProposalData struct {
	Domain        []byte
	Slot          uint64
	ProposerIndex uint64
	ParentRoot    []byte
	StateRoot     []byte
	BodyRoot      []byte
}

SignBeaconProposalData is passed to 'SignBeaconProposal' ruler requests.

type SignData

type SignData struct {
	Domain []byte
	Data   []byte
}

SignData is passed to 'Sign' ruler requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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