Skip to content

Commit c4b789b

Browse files
committed
feat: send memo transactions WIP: collateral
1 parent 2425ba6 commit c4b789b

File tree

2 files changed

+225
-19
lines changed

2 files changed

+225
-19
lines changed

public/index.html

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,88 @@ <h1>Digital Cash Wallet</h1>
398398
</th>
399399
<th data-name="need">0</th>
400400
</tr>
401+
<tr data-denom="10000">
402+
<th>
403+
<small><em>Collateral</em></small>
404+
</th>
405+
<th>
406+
<input
407+
name="priority"
408+
onkeyup="App.syncCashDrawer(event)"
409+
onchange="App.syncCashDrawer(event)"
410+
type="number"
411+
step="1"
412+
min="0"
413+
value="0"
414+
/>
415+
</th>
416+
<th data-name="have">0</th>
417+
<th>
418+
<input
419+
name="want"
420+
onkeyup="App.syncCashDrawer(event)"
421+
onchange="App.syncCashDrawer(event)"
422+
type="number"
423+
step="1"
424+
min="0"
425+
value="5"
426+
/>
427+
</th>
428+
<th data-name="need">0</th>
429+
</tr>
401430
</tbody>
402431
</table>
432+
433+
<hr />
434+
<label
435+
>Send Memo
436+
<small>hex-encoded op_return</small>
437+
<br />
438+
<label style="display: inline-block"
439+
><input
440+
type="radio"
441+
name="memo-encoding"
442+
value="hex"
443+
onchange="document.querySelector('[name=memo]').placeholder = 'ex: 48656c6c6f2c20576f726c6421'"
444+
checked="checked"
445+
/>
446+
hex
447+
</label>
448+
<label style="display: inline-block"
449+
><input
450+
type="radio"
451+
name="memo-encoding"
452+
value="string"
453+
onchange="document.querySelector('[name=memo]').placeholder = 'ex: Hello, World!'"
454+
/>
455+
string (utf-8)
456+
</label>
457+
<input
458+
type="text"
459+
name="memo"
460+
placeholder="ex: 48656c6c6f2c20576f726c6421"
461+
/>
462+
</label>
463+
<small
464+
>Share: <a href="" data-id="memo-link" target="_blank"></a
465+
></small>
466+
<pre><code data-id="memo-txid"><em>output: txid</em></code></pre>
467+
<button type="button" onclick="App.sendMemo(event)">Send Memo</button>
468+
469+
<hr />
470+
<label
471+
>Address for WIF Export
472+
<small>base58check-encoded pkh</small>
473+
<input
474+
type="text"
475+
data-id="export-address"
476+
placeholder="ex: ybLxVb3aspSHFgxM1qTyuBSXnjAqLFEG8P"
477+
/>
478+
</label>
479+
<pre><code data-id="export-wif"><em>output: private key as wif</em></code></pre>
480+
<button type="submit" onclick="App.exportWif(event)">
481+
Export WIF
482+
</button>
403483
</form>
404484
</section>
405485
<br />

0 commit comments

Comments
 (0)