add faucet link
@@ -65,6 +65,18 @@ func (k *KeyResult) String() string {
writer := util.CreateTabWriter(&b)
if k.privateKey != nil {
+ // build the faucet link
+ link := fmt.Sprintf("https://testnet-faucet.onflow.org/?key=%x", k.publicKey.Encode())
+ if k.privateKey.Algorithm() != crypto.ECDSA_P256 {
+ link = fmt.Sprintf("%s&sig-algo=%s", link, k.privateKey.Algorithm().String())
+ }
+
+ fmt.Printf(
+ "%s If you want to create an account on testnet with the generated keys use this link:\n%s \n\n",
+ output.TryEmoji(),
+ link,
+ )
+
_, _ = fmt.Fprintf(writer, "%s Store private key safely and don't share with anyone! \n", output.StopEmoji())
_, _ = fmt.Fprintf(writer, "Private Key \t %x \n", k.privateKey.Encode())
}
