Giter VIP home page Giter VIP logo

Comments (2)

mcdallas avatar mcdallas commented on June 8, 2024

Hi @amritabithi ,

Do you want to create a regular private key or an extended key from your own phrase? Either way that’s really not recommended for a bunch of reasons:

  1. if it’s not a standardized scheme you won’t be able to restore your wallet on any other software
  2. you are very likely to not choose random words but instead choose low entropy memorable words that will lead to your coins being stolen. If you are going to choose random words just use the existing scheme

if you still want to do it you could devise a custom scheme to turn your string to bytes by passing it through sha256 for example (known as brainwallets which again you should not use)

my_seed = sha256(str_to_bytes(“my custom words”))

and then for an extended key use Xprv.from_seed(my_seed) or for a regular key use PrivateKey(my_seed)

tl;dr don’t do it

from cryptotools.

amritabithi avatar amritabithi commented on June 8, 2024

Thank you for the quick response :) I eventually just got the WIF key and used that to initialize a private key object.

What I am trying to do specifically is to generate the xpub from an old private key that I used which created wallets programmatically, and so I was hoping to use the xpub to scan the wallet and make sure it is in fact empty.

I never could get the "to_xpub()" function to work today, trying with the sample code, I could not seem to get python to recognize that the objects had any functions that I Imported, and eventually gave up. I have been trying to find a script to show me an xpub for more than a year now.

from cryptotools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.