diff options
| author | Adam Soltys <[email protected]> | 2026-08-03 07:42:24 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-03 07:42:24 -0700 |
| commit | 161adb250e4273d0bcaa160516bc950f5f46310f (patch) | |
| tree | a845b83adb75e33847f709c0d7d3e5ec3ee2ca95 /src/recipient-search.js | |
| parent | 848958e450a5b5aac95a2fcd981fd229da1d6190 (diff) | |
| download | coinosv3-161adb250e4273d0bcaa160516bc950f5f46310f.tar.gz coinosv3-161adb250e4273d0bcaa160516bc950f5f46310f.zip | |
Self-host the punks; skipping avatar still publishes your punk
coinos.io serves 502 for a third of the punk set (both the numbered and
hash endpoints), which is why a default avatar could come up blank. The
64 webps now ship with the app (53 salvaged, 11 gaps filled with
donors) and every reference is same-origin. Skipping the avatar step
publishes the deterministic punk as the kind-0 picture — your face is
the same on every nostr client. Success screen: checkmark now sits
below the title, bigger.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
Diffstat (limited to 'src/recipient-search.js')
| -rw-r--r-- | src/recipient-search.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/recipient-search.js b/src/recipient-search.js index 2594488..553673e 100644 --- a/src/recipient-search.js +++ b/src/recipient-search.js @@ -13,8 +13,10 @@ import { queryOn, parseNostrPubkey, npubOf, PROFILE_RELAYS } from './nostr.js'; // coinos punks: the deterministic default avatar — same formula the coinos // app uses (last byte of the pubkey picks one of 64). Initials show through // if the image can't load (offline). +// Self-hosted (dist/punks) — coinos.io's own copies 502 for a third of the +// set. Same deterministic formula the coinos app uses. export const punkUrl = (pk) => - `https://coinos.io/api/public/punks/${Math.floor((parseInt(pk.slice(-2), 16) / 256) * 64) + 1}.webp`; + `punks/${Math.floor((parseInt(pk.slice(-2), 16) / 256) * 64) + 1}.webp`; export const fallbackAvatar = (h, pk, name, cls) => h('div', { class: cls + ' fallback' }, |
