def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] # handle beneficiaries extensions = Array([]) beneficiaries = kwargs.get('beneficiaries') if beneficiaries and type(beneficiaries) == list: ext_obj = [0, {'beneficiaries': beneficiaries}] ext = CommentOptionExtensions(ext_obj) extensions = Array([ext]) super(Comment_options, self).__init__( OrderedDict([ ('author', String(kwargs["author"])), ('permlink', String(kwargs["permlink"])), ('max_accepted_payout', Amount(kwargs["max_accepted_payout"])), ('percent_steem_dollars', Uint16(int(kwargs["percent_steem_dollars"]))), ('allow_votes', Bool(bool(kwargs["allow_votes"]))), ('allow_curation_rewards', Bool(bool(kwargs["allow_curation_rewards"]))), ('extensions', extensions), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] prefix = kwargs.get("prefix", default_prefix) # handle beneficiaries if "beneficiaries" in kwargs and kwargs['beneficiaries']: kwargs['extensions'] = [[ 0, { 'beneficiaries': kwargs['beneficiaries'] } ]] extensions = Array([]) if "extensions" in kwargs and kwargs["extensions"]: extensions = Array( [CommentOptionExtensions(o) for o in kwargs["extensions"]]) super(Comment_options, self).__init__( OrderedDict([ ('author', String(kwargs["author"])), ('permlink', String(kwargs["permlink"])), ('max_accepted_payout', Amount(kwargs["max_accepted_payout"], prefix=prefix)), ('percent_steem_dollars', Uint16(int(kwargs["percent_steem_dollars"]))), ('allow_votes', Bool(bool(kwargs["allow_votes"]))), ('allow_curation_rewards', Bool(bool(kwargs["allow_curation_rewards"]))), ('extensions', extensions), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] meta = "" if "json_metadata" in kwargs and kwargs["json_metadata"]: if (isinstance(kwargs["json_metadata"], dict) or isinstance(kwargs["json_metadata"], list)): meta = json.dumps(kwargs["json_metadata"]) else: meta = kwargs["json_metadata"] pod = String(kwargs["pod"]) if "pod" in kwargs else None max_accepted_payout = Amount( kwargs["max_accepted_payout"] ) if "max_accepted_payout" in kwargs else None allow_replies = Bool( kwargs["allow_replies"]) if "allow_replies" in kwargs else None allow_votes = Bool( kwargs["allow_votes"]) if "allow_votes" in kwargs else None allow_curation_rewards = Bool( kwargs["allow_curation_rewards"] ) if "allow_curation_rewards" in kwargs else None allow_friends = Bool( kwargs["allow_friends"]) if "allow_friends" in kwargs else None super(SocialActionCommentCreate, self).__init__( OrderedDict([ ('permlink', String(kwargs["permlink"])), ('parent_author', String(kwargs["parent_author"])), ('parent_permlink', String(kwargs["parent_permlink"])), ('pod', Optional(pod)), ('max_accepted_payout', Optional(max_accepted_payout)), ('allow_replies', Optional(allow_replies)), ('allow_votes', Optional(allow_votes)), ('allow_curation_rewards', Optional(allow_curation_rewards)), ('allow_friends', Optional(allow_friends)), ('title', String(kwargs["title"])), ('body', String(kwargs["body"])), ('json_metadata', String(meta)), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super(Decline_voting_rights, self).__init__( OrderedDict([ ('account', String(kwargs["account"])), ('decline', Bool(kwargs["decline"])), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super(Prove_authority, self).__init__( OrderedDict([ ('challenged', String(kwargs["challenged"])), ('require_owner', Bool(kwargs["require_owner"])), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super(Account_witness_vote, self).__init__(OrderedDict([ ('account', String(kwargs["account"])), ('witness', String(kwargs["witness"])), ('approve', Bool(bool(kwargs["approve"]))), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super(Set_withdraw_vesting_route, self).__init__( OrderedDict([ ('from_account', String(kwargs["from_account"])), ('to_account', String(kwargs["to_account"])), ('percent', Uint16((kwargs["percent"]))), ('auto_vest', Bool(kwargs["auto_vest"])), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super(Escrow_approve, self).__init__( OrderedDict([ ('from', String(kwargs["from"])), ('to', String(kwargs["to"])), ('agent', String(kwargs["agent"])), ('who', String(kwargs["who"])), ('escrow_id', Uint32(kwargs["escrow_id"])), ('approve', Bool(kwargs["approve"])), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super(Limit_order_create2, self).__init__( OrderedDict([ ('owner', String(kwargs["owner"])), ('orderid', Uint32(kwargs["orderid"])), ('amount_to_sell', Amount(kwargs["amount_to_sell"])), ('fill_or_kill', Bool(kwargs["fill_or_kill"])), ('exchange_rate', ExchangeRate(kwargs["exchange_rate"])), ('expiration', PointInTime(kwargs["expiration"])), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] extensions = Array([]) proposal_ids = [] for e in kwargs["proposal_ids"]: proposal_ids.append(Uint64(e)) super(Update_proposal_votes, self).__init__( OrderedDict([('voter', String(kwargs["voter"])), ('proposal_ids', Array(proposal_ids)), ('approve', Bool(kwargs["approve"])), ('extensions', extensions)]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] prefix = kwargs.get("prefix", default_prefix) super(Limit_order_create, self).__init__( OrderedDict([ ('owner', String(kwargs["owner"])), ('orderid', Uint32(kwargs["orderid"])), ('amount_to_sell', Amount(kwargs["amount_to_sell"], prefix=prefix)), ('min_to_receive', Amount(kwargs["min_to_receive"], prefix=prefix)), ('fill_or_kill', Bool(kwargs["fill_or_kill"])), ('expiration', PointInTime(kwargs["expiration"])), ]))
def __init__(self, *args, **kwargs): if check_for_class(self, args): return if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] prefix = kwargs.get("prefix", default_prefix) json_str = kwargs.get("json_str", False) if 'prefix' not in kwargs['exchange_rate']: kwargs['exchange_rate']['prefix'] = prefix super(Limit_order_create2, self).__init__( OrderedDict([ ('owner', String(kwargs["owner"])), ('orderid', Uint32(kwargs["orderid"])), ('amount_to_sell', Amount(kwargs["amount_to_sell"], prefix=prefix, json_str=json_str)), ('fill_or_kill', Bool(kwargs["fill_or_kill"])), ('exchange_rate', ExchangeRate(kwargs["exchange_rate"])), ('expiration', PointInTime(kwargs["expiration"])), ]))