shadowPaySDK 16.7.2025.1.0__tar.gz → 16.7.2025.1.1__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-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/PKG-INFO +1 -1
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/setup.py +1 -1
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/const.py +6 -1
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/types/EVMcheque.py +23 -21
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/PKG-INFO +1 -1
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/LICENSE +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/README.md +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/setup.cfg +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/interface/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/interface/erc20.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/interface/erc721.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/interface/sol.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/types/SOLcheque.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/types/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/utils/__init__.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/utils/utils.py +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/SOURCES.txt +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/dependency_links.txt +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/requires.txt +0 -0
- {shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/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='16.07.2025.1.
|
5
|
+
version='16.07.2025.1.1',
|
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',
|
@@ -32,7 +32,7 @@ __ERC20_ABI__ = json.loads("""[
|
|
32
32
|
|
33
33
|
__SHADOWPAY_CONTRACT_ADDRESS__ERC20__ = {
|
34
34
|
97: "0x5487C0DdCbD5465F26B446c6CAB88D8d6F7DF23b",
|
35
|
-
10143: "
|
35
|
+
10143: "0x1d856f2eA4738d1a89E27dbfc8950a4976Db41a5"
|
36
36
|
}
|
37
37
|
|
38
38
|
__SHADOWPAY_ABI__ERC20__= json.loads("""[
|
@@ -283,6 +283,11 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
|
|
283
283
|
"internalType": "bytes32",
|
284
284
|
"name": "id",
|
285
285
|
"type": "bytes32"
|
286
|
+
},
|
287
|
+
{
|
288
|
+
"internalType": "address",
|
289
|
+
"name": "from",
|
290
|
+
"type": "address"
|
286
291
|
}
|
287
292
|
],
|
288
293
|
"name": "getChequeInfo",
|
@@ -81,7 +81,7 @@ class Cheque:
|
|
81
81
|
|
82
82
|
def __convert__(self):
|
83
83
|
return self.w3.to_wei(self.amount, 'ether')
|
84
|
-
|
84
|
+
|
85
85
|
async def InitCheque(self, amount, receiver:list, private_key:Optional[str] = None):
|
86
86
|
if not isinstance(receiver,list):
|
87
87
|
raise ValueError("Receiver must be a list of addresses, [""0x1234...5678", "0x2345...6789""]")
|
@@ -409,6 +409,28 @@ class Cheque:
|
|
409
409
|
return self.contract.functions.getOwner().call()
|
410
410
|
async def getTreasery(self):
|
411
411
|
return self.contract.functions.getTreasery().call()
|
412
|
+
def getChequeInfo(self, cheque_id: str, address: Optional[str] = None):
|
413
|
+
if not cheque_id:
|
414
|
+
raise ValueError("Cheque ID is required")
|
415
|
+
if address:
|
416
|
+
address = Web3.to_checksum_address(address)
|
417
|
+
|
418
|
+
cheque_id_bytes32 = Web3.to_bytes(hexstr=cheque_id).rjust(32, b'\x00')
|
419
|
+
cheque_info = self.contract.functions.getChequeInfo(cheque_id_bytes32).call({
|
420
|
+
cheque_id_bytes32,
|
421
|
+
address or self.address
|
422
|
+
|
423
|
+
})
|
424
|
+
return cheque_info
|
425
|
+
def getTokenChequeInfo(self, cheque_id: str):
|
426
|
+
if not cheque_id:
|
427
|
+
raise ValueError("Cheque ID is required")
|
428
|
+
|
429
|
+
cheque_id_bytes32 = Web3.to_bytes(hexstr=cheque_id).rjust(32, b'\x00')
|
430
|
+
cheque_info = self.contract.functions.getTokenChequeInfo(cheque_id_bytes32).call({
|
431
|
+
cheque_id_bytes32
|
432
|
+
})
|
433
|
+
return cheque_info
|
412
434
|
async def getSwaoDetail(self, cheque_id: str):
|
413
435
|
cheque_id_bytes32 = Web3.to_bytes(hexstr=cheque_id).rjust(32, b'\x00') # паддинг до bytes32
|
414
436
|
s = self.contract.functions.getSwapDetail(cheque_id_bytes32).call()
|
@@ -416,26 +438,6 @@ class Cheque:
|
|
416
438
|
"tokenOut": s[0],
|
417
439
|
"amountOut": s[1],
|
418
440
|
}
|
419
|
-
async def getNativeChequeDetail(self,id, address:Optional[str] = None):
|
420
|
-
if not address:
|
421
|
-
address = self.w3.eth.default_account or self.w3.eth.account.from_key(self.private_key).address
|
422
|
-
address = Web3.to_checksum_address(address)
|
423
|
-
cheque_id_bytes32 = Web3.to_bytes(hexstr=id).rjust(32, b'\x00') # паддинг до bytes32
|
424
|
-
|
425
|
-
data = self.contract.functions.getChequeInfo(cheque_id_bytes32, address).call()
|
426
|
-
return {
|
427
|
-
"amount":data[0],
|
428
|
-
"reciver": data[1],
|
429
|
-
"status": data[2],
|
430
|
-
}
|
431
|
-
async def getTokenChequeDetail(self,id):
|
432
|
-
cheque_id_bytes32 = Web3.to_bytes(hexstr=id).rjust(32, b'\x00')
|
433
|
-
data = self.contract.functions.getTokenChequeInfo(cheque_id_bytes32).call()
|
434
|
-
return{
|
435
|
-
"from":data[0],
|
436
|
-
"to":data[1],
|
437
|
-
"claimed":data[2],
|
438
|
-
}
|
439
441
|
|
440
442
|
class NFTcheque:
|
441
443
|
def __init__(self, w3:Web3, token:str, amount:int, spender:str):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK/interface/__init__.py
RENAMED
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
|
{shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/dependency_links.txt
RENAMED
File without changes
|
{shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/requires.txt
RENAMED
File without changes
|
{shadowpaysdk-16.7.2025.1.0 → shadowpaysdk-16.7.2025.1.1}/shadowPaySDK.egg-info/top_level.txt
RENAMED
File without changes
|