Introducing the ability to create instant tip links to lightning address by `shotr`

naddress: naddr1qvzqqqr4gupzqf4m96ldd32j6ecvsp9s6e2jv7euvc4jrcpx6mjg4jf6vpc9xz2cqqxnzdesxgurxv3cx5mnvvpstunvc7

To generate a link of the chip page for any lightning address function is added to `shotr` (BETA). [shotr](https://6or.cc/ln)


日本語の記事は後ろにあります。

The article in Japanese follows after in English.

TL;DR;

To generate a link of the chip page for any lightning address function is added to shotr (BETA).

shotr

As a sample, I have placed a shotr tip link at the bottom of the article below so you can try it out.

Monacard(モナカード)1 Advent Calendar 2023 day2

Problem

Custom schema like lnurp::// or lightning:// are very useful. Web Applications can be called up from Android or iOS using DeepLink by simply embedding them as links on a website, making it easy to set up tip buttons.

However, in the case of post-type blog services that are not self-hosted, you can embed https:// or http:// schema links, but arbitrary custom schema are often restricted and cannot be embedded.

Solution

The premise is that shotr is an application that when a generated URL is accessed, it calls the original URL stored as an event in the relay and redirects. Because, to shorten the URL.

Utilize this mechanism to save the Lightning address as an event in the relay instead of a URL, and use it as a redirector for the custom schema link of the Lightning address.

When you open the generated URL, the data of the target Lightning address is retrieved from the relay and displayed as a tip button. Also, a QR code is displayed in case DeepLink cannot be used when launched in a browser on a PC.

image

Points to remember

TL;DR;

任意のライトニングアドレスに対してのチップ画面のリンクを生成する機能をshotrに追加しました(BETA)。

shotr

サンプルとして以下の記事の最下部にshotrのTip linkを設置したので試すことができます。

Monacard(モナカード)1 Advent Calendar 2023 day2

課題

lnurp::// (LUD-17) もしくは lightning://のようなカスタムスキーマはとても便利である。Webサイトにリンクとして埋め込むだけでAndroidやiOSからアプリケーションをDeepLinkで呼び出すことができるため、手軽にTipボタンを設置することができる。

しかしセルフホステッドでない投稿型のブログサービスなどの場合https://もしくはhttp://のスキーマのリンクは埋め込めるが任意のカスタムスキーマは制限されている場合が多く埋め込むことができない。

解決方法

前提として、shotrは生成したURLにアクセスするとリレーにイベントとして保存した元のURLを呼び出してリダイレクトを行うアプリである。

これを仕組みを活用してライトニングアドレスをURLの代わりにリレーにイベントとして保存し、ライトニングアドレスのカスタムスキーマのリンクに対するリダイレクタとして利用する。

生成したURLを開くとリレーから対象のライトニングアドレスのデータを取得してTipボタンとして表示する。 また、PC上のブラウザで起動してDeepLinkが使用できない場合を考慮してQRコードを表示する。

image

留意点


Visit nostr-ssg-blog-template to read the documentation