執筆者:望月 紀生(HashHubインターン:@mochiblock)
ライトニングネットワークでのコインの送受信はインボイス支払い型のため、通常のビットコインオンチェーンのように相手アドレスに対して勝手に投げ銭などができない側面があります。インボイスは使い捨てで、支払いがあったインボイスに対して再度支払いができない仕様になっています。そこで今回はインボイスの作成をちょっと工夫して、投げ銭ができるようにしたいと思います。また、インボイスの主要なフィールド情報についても取り上げたいと思います。
宮本です。12月に入ってから寒すぎて鬱が加速しています。サウナで自律神経を整えることで乗り切ろうとしています。いいですねサウナ。この間初めてロウリュというのを体験したんですが、大量のおっさんが熱風を受けて「ッシャア…」 「ッエェイ…」などと鳴き声をあげる様は中々の迫力で見応えがありました。
そんなことは置いといて、今回は最近出たあたらしいBIPについて書きます。汎用メッセージ署名フォーマットというものです。地味だけど超重要なやつです。日本語情報がないので書きます。
はじめに
基礎的な内容なので、知っている方は飛ばしてください。
ビットコインはトランザクション(TX)と呼ばれるデータの単位を使って、送金を行うわけですが、TXにはインプットとアウトプットが存在します。
アウトプットはscriptPubKeyと呼ばれるスクリプトを、インプットはscriptSigというスクリプトをそれぞれ格納しています。