Type your X username and your Dogecoin address. The page checks both while you type, so a typo shows up before you share anything.
Type the username any way you like: @name, a profile link or the plain name
The address is checked for typos and for the right network
Nothing is uploaded: your name and address live inside the link
A bio line ready to paste
You get one short line for your bio and a link for the Website box. It is short enough for the 160 characters X allows.
Copy the whole bio line or just the link
Open the tip page first to see what fans will see
Make a new link any time you change your address
Pin a tip post
One button opens the X post box with the words and the link already filled in. You look it over and press Post yourself.
We never read your account or post for you
The text fits X's 280 characters, with the link counted the way X counts it
Works on a phone and on a computer
Add a green Proof badge
Anyone can make a link with any name, so tip pages say Claimed. Sign once with your wallet and your page shows a green Proof badge.
Paste the proof link under Advanced
Fans can check the proof themselves in their browser
Optional: the tip jar works without it
How it works
Type your name and address
The page checks both and writes them into a link.
Copy the bio line and post
Paste it into your X bio and pin the tip post.
Fans tip from any wallet
They pick an amount and pay straight to your address.
Questions
Why does my tip page say Claimed?
Anyone can make a link with any name. Make a proof and add it under Advanced to get the green Proof badge.
Is the link short enough for a bio?
Yes. The bio line is at most 95 characters, even with a 15-character username; an X bio holds 160. If a link ever arrives cut short, the CRC catches it and the tip page says the link looks cut short instead of showing anything.
Can I use a test network address?
Yes, for trying it out: the page and the tip page label it Test network.
Do you take a fee?
No. Tips go from the fan's wallet straight to your address.
What if I change my address?
Make a new link and replace the old one in your bio. Old links keep pointing to the old address.
Do I need an account or an API key?
No. Everything is inside the link, and nothing is stored on a server.
Is this made by X?
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.
The format of a tip link, how to build and read one in code, and how the tip page works.
How it works
The page checks the username (1 to 15 letters, digits, underscores) and the address (checksum, network).
It writes both into a link: https://dogejs.com/x/t/#1~dogejs_demo~DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L~7a2ff36e. The last field is a CRC-32 that catches cut links.
The bio line is that link without https:// after "Tips in Dogecoin:". "Post on X" opens X's composer with a pinned-post text and the link.
The tip page (/x/t/) reads the fragment in the browser, shows the account as Claimed, or with a green Proof badge when the link carries a checked proof and post, and embeds the <doge-pay> button for the chosen amount. Payments go straight from the fan's wallet to the address.
Nothing is stored anywhere: change the address by making a new link. The field rules are on the link format section.
Use it in your own code
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.
Put a tip button on your own site with the same link as your bio:
HTML
<a href="https://dogejs.com/x/t/#1~dogejs_demo~DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L~7a2ff36e">Tip me in DOGE</a>
Or build links for many accounts in code (for a community page, say) with tipLink, and read links people paste with decodeLink.
Code examples
Each example runs in Node against the built package; the output is recorded from that run and checked by npm run examples.
Build and read a tip-jar link
From a typed handle and an address to the link, the bio line and back. File examples/tip-link.mjs; run: node examples/tip-link.mjs.
JavaScript
// Build an X tip-jar link, the bio line, and read the link back.import { addressNetwork, bioLine, decodeLink, encodeRecord, parseHandle, tipLink } from'@dogejs/xkit';
const handle = parseHandle('https://x.com/dogejs_demo'); // also "@dogejs_demo" or "dogejs_demo"const address = 'DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L';
const record = { handle, address, network: addressNetwork(address) }; // "mainnet"
console.log(encodeRecord(record)); // the part after "#"
console.log(tipLink(record)); // the page fans open
console.log(bioLine(record)); // what goes in the X bioconst read = decodeLink(tipLink(record));
console.log(read.ok, read.record.handle, read.record.network);
Output
1~dogejs_demo~DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L~7a2ff36e
https://dogejs.com/x/t/#1~dogejs_demo~DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L~7a2ff36e
Tips in Dogecoin: dogejs.com/x/t/#1~dogejs_demo~DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L~7a2ff36e
true dogejs_demo mainnet
Check what people type
The same checks as the form: handles typed many ways, addresses, and a pasted secret that must be cleared. File examples/inputs.mjs; run: node examples/inputs.mjs.
JavaScript
// 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'));
Output
"@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.
true
The pinned post
The "Post on X" link of step 2: text and link, counted like X counts it. File examples/composer.mjs; run: node examples/composer.mjs.
JavaScript
// Build a post-composer link: X opens with the text filled in, the person presses Post.import { addressNetwork, pinnedPost, postIntentUrl, tipLink, xLength } from'@dogejs/xkit';
const address = 'DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L';
const url = tipLink({ handle: 'dogejs_demo', address, network: addressNetwork(address) });
const text = pinnedPost();
console.log(text);
console.log('counts as', xLength(text, 1), 'of 280'); // X counts every link as 23
console.log(postIntentUrl({ text, url }));
try {
postIntentUrl({ text: 'wow '.repeat(80) });
} catch (e) {
console.log('refused:', e.message);
}
Output
Tip me in Dogecoin 🐕 Pick an amount, pay from any Dogecoin wallet. Much thanks. Wow. #Dogecoin
counts as 119 of 280
https://x.com/intent/post?text=Tip%20me%20in%20Dogecoin%20%F0%9F%90%95%20Pick%20an%20amount%2C%20pay%20from%20any%20Dogecoin%20wallet.%20Much%20thanks.%20Wow.%20%23Dogecoin&url=https%3A%2F%2Fdogejs.com%2Fx%2Ft%2F%231%7Edogejs_demo%7EDH5yaieqoZN36fDVciNyRueRGvGLR3mr7L%7E7a2ff36e
refused: post too long
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}$/
Addresses src/address.ts
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.
Post composer src/intent.ts
Export
Returns
What it does
postIntentUrl({ text, url? })
string
https://x.com/intent/post?text=...&url=.... Throws if it would not fit in 280 (X's count) or the url is not http(s).
followIntentUrl(handle)
string
https://x.com/intent/follow?screen_name=...
xLength(text, urls?)
number
Length as X counts it: most Latin characters 1, CJK and emoji 2, each link 23.
fitPost(text, hasUrl, limit?)
string
Cuts a text at a word so text plus link fits limit (default 240), ending with an ellipsis.
POST_LIMIT, URL_WEIGHT, OUR_LIMIT
280, 23, 240
X's limit, the weight of a link, the limit our texts keep to.
Self-hosting
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/.
Shell
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 output
Copy site/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.
Put the built dist/x-*.js next to the pages as site/x/x-*.js.
Serve the folder from any static host. Nothing else is needed: no database, no keys, no X API.
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.