shadowPaySDK 0.2.0.21__tar.gz → 0.2.0.22__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.21 → shadowpaysdk-0.2.0.22}/PKG-INFO +1 -1
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/setup.py +1 -1
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/interface/sol.py +22 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK.egg-info/PKG-INFO +1 -1
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/LICENSE +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/README.md +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/setup.cfg +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/__init__.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/api.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/const.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/interface/__init__.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/interface/erc20.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/interface/erc721.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/types/EVMcheque.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/types/SOLcheque.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/types/__init__.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/utils/__init__.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK/utils/utils.py +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK.egg-info/SOURCES.txt +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK.egg-info/dependency_links.txt +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/shadowPaySDK.egg-info/requires.txt +0 -0
- {shadowpaysdk-0.2.0.21 → shadowpaysdk-0.2.0.22}/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.22',
|
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',
|
@@ -11,6 +11,8 @@ from spl.token.constants import TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID
|
|
11
11
|
from solana.rpc.types import TxOpts, TokenAccountOpts
|
12
12
|
from solana.rpc.types import TxOpts
|
13
13
|
import solders
|
14
|
+
from solders.message import Message
|
15
|
+
|
14
16
|
# from solders.pubkey import Pubkey
|
15
17
|
# from solders.keypair import Keypair
|
16
18
|
# from solders.signature import Signature
|
@@ -201,6 +203,26 @@ class SOL:
|
|
201
203
|
return resp.value
|
202
204
|
|
203
205
|
|
206
|
+
async def transfer_native(self, to:str, amount):
|
207
|
+
if not self.KEYPAIR:
|
208
|
+
raise ValueError("not set KEYPAIR.")
|
209
|
+
|
210
|
+
sender_pubkey = self.get_pubkey()
|
211
|
+
receiver_pubkey = solders.pubkey.Pubkey.from_string(to)
|
212
|
+
ixns = [
|
213
|
+
transfer(TransferParams(
|
214
|
+
from_pubkey=sender_pubkey,
|
215
|
+
to_pubkey=receiver_pubkey,
|
216
|
+
lamports=amount * LAMPORTS_PER_SOL
|
217
|
+
))
|
218
|
+
]
|
219
|
+
msg = Message(ixns, self.get_pubkey())
|
220
|
+
latest_blockhash_resp = self.client.get_latest_blockhash()
|
221
|
+
|
222
|
+
blockhash_str = latest_blockhash_resp.value.blockhash
|
223
|
+
tx = Transaction([self.KEYPAIR], msg, blockhash_str)
|
224
|
+
resp = await self.client.send_transaction(tx)
|
225
|
+
return resp
|
204
226
|
|
205
227
|
|
206
228
|
|
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
|