Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
NIP-78 nostr relay storage
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Takuma Shinohara
August 04, 2023
Technology
320
0
Share
NIP-78 nostr relay storage
Takuma Shinohara
August 04, 2023
More Decks by Takuma Shinohara
See All by Takuma Shinohara
Bluesky Meetup in Tokyo vol.4 - 2023to2026
shinoharata
0
230
MCPとは?
shinoharata
0
150
BlueskyMeetup in Fukuoka アイデアソン
shinoharata
1
130
BlueskyMeetup in Fukuoka アイデアソン結果発表
shinoharata
1
110
いまのBlueskyってどうなの
shinoharata
0
170
四谷ラボとは ※2025/05/31
shinoharata
0
170
What's is Bluesky
shinoharata
0
2k
dissolute fat
shinoharata
0
260
20240520_toranoana_lab.pdf
shinoharata
0
250
Other Decks in Technology
See All in Technology
TSKaigi 2026 - 10秒のビルドを1秒へ:tsdownが切り拓く2026年のTypeScriptライブラリ開発
teamlab
PRO
2
270
freee-mcpを Local→Remote で出してわかった MCP認可実装のリアル
terara
3
640
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
400
Harnessing the Power of Mocks and Stubs in PHPUnit / #laravellivejp
asumikam
0
590
CloudFront VPCオリジンとVPC Latticeサービスの内部ALBをマルチアカウントで一元利用しよう
duelist2020jp
5
240
TypeScriptはどのようにどこまで推論できるのか ─ とにかく as は禁止で
ypresto
3
430
コーディングエージェントはTypeScriptの 型エラーをどう自己修正しているのか
melonps
4
490
Anthropic AIネイティブ・スタートアップ構築のプレイブック を理解する
nagatsu
0
190
その英語学習、AWSで代替できませんか?
suzutatsu
1
250
Javaで学ぶSOLID原則
negima
1
130
Oracle Cloud Infrastructure:2026年5月度サービス・アップデート
oracle4engineer
PRO
1
110
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
190
Featured
See All Featured
HDC tutorial
michielstock
2
670
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to Ace a Technical Interview
jacobian
281
24k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
Building Applications with DynamoDB
mza
96
7k
Designing Powerful Visuals for Engaging Learning
tmiket
1
380
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
RailsConf 2023
tenderlove
30
1.4k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
340
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Transcript
NIP-78 nostr relay storage 2023/08/04 – t.shinohara
NIP-78
アプリケーション固有データ / 任意のアプリ独自データ 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78
特徴 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78 NIP-33 (kind: 30023) の拡張 有名な例 :
Nosli contentや、d以外のタグ利用は何でも OK
リレーをストレージと して使用したいという 思惑? 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78
Key-value storageとして使え たら便利じゃ ん!!!!!!! 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78
作った!!!
None
タイムラインの流速を 計測したい
なんで?
タイムラインの流速を 計測したい から
計測データどうする?
Firebase cloud firestore
手間!!!
維持管理!!
なら
リレーに保存しよう 唐突に流れる NIP-78
投げるコードは
殆どが 演習の 1-3
神様ありがとう
どうやって保存してい るの?
データ 構造 const ev = { kind: 30078, content: "none",
tags: [ ["d", "table_name"], ["title", "table_title"], ["t", "table_name"], ["202308041938", "20"], ["202308041938", "17"], ... // 続く ], created_at: currUnixtime(), };
一時的に保存したい データを Post します
僕の使い方
Key-value Storage
なにこれ?
名前:データ で 保存したいものが ひも付きます
Key-value Storage データ 識別名 データ 識別名 データ 識別名 データ 識別名
データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名
よくある使い方
コード例 const value = getKeyValueStorage(key);
Nostr の NIP-78 使用したライブラリあ るかな?
npm で検索
None
None
None
ないやんけ!!!
作ろ!!
仕 様 検 討 • Key-Values Storage としての利用 • Post
は nostr-tools 等に任せる想定 • 欲しい機能 • DB 初期化 • Get All Table • Get Table • Get Item • Create Table • Insert Table • Update Table • Clear Table
作ってみて
Get Table 便利
Upsert Table 便利
今思っていること
・ Update, Insert 時にテーブルがなかった ら? 自動生成して欲しい ・ テーブルの存在検査をしてから、 テーブル定義を作りたい (なかったら初期化コマンド実行したいなど)
早速つかっています。
野洲田川水系 定点観測所 https://nostr-hotter- site.vercel.app/
None
NIP-78ばり便利