protocol: Enable private offers

Users can send private offers that will only be seen by one address.

To send a private offer:
 1. recipient creates a new address to receive offers on
 2. recipient sends the pubkey for the newly created address to the offerer
 3. offerer imports the recipient's pubkey
 4. offerer sends a new offer to the recipients key instead of the public network

Nodes will ignore offers sent on keys other than the network key or keys created for offer-receiving.
This commit is contained in:
tecnovert committed 2021-10-20 21:50:45 +02:00
1 parent f63815b26b
commit a40519737d
15 files changed
+217 -38

No files matched your search

+11 -1
View File
@@ -14,6 +14,7 @@
<br/><h4>Edit Address {{ data.addr_data.addr }}</h4>
<table>
<tr><td>Pubkey</td><td>{{ data.addr_data.pubkey }}</td></tr>
<tr><td>Active</td><td><select name="active_ind">
<option value="1"{% if data.addr_data.active_ind==1 %} selected{% endif %}>True</option>
<option value="0"{% if data.addr_data.active_ind==0 %} selected{% endif %}>False</option>
@@ -23,12 +24,20 @@
<tr><td><input type="submit" name="saveaddr" value="Save Address"><input type="submit" name="cancel" value="Cancel"></td></tr>
</table>
{% elif data.new_address %}
<br/><h4>New Address</h4>
<br/><h4>New Receiving Address</h4>
<table>
<tr><td>Note</td><td><input name="addressnote" type="text" value="" maxlength="30"></td></tr>
<tr><td><input type="submit" name="createnewaddr" value="Create Address"><input type="submit" name="cancel" value="Cancel"></td></tr>
</table>
{% elif data.new_send_address %}
<br/><h4>Add Sending Address</h4>
<table>
<tr><td>Pubkey</td><td><input name="addresspubkey" type="text" value="" maxlength="66"></td></tr>
<tr><td>Note</td><td><input name="addressnote" type="text" value="" maxlength="30"></td></tr>
<tr><td><input type="submit" name="createnewsendaddr" value="Add Address"><input type="submit" name="cancel" value="Cancel"></td></tr>
</table>
{% else %}
<table>
<tr><th>Address</th><th>Type</th><th>Active</th><th>Created At</th><th>Note</th><th>Action</th></tr>
@@ -39,6 +48,7 @@
</table>
<input type="submit" name="shownewaddr" value="New Address">
<input type="submit" name="showaddaddr" value="Add Sending Address">
{% endif %}
<input type="hidden" name="formid" value="{{ form_id }}">
</form>