
A header that says Dogecoin accepted
Pick a style and a text. Add a QR code that opens your tip page, so people can tip from your profile.
- Sized 1500 by 500, the size X asks for
- Two texts, so the header always fits
- The QR code leads to your tip page
DogeJS / Doge on X / Header and avatar
A header image that says Dogecoin accepted or Tips in DOGE, and your photo with a Dogecoin ring.
Free, no account, nothing leaves your browser. For developers: the docs

What you get

Pick a style and a text. Add a QR code that opens your tip page, so people can tip from your profile.
Choose a photo and get it back as a round avatar with a gold Dogecoin ring, 400 by 400.

Two texts, Dogecoin accepted or Tips in DOGE, and three colours: gold, night and cream. The QR code is optional.

Post it with one tap. The post box opens with the words filled in. Attach the header and press Post.

Choose the header text and look.
Get the avatar with the coin ring.

Set them under Edit profile.
No. It is read and drawn in your browser; nothing leaves your device.
The header is 1500x500 and the avatar 400x400, the sizes X asks for.
To your tip page, the same link as your bio. Without an address there is no QR code.
Two texts are offered so the header always fits and reads well.
No. The page never connects to your X account. You download the images and upload them on X yourself.
No. DogeJS is an independent project and is not affiliated with X Corp. The tools only open X's own post box with the text filled in; you press Post yourself.
For developers
What the images are, how they are drawn in the browser, and what the QR code holds.
tipLink).How the card renderer works: card renderer.
The package is @dogejs/xkit. It is not on npm yet: install it from its repository tag, then import the helpers. They are plain functions with no DOM at module level, so they run in Node 20+, in browsers and in workers.
npm install github:DogeJS-Dev/doge-on-x#v0.2.0import { tipLink, decodeLink, checkProof, draw, postIntentUrl } from '@dogejs/xkit';The drawing code is browser-only and lives in src/pages/profile.ts and src/canvas.ts; the links and texts it uses are in the package.
Each example runs in Node against the built package; the output is recorded from that run and checked by npm run examples.
The tip link inside the QR code, the bio line, the profile link and the composer link. File examples/profile-links.mjs; run: node examples/profile-links.mjs.
// What the header's QR code holds, and the post that shows the new header off.
import { addressNetwork, bioLine, postIntentUrl, profilePost, profileUrl, tipLink } from '@dogejs/xkit';
const address = 'nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt'; // a test network address
const record = { handle: 'dogejs_demo', address, network: addressNetwork(address) };
console.log('QR code ->', tipLink(record));
console.log('bio ->', bioLine(record));
console.log('profile ->', profileUrl(record.handle));
console.log(postIntentUrl({ text: profilePost(), url: tipLink(record) }));QR code -> https://dogejs.com/x/t/#1~dogejs_demo~nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt~2bb48547
bio -> Tips in Dogecoin: dogejs.com/x/t/#1~dogejs_demo~nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt~2bb48547
profile -> https://x.com/dogejs_demo
https://x.com/intent/post?text=New%20header%2C%20now%20with%20Dogecoin.%20Tips%20in%20DOGE%20welcome.%20Wow.%20%23Dogecoin&url=https%3A%2F%2Fdogejs.com%2Fx%2Ft%2F%231%7Edogejs_demo%7EnUCAGGgZEPN1QyknmQe1oAku817bQAFKFt%7E2bb48547A minimal header with the plain Canvas API, run in Chrome: the X path, a title that shrinks to fit, a PNG. File examples/header-canvas.html; run: Open it in a browser.
<!doctype html>
<meta charset="utf-8">
<title>Draw an X header in the browser</title>
<canvas id="c" width="1500" height="500" style="width:100%;max-width:750px"></canvas>
<pre id="out"></pre>
<script>
// The same steps as the header kit: fixed size, fonts first, text measured before drawing, PNG out.
// The X mark is the unmodified logo path (viewBox 0 0 1200 1227), only scaled and filled.
const X_PATH = 'M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z';
async function drawHeader(canvas, { title, handle }) {
const ctx = canvas.getContext('2d');
await document.fonts.ready; // the kit waits for its web fonts here
ctx.fillStyle = '#FDC606';
ctx.fillRect(0, 0, canvas.width, canvas.height);
// X mark, 160 px high, top-left at (90, 90)
ctx.save();
ctx.translate(90, 90);
ctx.scale(160 / 1227, 160 / 1227);
ctx.fillStyle = '#000';
ctx.fill(new Path2D(X_PATH));
ctx.restore();
// the title shrinks until it fits 1000 px
let size = 110;
do ctx.font = `900 ${size}px system-ui, sans-serif`; while (ctx.measureText(title).width > 1000 && --size > 40);
ctx.fillStyle = '#2F220C';
ctx.fillText(title, 300, 230);
ctx.font = '700 44px system-ui, sans-serif';
ctx.fillText('@' + handle, 300, 320);
return new Promise((resolve) => canvas.toBlob(resolve, 'image/png'));
}
drawHeader(document.getElementById('c'), { title: 'Dogecoin accepted here', handle: 'dogejs_demo' }).then((blob) => {
const c = document.getElementById('c');
document.getElementById('out').textContent = `${c.width}x${c.height} ${blob.type} ${blob.size > 10000 ? 'ok' : 'too small'}`;
});
</script>1500x500 image/png okThe same checks the form uses before the QR code is drawn. File examples/inputs.mjs; run: node examples/inputs.mjs.
// Read what people type into a tip-jar form, the way the tip page does.
import { addressHint, addressNetwork, handleHint, looksSecret, parseHandle } from '@dogejs/xkit';
for (const typed of ['@dogejs_demo', 'https://twitter.com/dogejs_demo/', 'doge js', 'much_too_long_name_here']) {
const h = parseHandle(typed);
console.log(JSON.stringify(typed), '->', h ?? handleHint(typed));
}
for (const typed of ['DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L', 'nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt', 'DH5yaieqoZN36fDVciNyRueRGvGLR3mr7', 'bc1qexampleexampleexample']) {
console.log(typed.slice(0, 12) + '...', '->', addressNetwork(typed) ?? addressHint(typed));
}
// A pasted recovery phrase or private key is recognised so the page can clear it and never keep it.
console.log(looksSecret('abandon ability able about above absent absorb abstract absurd abuse access accident'));"@dogejs_demo" -> dogejs_demo
"https://twitter.com/dogejs_demo/" -> dogejs_demo
"doge js" -> A username has no spaces.
"much_too_long_name_here" -> X usernames have at most 15 characters.
DH5yaieqoZN3... -> mainnet
nUCAGGgZEPN1... -> testnet
DH5yaieqoZN3... -> Not finished yet. A Dogecoin address has 34 characters and starts with D.
bc1qexamplee... -> That is not a Dogecoin address. Dogecoin addresses start with D.
trueThe exports this page uses. The full list is on the Doge on X developer page.
| Export | Returns | What it does |
|---|---|---|
tipLink(record, base?) | string | base + /x/t/# + fragment; base defaults to https://dogejs.com. |
proofLink(record, base?) | string | base + /x/proof/# + fragment. |
bioLine(record, base?) | string | Tips in Dogecoin: dogejs.com/x/t/#..., always without the proof so it stays short. |
pinnedPost(), proofPost(handle, address), pricePost(headline, line), wowPost(line), profilePost(), lockPost(commit, entries), winnersPost(winners, commit) | string | The texts the pages prefill in the composer; each stays under 240 with its link. |
SITE, PAGES | 'https://dogejs.com', { hub, tip, tipPage, proof, price, wow, profile, giveaway } | The site and the page paths. |
| Export | Returns | What it does |
|---|---|---|
parseHandle(input) | string | null | Reads "@name", "name", "x.com/name" or "https://twitter.com/name" as a handle (1 to 15 of A-Z a-z 0-9 _), or null. |
handleHint(input) | string | A plain sentence saying what is wrong with a handle that is not valid yet. |
sameHandle(a, b) | boolean | Compares two handles without case, as X does. |
profileUrl(handle) | string | https://x.com/<handle> |
parsePostUrl(input, handle) | { ok: true, id } | { ok: false, reason } | Accepts only an https x.com or twitter.com status link whose path names the same handle (any case). Refuses look-alike hosts, user:password@, other ports and non-status paths. |
postUrl(handle, id) | string | https://x.com/<handle>/status/<id> |
HANDLE_RE | RegExp | /^[A-Za-z0-9_]{1,15}$/ |
| Export | Returns | What it does |
|---|---|---|
addressNetwork(address) | 'mainnet' | 'testnet' | null | The network of a valid Dogecoin address (checksum checked by @dogejs/core), or null. |
addressHint(value) | string | A plain sentence for an address that is not valid yet (too short, another coin, spaces...). |
looksSecret(value) | boolean | True for a private key (WIF, hex), an extended private key or a recovery phrase. The pages clear such input and never keep it. |
Everything is static files. The page scripts are built from DogeJS-Dev/doge-on-x; the HTML and CSS of the pages are in DogeJS-Dev/website under site/x/.
git clone https://github.com/DogeJS-Dev/doge-on-x
cd doge-on-x
npm install
npm run build # dist/x-tip.js, x-t.js, x-proof.js, x-price.js, x-wow.js, x-profile.js, x-giveaway.js
npm test # unit tests
npm run examples # runs every example on this page and compares its outputsite/x/ from the website repository (the product page of each tool is x/<tool>/, the tool itself x/<tool>/app/), with ui.css, apps.css, styles.css, site.js, pay.js (tip pages) and signin.js (proof page) from the site root, and the images the pages name.dist/x-*.js next to the pages as site/x/x-*.js.What changes on your own host: the pages write links for the host they are served from (so your tip links point to your copy), and proofs are signed for your host. A proof page accepts proofs signed for dogejs.com and for its own host, nothing else. To make another host the default for links built in code, pass it as the base argument of tipLink, proofLink and bioLine, and the hosts you accept as allowedHosts of checkProof.