func (w *WalletRPC) ImportPrivKey(args []string) {
	if len(args) != 1 {
		w.errln("Usage: importprivkey <keyhex>")
		return
	}

	privBytes, err := hex.DecodeString(args[0])
	if err != nil {
		w.errf("Error parsing private key: %s\n", err)
	}

	addr := w.w.ImportPrivKey(privBytes, 0)

	w.printf("Imported new address: %s\n", addr)
}
// ImportPrivKey imports a private key.
ImportPrivKey imports a private key.
// ImportPrivKey imports a private key .
func (w *WalletRPC) ImportPrivKey(args []string) {
	if len(args) != 1 {
		w.errln("Usage: importprivkey <keyhex>")
		return
	}
	privBytes, err := hex.DecodeString(args[0])
	if err != nil {
		w.errf("Error parsing private key: %s\n", err)
	}
	addr := w.w.ImportPrivKey(privBytes, 0)
	w.printf("Imported new address: %s\n", addr)
}
func ( w * WalletRPC ) ImportPrivKey ( args [ ] string ) { if len ( args ) != 1 { w . errln ( " " ) return } privBytes , err := hex . DecodeString ( args [ 0 ] ) if err != nil { w . errf ( " \n " , err ) } addr := w . w . ImportPrivKey ( privBytes , 0 ) w . printf ( " \n " , addr ) }
ImportPrivKey imports a private key.
ImportPrivKey imports a private key .