blockchain_go/cli_createwallet.go

12 lines
221 B
Go

package main
import "fmt"
func (cli *CLI) createWallet(nodeID string) {
wallets, _ := NewWallets(nodeID)
address := wallets.CreateWallet()
wallets.SaveToFile(nodeID)
fmt.Printf("Your new address: %s\n", address)
}