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:
1 parent
f63815b26b
commit
a40519737d
15 files changed
+217
-38
No files matched your search
@@ -22,6 +22,7 @@
|
||||
<tr><td>Rate</td><td>{{ data.rate }} {{ data.amt_from }}/{{ data.tla_from }}</td></tr>
|
||||
<tr><td>Script Lock Type</td><td>{{ data.lock_type }}</td></tr>
|
||||
<tr><td>Script Lock Value</td><td>{{ data.lock_value }}</td></tr>
|
||||
<tr><td>Address To</td><td>{{ data.addr_to }}</td></tr>
|
||||
<tr><td>Address From</td><td>{{ data.addr_from }}</td></tr>
|
||||
<tr><td>Created At</td><td>{{ data.created_at | formatts }}</td></tr>
|
||||
<tr><td>Expired At</td><td>{{ data.expired_at | formatts }}</td></tr>
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
<form method="post">
|
||||
|
||||
<table>
|
||||
<tr><td>Send To</td><td><select name="addr_to_" disabled>
|
||||
<option{% if data.addr_to=="-1" %} selected{% endif %} value="-1">-- Public Network --</option>
|
||||
{% for a in addrs_to %}
|
||||
<option{% if data.addr_to==a %} selected{% endif %} value="{{ a }}">{{ a }}</option>
|
||||
{% endfor %}
|
||||
</select></td></tr>
|
||||
<tr><td>Send From Address</td><td><select name="addr_from_" disabled>
|
||||
{% for a in addrs %}
|
||||
<option{% if data.addr_from==a %} selected{% endif %} value="{{ a }}">{{ a }}</option>
|
||||
@@ -62,6 +68,7 @@
|
||||
<input name="submit_offer" type="submit" value="Confirm Offer">
|
||||
<input name="step2" type="submit" value="Back">
|
||||
<input type="hidden" name="formid" value="{{ form_id }}">
|
||||
<input type="hidden" name="addr_to" value="{{ data.addr_to }}">
|
||||
<input type="hidden" name="addr_from" value="{{ data.addr_from }}">
|
||||
<input type="hidden" name="coin_from" value="{{ data.coin_from }}">
|
||||
<input type="hidden" name="fee_from_extra" value="{{ data.fee_from_extra }}">
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
<form method="post">
|
||||
|
||||
<table>
|
||||
<tr><td>Send To</td><td><select name="addr_to">
|
||||
<option{% if data.addr_to=="-1" %} selected{% endif %} value="-1">-- Public Network --</option>
|
||||
{% for a in addrs_to %}
|
||||
<option{% if data.addr_to==a %} selected{% endif %} value="{{ a }}">{{ a }}</option>
|
||||
{% endfor %}
|
||||
</select></td></tr>
|
||||
<tr><td>Send From Address</td><td><select name="addr_from">
|
||||
{% for a in addrs %}
|
||||
<option{% if data.addr_from==a %} selected{% endif %} value="{{ a }}">{{ a }}</option>
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
<form method="post">
|
||||
|
||||
<table>
|
||||
<tr><td>Send To</td><td><select name="addr_to_" disabled>
|
||||
<option{% if data.addr_to=="-1" %} selected{% endif %} value="-1">-- Public Network --</option>
|
||||
{% for a in addrs_to %}
|
||||
<option{% if data.addr_to==a %} selected{% endif %} value="{{ a }}">{{ a }}</option>
|
||||
{% endfor %}
|
||||
</select></td></tr>
|
||||
<tr><td>Send From Address</td><td><select name="addr_from_" disabled>
|
||||
{% for a in addrs %}
|
||||
<option{% if data.addr_from==a %} selected{% endif %} value="{{ a }}">{{ a }}</option>
|
||||
@@ -59,6 +65,7 @@
|
||||
<input name="check_offer" type="submit" value="Continue">
|
||||
<input name="step1" type="submit" value="Back">
|
||||
<input type="hidden" name="formid" value="{{ form_id }}">
|
||||
<input type="hidden" name="addr_to" value="{{ data.addr_to }}">
|
||||
<input type="hidden" name="addr_from" value="{{ data.addr_from }}">
|
||||
<input type="hidden" name="coin_from" value="{{ data.coin_from }}">
|
||||
<input type="hidden" name="coin_to" value="{{ data.coin_to }}">
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
|
||||
|
||||
<table>
|
||||
<tr><th>At</th><th>Offer ID</th><th>Coin From</th><th>Coin To</th><th>Amount From</th><th>Amount To</th><th>Rate</th></tr>
|
||||
<tr><th>At</th><th>Recipient</th><th>Offer ID</th><th>Coin From</th><th>Coin To</th><th>Amount From</th><th>Amount To</th><th>Rate</th></tr>
|
||||
{% for o in offers %}
|
||||
<tr><td>{{ o[0] }}</td><td><a href=/offer/{{ o[1] }}>{{ o[1] }}</a></td><td>{{ o[2] }}</td><td>{{ o[3] }}</td><td>{{ o[4] }}</td><td>{{ o[5] }}</td><td>{{ o[6] }}</td></tr>
|
||||
<tr><td>{{ o[0] }}</td><td>{{ o[7] }}</td><td><a href=/offer/{{ o[1] }}>{{ o[1] }}</a></td><td>{{ o[2] }}</td><td>{{ o[3] }}</td><td>{{ o[4] }}</td><td>{{ o[5] }}</td><td>{{ o[6] }}</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user