neovrf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package neovrf provides verifiable randomness service.

Index

Constants

View Source
const (
	ServiceID   = "neovrf"
	ServiceName = "NeoVRF Service"
	Version     = "1.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Marble       *marble.Marble
	DB           database.RepositoryInterface
	ReplayWindow time.Duration
}

Config holds VRF service configuration.

type PublicKeyResponse

type PublicKeyResponse struct {
	PublicKey       string `json:"public_key"`
	AttestationHash string `json:"attestation_hash,omitempty"`
}

type RandomRequest

type RandomRequest struct {
	RequestID string `json:"request_id,omitempty"`
}

type RandomResponse

type RandomResponse struct {
	RequestID       string `json:"request_id"`
	Randomness      string `json:"randomness"`
	Signature       string `json:"signature,omitempty"`
	PublicKey       string `json:"public_key,omitempty"`
	AttestationHash string `json:"attestation_hash,omitempty"`
	Timestamp       int64  `json:"timestamp"`
}

type Service

type Service struct {
	*commonservice.BaseService
	// contains filtered or unexported fields
}

Service implements the VRF service.

func New

func New(cfg Config) (*Service, error)

New creates a new NeoVRF service.

Jump to

Keyboard shortcuts

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