abstract-solana 0.0.2.98__py3-none-any.whl → 0.0.2.100__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.

Potentially problematic release.


This version of abstract-solana might be problematic. Click here for more details.

@@ -1,10 +1 @@
1
- from .account_key_utils import *
2
- from .genesis_functions import *
3
- from .index_utils import *
4
- from .price_utils import *
5
- from .pubkey_utils import *
6
- from .signature_data_parse import *
7
- from .utils import *
8
- from .log_message_functions import *
9
- from .constants import *
10
- from .keypair_utils import *
1
+ from .pubKeyUtils import *
@@ -1,4 +1,10 @@
1
- from .signature_data_parse import get_error_message_from_txn,get_block_time_from_txn
1
+
2
+ from abstract_solcatcher import call_solcatcher_db
3
+ import asyncio
4
+ def get_block_time_from_txn(txnData):
5
+ return int(get_any_value(txnData,'blockTime') or 0)
6
+ def get_error_message_from_txn(txnData):
7
+ return make_list(get_any_value(txnData,'err'))[0]
2
8
  def get_errorless_txn_from_signature_array(signatureArray):
3
9
  return [sig for sig in signatureArray if get_error_message_from_txn(sig) == None]
4
10
  def return_oldest_from_signature_array(signatureArray,errorless=False):
@@ -12,3 +18,18 @@ def return_oldest_last_and_original_length_from_signature_array(signatureArray):
12
18
  return {"oldest":return_oldest_from_signature_array(signatureArray),
13
19
  "oldestValid":return_oldest_from_signature_array(signatureArray,errorless=True),
14
20
  "length":len(signatureArray)}
21
+ async def getGenesisSignature(address, limit=1000, before=None,encoding='jsonParsed',commitment=0,errorProof=True):
22
+ method = "getGenesisSignature"
23
+ validBefore=None
24
+ while True:
25
+ signatureArray = await async_call_solcatcher_py('make_limited_rpc_call',method ="getSignaturesForAddress",params=[address, {"limit":limit, "until":before}],solcatcherSettings={"getResult":None})
26
+ original_length = len(signatureArray)
27
+ signature_array_data = return_oldest_last_and_original_length_from_signature_array(signatureArray)
28
+ oldest = signature_array_data.get('oldest')
29
+ validOldest = signature_array_data.get('oldestValid')
30
+ if original_length < limit or original_length == 0 or (original_length>0 and (oldest == validOldest or oldest == before) and last_sig != None):
31
+ return validOldest
32
+
33
+ response = call_solcatcher_db('get-genesis-signature',address='3WLwz1F5Engos6ehdCdWeZxKAomiszyZgXY3PGs3niJy')
34
+
35
+ input(response)
@@ -0,0 +1,72 @@
1
+ from solders.pubkey import Pubkey
2
+ from solders.signature import Signature
3
+ from spl.token.instructions import get_associated_token_address
4
+ TOKEN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
5
+
6
+ def pubkey_find_program_address(string,address,programId):
7
+ return Pubkey.find_program_address([str(string).encode(), bytes(get_pubkey(address))],get_pubkey(programId))
8
+
9
+ def get_pubString(obj):
10
+ return Pubkey.from_string(str(obj))
11
+
12
+ def get_sigString(obj):
13
+ return Signature.from_string(str(obj))
14
+
15
+ def is_sigkey(obj):
16
+ return isinstance(obj,Signature)
17
+
18
+ def is_pubkey(obj):
19
+ return isinstance(obj,Pubkey)
20
+
21
+ def get_pubBytes(obj):
22
+ return Pubkey.from_bytes(obj)
23
+
24
+ def get_sigBytes(obj):
25
+ return Signature.from_bytes(obj)
26
+
27
+ def try_pubkey(obj):
28
+ return is_pubkey(get_pubkey(obj))
29
+
30
+ def try_sigkey(obj):
31
+ return is_sigkey(get_sigkey(obj))
32
+
33
+ def get_pubkey(obj):
34
+ if is_pubkey(obj):
35
+ return obj
36
+ address = obj
37
+ if isinstance(obj,bytes):
38
+ pubkey = get_pubBytes(address)
39
+ if is_pubkey(pubkey):
40
+ return pubkey
41
+ if isinstance(obj,str):
42
+ try:
43
+ pubkey= get_pubString(obj)
44
+ except:
45
+ pubkey = obj
46
+ if is_pubkey(pubkey):
47
+ return pubkey
48
+ return obj
49
+
50
+ def get_sigkey(obj):
51
+ if is_sigkey(obj):
52
+ return obj
53
+ signature = obj
54
+ if isinstance(signature,bytes):
55
+ sigKey = get_sigBytes(signature)
56
+ if is_sigkey(sigKey):
57
+ return sigKey
58
+ if isinstance(signature,str):
59
+ try:
60
+ sigKey= get_sigString(signature)
61
+ except:
62
+ sigKey = signature
63
+ if is_sigkey(sigKey):
64
+ return sigKey
65
+ return obj
66
+
67
+ def derive_associated_bonding_curve(mint,programId=None):
68
+ return get_associated_token_address(derive_bonding_curve(mint,programId)[0], get_pubkey(mint))
69
+
70
+ def derive_bonding_curve(mint,programId=None):
71
+ programId = programId or TOKEN_PROGRAM_ID
72
+ return pubkey_find_program_address("bonding-curve",mint,programId)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_solana
3
- Version: 0.0.2.98
3
+ Version: 0.0.2.100
4
4
  Home-page: https://github.com/AbstractEndeavors/abstract_solana
