abstract-solana 0.0.2.102__tar.gz → 0.0.2.104__tar.gz
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.
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/PKG-INFO +10 -2
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/setup.py +1 -1
- abstract_solana-0.0.2.104/src/abstract_solana/__init__.py +2 -0
- {abstract_solana-0.0.2.102/src/abstract_solana/abstract_utils → abstract_solana-0.0.2.104/src/abstract_solana/utils}/__init__.py +1 -0
- abstract_solana-0.0.2.104/src/abstract_solana/utils/bondingCurves.py +28 -0
- {abstract_solana-0.0.2.102/src/abstract_solana/abstract_utils → abstract_solana-0.0.2.104/src/abstract_solana/utils}/genesis_functions.py +5 -3
- {abstract_solana-0.0.2.102/src/abstract_solana/abstract_utils → abstract_solana-0.0.2.104/src/abstract_solana/utils}/pubKeyUtils.py +10 -13
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/PKG-INFO +10 -2
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/SOURCES.txt +4 -3
- abstract_solana-0.0.2.102/src/abstract_solana/__init__.py +0 -2
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/README.md +0 -0
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/pyproject.toml +0 -0
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/setup.cfg +0 -0
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/dependency_links.txt +0 -0
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/requires.txt +0 -0
- {abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: abstract_solana
|
|
3
|
-
Version: 0.0.2.
|
|
3
|
+
Version: 0.0.2.104
|
|
4
4
|
Home-page: https://github.com/AbstractEndeavors/abstract_solana
|
|
5
5
|
Author: putkoff
|
|
6
6
|
Author-email: partners@abstractendeavors.com
|
|
@@ -22,6 +22,14 @@ Requires-Dist: solders
|
|
|
22
22
|
Requires-Dist: abstract_solcatcher
|
|
23
23
|
Requires-Dist: abstract_utilities
|
|
24
24
|
Requires-Dist: solana
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: requires-dist
|
|
32
|
+
Dynamic: requires-python
|
|
25
33
|
|
|
26
34
|
## Abstract Solana
|
|
27
35
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from .pubKeyUtils import get_pubkey,pubkey_find_program_address,Pubkey,create_associated_token_account, get_associated_token_address
|
|
2
|
+
from ..pumpFun import PUMP_FUN_PROGRAM
|
|
3
|
+
def derive_associated_bonding_curve(mint,programId=None):
|
|
4
|
+
return get_associated_token_address(derive_bonding_curve(mint,programId)[0], get_pubkey(mint))
|
|
5
|
+
def derive_bonding_curve(mint,programId=None):
|
|
6
|
+
programId = programId or PUMP_FUN_PROGRAM
|
|
7
|
+
return Pubkey.find_program_address(["bonding-curve".encode(), get_pubkey_bytes(mint)],programId)
|
|
8
|
+
def derive_bonding_curve_accounts(mint_str: str,programId=None):
|
|
9
|
+
mintPubKey = get_pubkey(mint_str)
|
|
10
|
+
if not mintPubKey.is_on_curve():
|
|
11
|
+
return {}
|
|
12
|
+
bonding_curve, _ = derive_bonding_curve(mintPubKey,programId)
|
|
13
|
+
associated_bonding_curve = get_associated_token_address(bonding_curve, mintPubKey)
|
|
14
|
+
return {'bonding_curve': bonding_curve, "associated_bonding_curve": associated_bonding_curve}
|
|
15
|
+
def get_bonding_curve(mint:str):
|
|
16
|
+
return derive_bonding_curve_accounts(mint).get('bonding_curve')
|
|
17
|
+
def get_associated_bonding_curve(mint:str):
|
|
18
|
+
return derive_bonding_curve_accounts(mint).get("associated_bonding_curve")
|
|
19
|
+
def isOnCurve(obj):
|
|
20
|
+
pubkey = get_pubkey(obj)
|
|
21
|
+
is_on_curve = pubkey.is_on_curve()
|
|
22
|
+
return is_on_curve
|
|
23
|
+
def derive_associated_bonding_curve(mint,programId=None):
|
|
24
|
+
programId = programId or PUMP_FUN_PROGRAM
|
|
25
|
+
return get_associated_token_address(derive_bonding_curve(mint,programId)[0], get_pubkey(mint))
|
|
26
|
+
def derive_bonding_curve(mint,programId=None):
|
|
27
|
+
programId = programId or PUMP_FUN_PROGRAM
|
|
28
|
+
return pubkey_find_program_address("bonding-curve",mint,programId)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
from abstract_apis import get_headers,get_response,get_text_response,load_inner_json
|
|
2
2
|
from abstract_solcatcher import call_solcatcher_db,async_call_solcatcher_py,async_make_rate_limited_call
|
|
3
3
|
import asyncio
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import asyncio,httpx,logging
|
|
6
5
|
def get_block_time_from_txn(txnData):
|
|
7
6
|
return int(get_any_value('txnDatablockTime') or 0)
|
|
8
7
|
def get_error_message_from_txn(txnData):
|
|
@@ -26,7 +25,7 @@ async def getGenesisSignature(address, limit=1000, before=None,encoding='jsonPar
|
|
|
26
25
|
oldest=None
|
|
27
26
|
validOldest=None
|
|
28
27
|
while True:
|
|
29
|
-
signatureArray = await async_make_rate_limited_call(method ="getSignaturesForAddress",params=[address, {"limit":limit, "until":before}],solcatcherSettings={"getResult":'result'})
|
|
28
|
+
signatureArray = await async_make_rate_limited_call(method ="getSignaturesForAddress",params=[address, {"limit":limit, "until":before}],solcatcherSettings={"getResponse":True,"getResult":'result'})
|
|
30
29
|
original_length = len(signatureArray or '')
|
|
31
30
|
signature_array_data = return_oldest_last_and_original_length_from_signature_array(signatureArray)
|
|
32
31
|
oldest = signature_array_data.get('oldest',oldest) or oldest
|
|
@@ -34,3 +33,6 @@ async def getGenesisSignature(address, limit=1000, before=None,encoding='jsonPar
|
|
|
34
33
|
if original_length < limit or original_length == 0 or (original_length>0 and (oldest == validOldest or oldest == before) and last_sig != None):
|
|
35
34
|
return validOldest
|
|
36
35
|
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
from solders.pubkey import Pubkey
|
|
2
2
|
from solders.signature import Signature
|
|
3
|
-
from spl.token.instructions import get_associated_token_address
|
|
4
|
-
TOKEN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
|
|
5
|
-
|
|
3
|
+
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
6
4
|
def pubkey_find_program_address(string,address,programId):
|
|
7
5
|
return Pubkey.find_program_address([str(string).encode(), bytes(get_pubkey(address))],get_pubkey(programId))
|
|
8
6
|
|
|
@@ -47,6 +45,15 @@ def get_pubkey(obj):
|
|
|
47
45
|
return pubkey
|
|
48
46
|
return obj
|
|
49
47
|
|
|
48
|
+
def get_pubkey_bytes(obj):
|
|
49
|
+
pubkey = get_pubkey(obj)
|
|
50
|
+
try:
|
|
51
|
+
pubKeyBytes = bytes(pubkey)
|
|
52
|
+
return pubKeyBytes
|
|
53
|
+
except:
|
|
54
|
+
return obj
|
|
55
|
+
|
|
56
|
+
|
|
50
57
|
def get_sigkey(obj):
|
|
51
58
|
if is_sigkey(obj):
|
|
52
59
|
return obj
|
|
@@ -64,14 +71,4 @@ def get_sigkey(obj):
|
|
|
64
71
|
return sigKey
|
|
65
72
|
return obj
|
|
66
73
|
|
|
67
|
-
def isOnCurve(obj):
|
|
68
|
-
pubkey = get_pubkey(obj)
|
|
69
|
-
is_on_curve = pubkey.is_on_curve()
|
|
70
|
-
return is_on_curve
|
|
71
|
-
|
|
72
|
-
def derive_associated_bonding_curve(mint,programId=None):
|
|
73
|
-
return get_associated_token_address(derive_bonding_curve(mint,programId)[0], get_pubkey(mint))
|
|
74
74
|
|
|
75
|
-
def derive_bonding_curve(mint,programId=None):
|
|
76
|
-
programId = programId or TOKEN_PROGRAM_ID
|
|
77
|
-
return pubkey_find_program_address("bonding-curve",mint,programId)
|
{abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: abstract_solana
|
|
3
|
-
Version: 0.0.2.
|
|
3
|
+
Version: 0.0.2.104
|
|
4
4
|
Home-page: https://github.com/AbstractEndeavors/abstract_solana
|
|
5
5
|
Author: putkoff
|
|
6
6
|
Author-email: partners@abstractendeavors.com
|
|
@@ -22,6 +22,14 @@ Requires-Dist: solders
|
|
|
22
22
|
Requires-Dist: abstract_solcatcher
|
|
23
23
|
Requires-Dist: abstract_utilities
|
|
24
24
|
Requires-Dist: solana
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: requires-dist
|
|
32
|
+
Dynamic: requires-python
|
|
25
33
|
|
|
26
34
|
## Abstract Solana
|
|
27
35
|
|
{abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/SOURCES.txt
RENAMED
|
@@ -7,6 +7,7 @@ src/abstract_solana.egg-info/SOURCES.txt
|
|
|
7
7
|
src/abstract_solana.egg-info/dependency_links.txt
|
|
8
8
|
src/abstract_solana.egg-info/requires.txt
|
|
9
9
|
src/abstract_solana.egg-info/top_level.txt
|
|
10
|
-
src/abstract_solana/
|
|
11
|
-
src/abstract_solana/
|
|
12
|
-
src/abstract_solana/
|
|
10
|
+
src/abstract_solana/utils/__init__.py
|
|
11
|
+
src/abstract_solana/utils/bondingCurves.py
|
|
12
|
+
src/abstract_solana/utils/genesis_functions.py
|
|
13
|
+
src/abstract_solana/utils/pubKeyUtils.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/requires.txt
RENAMED
|
File without changes
|
{abstract_solana-0.0.2.102 → abstract_solana-0.0.2.104}/src/abstract_solana.egg-info/top_level.txt
RENAMED
|
File without changes
|