Overhauled multi-network support + more flexibility with configuring beem
from privex.steemengine import SteemEngineToken
# You may now specify RPC nodes in the constructor
# Just make sure you specify the correct network too, or various methods will raise the WrongNetwork exception.
st = SteemEngineToken(nodes=["https://hived.privex.io"], network="hive")
# You can also now use set_beem to replace the Beem instance with one that uses a different set of nodes
st.set_beem(["https://anyx.io", "https://hived.hive-engine.com"])
# Or you can specify your own instance by setting .steem
from beem.hive import Hive
st.steem = Hive("https://hived.privex.io")
# You can also change the network for an existing instance on-the-fly
# The Beem instance will be automatically switched to the Steem network instance
st.network = "steem"-
Use of a Beem shared instance can now be enabled or disabled using
SteemEngineToken.use_shared_instances -
The default nodes used for each network when creating a Beem instance are now user configurable via
SteemEngineToken.default_nodes -
The
SteemEngineToken.steemproperty now has a setter, allowing the user to override the Beem instance naturally, just by setting.steem -
The constructor now accepts a
nodesargument, allowing overriding the nodes used by Beem during construction -
Added
verify_networkmethod, which raisesWrongNetworkif the network of the current RPC node doesn't match the network set in the constructor or via.network -
Added
.set_beemmethod, for easier overriding of the Beem instances -
Re-wrote
custom_beemsince._steemis no longer used -
Added return and parameter types to various beem-related methods
-
Refactored tests into
tests/folder for easier usage with PyTest -
Adjustments to
.travis.ymlandpytest.ini -
Probably some other small changes