shadowPaySDK 0.2.0.13__tar.gz → 0.2.0.15__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.
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/PKG-INFO +1 -1
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/setup.py +1 -1
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/types/EVMcheque.py +15 -5
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK.egg-info/PKG-INFO +1 -1
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/LICENSE +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/README.md +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/setup.cfg +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/__init__.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/api.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/const.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/interface/__init__.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/interface/erc20.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/interface/erc721.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/interface/sol.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/types/SOLcheque.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/types/__init__.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/utils/__init__.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK/utils/utils.py +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK.egg-info/SOURCES.txt +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK.egg-info/dependency_links.txt +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK.egg-info/requires.txt +0 -0
- {shadowpaysdk-0.2.0.13 → shadowpaysdk-0.2.0.15}/shadowPaySDK.egg-info/top_level.txt +0 -0
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='shadowPaySDK',
|
5
|
-
version='0.2.0.
|
5
|
+
version='0.2.0.15',
|
6
6
|
description='ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction',
|
7
7
|
long_description=open('README.md').read(),
|
8
8
|
long_description_content_type='text/markdown',
|
@@ -21,6 +21,13 @@ class Cheque:
|
|
21
21
|
self.__allow__()
|
22
22
|
|
23
23
|
def __get__id(self, tx):
|
24
|
+
if isinstance(tx, str):
|
25
|
+
try:
|
26
|
+
tx = self.w3.eth.get_transaction_receipt(tx)
|
27
|
+
except Exception as e:
|
28
|
+
print(f"Failed to get transaction receipt: {str(e)}")
|
29
|
+
return False
|
30
|
+
|
24
31
|
try:
|
25
32
|
logs = self.contract.events.ChequeCreated().process_receipt(tx)
|
26
33
|
cheque_id = logs[0]["args"]["id"]
|
@@ -67,12 +74,15 @@ class Cheque:
|
|
67
74
|
async def InitCheque(self, amount, receiver:list, private_key:Optional[str] = None):
|
68
75
|
if not isinstance(receiver,list):
|
69
76
|
raise ValueError("Receiver must be a list of addresses, [""0x1234...5678", "0x2345...6789""]")
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
77
|
+
|
78
|
+
key = private_key or self.private_key
|
79
|
+
|
80
|
+
if key:
|
81
|
+
address = Web3.to_checksum_address(self.w3.eth.account.from_key(key).address)
|
82
|
+
print("InitCheque", amount, receiver, key)
|
83
|
+
|
74
84
|
elif self.address:
|
75
|
-
address = self.address
|
85
|
+
address = Web3.to_checksum_address(self.address)
|
76
86
|
else:
|
77
87
|
raise ValueError("No private key or address provided")
|
78
88
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|