system: Allow preselecting inputs for atomic swaps.

This commit is contained in:
tecnovert committed 2022-12-05 17:04:23 +02:00
1 parent 23e89882a4
commit c90fa6f2c6
16 files changed
+334 -72

No files matched your search

@@ -184,11 +184,18 @@ def ser_string_vector(l):
return r
# Deserialize from bytes
def FromBytes(obj, tx_bytes):
obj.deserialize(BytesIO(tx_bytes))
return obj
# Deserialize from a hex string representation (eg from RPC)
def FromHex(obj, hex_string):
obj.deserialize(BytesIO(hex_str_to_bytes(hex_string)))
return obj
# Convert a binary-serializable object to hex (eg for submission via RPC)
def ToHex(obj):
return bytes_to_hex_str(obj.serialize())