Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "decode <public key>", Short: "Decode a public account key hex string", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { publicKey := args[0] publicKeyBytes, err := hex.DecodeString(publicKey) if err != nil { cli.Exitf(1, "Failed to decode public key: %v", err) } accountKey, err := flowsdk.DecodeAccountKey(publicKeyBytes) if err != nil { cli.Exitf(1, "Failed to decode private key bytes: %v", err) } fmt.Printf(" Public key: %x\n", accountKey.PublicKey.Encode()) fmt.Printf(" Signature algorithm: %s\n", accountKey.SigAlgo) fmt.Printf(" Hash algorithm: %s\n", accountKey.HashAlgo) fmt.Printf(" Weight: %d\n", accountKey.Weight) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.