5
5
  Author: putkoff
6
6
  Author-email: partners@abstractendeavors.com
@@ -5,14 +5,15 @@ abstract_solana/abstract_rpcs/get_api_gui.py,sha256=zii6XCRD_wmgcupqCSH5lyXIvg5n
5
5
  abstract_solana/abstract_rpcs/get_body.py,sha256=UV85217q7mIpYOhVZdnzfmgZxD3QM0w0J0oevXyYtdE,51272
6
6
  abstract_solana/abstract_rpcs/rate_limiter.py,sha256=yfUwmdMXty05VN_A-baTrOKY4EH9fYF1Vc7SKPZgcTk,7248
7
7
  abstract_solana/abstract_rpcs/solana_rpc_client.py,sha256=s-Mg0mDcDwjU3dm6nK_U6wWysaWTLoC4eXpSHbYsbyY,4132
8
- abstract_solana/abstract_utils/__init__.py,sha256=HCbBVQ5BIFCVkFqqTMHp1Y__YQAO4HTq_KHVdMCe89U,296
8
+ abstract_solana/abstract_utils/__init__.py,sha256=syjcqNbZ5Q_jNTvZIklEDgMAjygtH4pcFUbhM8kJ5x4,27
9
9
  abstract_solana/abstract_utils/account_key_utils.py,sha256=VMJd4GOTK1vn8UZsfXDnjxDOGoQWGY6fvflJqPZ7Xvs,877
10
10
  abstract_solana/abstract_utils/constants.py,sha256=cSmCKzQiNZocX1YkKYrdY-O449aYhi7BT_j-45HZN-E,1418
11
- abstract_solana/abstract_utils/genesis_functions.py,sha256=2WRQUxN9j-dpLfYIBiX3URM-_uDGkh-eTy08Gi-qWgo,939
11
+ abstract_solana/abstract_utils/genesis_functions.py,sha256=v-EUF2pA0TWU1hs7lw9KzvrYMztlGUViK1OQtoGkRNM,2091
12
12
  abstract_solana/abstract_utils/index_utils.py,sha256=Ed07BYTZWp-SVfpthAUqjRY00U3ZYldPCqd7LJy9AO8,1884
13
13
  abstract_solana/abstract_utils/keypair_utils.py,sha256=VgbwbX9BcXnypkbBJkPwXmSIKORUlMVakkoLk7hTXCw,572
14
14
  abstract_solana/abstract_utils/log_message_functions.py,sha256=smkTnxpe8nMxh6NEFjzPoxrn7ojEcLwBLX21K7wAWzs,8104
15
15
  abstract_solana/abstract_utils/price_utils.py,sha256=BLkwFLhlsTHeW0NTdzCAUi2xhc2lX7SrHz5sslDbUrY,4288
16
+ abstract_solana/abstract_utils/pubKeyUtils.py,sha256=TAYF74fKAuTBnqIP2SnA-BttO5uoHbxI9BRZRpGCMNY,2010
16
17
  abstract_solana/abstract_utils/pubkey_utils.py,sha256=TAYF74fKAuTBnqIP2SnA-BttO5uoHbxI9BRZRpGCMNY,2010
17
18
  abstract_solana/abstract_utils/signature_data_parse.py,sha256=5AOMtJZADWcwR0JLDbd2kXZNzW129qeB0lvYUrE_tm0,1974
18
19
  abstract_solana/abstract_utils/utils.py,sha256=RcnGEiZ0aJbcw8ObpjHU3WUFU4Tmy-exCs6qIbEu4_c,444
@@ -20,7 +21,7 @@ abstract_solana/pump_functions/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4h
20
21
  abstract_solana/pump_functions/buy_sell_pump.py,sha256=gjv_1et20s1Li0ygcURofO29VPkO1v-a5G5Bo_sZs_c,7860
21
22
  abstract_solana/pump_functions/pump_fun_keys.py,sha256=BeWbV9_wd-c6ydF33drW-gZBDPWolbsMZL4cNhP3eOU,8537
22
23
  abstract_solana/pump_functions/token_utils.py,sha256=O-Fgj3L1NhND-k4INa3WvLAEXg2N9u1fVqyLFzn1PwM,2714
23
- abstract_solana-0.0.2.98.dist-info/METADATA,sha256=9K6fcYAwHiDydfshe0m2VYHoZnzQmdnnZ4gXzoJzMJ8,981
24
- abstract_solana-0.0.2.98.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
25
- abstract_solana-0.0.2.98.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
26
- abstract_solana-0.0.2.98.dist-info/RECORD,,
24
+ abstract_solana-0.0.2.100.dist-info/METADATA,sha256=nIMcgVMUDxJVy8NF8XoLpoXP82MxAo4N9y5WL1c7RVg,982
25
+ abstract_solana-0.0.2.100.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
26
+ abstract_solana-0.0.2.100.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
27
+ abstract_solana-0.0.2.100.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.7.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5