lemdaddy commited on
Commit
472427c
·
1 Parent(s): 1574c80

Add address fetch method

Browse files
Files changed (1) hide show
  1. src/tools/crypto_wallet_toolkit.py +4 -3
src/tools/crypto_wallet_toolkit.py CHANGED
@@ -8,6 +8,7 @@ class CryptoWalletTools(Toolkit):
8
  super().__init__(name="crypto_wallet_tools")
9
 
10
  # Registering methods to make them accessible via the toolkit
 
11
  self.register(self.create_crypto_wallet)
12
 
13
  def create_crypto_wallet(self, user_email: str) -> str:
@@ -34,9 +35,9 @@ class CryptoWalletTools(Toolkit):
34
  response = asyncio.run(rpc_call(method_name="createLocalWallet", params=params))
35
  return f"{response}"
36
 
37
- def get_crypto_wallet(self, user_email: str) -> str:
38
  """
39
- Fetches the crypto wallet account for the given user email.
40
 
41
  Parameters:
42
  user_email (str): The email of the user for whom the wallet is being fetched.
@@ -55,7 +56,7 @@ class CryptoWalletTools(Toolkit):
55
  params = {
56
  'userEmail': user_email,
57
  }
58
- response = asyncio.run(rpc_call(method_name="getLocalWallet", params=params))
59
  return f"{response}"
60
 
61
 
 
8
  super().__init__(name="crypto_wallet_tools")
9
 
10
  # Registering methods to make them accessible via the toolkit
11
+ self.register(self.get_crypto_wallet_address)
12
  self.register(self.create_crypto_wallet)
13
 
14
  def create_crypto_wallet(self, user_email: str) -> str:
 
35
  response = asyncio.run(rpc_call(method_name="createLocalWallet", params=params))
36
  return f"{response}"
37
 
38
+ def get_crypto_wallet_address(self, user_email: str) -> str:
39
  """
40
+ Fetches the crypto wallet account addresse for the given user email.
41
 
42
  Parameters:
43
  user_email (str): The email of the user for whom the wallet is being fetched.
 
56
  params = {
57
  'userEmail': user_email,
58
  }
59
+ response = asyncio.run(rpc_call(method_name="getLocalWalletAddress", params=params))
60
  return f"{response}"
61
 
62