Skip to content

Commit 392d1ae

Browse files
committed
resolved conflicts and added getApiKey method
1 parent 840e4e7 commit 392d1ae

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/lighthouseweb3/__init__.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
get_uploads as getUploads,
99
download as _download,
1010
get_file_info as getFileInfo,
11-
get_balance as getBalance
11+
get_balance as getBalance,
12+
get_api_key as getApiKey
1213
)
1314

1415

@@ -125,6 +126,21 @@ def getFileInfo(cid: str):
125126
return getFileInfo.get_file_info(cid)
126127
except Exception as e:
127128
raise e
129+
130+
@staticmethod
131+
def getApiKey(publicKey: str, signedMessage: str):
132+
"""
133+
Generates and returns an API key for the given public key and signed message.
134+
:param publicKey: str, The public key associated with the user.
135+
:param signedMessage: str, The message signed by the user's private key.
136+
:return: dict, A dict with generated API key.
137+
"""
138+
139+
140+
try:
141+
return getApiKey.get_api_key(publicKey, signedMessage)
142+
except Exception as e:
143+
raise e
128144

129145
def getTagged(self, tag: str):
130146
"""

0 commit comments

Comments
 (0)