Update for beem: more bug fixes and improvements

in HiveDevs4 years ago (edited)

Repository

https://github.com/holgern/beem


beem-logo

beem is a python library for STEEM and HIVE. The current version is 0.22.11.

There is also a discord channel for beem: https://discord.gg/4HM592V

The newest beem version can be installed by:

pip install -U beem

Changelog for versions 0.22.6 - 0.22.11

  • Add hive_btc_ticker and hive_usd_ticker
  • use coingecko API
  • add HIVE/HBD to all market operation in beempy
  • Allow to use HIVE/HBD also in operations
  • add steem node
  • fix 'dict' object has no attribute 'split
  • HIVE nodes are now also detected as appbase ready (thanks to @crokkon)
  • Fix asset check in Amount and Price
  • Fix get_curation_rewards for comments
  • Fix empty return in _get_account_history
  • Fix several unit tests
  • Fix deprecated collections import
  • Fix more HIVE/HBD symbols in beempy for HIVE
  • Add information about HIVE in the documentation

Fix Asset symbols for hive

It is now possible to use HIVE and HBD as asset symbol in all operations.

from beem import Steem
from beem.transactionbuilder import TransactionBuilder
from beembase import operations
hive = Steem(node="https://api.hive.blog")
tx = TransactionBuilder(steem_instance=hive)
op = operations.Transfer(**{"from": 'holger.random',
                            "to": 'holger80',
                            "amount": '0.100 HIVE',
                            "memo": 'test'})
tx.appendOps(op)
tx.appendWif('5.....') # `active wif`
tx.sign()
tx.broadcast()

The HIVE symbol is internally replaced by STEEM and the following transaction is broadcasted:

{'expiration': '2020-03-29T19:55:49',
 'extensions': [],
 'operations': [['transfer',
                 {'amount': '0.100 STEEM',
                  'from': 'holger.random',
                  'memo': 'test',
                  'to': 'holger80'}]],
 'ref_block_num': 9013,
 'ref_block_prefix': 704665848,
 'signatures': ['20134042e93926d28687d7368b7adfa98e68c57d5502c8a5b859f450a9d7ad1009413fc00dc61652c32a23b3b813d40563e6313edd923e78f8e446cbe2f8283c60']}

As this is done directly in operations itself, so all high level function are working with HIVE and HBD in beem.
image.png

Integration tests

Several integration tests have been improved and have been switched over to the HIVE blockchain. Some tests are failing due to disabled API's in the nodes.

beempy as price ticker

beempy can now be used to broadcast price ticker as witness on HIVE.

#!/bin/bash
beempy updatenodes --hive
beempy witnessfeed holger80 5xxx

where 5xxx is the witness key. The coingecko API is used as source.


If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD.

Sort:  

I appreciate your creativity, @holger80
@tipu curate


A huge hug from @amico! 🤗

!trdo

Build build build. Thanks.

$rewarding 100%

Great job @holger80!

Thanks.

Wow, this is a great good job. You did so well. Bravo 💯💯. Weldone 🔥🔥