shadowPaySDK 16.7.2025.8__py3-none-any.whl → 16.7.2025.256__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.
shadowPaySDK/const.py CHANGED
@@ -32,10 +32,60 @@ __ERC20_ABI__ = json.loads("""[
32
32
 
33
33
  __SHADOWPAY_CONTRACT_ADDRESS__ERC20__ = {
34
34
  97: "0x5487C0DdCbD5465F26B446c6CAB88D8d6F7DF23b",
35
- 10143: "0x35D7950dF4E593dAFaE608Ef34C4fB8b28F21cdC"
35
+ 10143: "0x1d856f2eA4738d1a89E27dbfc8950a4976Db41a5"
36
36
  }
37
37
 
38
38
  __SHADOWPAY_ABI__ERC20__= json.loads("""[
39
+ {
40
+ "inputs": [
41
+ {
42
+ "internalType": "address",
43
+ "name": "_trassary",
44
+ "type": "address"
45
+ }
46
+ ],
47
+ "stateMutability": "nonpayable",
48
+ "type": "constructor"
49
+ },
50
+ {
51
+ "anonymous": false,
52
+ "inputs": [
53
+ {
54
+ "indexed": false,
55
+ "internalType": "bytes32",
56
+ "name": "id",
57
+ "type": "bytes32"
58
+ }
59
+ ],
60
+ "name": "ChequeClaimed",
61
+ "type": "event"
62
+ },
63
+ {
64
+ "anonymous": false,
65
+ "inputs": [
66
+ {
67
+ "indexed": false,
68
+ "internalType": "bytes32",
69
+ "name": "id",
70
+ "type": "bytes32"
71
+ }
72
+ ],
73
+ "name": "ChequeCreated",
74
+ "type": "event"
75
+ },
76
+ {
77
+ "anonymous": false,
78
+ "inputs": [
79
+ {
80
+ "indexed": true,
81
+ "internalType": "bytes32",
82
+ "name": "id",
83
+ "type": "bytes32"
84
+ }
85
+ ],
86
+ "name": "redeem",
87
+ "type": "event"
88
+ },
39
89
  {
40
90
  "inputs": [
41
91
  {
@@ -76,16 +126,16 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
76
126
  "type": "function"
77
127
  },
78
128
  {
79
- "inputs": [
129
+ "inputs": [],
130
+ "name": "FEE_DENOMINATOR",
131
+ "outputs": [
80
132
  {
81
- "internalType": "address",
82
- "name": "newOwner",
83
- "type": "address"
133
+ "internalType": "uint256",
134
+ "name": "",
135
+ "type": "uint256"
84
136
  }
85
137
  ],
86
- "name": "changeOwner",
87
- "outputs": [],
88
- "stateMutability": "nonpayable",
138
+ "stateMutability": "view",
89
139
  "type": "function"
90
140
  },
91
141
  {
@@ -146,43 +196,6 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
146
196
  "stateMutability": "nonpayable",
147
197
  "type": "function"
148
198
  },
149
- {
150
- "inputs": [
151
- {
152
- "internalType": "address",
153
- "name": "_treaseryAddress",
154
- "type": "address"
155
- }
156
- ],
157
- "name": "setTreasery",
158
- "outputs": [],
159
- "stateMutability": "nonpayable",
160
- "type": "function"
161
- },
162
- {
163
- "inputs": [
164
- {
165
- "internalType": "address",
166
- "name": "_trassary",
167
- "type": "address"
168
- }
169
- ],
170
- "stateMutability": "nonpayable",
171
- "type": "constructor"
172
- },
173
- {
174
- "anonymous": false,
175
- "inputs": [
176
- {
177
- "indexed": false,
178
- "internalType": "bytes32",
179
- "name": "id",
180
- "type": "bytes32"
181
- }
182
- ],
183
- "name": "ChequeCreated",
184
- "type": "event"
185
- },
186
199
  {
187
200
  "inputs": [
188
201
  {
@@ -212,68 +225,15 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
212
225
  "stateMutability": "payable",
213
226
  "type": "function"
214
227
  },
215
- {
216
- "anonymous": false,
217
- "inputs": [
218
- {
219
- "indexed": true,
220
- "internalType": "bytes32",
221
- "name": "id",
222
- "type": "bytes32"
223
- }
224
- ],
225
- "name": "redeem",
226
- "type": "event"
227
- },
228
- {
229
- "inputs": [
230
- {
231
- "internalType": "uint256",
232
- "name": "_minFee",
233
- "type": "uint256"
234
- },
235
- {
236
- "internalType": "uint256",
237
- "name": "_maxFees",
238
- "type": "uint256"
239
- },
240
- {
241
- "internalType": "uint256",
242
- "name": "_minEth",
243
- "type": "uint256"
244
- },
245
- {
246
- "internalType": "uint256",
247
- "name": "_baseFee",
248
- "type": "uint256"
249
- }
250
- ],
251
- "name": "setFees",
252
- "outputs": [],
253
- "stateMutability": "nonpayable",
254
- "type": "function"
255
- },
256
228
  {
257
229
  "inputs": [
258
- {
259
- "internalType": "uint256",
260
- "name": "amount",
261
- "type": "uint256"
262
- },
263
230
  {
264
231
  "internalType": "address",
265
- "name": "_to",
232
+ "name": "newOwner",
266
233
  "type": "address"
267
234
  }
268
235
  ],
269
- "name": "withdrawAmount",
270
- "outputs": [],
271
- "stateMutability": "nonpayable",
272
- "type": "function"
273
- },
274
- {
275
- "inputs": [],
276
- "name": "withdrawFees",
236
+ "name": "changeOwner",
277
237
  "outputs": [],
278
238
  "stateMutability": "nonpayable",
279
239
  "type": "function"
@@ -291,19 +251,6 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
291
251
  "stateMutability": "view",
292
252
  "type": "function"
293
253
  },
294
- {
295
- "inputs": [],
296
- "name": "FEE_DENOMINATOR",
297
- "outputs": [
298
- {
299
- "internalType": "uint256",
300
- "name": "",
301
- "type": "uint256"
302
- }
303
- ],
304
- "stateMutability": "view",
305
- "type": "function"
306
- },
307
254
  {
308
255
  "inputs": [],
309
256
  "name": "feeBasisPoints",
@@ -336,6 +283,11 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
336
283
  "internalType": "bytes32",
337
284
  "name": "id",
338
285
  "type": "bytes32"
286
+ },
287
+ {
288
+ "internalType": "address",
289
+ "name": "from",
290
+ "type": "address"
339
291
  }
340
292
  ],
341
293
  "name": "getChequeInfo",
@@ -349,6 +301,11 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
349
301
  "internalType": "address payable[]",
350
302
  "name": "to",
351
303
  "type": "address[]"
304
+ },
305
+ {
306
+ "internalType": "bool",
307
+ "name": "claimed",
308
+ "type": "bool"
352
309
  }
353
310
  ],
354
311
  "stateMutability": "view",
@@ -399,38 +356,63 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
399
356
  "internalType": "uint256",
400
357
  "name": "amountOut",
401
358
  "type": "uint256"
359
+ },
360
+ {
361
+ "internalType": "address",
362
+ "name": "spender",
363
+ "type": "address"
364
+ },
365
+ {
366
+ "internalType": "address",
367
+ "name": "receiver",
368
+ "type": "address"
369
+ },
370
+ {
371
+ "internalType": "bool",
372
+ "name": "claimed",
373
+ "type": "bool"
402
374
  }
403
375
  ],
404
376
  "stateMutability": "view",
405
377
  "type": "function"
406
378
  },
407
379
  {
408
- "inputs": [],
409
- "name": "getTreasery",
380
+ "inputs": [
381
+ {
382
+ "internalType": "bytes32",
383
+ "name": "id",
384
+ "type": "bytes32"
385
+ }
386
+ ],
387
+ "name": "getTokenChequeDetail",
410
388
  "outputs": [
411
389
  {
412
390
  "internalType": "address",
413
- "name": "",
391
+ "name": "spender",
392
+ "type": "address"
393
+ },
394
+ {
395
+ "internalType": "address",
396
+ "name": "receiver",
414
397
  "type": "address"
398
+ },
399
+ {
400
+ "internalType": "bool",
401
+ "name": "claimed",
402
+ "type": "bool"
415
403
  }
416
404
  ],
417
405
  "stateMutability": "view",
418
406
  "type": "function"
419
407
  },
420
408
  {
421
- "inputs": [
422
- {
423
- "internalType": "address",
424
- "name": "_addrr",
425
- "type": "address"
426
- }
427
- ],
428
- "name": "getUserChequeCount",
409
+ "inputs": [],
410
+ "name": "getTreasery",
429
411
  "outputs": [
430
412
  {
431
- "internalType": "uint256",
413
+ "internalType": "address",
432
414
  "name": "",
433
- "type": "uint256"
415
+ "type": "address"
434
416
  }
435
417
  ],
436
418
  "stateMutability": "view",
@@ -481,6 +463,78 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
481
463
  "stateMutability": "view",
482
464
  "type": "function"
483
465
  },
466
+ {
467
+ "inputs": [
468
+ {
469
+ "internalType": "uint256",
470
+ "name": "_minFee",
471
+ "type": "uint256"
472
+ },
473
+ {
474
+ "internalType": "uint256",
475
+ "name": "_maxFees",
476
+ "type": "uint256"
477
+ },
478
+ {
479
+ "internalType": "uint256",
480
+ "name": "_minEth",
481
+ "type": "uint256"
482
+ },
483
+ {
484
+ "internalType": "uint256",
485
+ "name": "_baseFee",
486
+ "type": "uint256"
487
+ }
488
+ ],
489
+ "name": "setFees",
490
+ "outputs": [],
491
+ "stateMutability": "nonpayable",
492
+ "type": "function"
493
+ },
494
+ {
495
+ "inputs": [
496
+ {
497
+ "internalType": "uint256",
498
+ "name": "_TokenChequepercentage",
499
+ "type": "uint256"
500
+ },
501
+ {
502
+ "internalType": "uint256",
503
+ "name": "_SwapTokenChequepercentage",
504
+ "type": "uint256"
505
+ }
506
+ ],
507
+ "name": "setTokenFees",
508
+ "outputs": [],
509
+ "stateMutability": "nonpayable",
510
+ "type": "function"
511
+ },
512
+ {
513
+ "inputs": [
514
+ {
515
+ "internalType": "address",
516
+ "name": "_treaseryAddress",
517
+ "type": "address"
518
+ }
519
+ ],
520
+ "name": "setTreasery",
521
+ "outputs": [],
522
+ "stateMutability": "nonpayable",
523
+ "type": "function"
524
+ },
525
+ {
526
+ "inputs": [],
527
+ "name": "swapBasicPoints",
528
+ "outputs": [
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "",
532
+ "type": "uint256"
533
+ }
534
+ ],
535
+ "stateMutability": "view",
536
+ "type": "function"
537
+ },
484
538
  {
485
539
  "inputs": [
486
540
  {
@@ -542,6 +596,31 @@ __SHADOWPAY_ABI__ERC20__= json.loads("""[
542
596
  ],
543
597
  "stateMutability": "view",
544
598
  "type": "function"
599
+ },
600
+ {
601
+ "inputs": [
602
+ {
603
+ "internalType": "uint256",
604
+ "name": "amount",
605
+ "type": "uint256"
606
+ },
607
+ {
608
+ "internalType": "address",
609
+ "name": "_to",
610
+ "type": "address"
611
+ }
612
+ ],
613
+ "name": "withdrawAmount",
614
+ "outputs": [],
615
+ "stateMutability": "nonpayable",
616
+ "type": "function"
617
+ },
618
+ {
619
+ "inputs": [],
620
+ "name": "withdrawFees",
621
+ "outputs": [],
622
+ "stateMutability": "nonpayable",
623
+ "type": "function"
545
624
  }
546
625
  ]""")
547
626
 
@@ -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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shadowPaySDK
3
- Version: 16.7.2025.8
3
+ Version: 16.7.2025.256
4
4
  Summary: ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction
5
5
  Author: dazay
6
6
  Author-email: shadowpay.protocol@gmail.com
@@ -1,16 +1,16 @@
1
1
  shadowPaySDK/__init__.py,sha256=CMwAuP_6hJN-WueU-XlTNta9Oyd28sFo8OojdgD_pxA,681
2
- shadowPaySDK/const.py,sha256=E-w8fivcd-yeHmpOpDAwTIP5FvsArFBHNWbhJ5K01yw,10386
2
+ shadowPaySDK/const.py,sha256=30WE442-C_wQ2cwmIMrcTF0nIB23nRlnExwu-g45Zsg,11710
3
3
  shadowPaySDK/interface/__init__.py,sha256=ggSZCV22udnzXm_Wv_3x6VN3hNIAEiwgwHZc2Jwc688,146
4
4
  shadowPaySDK/interface/erc20.py,sha256=zUTdwhf1hznSGxeEw0HsEFVf1nafHPcxj1X3djPczSo,4477
5
5
  shadowPaySDK/interface/erc721.py,sha256=4AlWfDjrvl85wFocnN93j-oM54kTsLLwv9SdtcLj4eM,3094
6
6
  shadowPaySDK/interface/sol.py,sha256=LsgwE8BzCstsVAxgcbKcYiXAORYMBHcQmNZdzsNkaLQ,7998
7
- shadowPaySDK/types/EVMcheque.py,sha256=_zZR9NmUMiuYVA8setWpPerSgEoUswalhJB-rPWIvTU,15777
7
+ shadowPaySDK/types/EVMcheque.py,sha256=1g5MRvtPhPXR2UfkMU_aJpARkSlFtqewx9j0oQ6ZkHg,16654
8
8
  shadowPaySDK/types/SOLcheque.py,sha256=ZzQgQXBerwa9lelbV8O6JBr1nevCAmJDxrdo8FtKT-4,11795
9
9
  shadowPaySDK/types/__init__.py,sha256=sG6pNZfKGvENXqsnv6MrQtKrJ898fAXkMvAZY1k1-Qg,97
10
10
  shadowPaySDK/utils/__init__.py,sha256=aja3iYO4rT-ptMM-pzw0GRFTziBdXdcEi-4kE84zH64,61
11
11
  shadowPaySDK/utils/utils.py,sha256=g4bGvLDdjhNGsAj1eaZnNWFNaiN-cVhhM-5PrnG5aIQ,720
12
- shadowpaysdk-16.7.2025.8.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
13
- shadowpaysdk-16.7.2025.8.dist-info/METADATA,sha256=KzWfWZJCFFBNqN6-aQrQEHpCwRXCRKMDqM5XveVixj8,1045
14
- shadowpaysdk-16.7.2025.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- shadowpaysdk-16.7.2025.8.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
16
- shadowpaysdk-16.7.2025.8.dist-info/RECORD,,
12
+ shadowpaysdk-16.7.2025.256.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
13
+ shadowpaysdk-16.7.2025.256.dist-info/METADATA,sha256=wykH0B1WIcpZrqQtcRmsFjLHyQ-wgLXarJPPBVrWL3E,1047
14
+ shadowpaysdk-16.7.2025.256.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ shadowpaysdk-16.7.2025.256.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
16
+ shadowpaysdk-16.7.2025.256.dist-info/RECORD,,