Closed aaroncatalano closed 8 months ago
Does import solders
give an error?
Import "solders.pubkey" could not be resolved from source. AttributeError: type object 'solders.pubkey.Pubkey' has no attribute 'verify'
Oh there's no Pubkey.verify method. There's a Signature.verify which is probably what you're looking for https://kevinheavey.github.io/solders/api_reference/signature.html#solders.signature.Signature.verify
Does something somewhere say there is a Pubkey.verify?
from solders.pubkey import Pubkey. Error: Import "solders.pubkey" could not be resolved from source. The Pubkey is not being imported from solders.pubkey.
Does import solders
give an error?
Import "solders.keypair" could not be resolved from sourcePylancereportMissingModuleSource (module) solders
Ok but that's just a Pylance error. What happens when you actually run the code?
code: def verify_wallet(update, context): try: username, phantom_wallet_address = signed_message.strip().split(' ', 1) # Limit the split to 1 occurrence if Pubkey.verify(username.encode("utf-8"), signed_message, Pubkey(phantom_wallet_address)):
Error Message: AttributeError: type object 'solders.pubkey.Pubkey' has no attribute 'verify' 2024-01-21 17:25:27,771 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception. Traceback (most recent call last):
if Pubkey.verify(username.encode("utf-8"), signed_message, Pubkey(phantom_wallet_address)):
Can you please communicate better
Is solders compatible with: Python 3.10 solana-cli 1.17 solana==0.30.2? //
This is not what a good GitHub issue looks like
Your solders library. From solders.pubkey import Pubkey., does not support Verify function?
from solders.pubkey import Pubkey def verify_wallet(update, context):
try:
username, phantom_wallet_address = signed_message.strip().split(' ', 1) # Limit the split to 1 occurrence
if Pubkey.verify(username.encode("utf-8"), signed_message, Pubkey(phantom_wallet_address)):
What versions does your solders library support?
Environment:
Python 3.10 solana-cli 1.17 solana==0.30.2 httpx==0.23.0
solders .19 python-telegram-bot==13
Telegram python bot script does not recognize from solders.pubkey import Pubkey. Import "solders.pubkey" could not be resolved from source
I have dependencies on :