Skip to main content

A blockchain Wallet Service APIs

Project description

This library is a service that help can create Wallet Seed or keys, create BlockCypher HD allet and also hold internal wallet reference to it. 

Get Started

# open any command-line terminal

# install px-services
pip install px-services==0.1.3

# run python3 interractive shell
python3 

Python 3.9.10 (main, Jan 15 2022, 11:48:00)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information

# import px_services package classes
>>> from px_services.wallet import PxWallet
>>> from px_services.wallet import PxWalletKeyGenerator

# This method `PxWalletKeyGenerator.generate_seed_phrase()` return a turple of 
# `secret_phrase` ( a.k.a `seed phrase` | `recovery phrase` | `backup phrase`)
# `seed` dictionary with these keys `hex`, `bytes`

secret_phrase, seed = PxWalletKeyGenerator.generate_seed_phrase()

# This method `PxWalletKeyGenerator.seedToMasterKey(seed['hex'])` take the seed (in hex format)
# as input and returns a turple of `info` dictionary object and `hdKey` Master key object
# (same object from which `info` dictionary object was constructed).

info, hdKey = PxWalletKeyGenerator.seedToMasterKey(seed['hex'])

# get Master Node or Master Key details from `info` dictionary object

info.get('master_key_info')

# get `account_keys` (account level extended public & private key) from `master_key_info`

info.get('master_key_info').get('account_keys')

# get `zprv` ( account level extended private key) from `account_keys`. This key can be 
# used to derive all account level addresses and it corresponding public & private keys. 
# Please DONOT share this key with any Blockchain Service Provider unless you have too.

info.get('master_key_info').get('account_keys').('zprv')

# get `zpub` ( account level extended public key) from `account_keys`. This key can be used 
# to derive all account level addresses and its corresponding `public keys` but cannot derive 
# its corresponding `private keys`. This key can be shared with any Blockchain Service 
# Providers since they will only be able to derive addresses and read its balances.

info.get('master_key_info').get('account_keys').('zpub')

Change Log

0.1.11 (05/12/2023)

  • Improved BlockCypher HD wallet create response

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

px_services-0.1.11.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file px_services-0.1.11.tar.gz.

File metadata

  • Download URL: px_services-0.1.11.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for px_services-0.1.11.tar.gz
Algorithm Hash digest
SHA256 1fed2b6b004ec36c7f38e37006635f4148d71948a38e7f30757c2c2d0b352111
MD5 5d3ace309055e5a8085613abb8d406b2
BLAKE2b-256 01f1c5af2cbd381d5d0d6560d5aa0da49c8b7b8b93fa9e270bb74a8fdc026d97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page