testutils

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustFromHex

func MustFromHex(t *testing.T, s string) []byte

Helper to decode a hex string beginning with "0x". Fails the test if the string can't be decoded.

func RandomBandersnatchOutputHash

func RandomBandersnatchOutputHash(t *testing.T) crypto.BandersnatchOutputHash

func RandomBandersnatchPrivateKey

func RandomBandersnatchPrivateKey(t *testing.T) crypto.BandersnatchPrivateKey

func RandomBandersnatchPublicKey

func RandomBandersnatchPublicKey(t *testing.T) crypto.BandersnatchPublicKey

func RandomBandersnatchRingCommitment

func RandomBandersnatchRingCommitment(t *testing.T) crypto.RingCommitment

func RandomBandersnatchSignature

func RandomBandersnatchSignature(t *testing.T) crypto.BandersnatchSignature

func RandomBlsKey

func RandomBlsKey(t *testing.T) crypto.BlsKey

func RandomBytes

func RandomBytes(t *testing.T, ln uint32) []byte

func RandomED25519Keys

func RandomED25519Keys(t *testing.T) (ed25519.PublicKey, ed25519.PrivateKey, error)

func RandomED25519PublicKey

func RandomED25519PublicKey(t *testing.T) ed25519.PublicKey

func RandomEd25519Signature

func RandomEd25519Signature(t *testing.T) crypto.Ed25519Signature

func RandomEpochKeys

func RandomEpochKeys(t *testing.T) crypto.EpochKeys

func RandomHash

func RandomHash(t *testing.T) crypto.Hash

func RandomMetadataKey

func RandomMetadataKey(t *testing.T) crypto.MetadataKey

func RandomSlice

func RandomSlice[T any](t *testing.T, start, end int32, generatorFn func(t *testing.T) T) iter.Seq[T]

RandomSlice creates a slice of type T using generator function generatorFn between 1 and 100

func RandomTicketProof

func RandomTicketProof(t *testing.T) [784]byte

func RandomTimeslot

func RandomTimeslot() jamtime.Timeslot

func RandomUint16

func RandomUint16() uint16

func RandomUint32

func RandomUint32() uint32

func RandomUint64

func RandomUint64() uint64

func RandomValidatorKey

func RandomValidatorKey(t *testing.T) crypto.ValidatorKey

Types

This section is empty.

Directories

Path Synopsis
This package does its best to ensure deterministic encoding by sorting various fields as specified by the GP appendix D. This allows for more useful JSON diffing.
This package does its best to ensure deterministic encoding by sorting various fields as specified by the GP appendix D. This allows for more useful JSON diffing.

Jump to

Keyboard shortcuts

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