A free URL shortener service enabled by the NOSTR protocol, that is fast and fuss-free, stripped of all bells and whistles, no gimmicks—it just works!
Visit w3.do, the URL shortener service enabled by the NOSTR protocol.
const id = nanoid(8);
const event = new NDKEvent();
event.kind = 1994;
event.tags = [
["d", id],
["r", '<user input>'],
];
Why 1994?
Because URLs (Uniform Resource Locators) were defined in 1994 by Tim Berners-Lee, the inventor of the World Wide Web. [source: Wikipedia]
You can use this API to create a short URL.
GET https://w3.do/get?url=<url>
For example: https://w3.do/get?url=https://github.com/jinglescode/nostr-url-shortener
This will return a JSON response, for example:
{
"id":"xNQ8b0HZ",
"url":"w3.do/xNQ8b0HZ",
"eid":"a62729f9e11506183672f1e37bc4617af94636169b3c5b25db6c16b0cd05fbf1"
}
GET https://w3.do/check?url=<url>
Example: https://w3.do/check?url=https://github.com/jinglescode/nostr-url-shortener
GET https://w3.do/check?id=<id>
Example: https://w3.do/check?id=MSbbaU8l
GET https://w3.do/check?pubkey=<pubkey hex>
Example: https://w3.do/check?pubkey=efc37e97fa4fad679e464b7a6184009b7cc7605aceb0c5f56b464d2b986a60f0
-
Fund Raiser - Join the global community to support project on Geyser Fund, a crowdfunding platform. The funds will be used to pay for contributors and bounties.
-
Contribute - Contribute directly by submitting a pull request.
-
Try it and share it - Try the URL shortener service and share it.
- support to handle nostr slugs, like nevent, npub, note, nprofile
- something about njump? https://github.com/fiatjaf/njump
- use bech32 too, use nip89 to store user preferred client