hiveengine.wallet¶
-
class
hiveengine.wallet.
Wallet
(account, api=None, blockchain_instance=None, steem_instance=None)¶ Bases:
list
Access the hive-engine wallet
Parameters: - account (str) – Name of the account
- blockchain_instance (Hive) – Hive instance
Wallet example:
from hiveengine.wallet import Wallet wallet = Wallet("test") print(wallet)
-
cancel_unstake
(trx_id)¶ Cancel unstaking a token.
Parameters: trx_id (str) – transaction id in which the tokan was unstaked Cancel unstake example:
from hiveengine.wallet import Wallet from beem import Steem active_wif = "5xxxx" stm = Steem(keys=[active_wif]) wallet = Wallet("test", blockchain_instance=stm) wallet.stake("cf39ecb8b846f1efffb8db526fada21a5fcf41c3")
-
change_account
(account)¶ Changes the wallet account
-
get_balances
()¶ Returns all token within the wallet as list
-
get_buy_book
(symbol=None, limit=100, offset=0)¶ Returns the buy book for the wallet account. When symbol is set, the order book from the given token is shown.
-
get_history
(symbol, limit=1000, offset=0)¶ Returns the transfer history of a token
-
get_sell_book
(symbol=None, limit=100, offset=0)¶ Returns the sell book for the wallet account. When symbol is set, the order book from the given token is shown.
-
get_token
(symbol)¶ Returns a token from the wallet. Is None when not available.
-
issue
(to, amount, symbol)¶ Issues a specific token amount.
Parameters: - to (str) – Recipient
- amount (float) – Amount to issue
- symbol (str) – Token to issue
Issue example:
from hiveengine.wallet import Wallet from beem import Steem active_wif = "5xxxx" stm = Steem(keys=[active_wif]) wallet = Wallet("test", blockchain_instance=stm) wallet.issue(1, "my_token")
-
refresh
()¶
-
set_id
(ssc_id)¶ Sets the ssc id (default is ssc-mainnet-hive)
-
stake
(amount, symbol, receiver=None)¶ Stake a token.
Parameters: - amount (float) – Amount to stake
- symbol (str) – Token to stake
Stake example:
from hiveengine.wallet import Wallet from beem import Steem active_wif = "5xxxx" stm = Steem(keys=[active_wif]) wallet = Wallet("test", blockchain_instance=stm) wallet.stake(1, "BEE")
-
transfer
(to, amount, symbol, memo='')¶ Transfer a token to another account.
Parameters: - to (str) – Recipient
- amount (float) – Amount to transfer
- symbol (str) – Token to transfer
- memo (str) – (optional) Memo
Transfer example:
from hiveengine.wallet import Wallet from beem import Steem active_wif = "5xxxx" stm = Steem(keys=[active_wif]) wallet = Wallet("test", blockchain_instance=stm) wallet.transfer("test1", 1, "BEE", "test")
-
unstake
(amount, symbol)¶ Unstake a token.
Parameters: - amount (float) – Amount to unstake
- symbol (str) – Token to unstake
Unstake example:
from hiveengine.wallet import Wallet from beem import Steem active_wif = "5xxxx" stm = Steem(keys=[active_wif]) wallet = Wallet("test", blockchain_instance=stm) wallet.unstake(1, "BEE")