prepare: Set Particl version to 27.2.2.0

Fixes zmq missing curve functions.
Fix signmessage for v23.
This commit is contained in:
tecnovert
2025-08-06 15:12:20 +02:00
parent a171bbb48a
commit 7ee1931176
6 changed files with 27 additions and 13 deletions

View File

@@ -53,6 +53,7 @@ class CoinInterface:
self._network = network
self._mx_wallet = threading.Lock()
self._altruistic = True
self._core_version = None # Set in getDaemonVersion()
def interface_type(self) -> int:
# coin_type() returns the base coin type, interface_type() returns the coin+balance type.

View File

@@ -364,7 +364,9 @@ class BTCInterface(Secp256k1Interface):
self.rpc_wallet("getwalletinfo" if with_wallet else "getblockchaininfo")
def getDaemonVersion(self):
return self.rpc("getnetworkinfo")["version"]
if self._core_version is None:
self._core_version = self.rpc("getnetworkinfo")["version"]
return self._core_version
def getBlockchainInfo(self):
return self.rpc("getblockchaininfo")

View File

@@ -191,12 +191,22 @@ class PARTInterface(BTCInterface):
raise RuntimeError("No non-segwit outputs found.")
def signMessage(self, address: str, message: str) -> str:
message_magic: str = self.chainparams()["message_magic"]
return self.rpc_wallet("signmessage", [address, message, message_magic])
args = [address, message]
if self.getDaemonVersion() > 23020700:
message_magic: str = self.chainparams()["message_magic"]
args += [
message_magic,
]
return self.rpc_wallet("signmessage", args)
def signMessageWithKey(self, key_wif: str, message: str) -> str:
message_magic: str = self.chainparams()["message_magic"]
return self.rpc("signmessagewithprivkey", [key_wif, message, message_magic])
args = [key_wif, message]
if self.getDaemonVersion() > 23020700:
message_magic: str = self.chainparams()["message_magic"]
args += [
message_magic,
]
return self.rpc("signmessagewithprivkey", args)
class PARTInterfaceBlind(PARTInterface):

View File

@@ -287,7 +287,10 @@ class XMRInterface(CoinInterface):
self.rpc_wallet("get_languages")
def getDaemonVersion(self):
return self.rpc_wallet("get_version")["version"]
# Returns wallet version
if self._core_version is None:
self._core_version = self.rpc_wallet("get_version")["version"]
return self._core_version
def getBlockchainInfo(self):
get_height = self.rpc2("get_height", timeout=self._rpctimeout)