diff --git a/lighter/signer_client.py b/lighter/signer_client.py index a473042..c1bb252 100644 --- a/lighter/signer_client.py +++ b/lighter/signer_client.py @@ -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] @@ -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 @@ -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: diff --git a/lighter/signers/lighter-signer-darwin-arm64.dylib b/lighter/signers/lighter-signer-darwin-arm64.dylib index 0dd7cec..cb267ad 100644 Binary files a/lighter/signers/lighter-signer-darwin-arm64.dylib and b/lighter/signers/lighter-signer-darwin-arm64.dylib differ diff --git a/lighter/signers/lighter-signer-darwin-arm64.h b/lighter/signers/lighter-signer-darwin-arm64.h index 15a6068..307323c 100644 --- a/lighter/signers/lighter-signer-darwin-arm64.h +++ b/lighter/signers/lighter-signer-darwin-arm64.h @@ -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); diff --git a/lighter/signers/lighter-signer-linux-amd64.h b/lighter/signers/lighter-signer-linux-amd64.h index 887f09e..b097024 100644 --- a/lighter/signers/lighter-signer-linux-amd64.h +++ b/lighter/signers/lighter-signer-linux-amd64.h @@ -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); diff --git a/lighter/signers/lighter-signer-linux-amd64.so b/lighter/signers/lighter-signer-linux-amd64.so index 424cac5..fa3f8c6 100644 Binary files a/lighter/signers/lighter-signer-linux-amd64.so and b/lighter/signers/lighter-signer-linux-amd64.so differ diff --git a/lighter/signers/lighter-signer-linux-arm64.h b/lighter/signers/lighter-signer-linux-arm64.h index 887f09e..b097024 100644 --- a/lighter/signers/lighter-signer-linux-arm64.h +++ b/lighter/signers/lighter-signer-linux-arm64.h @@ -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); diff --git a/lighter/signers/lighter-signer-linux-arm64.so b/lighter/signers/lighter-signer-linux-arm64.so index 30645c3..d9254e8 100644 Binary files a/lighter/signers/lighter-signer-linux-arm64.so and b/lighter/signers/lighter-signer-linux-arm64.so differ diff --git a/lighter/signers/lighter-signer-windows-amd64.dll b/lighter/signers/lighter-signer-windows-amd64.dll index 7b3fb5d..9d1c2f4 100644 Binary files a/lighter/signers/lighter-signer-windows-amd64.dll and b/lighter/signers/lighter-signer-windows-amd64.dll differ diff --git a/lighter/signers/lighter-signer-windows-amd64.h b/lighter/signers/lighter-signer-windows-amd64.h index 6ad24a1..164e01c 100644 --- a/lighter/signers/lighter-signer-windows-amd64.h +++ b/lighter/signers/lighter-signer-windows-amd64.h @@ -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);