def __init__(self, block, steemd_instance=None): self.steemd = steemd_instance or shared_steemd_instance() self.block = block if isinstance(block, Block): super(Block, self).__init__(block) else: self.refresh()
def __init__(self, account_name, steemd_instance=None): self.steemd = steemd_instance or shared_steemd_instance() self.name = account_name # caches self._converter = None self.refresh()
def __init__(self, account_name, comments_only=False, steemd_instance=None): self.steem = steemd_instance or shared_steemd_instance() self.comments_only = comments_only self.account = Account(account_name, steemd_instance=steemd_instance) self.history = self.account.history_reverse(filter_by='comment') self.seen_items = set()
def __init__(self, steemd_instance=None, mode="irreversible"): self.steem = steemd_instance or shared_steemd_instance() self.config = self.steem.get_config() if mode == "irreversible": self.mode = 'last_irreversible_block_num' elif mode == "head": self.mode = "head_block_number" else: raise ValueError("invalid value for 'mode'!")
def get_new_steem(nodes: list) -> Steem: steem = Steem(nodes=nodes) del ( steem.commit.wallet.keyStorage, steem.commit.wallet.configStorage, steem.commit.wallet.MasterPassword, ) steem.accounts = set() steem.__class__.__name__ = 'Steem' set_shared_steemd_instance(steem) return shared_steemd_instance()
def __init__(self, tx=None, steemd_instance=None, wallet_instance=None, no_broadcast=False, expiration=60): self.steemd = steemd_instance or shared_steemd_instance() self.no_broadcast = no_broadcast self.expiration = expiration self.wallet = wallet_instance or Wallet(self.steemd) self.op = [] self.wifs = [] if tx and not isinstance(tx, dict): raise ValueError("Invalid Transaction (self.tx) Format") super(TransactionBuilder, self).__init__(tx or {})
def __init__(self, post, steemd_instance=None): self.steemd = steemd_instance or shared_steemd_instance() self.commit = Commit(steemd_instance=self.steemd) # will set these during refresh() self.patched = False self.category = None self.root_identifier = None if isinstance(post, str): # From identifier self.identifier = self.parse_identifier(post) elif isinstance(post, dict) and "author" in post and "permlink" in post: self.identifier = construct_identifier(post["author"], post["permlink"]) else: raise ValueError("Post expects an identifier or a dict " "with author and permlink!") self.refresh()
def __init__(self, steemd_instance=None, **kwargs): from steepbase.storage import configStorage self.configStorage = configStorage # RPC self.steemd = steemd_instance or shared_steemd_instance() # Prefix if self.steemd: self.prefix = self.steemd.chain_params["prefix"] else: # If not connected, load prefix from config self.prefix = self.configStorage["prefix"] if "keys" in kwargs: self.setKeys(kwargs["keys"]) else: """ If no keys are provided manually we load the SQLite keyStorage """ from steepbase.storage import (keyStorage, KeyEncryptionKey) self.MasterPassword = KeyEncryptionKey self.keyStorage = keyStorage
def __init__(self, steemd_instance=None): self.steemd = steemd_instance or shared_steemd_instance()
def __init__(self, steemd_instance=None): self.steemd = steemd_instance or shared_steemd_instance() self.CONTENT_CONSTANT = 2000000000000
def __init__(self, witness, steemd_instance=None): self.steemd = steemd_instance or shared_steemd_instance() self.witness_name = witness self.witness = None self.refresh()