func (v *Vault) NewKeyPair() (pub solana.PublicKey, err error) {
	pub, privKey, err := solana.NewRandomPrivateKey()
	if err != nil {
		return
	}
	v.KeyBag = append(v.KeyBag, privKey)
	return
}
NewKeyPair creates a new keypair, saves the private key in the
local wallet and returns the public key. It does NOT save the
wallet, you better do that soon after.
package vault
import (
	"encoding/json"
	"fmt"
	"os"
	"github.com/streamingfast/solana-go"
)
type Vault struct {
	Kind    string `json:"kind"`
	Version int    `json:"version"`
	Comment string `json:"comment"`
	SecretBoxWrap       string `json:"secretbox_wrap"`
	SecretBoxCiphertext string `json:"secretbox_ciphertext"`
	KeyBag []solana.PrivateKey `json:"-"`
}
func NewVaultFromWalletFile(filename string) (*Vault, error) {
	v := NewVault()
	fl, err := os.Open(filename)
	if err != nil {
		return nil, err
	}
	defer fl.Close()
	err = json.NewDecoder(fl).Decode(&v)
	if err != nil {
		return nil, err
	}
	return v, nil
}
func NewVaultFromSingleKey(privKey string) (*Vault, error) {
	v := NewVault()
	key, err := solana.PrivateKeyFromBase58(privKey)
	if err != nil {
		return nil, fmt.Errorf("import private key: %s", err)
	}
	v.KeyBag = append(v.KeyBag, key)
	return v, nil
}
func NewVault() *Vault {
	return &Vault{
		Kind:    "solana-vault-wallet",
		Version: 1,
	}
}