2022-03-22 03:04:09 +00:00
|
|
|
package remote_utils
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/logrusorgru/aurora"
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/validator/accounts/petnames"
|
2022-03-22 03:04:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// DisplayRemotePublicKeys prints remote public keys to stdout.
|
|
|
|
func DisplayRemotePublicKeys(validatingPubKeys [][48]byte) {
|
|
|
|
au := aurora.NewAurora(true)
|
|
|
|
for i := 0; i < len(validatingPubKeys); i++ {
|
|
|
|
fmt.Println("")
|
|
|
|
fmt.Printf(
|
|
|
|
"%s\n", au.BrightGreen(petnames.DeterministicName(validatingPubKeys[i][:], "-")).Bold(),
|
|
|
|
)
|
|
|
|
// Retrieve the validating key account metadata.
|
|
|
|
fmt.Printf("%s %#x\n", au.BrightCyan("[validating public key]").Bold(), validatingPubKeys[i])
|
|
|
|
fmt.Println(" ")
|
|
|
|
}
|
|
|
|
}
|