@@ -72,6 +72,8 @@ def __get_shared_library():
7272
7373 if is_arm and is_mac :
7474 return ctypes .CDLL (os .path .join (path_to_signer_folders , "lighter-signer-darwin-arm64.dylib" ))
75+ elif is_x64 and is_mac :
76+ return ctypes .CDLL (os .path .join (path_to_signer_folders , "lighter-signer-darwin-amd64.dylib" ))
7577 elif is_linux and is_x64 :
7678 return ctypes .CDLL (os .path .join (path_to_signer_folders , "lighter-signer-linux-amd64.so" ))
7779 elif is_linux and is_arm :
@@ -81,7 +83,7 @@ def __get_shared_library():
8183 else :
8284 raise Exception (
8385 f"Unsupported platform/architecture: { platform .system ()} /{ platform .machine ()} . "
84- "Currently supported: Linux(x86_64), macOS(arm64), and Windows(x86_64)."
86+ "Currently supported: Linux(x86_64/arm64 ), macOS(arm64/x86_64 ), and Windows(x86_64)."
8587 )
8688
8789
@@ -485,7 +487,6 @@ def sign_create_order(
485487 integrator_account_index : int = 0 ,
486488 integrator_taker_fee : int = 0 ,
487489 integrator_maker_fee : int = 0 ,
488- cancel_all_market_index : int = 255 ,
489490 self_trade_behavior_mode : int = 0 ,
490491 self_trade_equality_mode : int = 0 ,
491492 skip_nonce : int = SKIP_NONCE_OFF ,
@@ -506,10 +507,9 @@ def sign_create_order(
506507 integrator_account_index ,
507508 integrator_taker_fee ,
508509 integrator_maker_fee ,
509- skip_nonce ,
510- cancel_all_market_index ,
511510 self_trade_behavior_mode ,
512511 self_trade_equality_mode ,
512+ skip_nonce ,
513513 nonce ,
514514 api_key_index ,
515515 self .account_index ,
@@ -544,8 +544,8 @@ def sign_withdraw(self, asset_index: int, route_type: int, amount: int, skip_non
544544 def sign_create_sub_account (self , skip_nonce : int = SKIP_NONCE_OFF , nonce : int = DEFAULT_NONCE , api_key_index : int = DEFAULT_API_KEY_INDEX ) -> Union [Tuple [str , str , str , None ], Tuple [None , None , None , str ]]:
545545 return self .__decode_tx_info (self .signer .SignCreateSubAccount (skip_nonce , nonce , api_key_index , self .account_index ))
546546
547- def sign_cancel_all_orders (self , time_in_force : int , timestamp_ms : int , cancel_all_market_index : int , skip_nonce : int = SKIP_NONCE_OFF , nonce : int = DEFAULT_NONCE , api_key_index : int = DEFAULT_API_KEY_INDEX ) -> Union [Tuple [str , str , str , None ], Tuple [None , None , None , str ]]:
548- return self .__decode_tx_info (self .signer .SignCancelAllOrders (time_in_force , timestamp_ms , skip_nonce , nonce , api_key_index , self .account_index ))
547+ def sign_cancel_all_orders (self , time_in_force : int , timestamp_ms : int , cancel_all_market_index : int = NIL_MARKET_INDEX , skip_nonce : int = SKIP_NONCE_OFF , nonce : int = DEFAULT_NONCE , api_key_index : int = DEFAULT_API_KEY_INDEX ) -> Union [Tuple [str , str , str , None ], Tuple [None , None , None , str ]]:
548+ return self .__decode_tx_info (self .signer .SignCancelAllOrders (time_in_force , timestamp_ms , cancel_all_market_index , skip_nonce , nonce , api_key_index , self .account_index ))
549549
550550 def sign_modify_order (
551551 self ,
@@ -564,7 +564,7 @@ def sign_modify_order(
564564 nonce : int = DEFAULT_NONCE ,
565565 api_key_index : int = DEFAULT_API_KEY_INDEX
566566 ) -> Union [Tuple [str , str , str , None ], Tuple [None , None , None , str ]]:
567- return self .__decode_tx_info (self .signer .SignModifyOrder (market_index , order_index , base_amount , price , trigger_price , integrator_account_index , integrator_taker_fee , integrator_maker_fee , self_trade_behavior_mode , self_trade_behavior_mode , skip_nonce , nonce , api_key_index , self .account_index ))
567+ return self .__decode_tx_info (self .signer .SignModifyOrder (market_index , order_index , base_amount , price , trigger_price , integrator_account_index , integrator_taker_fee , integrator_maker_fee , self_trade_behavior_mode , self_trade_equality_mode , skip_nonce , nonce , api_key_index , self .account_index ))
568568
569569 def sign_approve_integrator (
570570 self ,
@@ -1146,8 +1146,8 @@ async def create_sub_account(self, skip_nonce : int = SKIP_NONCE_OFF, nonce: int
11461146 return tx_info , api_response , None
11471147
11481148 @process_api_key_and_nonce
1149- async def cancel_all_orders (self , time_in_force , timestamp_ms , cancel_all_market_index , skip_nonce : int = SKIP_NONCE_OFF , nonce : int = DEFAULT_NONCE , api_key_index : int = DEFAULT_API_KEY_INDEX )-> Union [Tuple [Withdraw , RespSendTx , None ], Tuple [None , None , str ]]:
1150- tx_type , tx_info , tx_hash , error = self .sign_cancel_all_orders (time_in_force , timestamp_ms , cancel_all_market_index , skip_nonce , nonce , api_key_index )
1149+ async def cancel_all_orders (self , time_in_force , timestamp_ms , cancel_all_market_index : int = NIL_MARKET_INDEX , skip_nonce : int = SKIP_NONCE_OFF , nonce : int = DEFAULT_NONCE , api_key_index : int = DEFAULT_API_KEY_INDEX )-> Union [Tuple [Withdraw , RespSendTx , None ], Tuple [None , None , str ]]:
1150+ tx_type , tx_info , tx_hash , error = self .sign_cancel_all_orders (time_in_force , timestamp_ms , cancel_all_market_index , skip_nonce , nonce , api_key_index )
11511151 if error is not None :
11521152 return None , None , error
11531153
0 commit comments