Documentation ¶
Index ¶
- Constants
- Variables
- func AppendUniqueIdentifier(ctx context.Context, guid uint64) context.Context
- func CalculateQueryHash(relayReq pairingtypes.RelayPrivateData) (queryHash []byte)
- func CalculateVrfOnRelay(request *pairingtypes.RelayPrivateData, response *pairingtypes.RelayReply, ...) ([]byte, []byte)
- func Deserialize(raw []byte, data any)
- func FormatDataForVrf(request *pairingtypes.RelayPrivateData, response *pairingtypes.RelayReply, ...) (data []byte)
- func FormatStringerList[T fmt.Stringer](description string, listToPrint []T) string
- func GeneratePrivateVRFKey() (vrf.PrivateKey, vrf.PublicKey, error)
- func GenerateUniqueIdentifier() uint64
- func GetIndexForVrf(vrf []byte, providersCount uint32, reliabilityThreshold uint32) (index int64, err error)
- func GetUniqueIdentifier(ctx context.Context) (guid uint64, found bool)
- func LavaError(ctx sdk.Context, logger log.Logger, name string, attributes map[string]string, ...) error
- func LavaFormatDebug(description string, attributes ...Attribute) error
- func LavaFormatError(description string, err error, attributes ...Attribute) error
- func LavaFormatFatal(description string, err error, attributes ...Attribute)
- func LavaFormatInfo(description string, attributes ...Attribute) error
- func LavaFormatLog(description string, err error, attributes []Attribute, severity uint) error
- func LavaFormatWarning(description string, err error, attributes ...Attribute) 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.RelayPrivateData, 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)
- func WithUniqueIdentifier(ctx context.Context, guid uint64) context.Context
- type Attribute
- 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 AppendUniqueIdentifier ¶
func CalculateQueryHash ¶ added in v0.4.3
func CalculateQueryHash(relayReq pairingtypes.RelayPrivateData) (queryHash []byte)
func CalculateVrfOnRelay ¶ added in v0.4.3
func CalculateVrfOnRelay(request *pairingtypes.RelayPrivateData, response *pairingtypes.RelayReply, vrf_sk vrf.PrivateKey, currentEpoch uint64) ([]byte, []byte)
func Deserialize ¶
func FormatDataForVrf ¶ added in v0.4.3
func FormatDataForVrf(request *pairingtypes.RelayPrivateData, response *pairingtypes.RelayReply, differentiator bool, currentEpoch uint64) (data []byte)
func FormatStringerList ¶
func GeneratePrivateVRFKey ¶ added in v0.4.3
func GeneratePrivateVRFKey() (vrf.PrivateKey, vrf.PublicKey, error)
func GenerateUniqueIdentifier ¶
func GenerateUniqueIdentifier() uint64
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.RelayPrivateData, 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.