Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lighter/signer_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __get_shared_library():


def __populate_shared_library_functions(signer):
signer.GenerateAPIKey.argtypes = [ctypes.c_char_p]
signer.GenerateAPIKey.argtypes = []
signer.GenerateAPIKey.restype = ApiKeyResponse

signer.CreateClient.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_int, ctypes.c_int, ctypes.c_longlong]
Expand Down Expand Up @@ -159,8 +159,8 @@ def get_signer():
return __signer


def create_api_key(seed=""):
result = get_signer().GenerateAPIKey(ctypes.c_char_p(seed.encode("utf-8")))
def create_api_key():
result = get_signer().GenerateAPIKey()

private_key_str = result.privateKey.decode("utf-8") if result.privateKey else None
public_key_str = result.publicKey.decode("utf-8") if result.publicKey else None
Expand Down Expand Up @@ -359,8 +359,8 @@ def check_client(self):
return None

@staticmethod
def create_api_key(self, seed=""):
return create_api_key(seed=seed)
def create_api_key(self):
return create_api_key()

def get_api_key_nonce(self, api_key_index: int, nonce: int) -> Tuple[int, int]:
if api_key_index != self.DEFAULT_API_KEY_INDEX and nonce != self.DEFAULT_NONCE:
Expand Down
Binary file modified lighter/signers/lighter-signer-darwin-arm64.dylib
Binary file not shown.
2 changes: 1 addition & 1 deletion lighter/signers/lighter-signer-darwin-arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
extern "C" {
#endif

extern ApiKeyResponse GenerateAPIKey(char* cSeed);
extern ApiKeyResponse GenerateAPIKey();
extern char* CreateClient(char* cUrl, char* cPrivateKey, int cChainId, int cApiKeyIndex, long long cAccountIndex);
extern char* CheckClient(int cApiKeyIndex, long long cAccountIndex);
extern SignedTxResponse SignChangePubKey(char* cPubKey, long long cNonce, int cApiKeyIndex, long long cAccountIndex);
Expand Down
2 changes: 1 addition & 1 deletion lighter/signers/lighter-signer-linux-amd64.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
extern "C" {
#endif

extern ApiKeyResponse GenerateAPIKey(char* cSeed);
extern ApiKeyResponse GenerateAPIKey();
extern char* CreateClient(char* cUrl, char* cPrivateKey, int cChainId, int cApiKeyIndex, long long int cAccountIndex);
extern char* CheckClient(int cApiKeyIndex, long long int cAccountIndex);
extern SignedTxResponse SignChangePubKey(char* cPubKey, long long int cNonce, int cApiKeyIndex, long long int cAccountIndex);
Expand Down
Binary file modified lighter/signers/lighter-signer-linux-amd64.so
Binary file not shown.
2 changes: 1 addition & 1 deletion lighter/signers/lighter-signer-linux-arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
extern "C" {
#endif

extern ApiKeyResponse GenerateAPIKey(char* cSeed);
extern ApiKeyResponse GenerateAPIKey();
extern char* CreateClient(char* cUrl, char* cPrivateKey, int cChainId, int cApiKeyIndex, long long int cAccountIndex);
extern char* CheckClient(int cApiKeyIndex, long long int cAccountIndex);
extern SignedTxResponse SignChangePubKey(char* cPubKey, long long int cNonce, int cApiKeyIndex, long long int cAccountIndex);
Expand Down
Binary file modified lighter/signers/lighter-signer-linux-arm64.so
Binary file not shown.
Binary file modified lighter/signers/lighter-signer-windows-amd64.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion lighter/signers/lighter-signer-windows-amd64.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
extern "C" {
#endif

extern __declspec(dllexport) ApiKeyResponse GenerateAPIKey(char* cSeed);
extern __declspec(dllexport) ApiKeyResponse GenerateAPIKey();
extern __declspec(dllexport) char* CreateClient(char* cUrl, char* cPrivateKey, int cChainId, int cApiKeyIndex, long long int cAccountIndex);
extern __declspec(dllexport) char* CheckClient(int cApiKeyIndex, long long int cAccountIndex);
extern __declspec(dllexport) SignedTxResponse SignChangePubKey(char* cPubKey, long long int cNonce, int cApiKeyIndex, long long int cAccountIndex);
Expand Down