MCPcopy Create free account
hub / github.com/Sifchain/sifnode / AddKey

Method AddKey

tools/sifgen/utils/cli.go:117–126  ·  view source on GitHub ↗
(name, mnemonic, keyPassword, cliDir string)

Source from the content-addressed store, hash-verified

115}
116
117func (c CLI) AddKey(name, mnemonic, keyPassword, cliDir string) (*string, error) {
118 switch c.keyringBackend {
119 case keyring.BackendFile:
120 return nil, errors.New("not implemented")
121 default:
122 var input [][]byte
123 input = c.formatInputs([]string{mnemonic, ""})
124 return c.shellExecInput("sifnoded", input, "keys", "add", name, "--home", cliDir, "-i", "--keyring-backend", c.keyringBackend)
125 }
126}
127
128func (c CLI) AddGenesisAccount(address, nodeDir string, coins []string) (*string, error) {
129 return c.shellExec("sifnoded", "add-genesis-account", address, strings.Join(coins[:], ","), "--home", nodeDir)

Callers 1

AddKeyToBackendFunction · 0.95

Calls 2

formatInputsMethod · 0.95
shellExecInputMethod · 0.95

Tested by 1

AddKeyToBackendFunction · 0.76