func NewSeed(optionalSeedBytes ...[]byte) *Seed {
	if len(optionalSeedBytes) >= 1 {
		if len(optionalSeedBytes[0]) < SeedSize {
			panic("seed is not long enough")
		}
		return &Seed{
			seedBytes: optionalSeedBytes[0],
		}
	}
	randomSeedBytes := make([]byte, ed25519.SeedSize)
	_, err := rand.Read(randomSeedBytes)
	if err != nil {
		panic(err)
	}
	return &Seed{
		seedBytes: randomSeedBytes,
	}
}
NewSeed represents the factory method for a Seed object. It either generates a new random seed or restores an
existing one from a sequence of bytes.
package ed25519
import (
	"crypto/rand"
	"encoding/binary"
	"github.com/iotaledger/hive.go/byteutils"
	"github.com/mr-tron/base58"
	"github.com/oasisprotocol/ed25519"
	"golang.org/x/crypto/blake2b"
)
type Seed struct {
	seedBytes []byte
}