yeref 0.24.15__py3-none-any.whl → 0.24.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yeref/yeref.py CHANGED
@@ -7612,7 +7612,7 @@ async def get_smc_info(address, KEYS_JSON, is_test_only=False):
7612
7612
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
7613
7613
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
7614
7614
  if provider == "tonapi":
7615
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
7615
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
7616
7616
  if key:
7617
7617
  items.append([
7618
7618
  'tonapi',
@@ -7706,7 +7706,7 @@ async def get_wallet_address(address, master, KEYS_JSON, is_test_only=False, is_
7706
7706
  for provider, keys in data["ton"].items():
7707
7707
  for it in keys:
7708
7708
  if provider == "tonapi":
7709
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
7709
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
7710
7710
  if key:
7711
7711
  items.append([
7712
7712
  'tonapi',
@@ -7816,7 +7816,7 @@ async def get_nft_data(address, KEYS_JSON, is_test_only=False, help_link=None):
7816
7816
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
7817
7817
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
7818
7818
  if provider == "tonapi":
7819
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
7819
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
7820
7820
  if key:
7821
7821
  items.append([
7822
7822
  'tonapi',
@@ -7987,7 +7987,7 @@ async def get_collection_data(address, KEYS_JSON, is_test_only=False):
7987
7987
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
7988
7988
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
7989
7989
  if provider == "tonapi":
7990
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
7990
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
7991
7991
  if key:
7992
7992
  items.append([
7993
7993
  'tonapi',
@@ -8115,7 +8115,7 @@ async def get_nft_in_account(address, collection, KEYS_JSON, is_test_only=False,
8115
8115
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8116
8116
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8117
8117
  if provider == "tonapi":
8118
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8118
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
8119
8119
  if key:
8120
8120
  items.append([
8121
8121
  'tonapi',
@@ -8187,7 +8187,7 @@ async def get_any_activity(address, KEYS_JSON, is_test_only=False):
8187
8187
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8188
8188
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8189
8189
  if provider == "tonapi":
8190
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8190
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
8191
8191
  if key:
8192
8192
  items.append([
8193
8193
  'tonapi',
@@ -8266,7 +8266,7 @@ async def get_any_nfts(address, KEYS_JSON, is_test_only=False):
8266
8266
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8267
8267
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8268
8268
  if provider == "tonapi":
8269
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8269
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
8270
8270
  if key:
8271
8271
  items.append([
8272
8272
  'tonapi',
@@ -8344,7 +8344,7 @@ async def get_any_jettons(address, KEYS_JSON, is_test_only=False):
8344
8344
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8345
8345
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8346
8346
  if provider == "tonapi":
8347
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8347
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
8348
8348
  if key:
8349
8349
  items.append([
8350
8350
  'tonapi',
@@ -8432,17 +8432,18 @@ async def calculate_wallet_address(owner, master, KEYS_JSON, is_test_only=False)
8432
8432
  items = []
8433
8433
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8434
8434
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8435
- if provider == "tonapi": continue
8436
- # key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8437
- # if key:
8438
- # items.append([
8439
- # 'tonapi',
8440
- # f'https://{pfx_testnet}tonapi.io/v2/accounts/{owner}/jettons/{master}',
8441
- # {
8442
- # 'accept': 'application/json',
8443
- # 'Authorization': f'Bearer {key}'
8444
- # }
8445
- # ])
8435
+ if provider == "tonapi": # continue
8436
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
8437
+
8438
+ if key:
8439
+ items.append([
8440
+ 'tonapi',
8441
+ f'https://{pfx_testnet}tonapi.io/v2/accounts/{owner}/jettons/{master}',
8442
+ {
8443
+ 'accept': 'application/json',
8444
+ 'Authorization': f'Bearer {key}'
8445
+ }
8446
+ ])
8446
8447
  elif provider == "toncenter":
8447
8448
  key = next((it['testnet'] if is_test_only else it['mainnet'] for it in keys if (is_test_only and 'testnet' in it) or (not is_test_only and 'mainnet' in it)), None)
8448
8449
  if key:
@@ -8507,7 +8508,7 @@ async def get_method_data(address, KEYS_JSON, is_test_only=False, method_name='g
8507
8508
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8508
8509
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8509
8510
  if provider == "tonapi":
8510
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8511
+ key = random.choice([it['all'] for it in keys if 'all' in it]) if keys else None
8511
8512
  if key:
8512
8513
  items.append([
8513
8514
  'tonapi',
@@ -15616,7 +15617,7 @@ async def ch_games(USER_GAMES, game, condition, balls=-1):
15616
15617
  # return USER_GAMES
15617
15618
 
15618
15619
 
15619
- async def get_user_vars(PROJECT_USERNAME, BASE_P, ENT_TID, chat_id, lc, username, full_name, is_premium=False, usr_hash='',
15620
+ async def get_user_vars(PROJECT_USERNAME, BASE_P, ENT_TID, chat_id, lc, username, full_name, is_premium=False, usr_sig='',
15620
15621
  page=''):
15621
15622
  USER_TID = chat_id
15622
15623
  USER_VARS = json.loads(USER_VARS_)
@@ -15666,7 +15667,7 @@ async def get_user_vars(PROJECT_USERNAME, BASE_P, ENT_TID, chat_id, lc, username
15666
15667
  USER_VARS['USER_LZ'] = lz
15667
15668
  # endregion
15668
15669
  print(f"{USER_VARS=}, {lc=}")
15669
- USER_VARS['USER_HASH'] = usr_hash
15670
+ USER_VARS['USER_SIG'] = usr_sig
15670
15671
  USER_VARS['USER_ISPREMIUM'] = is_premium
15671
15672
 
15672
15673
  sql = f"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.15
3
+ Version: 0.24.17
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -0,0 +1,8 @@
1
+ yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
2
+ yeref/l_.py,sha256=7SgEs9hcn0b-AKW3BeE6DTY1Mo-ZtNCTPAKVv7RE5PM,1178681
3
+ yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
4
+ yeref/yeref.py,sha256=j48IFV9QYUhU8volod6KqNwLv44nv-ybTty6fu4bXVE,1012329
5
+ yeref-0.24.17.dist-info/METADATA,sha256=A7Bx3hd9VUnQl5jezhgIQOeJPIvTZEmxsSn1d3VRL5o,119
6
+ yeref-0.24.17.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
7
+ yeref-0.24.17.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
+ yeref-0.24.17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
2
- yeref/l_.py,sha256=7SgEs9hcn0b-AKW3BeE6DTY1Mo-ZtNCTPAKVv7RE5PM,1178681
3
- yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
4
- yeref/yeref.py,sha256=1rpCFJhTKNSfjDd8jCwuSvvbiOK1dZ94IRZEZ4Vcr8k,1012306
5
- yeref-0.24.15.dist-info/METADATA,sha256=DKy1eBT51Eb0B4_L0NBqkdj6E1htYCqLAHMITm5mIEI,119
6
- yeref-0.24.15.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
7
- yeref-0.24.15.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
- yeref-0.24.15.dist-info/RECORD,,