utils

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMultiSignedPolicy

func BuildMultiSignedPolicy(chainID uint64, policyBytes []byte, voterPrivKeys []*ecdsa.PrivateKey) types.MultiSignedPolicy

BuildMultiSignedPolicy signs the source-bound policy hash for chainID, matching what data providers put on chain.

func EncodeSigningPolicy

func EncodeSigningPolicy(policy *relay.RelaySigningPolicyInitialized) ([]byte, error)

func GenerateRandomKeys

func GenerateRandomKeys(numVoters int) ([]common.Address, []*ecdsa.PrivateKey, map[common.Address]*ecdsa.PublicKey)

func GenerateRandomPolicyData

func GenerateRandomPolicyData(rewardEpochID uint32, voters []common.Address, seed int64) *policy.SigningPolicy

func GetVoterWeights

func GetVoterWeights(policy *policy.SigningPolicy) []uint16

Types

This section is empty.

Jump to

Keyboard shortcuts

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