diff options
| author | Adam Soltys <[email protected]> | 2026-08-17 08:12:34 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-17 08:12:34 -0700 |
| commit | b62ca1099ff996e333015142cb712687737d4637 (patch) | |
| tree | b385b675aefbf9718f8774fe0e94bda41256a614 /src/app.js | |
| parent | f6120c49d80e0c8f2103a9adfd928f7004645aaf (diff) | |
| download | coinosv3-b62ca1099ff996e333015142cb712687737d4637.tar.gz coinosv3-b62ca1099ff996e333015142cb712687737d4637.zip | |
The seed takes dice: an optional entropy field folds open on the generate step, hashed with the device's own randomness so it can only strengthen the phrase — and the forget option now says all data, which is what it takes
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -770,12 +770,28 @@ function createPane() { 'div', { class: 'col' }, h('p', { class: 'muted' }, t('genIntro')), + // BYO randomness for the seed — folded away so the common path stays + // one button. Whatever is typed here is hashed together with the + // device's own randomness (see newMnemonic), never used alone. + h('button', { + class: 'linklike small', style: 'align-self:flex-start', + onClick: () => { ui.ownEntropyOpen = !ui.ownEntropyOpen; render(); }, + }, (ui.ownEntropyOpen ? '▾ ' : '▸ ') + t('entropyToggle')), + ui.ownEntropyOpen + ? h('div', { class: 'col gap6' }, + h('p', { class: 'small muted', style: 'margin:0' }, t('entropyHint')), + h('textarea', { + rows: '2', style: 'font-family:var(--sans)', placeholder: t('entropyPlaceholder'), + autocapitalize: 'none', autocomplete: 'off', spellcheck: 'false', + value: ui.ownEntropy || '', onInput: (e) => (ui.ownEntropy = e.target.value), + })) + : null, h( 'button', { class: 'btn-primary btn-block', onClick: () => { - ui.draftMnemonic = newMnemonic(); + ui.draftMnemonic = newMnemonic(128, (ui.ownEntropy || '').trim()); render(); }, }, @@ -804,7 +820,7 @@ function createPane() { { class: 'btn-ghost btn-sm', onClick: () => { - ui.draftMnemonic = newMnemonic(); + ui.draftMnemonic = newMnemonic(128, (ui.ownEntropy || '').trim()); render(); }, }, |
