Comments (2)
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:
- if it’s not a standardized scheme you won’t be able to restore your wallet on any other software
- 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.
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)
- Remove lxml from test suite
- It makes P2WSH not right. HOT 8
- How to install offline? HOT 1
- Problems installing cryptotools with pip HOT 2
- incomplete test instructions?! HOT 2
- multisig logic appears faulty HOT 4
- support for passphrases? HOT 1
- P2WSH and P2WPKH_P2SH etc? HOT 7
- How to derive all possible segwit addresses from xpub HOT 3
- Litecoin support? Get address from Ltub? HOT 3
- ScriptValidationError: Unknown script type HOT 8
- Not working with pyinstaller HOT 2
- question
- Why doesn't this work on Private Key WIF compressed ? HOT 1
- BTC private keys to address and balance check HOT 2
- pls add support electrum v1 and v2
- Need some advice. HOT 10
- 50000
- cant install with the command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptotools.