Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateQueryHash(relayReq pairingtypes.RelayRequest) (queryHash []byte)
- func CalculateVrfOnRelay(request *pairingtypes.RelayRequest, response *pairingtypes.RelayReply, ...) ([]byte, []byte)
- func Deserialize(raw []byte, data any)
- func FormatDataForVrf(request *pairingtypes.RelayRequest, response *pairingtypes.RelayReply, ...) (data []byte)
- func GeneratePrivateVRFKey() (vrf.PrivateKey, vrf.PublicKey, error)
- func GetIndexForVrf(vrf []byte, providersCount uint32, reliabilityThreshold uint32) (index int64, err error)
- func LavaError(ctx sdk.Context, logger log.Logger, name string, attributes map[string]string, ...) error
- func LavaFormatDebug(description string, extraAttributes *map[string]string) error
- func LavaFormatError(description string, err error, extraAttributes *map[string]string) error
- func LavaFormatFatal(description string, err error, extraAttributes *map[string]string)
- func LavaFormatInfo(description string, extraAttributes *map[string]string) error
- func LavaFormatLog(description string, err error, extraAttributes *map[string]string, ...) error
- func LavaFormatWarning(description string, err error, extraAttributes *map[string]string) error
- func LogLavaEvent(ctx sdk.Context, logger log.Logger, name string, attributes map[string]string, ...)
- func LoggingLevel(logLevel string)
- func OpenKeyring(clientCtx client.Context) (keyring.Keyring, error)
- func ProveVrfOnRelay(request *pairingtypes.RelayRequest, response *pairingtypes.RelayReply, ...) (vrf_res []byte, proof []byte)
- func Serialize(data any) []byte
- func VerifyVRF(vrfpk string) error
- func VerifyVrfProof(request *pairingtypes.RelayRequest, vrf_pk VrfPubKey, relayEpochStart uint64) (valid bool)
- func VerifyVrfProofFromVRFData(reliabilityData *pairingtypes.VRFData, vrf_pk VrfPubKey, ...) (valid bool)
- type LavaMutex
- type Lockable
- type VrfPubKey
- func (pk *VrfPubKey) Bytes() []byte
- func (pk *VrfPubKey) DecodeFromBech32(bech32str string) (*VrfPubKey, error)
- func (pk *VrfPubKey) EncodeBech32() (string, error)
- func (pk *VrfPubKey) Equals(pk2 VrfPubKey) bool
- func (pk *VrfPubKey) MarshalTo(dAtA []byte) (int, error)
- func (pk *VrfPubKey) Reset()
- func (pk *VrfPubKey) String() string
- func (pk *VrfPubKey) Unmarshal(bz []byte) error
- func (pk *VrfPubKey) VerifySignature(m []byte, vrfBytes []byte, proof []byte) bool
Constants ¶
View Source
const (
EventPrefix = "lava_"
)
View Source
const TIMEOUT = 10
Variables ¶
View Source
var ( TimeoutMutex = "false" TimeoutMutexBoolean, _ = strconv.ParseBool(TimeoutMutex) )
View Source
var VRFValueAboveReliabilityThresholdError = sdkerrors.New("VRFValueAboveReliabilityThreshold Error", 1, "calculated vrf does not result in a smaller value than threshold") // client could'nt connect to any provider.
Functions ¶
func CalculateQueryHash ¶ added in v0.4.3
func CalculateQueryHash(relayReq pairingtypes.RelayRequest) (queryHash []byte)
func CalculateVrfOnRelay ¶ added in v0.4.3
func CalculateVrfOnRelay(request *pairingtypes.RelayRequest, response *pairingtypes.RelayReply, vrf_sk vrf.PrivateKey, currentEpoch uint64) ([]byte, []byte)
func Deserialize ¶
func FormatDataForVrf ¶ added in v0.4.3
func FormatDataForVrf(request *pairingtypes.RelayRequest, response *pairingtypes.RelayReply, differentiator bool, currentEpoch uint64) (data []byte)
func GeneratePrivateVRFKey ¶ added in v0.4.3
func GeneratePrivateVRFKey() (vrf.PrivateKey, vrf.PublicKey, error)
func GetIndexForVrf ¶ added in v0.4.3
func LavaFormatDebug ¶
func LavaFormatError ¶
func LavaFormatFatal ¶
func LavaFormatInfo ¶
func LavaFormatLog ¶
func LavaFormatWarning ¶
func LogLavaEvent ¶
func LoggingLevel ¶ added in v0.4.3
func LoggingLevel(logLevel string)
func OpenKeyring ¶ added in v0.4.3
func ProveVrfOnRelay ¶ added in v0.4.3
func ProveVrfOnRelay(request *pairingtypes.RelayRequest, response *pairingtypes.RelayReply, vrf_sk vrf.PrivateKey, differentiator bool, currentEpoch uint64) (vrf_res []byte, proof []byte)
func VerifyVrfProof ¶ added in v0.4.3
func VerifyVrfProof(request *pairingtypes.RelayRequest, vrf_pk VrfPubKey, relayEpochStart uint64) (valid bool)
func VerifyVrfProofFromVRFData ¶ added in v0.4.3
func VerifyVrfProofFromVRFData(reliabilityData *pairingtypes.VRFData, vrf_pk VrfPubKey, relayEpochStart uint64) (valid bool)
Types ¶
type LavaMutex ¶
type LavaMutex struct { SecondsLeft int // contains filtered or unexported fields }
type VrfPubKey ¶ added in v0.4.3
type VrfPubKey struct {
// contains filtered or unexported fields
}
func GenerateVRFKey ¶ added in v0.4.3
func GetOrCreateVRFKey ¶ added in v0.4.3
func LoadVRFKey ¶ added in v0.4.3
func (*VrfPubKey) DecodeFromBech32 ¶ added in v0.4.3
func (*VrfPubKey) EncodeBech32 ¶ added in v0.4.3
Click to show internal directories.
Click to hide internal directories.