Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/destiner/blocksmith
Bitcoin/Ethereum key manipulation
https://github.com/destiner/blocksmith
bitcoin cryptocurrency cryptography ethereum security
Last synced: 4 days ago
JSON representation
Bitcoin/Ethereum key manipulation
- Host: GitHub
- URL: https://github.com/destiner/blocksmith
- Owner: Destiner
- License: apache-2.0
- Created: 2018-06-15T18:14:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-06T08:37:12.000Z (over 1 year ago)
- Last Synced: 2024-12-15T07:05:21.205Z (11 days ago)
- Topics: bitcoin, cryptocurrency, cryptography, ethereum, security
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 261
- Watchers: 18
- Forks: 92
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blocksmith
The goal of this library is to generate private keys and create Bitcoin and Ethereum wallet addresses from them.```
pip install blocksmith
```## Usage
### Generate a private key
```python
import blocksmithkg = blocksmith.KeyGenerator()
kg.seed_input('Truly random string. I rolled a dice and got 4.')
key = kg.generate_key()
print(key)
# 7077da4a47f6c85a21fe6c6cf1285c0fa06915871744ab1e5a5b741027884d00```
### Create Bitcoin wallet from a private key
```python
import blocksmithkey = '7077da4a47f6c85a21fe6c6cf1285c0fa06915871744ab1e5a5b741027884d00'
address = blocksmith.BitcoinWallet.generate_address(key)
print(address)
# 1JUP2bjfVexDif2m5fgyjHFrV9FE494REN```
### Create Ethereum wallet from a private key
```python
import blocksmithkey = '7077da4a47f6c85a21fe6c6cf1285c0fa06915871744ab1e5a5b741027884d00'
address = blocksmith.EthereumWallet.generate_address(key)
print(address)
# 0x1269645a46a3e86c1a3c3de8447092d90f6f04edchecksum_address = blocksmith.EthereumWallet.checksum_address(address)
print(checksum_address)
# 0x1269645a46A3e86c1a3C3De8447092D90f6F04ED```