ui: Display XMR view key on bid page

https://monerohash.com/explorer/myoutputs

Shared view key is for the chain B lock tx.

To find the view key for the lock spend tx:
http://localhost:12700/rpc
Monero Wallet
    getaddress
    query_key {"key_type":"view_key"}
2024-05-20_merge
tecnovert 2 years ago
parent a4f4a411a9
commit c4457ca400
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 8
      basicswap/interface/xmr.py
  2. 3
      basicswap/templates/bid_xmr.html
  3. 1
      basicswap/ui/util.py

@ -181,7 +181,10 @@ class XMRInterface(CoinInterface):
return edf.scalarmult_B(key)
def encodeKey(self, vk):
return vk.hex()
return vk[::-1].hex()
def decodeKey(self, k_hex):
return bytes.fromhex(k_hex)[::-1]
def encodePubkey(self, pk):
return edu.encodepoint(pk)
@ -216,9 +219,6 @@ class XMRInterface(CoinInterface):
def lengthDLEAG(self):
return dleag_proof_len()
def decodeKey(self, k_hex):
return bytes.fromhex(k_hex)
def sumKeys(self, ka, kb):
return ed25519_scalar_add(ka, kb)

@ -94,6 +94,9 @@
{% if data.xmr_b_shared_address %}
<p class="monospace">Shared Address: {{ data.xmr_b_shared_address }}</p>
{% endif %}
{% if data.xmr_b_shared_viewkey %}
<p class="monospace">Shared View Key: {{ data.xmr_b_shared_viewkey }}</p>
{% endif %}
{% if data.xmr_b_half_privatekey %}
<p class="monospace">Key Half: {{ data.xmr_b_half_privatekey }}</p>
{% endif %}

@ -297,6 +297,7 @@ def describeBid(swap_client, bid, xmr_swap, offer, xmr_offer, bid_events, edit_b
data['txns'] = txns
data['xmr_b_shared_address'] = ci_to.encodeSharedAddress(xmr_swap.pkbv, xmr_swap.pkbs) if xmr_swap.pkbs else None
data['xmr_b_shared_viewkey'] = ci_to.encodeKey(xmr_swap.vkbv) if xmr_swap.vkbv else None
if swap_client.debug_ui:
try:

Loading…
Cancel
Save