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
Takuma Shinohara
August 04, 2023
Technology
0
310
NIP-78 nostr relay storage
Takuma Shinohara
August 04, 2023
Tweet
Share
More Decks by Takuma Shinohara
See All by Takuma Shinohara
MCPとは?
shinoharata
0
120
BlueskyMeetup in Fukuoka アイデアソン
shinoharata
1
110
BlueskyMeetup in Fukuoka アイデアソン結果発表
shinoharata
1
91
いまのBlueskyってどうなの
shinoharata
0
150
四谷ラボとは ※2025/05/31
shinoharata
0
140
What's is Bluesky
shinoharata
0
1.9k
dissolute fat
shinoharata
0
240
20240520_toranoana_lab.pdf
shinoharata
0
230
民主的なSNSは日本を救う
shinoharata
0
400
Other Decks in Technology
See All in Technology
【PyCon mini Shizuoka 2026】生成AI時代に画像処理やオーディオ処理のノードエディターを作る理由
kazuhitotakahashi
0
130
primeNumber DATA MANAGEMENT CAMP #2:
masatoshi0205
1
590
大規模な組織におけるAI Agent活用の促進と課題
lycorptech_jp
PRO
4
6.1k
AIエージェントで変わる開発プロセス ― レビューボトルネックからの脱却
lycorptech_jp
PRO
2
750
dbt meetup #19 『dbtを『なんとなく動かす』を卒業します』
tiltmax3
0
110
WBCの解説は生成AIにやらせよう - 生成AIで野球解説者AI Agentを実現する / Baseball Commentator AI Agent for Gemini
shinyorke
PRO
0
170
OCI技術資料 : 外部接続 VPN接続 詳細
ocise
1
10k
ソフトウェアアーキテクトのための意思決定術: Create Decision Readiness—The Real Skill Behind Architectural Decision
snoozer05
PRO
22
6.4k
社内でAWS BuilderCards体験会を立ち上げ、得られた気づき / 20260225 Masaki Okuda
shift_evolve
PRO
1
130
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.8k
もう怖くないバックグラウンド処理 Background Tasks のすべて - Hakodate.swift #1
kantacky
0
130
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
66k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
95
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Typedesign – Prime Four
hannesfritz
42
3k
A better future with KSS
kneath
240
18k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
110
Into the Great Unknown - MozCon
thekraken
40
2.3k
How to Ace a Technical Interview
jacobian
281
24k
Utilizing Notion as your number one productivity tool
mfonobong
3
230
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
450
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
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ばり便利