tpkg

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualOutput

func EqualOutput(t *testing.T, expected *utxo.Output, actual *utxo.Output)

func EqualOutputs

func EqualOutputs(t *testing.T, expected utxo.Outputs, actual utxo.Outputs)

func EqualSpent

func EqualSpent(t *testing.T, expected *utxo.Spent, actual *utxo.Spent)

func EqualSpents

func EqualSpents(t *testing.T, expected utxo.Spents, actual utxo.Spents)

func Rand32ByteHash

func Rand32ByteHash() [32]byte

func RandAddress

func RandAddress(addressType iotago.AddressType) iotago.Address

func RandAliasID

func RandAliasID() iotago.AliasID

func RandAmount

func RandAmount() uint64

func RandBlockID

func RandBlockID() iotago.BlockID

func RandByte

func RandByte() byte

RandByte returns a random byte.

func RandBytes

func RandBytes(length int) []byte

RandBytes returns length amount random bytes.

func RandFloat64

func RandFloat64(max float64) float64

RandFloat64 returns a random float64.

func RandMilestoneID

func RandMilestoneID() iotago.MilestoneID

func RandMilestoneIndex

func RandMilestoneIndex() iotago.MilestoneIndex

func RandMilestoneTimestamp

func RandMilestoneTimestamp() uint32

func RandNFTID

func RandNFTID() iotago.NFTID

func RandOutput

func RandOutput(outputType iotago.OutputType) iotago.Output

func RandOutputID

func RandOutputID(index ...uint16) iotago.OutputID

func RandOutputOnAddress

func RandOutputOnAddress(outputType iotago.OutputType, address iotago.Address) iotago.Output

func RandOutputOnAddressWithAmount

func RandOutputOnAddressWithAmount(outputType iotago.OutputType, address iotago.Address, amount uint64) iotago.Output

func RandOutputType

func RandOutputType() iotago.OutputType

func RandProtocolParameters

func RandProtocolParameters() *iotago.ProtocolParameters

RandProtocolParameters produces random protocol parameters.

func RandProtocolParamsMilestoneOpt

func RandProtocolParamsMilestoneOpt(targetIndex ...iotago.MilestoneIndex) *iotago.ProtocolParamsMilestoneOpt

RandProtocolParamsMilestoneOpt produces random protocol parameters milestone option.

func RandReceipt

func RandReceipt(msIndex iotago.MilestoneIndex, protoParams *iotago.ProtocolParameters) (*iotago.ReceiptMilestoneOpt, error)

func RandRentStructure

func RandRentStructure() *iotago.RentStructure

RandRentStructure produces random rent structure.

func RandSeed

func RandSeed() []byte

func RandString

func RandString(length int) string

func RandTransactionID

func RandTransactionID() iotago.TransactionID

func RandTreasuryOutput

func RandTreasuryOutput() *utxo.TreasuryOutput

func RandUTXOOutput

func RandUTXOOutput() *utxo.Output

func RandUTXOOutputOnAddress

func RandUTXOOutputOnAddress(outputType iotago.OutputType, address iotago.Address) *utxo.Output

func RandUTXOOutputOnAddressWithAmount

func RandUTXOOutputOnAddressWithAmount(outputType iotago.OutputType, address iotago.Address, amount uint64) *utxo.Output

func RandUTXOOutputWithType

func RandUTXOOutputWithType(outputType iotago.OutputType) *utxo.Output

func RandUTXOSpent

func RandUTXOSpent(msIndexSpent iotago.MilestoneIndex, msTimestampSpent uint32) *utxo.Spent

func RandUTXOSpentWithOutput

func RandUTXOSpentWithOutput(output *utxo.Output, msIndexSpent iotago.MilestoneIndex, msTimestampSpent uint32) *utxo.Spent

func RandUint16

func RandUint16(max uint16) uint16

RandUint16 returns a random uint16.

func RandUint32

func RandUint32(max uint32) uint32

RandUint32 returns a random uint32.

func RandUint64

func RandUint64(max uint64) uint64

RandUint64 returns a random uint64.

func RandUint8

func RandUint8(max uint8) uint8

RandUint8 returns a random uint8.

func RandomFloat64

func RandomFloat64() float64

func RandomInt31n

func RandomInt31n(n int32) int32

func RandomInt63n

func RandomInt63n(n int64) int64

func RandomIntn

func RandomIntn(n int) int

func RandomRead

func RandomRead(p []byte) (n int, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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