blockchain_go/cli_listaddress.go

19 lines
263 B
Go
Raw Normal View History

package main
import (
"fmt"
"log"
)
func (cli *CLI) listAddresses(nodeID string) {
wallets, err := NewWallets(nodeID)
if err != nil {
log.Panic(err)
}
addresses := wallets.GetAddresses()
for _, address := range addresses {
fmt.Println(address)
}
}