Giter VIP home page Giter VIP logo

pybgl's Introduction

Python bitgesell library

Based on pybtc library. Current version is 3.0

Feature Support

  • Basic functions
  • Supports addresses types PUBKEY, P2PKH, P2SH, P2SH-PWPKH, P2WPKH, P2WSH.
  • Supports BIP32(Hierarchical Deterministic Wallets), BIP39(Mnemonic code generation)
  • Supports BIP141(Segregated Witness)
  • Transaction constructor

Installation

To install pybgl

$ git clone https://github.com/bitaps-com/pybgl
$ cd pybgl
$ python3 setup.py install

Dependencies

  • Python 3.3.3+

Documentation

Documentation is available at https://pybgl.readthedocs.io

Example of usage

Create address
  >>> import pybgl
  >>> a = pybgl.Address()
  >>> a.address
  'bgl1qdzjn6rd7e84lt2m5d3yf9jcg42ncdje7vhp4rl'
  >>> a.private_key.wif
  'L1LAHLFBWcW2E1xRsUooVL9ajxJXtsAUjJJ4GuPTgHKAKNhy6fsD'
  >>> a = pybgl.Address('L1LAHLFBWcW2E1xRsUooVL9ajxJXtsAUjJJ4GuPTgHKAKNhy6fsD')
  >>> a.address
  'bgl1qdzjn6rd7e84lt2m5d3yf9jcg42ncdje7vhp4rl'
Create private key
  >>> import pybgl
  >>> pybgl.create_private_key()
  'L38PPqhzCbyTH3nd7e2ExEY3LSdaYhaF1d7pXYBEz83avPfpBbZ6'
  >>> pybgl.create_private_key(compressed=False)
  '5JCnJEggRKX5rscdGiqasmYdsyQ2fCYyLA7xYqSDRLEbWY7mZtq'
Create wallet
  >>> import pybgl
  >>> w = pybgl.Wallet(path_type='BIP84')
  >>> w.mnemonic
  'wet talent menu also ill comic smart unfold bone tape settle kangaroo caught tree wrap write diagram stomach have time addict unknown cruise polar'
  >>> w.account_public_xkey
  'zpub6qhAnVjudYd5rA4tCViT1iC5TQs9nPKhF2JcBZ55VnsN7EYGhnVr5X14enqueqWuz2nBBaDr77WT1Rnx82R1mTAbr9FbJq8oNdcf8UgndVA'
  >>> w = pybgl.Wallet('wet talent menu also ill comic smart unfold bone tape settle kangaroo caught tree wrap write diagram stomach have time addict unknown cruise polar',path_type='BIP84')
  >>> w.account_public_xkey
  'zpub6qhAnVjudYd5rA4tCViT1iC5TQs9nPKhF2JcBZ55VnsN7EYGhnVr5X14enqueqWuz2nBBaDr77WT1Rnx82R1mTAbr9FbJq8oNdcf8UgndVA'
  >>> w.get_address(0)['address']
  'bgl1qjc46yw4zgggj4e0x6ew6htuu234j4y9vds66e2'
  >>> w.get_address(0)['private_key']
  'L1U3Fviv4PGDxQatgXimWnU8yLy6jVz12wAyxjjP4XLyjDx7aycU'
  >>> w.get_address(0)['public_key']

How to Contribute

In order to make a clone of the GitHub repo: open the link and press the β€œFork” button on the upper-right menu of the web page.

Workflow is pretty straightforward:

  1. Clone the GitHub
  2. Make a change
  3. Make sure all tests passed
  4. Add a record into file into change.log.
  5. Commit changes to own pybgl clone
  6. Make pull request from github page for your clone against master branch

pybgl's People

Contributors

4tochka avatar c0ffe1n avatar madnadyka avatar

Stargazers

Daniel Umpierrez avatar kristof kaehler avatar Matt avatar Semyon Novikov avatar

Watchers

James Cloos avatar  avatar

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.