Documentation ¶
Overview ¶
Package test provides helper and setup functions to test the sr25519 wallet.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AccountsCfg []byte
Functions ¶
func NewAddressZero ¶
NewAddressZero returns a zero address that is strictly smaller than all other addresses.
Types ¶
type DevAccount ¶
DevAccount contains an account for testing and developing which is funded by the substrate node.
func LoadDevAccounts ¶
func LoadDevAccounts(t *testing.T) []*DevAccount
LoadDevAccounts loads all dev accounts by assuming that the config file is in the passed directory.
type Hex ¶
type Hex []byte
Hex allows hexadecimal strings to be decoded by the go JSON lib.
func (*Hex) UnmarshalJSON ¶
UnmarshalJSON unmarshalls a Hex string from a byte slice.
type Randomizer ¶
type Randomizer struct {
// contains filtered or unexported fields
}
Randomizer implements the wallet/test.Randomizer interface.
func (*Randomizer) NewRandomAddress ¶
func (*Randomizer) NewRandomAddress(rng *rand.Rand) pwallet.Address
NewRandomAddress samples a random address from the passed entropy source.
func (*Randomizer) NewWallet ¶
func (*Randomizer) NewWallet() ptest.Wallet
NewWallet returns a new wallet.
func (*Randomizer) RandomWallet ¶
func (r *Randomizer) RandomWallet() ptest.Wallet
RandomWallet returns the random wallet of the Randomizer.