Avalados por :
import (
"strings"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/types"
)
func NewKeyring() (keyring.Keyring, error) {
var kr keyring.Keyring
keyringPassword := "password"
runtimeHomeDir := "~/.cosmosHome"
reader := strings.NewReader("")
reader.Reset(keyringPassword + "\n")
kr, err := keyring.New(
types.KeyringServiceName(),
keyring.BackendTest
runtimeHomeDir,
reader,
)
if err != nil {
return kr, err
}
return kr, nil
}
import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
)
func CreateAccount() (string, error) {
keyringPassword := "password"
kr, err = NewKeyring()
if err !=
contacto@primeinstitute.com
(+51) 1641 9379
(+57) 1489 6964
© 2024 Copyright. Todos los derechos reservados.
Desarrollado por Prime Institute