hiveengine.collection

class hiveengine.collection.Collection(account, api=None, blockchain_instance=None, steem_instance=None)

Bases: dict

Access the hive-engine NFT collection

Parameters:
  • account (str) – Name of the account
  • blockchain_instance (Hive) – Hive instance

Wallet example:

from hiveengine.collection import Collection
collection = Collection("test")
print(collection)
burn(nfts)

Burn a token

Parameters:nfts (list) – Amount to transfer

Transfer example:

from hiveengine.collection import Collection
from beem import Hive
active_wif = "5xxxx"
hive = Hive(keys=[active_wif])
collection = Collection("test", blockchain_instance=hive)
nfts = [{"symbol": "STAR", "ids": ["100"]}]
collection.burn(nfts)
change_account(account)

Changes the wallet account

delegate(to, nfts, from_type='user', to_type='user')

Delegate a token to another account.

Parameters:
  • to (str) – Recipient
  • nfts (list) – Amount to transfer
  • from_type (str) – (optional) user / contract
  • to_type (str) – (optional) user / contract

Transfer example:

from hiveengine.collection import Collection
from beem import Hive
active_wif = "5xxxx"
hive = Hive(keys=[active_wif])
collection = Collection("test", blockchain_instance=hive)
nfts = [{"symbol": "STAR", "ids": ["100"]}]
collection.delegate("test2", nfts)
get_collection()

Returns all token within the wallet as list

get_nft(nft_id, symbol)

Returns a token from the wallet. Is None when not available.

refresh()
set_id(ssc_id)

Sets the ssc id (default is ssc-mainnet-hive)

transfer(to, nfts, from_type='user', to_type='user')

Transfer a token to another account.

Parameters:
  • to (str) – Recipient
  • nfts (list) – Amount to transfer
  • from_type (str) – (optional) user / contract
  • to_type (str) – (optional) user / contract

Transfer example:

from hiveengine.collection import Collection
from beem import Hive
active_wif = "5xxxx"
hive = Hive(keys=[active_wif])
collection = Collection("test", blockchain_instance=hive)
nfts = [{"symbol": "STAR", "ids": ["100"]}]
collection.transfer("test2", nfts)
undelegate(to, nfts, from_type='user')

Undelegate a token to another account.

Parameters:
  • to (str) – Recipient
  • nfts (list) – Amount to transfer
  • from_type (str) – (optional) user / contract

Transfer example:

from hiveengine.collection import Collection
from beem import Hive
active_wif = "5xxxx"
hive = Hive(keys=[active_wif])
collection = Collection("test", blockchain_instance=hive)
nfts = [{"symbol": "STAR", "ids": ["100"]}]
collection.undelegate("test2", nfts)