Skip to main content

bkb_core/
bitcoin.rs

1/// Bitcoin concept vocabulary, seeded from Optech topics.
2///
3/// Each concept has a slug (primary key), display name, category,
4/// and a list of aliases/keywords that trigger matching.
5
6/// A Bitcoin/Lightning concept definition.
7pub struct ConceptDef {
8	pub slug: &'static str,
9	pub name: &'static str,
10	pub category: &'static str,
11	pub aliases: &'static [&'static str],
12}
13
14/// The curated concept vocabulary.
15///
16/// Sourced from Bitcoin Optech's topic index with additional terms.
17/// This list covers the most commonly referenced Bitcoin and Lightning
18/// concepts across the ecosystem.
19pub const CONCEPTS: &[ConceptDef] = &[
20	// -- Soft forks & consensus --
21	ConceptDef {
22		slug: "taproot",
23		name: "Taproot",
24		category: "soft-fork",
25		aliases: &[
26			"taproot", "bip-340", "bip-341", "bip-342", "bip340", "bip341", "bip342", "schnorr",
27		],
28	},
29	ConceptDef {
30		slug: "segwit",
31		name: "Segregated Witness",
32		category: "soft-fork",
33		aliases: &["segwit", "segregated witness", "bip-141", "bip-143", "bip-144", "bip141"],
34	},
35	ConceptDef {
36		slug: "op-cat",
37		name: "OP_CAT",
38		category: "soft-fork",
39		aliases: &["op_cat", "op cat", "bip-347", "bip347"],
40	},
41	ConceptDef {
42		slug: "op-checktemplateverify",
43		name: "OP_CHECKTEMPLATEVERIFY",
44		category: "soft-fork",
45		aliases: &[
46			"op_checktemplateverify",
47			"op_ctv",
48			"ctv",
49			"bip-119",
50			"bip119",
51			"checktemplateverify",
52		],
53	},
54	ConceptDef {
55		slug: "op-checksigfromstack",
56		name: "OP_CHECKSIGFROMSTACK",
57		category: "soft-fork",
58		aliases: &["op_checksigfromstack", "op_csfs", "csfs", "checksigfromstack"],
59	},
60	ConceptDef {
61		slug: "covenants",
62		name: "Covenants",
63		category: "soft-fork",
64		aliases: &["covenant", "covenants"],
65	},
66	// -- Transactions & scripting --
67	ConceptDef {
68		slug: "miniscript",
69		name: "Miniscript",
70		category: "scripting",
71		aliases: &["miniscript", "mini script"],
72	},
73	ConceptDef {
74		slug: "descriptors",
75		name: "Output Script Descriptors",
76		category: "scripting",
77		aliases: &["descriptor", "descriptors", "output descriptor", "output descriptors"],
78	},
79	ConceptDef {
80		slug: "psbt",
81		name: "Partially Signed Bitcoin Transactions",
82		category: "transaction",
83		aliases: &["psbt", "bip-174", "bip174", "partially signed"],
84	},
85	ConceptDef {
86		slug: "rbf",
87		name: "Replace-By-Fee",
88		category: "transaction",
89		aliases: &["replace-by-fee", "replace by fee", "rbf", "bip-125", "bip125"],
90	},
91	ConceptDef {
92		slug: "cpfp",
93		name: "Child Pays for Parent",
94		category: "transaction",
95		aliases: &["cpfp", "child pays for parent", "child-pays-for-parent"],
96	},
97	ConceptDef {
98		slug: "package-relay",
99		name: "Package Relay",
100		category: "transaction",
101		aliases: &["package relay", "package-relay"],
102	},
103	ConceptDef {
104		slug: "cluster-mempool",
105		name: "Cluster Mempool",
106		category: "mempool",
107		aliases: &["cluster mempool", "cluster-mempool"],
108	},
109	ConceptDef {
110		slug: "v3-transactions",
111		name: "v3 Transactions",
112		category: "transaction",
113		aliases: &[
114			"v3 transaction",
115			"v3 transactions",
116			"topologically restricted until confirmation",
117			"truc",
118		],
119	},
120	ConceptDef {
121		slug: "ephemeral-anchors",
122		name: "Ephemeral Anchors",
123		category: "transaction",
124		aliases: &["ephemeral anchor", "ephemeral anchors", "ephemeral-anchors"],
125	},
126	// -- Lightning --
127	ConceptDef {
128		slug: "lightning",
129		name: "Lightning Network",
130		category: "lightning",
131		aliases: &["lightning network", "lightning"],
132	},
133	ConceptDef {
134		slug: "htlc",
135		name: "Hash Time-Locked Contract",
136		category: "lightning",
137		aliases: &["htlc", "hash time-locked contract", "hash time locked contract"],
138	},
139	ConceptDef {
140		slug: "ptlc",
141		name: "Point Time-Locked Contract",
142		category: "lightning",
143		aliases: &["ptlc", "point time-locked contract"],
144	},
145	ConceptDef {
146		slug: "channel-splicing",
147		name: "Channel Splicing",
148		category: "lightning",
149		aliases: &["splicing", "splice", "splice-in", "splice-out", "channel splicing"],
150	},
151	ConceptDef {
152		slug: "anchor-outputs",
153		name: "Anchor Outputs",
154		category: "lightning",
155		aliases: &["anchor output", "anchor outputs", "anchor channels", "anchor-outputs"],
156	},
157	ConceptDef {
158		slug: "bolt11",
159		name: "BOLT11 Invoices",
160		category: "lightning",
161		aliases: &["bolt11", "bolt-11", "bolt 11", "lightning invoice"],
162	},
163	ConceptDef {
164		slug: "bolt12",
165		name: "BOLT12 Offers",
166		category: "lightning",
167		aliases: &["bolt12", "bolt-12", "bolt 12", "offers", "lightning offers"],
168	},
169	ConceptDef {
170		slug: "onion-messages",
171		name: "Onion Messages",
172		category: "lightning",
173		aliases: &["onion message", "onion messages", "onion-messages"],
174	},
175	ConceptDef {
176		slug: "blinded-paths",
177		name: "Blinded Paths",
178		category: "lightning",
179		aliases: &["blinded path", "blinded paths", "blinded-paths", "route blinding"],
180	},
181	ConceptDef {
182		slug: "dual-funding",
183		name: "Dual Funding",
184		category: "lightning",
185		aliases: &["dual funding", "dual-funding", "interactive-tx"],
186	},
187	ConceptDef {
188		slug: "async-payments",
189		name: "Async Payments",
190		category: "lightning",
191		aliases: &["async payment", "async payments", "asynchronous payment", "async-payments"],
192	},
193	ConceptDef {
194		slug: "trampoline-routing",
195		name: "Trampoline Routing",
196		category: "lightning",
197		aliases: &["trampoline", "trampoline routing", "trampoline-routing"],
198	},
199	ConceptDef {
200		slug: "channel-jamming",
201		name: "Channel Jamming",
202		category: "lightning",
203		aliases: &["channel jamming", "channel-jamming", "jamming"],
204	},
205	// -- Privacy --
206	ConceptDef {
207		slug: "payjoin",
208		name: "Payjoin",
209		category: "privacy",
210		aliases: &["payjoin", "pay-join", "bip-78", "bip78", "p2ep"],
211	},
212	ConceptDef {
213		slug: "silent-payments",
214		name: "Silent Payments",
215		category: "privacy",
216		aliases: &["silent payment", "silent payments", "bip-352", "bip352"],
217	},
218	ConceptDef {
219		slug: "coinswap",
220		name: "Coinswap",
221		category: "privacy",
222		aliases: &["coinswap", "coin swap"],
223	},
224	// -- Wallet & key management --
225	ConceptDef {
226		slug: "musig2",
227		name: "MuSig2",
228		category: "cryptography",
229		aliases: &["musig", "musig2", "multi-signature", "multisig"],
230	},
231	ConceptDef {
232		slug: "frost",
233		name: "FROST",
234		category: "cryptography",
235		aliases: &["frost", "flexible round-optimized schnorr threshold"],
236	},
237	ConceptDef {
238		slug: "bip32",
239		name: "HD Wallets",
240		category: "wallet",
241		aliases: &["bip32", "bip-32", "hierarchical deterministic", "hd wallet"],
242	},
243	// -- P2P & network --
244	ConceptDef { slug: "erlay", name: "Erlay", category: "p2p", aliases: &["erlay"] },
245	ConceptDef {
246		slug: "compact-block-filters",
247		name: "Compact Block Filters",
248		category: "p2p",
249		aliases: &[
250			"compact block filter",
251			"compact block filters",
252			"bip-157",
253			"bip-158",
254			"bip157",
255			"bip158",
256			"neutrino",
257		],
258	},
259	ConceptDef {
260		slug: "assumeutxo",
261		name: "AssumeUTXO",
262		category: "validation",
263		aliases: &["assumeutxo", "assume utxo", "assume-utxo"],
264	},
265	// -- Additional Lightning --
266	ConceptDef {
267		slug: "keysend",
268		name: "Keysend",
269		category: "lightning",
270		aliases: &["keysend", "spontaneous payment", "spontaneous payments"],
271	},
272	ConceptDef {
273		slug: "watchtower",
274		name: "Watchtowers",
275		category: "lightning",
276		aliases: &["watchtower", "watchtowers", "breach remedy"],
277	},
278	ConceptDef {
279		slug: "eltoo",
280		name: "Eltoo",
281		category: "lightning",
282		aliases: &["eltoo", "sighash_anyprevout", "anyprevout", "bip-118", "bip118"],
283	},
284	ConceptDef {
285		slug: "lsp",
286		name: "Lightning Service Provider",
287		category: "lightning",
288		aliases: &["lsp", "lightning service provider", "lsps"],
289	},
290	ConceptDef {
291		slug: "channel-factory",
292		name: "Channel Factories",
293		category: "lightning",
294		aliases: &["channel factory", "channel factories", "joinpool", "joinpools"],
295	},
296	// -- Additional scripting --
297	ConceptDef {
298		slug: "timelock",
299		name: "Timelocks",
300		category: "scripting",
301		aliases: &[
302			"timelock",
303			"timelocks",
304			"cltv",
305			"csv",
306			"bip-65",
307			"bip65",
308			"bip-112",
309			"bip112",
310			"checklocktimeverify",
311			"checksequenceverify",
312		],
313	},
314	ConceptDef {
315		slug: "vaults",
316		name: "Vaults",
317		category: "scripting",
318		aliases: &["vault", "vaults", "bitcoin vault", "bitcoin vaults"],
319	},
320	// -- Protocols --
321	ConceptDef {
322		slug: "lnurl",
323		name: "LNURL",
324		category: "protocols",
325		aliases: &["lnurl", "lnurl-pay", "lnurl-withdraw", "lnurl-auth", "lnurl-channel"],
326	},
327	ConceptDef {
328		slug: "ecash",
329		name: "Ecash",
330		category: "protocols",
331		aliases: &["ecash", "e-cash", "cashu", "chaumian"],
332	},
333	ConceptDef {
334		slug: "dlc",
335		name: "Discreet Log Contracts",
336		category: "protocols",
337		aliases: &["dlc", "discreet log contract", "discreet log contracts"],
338	},
339	ConceptDef {
340		slug: "submarine-swap",
341		name: "Submarine Swaps",
342		category: "protocols",
343		aliases: &["submarine swap", "submarine swaps", "atomic swap", "atomic swaps"],
344	},
345	ConceptDef { slug: "nostr", name: "Nostr", category: "protocols", aliases: &["nostr", "nip"] },
346	// -- Additional wallet --
347	ConceptDef {
348		slug: "coin-selection",
349		name: "Coin Selection",
350		category: "wallet",
351		aliases: &["coin selection", "coin-selection", "utxo selection"],
352	},
353	ConceptDef {
354		slug: "codex32",
355		name: "Codex32",
356		category: "wallet",
357		aliases: &["codex32", "bip-93", "bip93"],
358	},
359	// -- Additional cryptography --
360	ConceptDef {
361		slug: "threshold-signature",
362		name: "Threshold Signatures",
363		category: "cryptography",
364		aliases: &["threshold signature", "threshold signatures", "tss"],
365	},
366];