Documentation ¶
Index ¶
- Constants
- func DisplayInfo(info PrintInfo) error
- func DownloadGitFiles(path, downloadPath string) error
- func InitializeVRFKey(config *cfg.Config) (vrfPubKey sdkcrypto.PubKey, err error)
- func PrivValidatorKeyFileToVRFKeyFile(pvFile string) string
- type GitFile
- type PrintInfo
- type VRFKey
- func (v *VRFKey) IsNil() bool
- func (v VRFKey) Save() error
- func (v *VRFKey) SignTransaction(ctx sdk.Context, txBuilder client.TxBuilder, txConfig client.TxConfig, ...) (txsigning.SignatureV2, error)
- func (v *VRFKey) VRFProve(alpha []byte) (pi, beta []byte, err error)
- func (v *VRFKey) VRFVerify(publicKey, alpha, pi []byte) (beta []byte, err error)
Constants ¶
View Source
const ( OrgName = "sedaprotocol" RepoName = "seda-networks" )
View Source
const VRFKeyFileName = "vrf_key.json"
Variables ¶
This section is empty.
Functions ¶
func DisplayInfo ¶
func DownloadGitFiles ¶
func InitializeVRFKey ¶
func PrivValidatorKeyFileToVRFKeyFile ¶
PrivValidatorKeyFileToVRFKeyFile returns the path to the VRF key file given a path to the private validator key file. The two files should be placed in the same directory.
Types ¶
type PrintInfo ¶ added in v0.0.6
type PrintInfo struct { Moniker string `json:"moniker" yaml:"moniker"` ChainID string `json:"chain_id" yaml:"chain_id"` NodeID string `json:"node_id" yaml:"node_id"` Seeds string `json:"seeds" yaml:"seeds"` }
func NewPrintInfo ¶
type VRFKey ¶
type VRFKey struct { Address types.Address `json:"address"` PubKey sdkcrypto.PubKey `json:"pub_key"` PrivKey crypto.PrivKey `json:"priv_key"` // contains filtered or unexported fields }
func LoadOrGenVRFKey ¶
LoadOrGenVRFKey loads a VRFKey from the given file path or else generates a new one and saves it to the file path.
func LoadVRFKey ¶
func (*VRFKey) SignTransaction ¶
func (v *VRFKey) SignTransaction( ctx sdk.Context, txBuilder client.TxBuilder, txConfig client.TxConfig, signMode txsigning.SignMode, account sdk.AccountI, ) (txsigning.SignatureV2, error)
SignTransaction signs a given transaction with the VRF key and returns the resulting signature. The given account must belong to the VRF key.
Click to show internal directories.
Click to hide internal directories.