Skip to content

Commit b8a3b2a

Browse files
buffrrgitbook-bot
authored andcommitted
GITBOOK-18: No subject
1 parent eaf9868 commit b8a3b2a

13 files changed

+3177
-14
lines changed

.gitbook/assets/Fabric bg (1).svg

+1,475
Loading

.gitbook/assets/Fabric bg.svg

+1,475
Loading

.gitbook/assets/alice-npub-resolve.svg

+12
Loading

.gitbook/assets/illustr.png

18 KB
Loading

.gitbook/assets/illustr.svg

+12
Loading

README.md

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
2-
icon: hand-wave
2+
icon: bitcoin
3+
cover: .gitbook/assets/Fabric bg (1).svg
4+
coverY: 0
35
layout:
6+
cover:
7+
visible: true
8+
size: full
49
title:
510
visible: true
611
description:
@@ -13,19 +18,23 @@ layout:
1318
visible: true
1419
---
1520

16-
# Welcome
21+
# Spaces on Bitcoin
22+
23+
_Spaces_ are nice & memorable sovereign handles anchored in Bitcoin with minimal on-chain footprint. They are easier to share compared to an [`npub`](https://github.com/nostr-protocol/nips/blob/master/19.md#bare-keys-and-ids), and can be used to sign things just like a regular public key! 
24+
25+
26+
27+
<figure><img src=".gitbook/assets/alice-npub-resolve.svg" alt=""><figcaption></figcaption></figure>
1728

18-
_Spaces_ are community identifiers; think of them as top-level domains such as ".com", ".org", and ".net". Every _Space_ is represented as a [Bitcoin UTXO](https://mirror.xyz/0xaFaBa30769374EA0F971300dE79c62Bf94B464d5/Yetu-6pZkbQCOpsBxswn_7dGUZDxoBU8NrOQIZScwpg) (Unspent Transaction Output), and can operate millions of decentralized identities underneath called _subspaces_. There are only about 3600 community spaces released per year, acquired through permissionless auctions on the Bitcoin blockchain.
1929

20-
<figure><picture><source srcset=".gitbook/assets/handles-dark.png" media="(prefers-color-scheme: dark)"><img src=".gitbook/assets/handles-light.png" alt=""></picture><figcaption><p>alice, bob and mike are subspaces or identities within the communities @nostr, @bitcoin and @x</p></figcaption></figure>
2130

2231
## What makes spaces special?
2332

24-
Unlike _Bitcoin-themed_ naming systems such as ones based on RSK and STX, Spaces are Bitcoin UTXOs secured directly by the Bitcoin blockchain and have the following properties:
33+
Spaces are anchored in Bitcoin, the most secure Proof-of-Work blockchain, and have the following properties:
2534

26-
* Spaces are community identifiers, capped at \~3600 per year, acquired through permissionless auctions on the Bitcoin blockchain.
27-
* Each _Space_ is a community that may operate a registry for issuing Bitcoin identities known as _subspaces_.
28-
* Spaces AND subspaces (once allocated) are permissionless and as secure as Bitcoin itself! No bridges, slashing, or optimistic security.
35+
* Primary spaces are community identifiers, capped at \~3600 per year, acquired through permissionless auctions on the Bitcoin blockchain.
36+
* Each primary _Space_ is a community that may issue sovereign handles off-chain known as _subspaces._
37+
* Spaces AND subspaces (once allocated) are permissionless and as secure as Bitcoin itself! No bridges, slashing, or any kind of optimistic security.
2938
* The spaces protocol is designed with zk-light clients in mind making these identities verifiable on resource constrained devices.
3039
* Subspaces do not need to trust the community operator once allocated, and they can do 100% of their transactions on-chain if they wish.
3140
* Minimal on-chain footprint.
@@ -36,4 +45,4 @@ For full verification, you can sync the entire spaces protocol with a pruned Bit
3645

3746
## Jump right in
3847

39-
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting Started</strong></td><td>Download and install spaces</td><td><a href=".gitbook/assets/coversgetstarted.png">coversgetstarted.png</a></td><td></td><td><a href="getting-started/quickstart.md">quickstart.md</a></td></tr><tr><td><strong>Deep Dive</strong></td><td>Understand how the protocol works</td><td><a href=".gitbook/assets/coversdeepdive.png">coversdeepdive.png</a></td><td></td><td><a href="deep-dive/spec.md">spec.md</a></td></tr><tr><td><strong>Explorer</strong></td><td>Checkout the explorer</td><td><a href=".gitbook/assets/coversexplorer.png">coversexplorer.png</a></td><td></td><td><a href="https://explorer.spacesprotocol.org">https://explorer.spacesprotocol.org</a></td></tr></tbody></table>
48+
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting Started</strong></td><td>Download and install spaces</td><td><a href=".gitbook/assets/Fabric bg (1).svg">Fabric bg (1).svg</a></td><td></td><td><a href="getting-started/quickstart.md">quickstart.md</a></td></tr><tr><td><strong>Deep Dive</strong></td><td>Understand how the protocol works</td><td><a href=".gitbook/assets/Fabric bg (1).svg">Fabric bg (1).svg</a></td><td></td><td><a href="deep-dive/spec.md">spec.md</a></td></tr><tr><td><strong>Explorer</strong></td><td>Checkout the explorer</td><td><a href=".gitbook/assets/Fabric bg (1).svg">Fabric bg (1).svg</a></td><td></td><td><a href="https://explorer.spacesprotocol.org">https://explorer.spacesprotocol.org</a></td></tr></tbody></table>

SUMMARY.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Table of contents
22

3-
* [Welcome](README.md)
3+
* [Spaces on Bitcoin](README.md)
44

55
## Getting Started
66

7-
* [Quickstart](getting-started/quickstart.md)
7+
* [Quick start](getting-started/quickstart.md)
8+
* [Fabric DHT](getting-started/fabric-dht.md)
89
* [Auctions](getting-started/auctions.md)
910
* [Name resolution](getting-started/resolver.md)
1011
* [Subspaces](getting-started/subspaces.md)

deep-dive/spec.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
description: A low level overview of the spaces protocol but not an exact spec!
3+
cover: ../.gitbook/assets/Fabric bg (1).svg
4+
coverY: 0
35
---
46

57
# Spec

getting-started/auctions.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
cover: ../.gitbook/assets/Fabric bg (1).svg
3+
coverY: 0
4+
---
5+
16
# Auctions
27

38
Spaces enable auctions with arbitrary bids implemented directly on the Bitcoin blockchain. Auctions are designed as a fair competition for naming rights. Instead of distributing spaces on a first-come, first-served basis, the protocol employs a bidding system. This approach helps ensure that valuable names don't all end up concentrated in the hands of a few quick actors.

getting-started/fabric-dht.md

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
cover: ../.gitbook/assets/Fabric bg (1).svg
3+
coverY: 0
4+
layout:
5+
cover:
6+
visible: true
7+
size: full
8+
title:
9+
visible: true
10+
description:
11+
visible: true
12+
tableOfContents:
13+
visible: true
14+
outline:
15+
visible: true
16+
pagination:
17+
visible: true
18+
---
19+
20+
# Fabric DHT
21+
22+
Fabric enables you to sign Nostr events, and DNS records with a Bitcoin sovereign handle (a `space`), or a public key (an `npub`), and publish them to the Fabric peer-to-peer network without adding any bloat to the Bitcoin blockchain!
23+
24+
## Who can use it?
25+
26+
* **Own a Space?** Publish forward records tied to your handle e.g., `@example`. To grab one, see [quick start](quickstart.md) or buy one from a [secondary marketplace](https://spaces.market).
27+
* **No Space? No Problem!** Use your `npub` to publish Nostr events (like NIP-65 relay lists) instead.
28+
29+
```
30+
npm install -g @spacesprotocol/fabric
31+
```
32+
33+
and verify installation
34+
35+
```
36+
fabric --version
37+
beam --version
38+
```
39+
40+
By default, the `beam` tool will try to load trust anchors from `http://127.0.0.1:7225/root-anchors.json` to verify space handles. If you don't have a spaces [spaces client](https://github.com/spacesprotocol/spaces), you can load the file from an external source that you trust e.g.
41+
42+
```
43+
export FABRIC_REMOTE_ANCHORS=https://bitpki.com/root-anchors.json
44+
```
45+
46+
Don't trust, verify! Run your own Bitcoin full node and spaces client.\
47+
48+
49+
#### DNS Records
50+
51+
```
52+
beam <space> <record-type>
53+
```
54+
55+
For example:
56+
57+
```
58+
beam @buffrr TXT
59+
```
60+
61+
#### Nostr events
62+
63+
```
64+
beam <space-or-pubkey> <event-kind> <optional-d-tag>
65+
```
66+
67+
68+
69+
## Publishing records by handle
70+
71+
If you own a space, you can publish forward records resolvable by your handle e.g. `@example`
72+
73+
### Publish DNS records
74+
75+
{% hint style="info" %}
76+
Spaces use the DNS class code 2 (CLASS2) to further distinguish them from regular domains in the IN class.
77+
{% endhint %}
78+
79+
1. **Create a zone file**:
80+
81+
Add your records to a file and save it e.g. `myexample.zone`
82+
83+
```
84+
@example. 3600 CLASS2 TXT "Hello Fabric"
85+
@example. 3600 CLASS2 A 127.0.0.1
86+
```
87+
88+
Remember to replace `@example`with your space name, and remember to put the `.`at the end. It's not a typo in DNS zone files!
89+
90+
2. **Sign the file**
91+
92+
```
93+
space-cli signzone myexample.zone > signed.event.json
94+
```
95+
96+
The wallet will turn it into a signed Nostr event and bundles proof information to make it ready for publishing to Fabric.
97+
98+
3. **Publish it with** `beam`
99+
100+
```
101+
beam publish signed.event.json
102+
```
103+
104+
### Publish Nostr Events
105+
106+
To sign a forward event (lookup by a space handle), you could do the following:
107+
108+
Note: there's no standard yet for using kind 0 for forward lookups yet but it's here as an example.
109+
110+
```
111+
{
112+
"kind": 0,
113+
"created_at": 1679673265,
114+
"content": "{\"name\": \"Alice\", \"about\": \"A Nostr enthusiast\", \"picture\": \"https://example.com/avatar.jpg\"}",
115+
"tags": []
116+
}
117+
```
118+
119+
```
120+
space-cli signevent @example event.json --anchor > event.signed.json
121+
```
122+
123+
For lookups by handle, you should use the `--anchor`option to include trust path information and append the `space`tag to the event.
124+
125+
```
126+
beam publish event.signed.json
127+
```
128+
129+
## Publishing records by pubkey
130+
131+
If you have an `npub`, you could publish events on Fabric. This is still experimental and no Nostr client supports lookups through Fabric yet. Here's an example publishing a NIP-65 relay list:&#x20;
132+
133+
```
134+
{
135+
"kind": 10002,
136+
"created_at": 1679673265,
137+
"pubkey": "97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322",
138+
"tags": [
139+
["r", "wss://alicerelay.example.com"],
140+
["r", "wss://brando-relay.com"],
141+
["r", "wss://expensive-relay.example2.com", "write"],
142+
["r", "wss://nostr-relay.example.com", "read"]
143+
],
144+
"content": "",
145+
"sig": "<signature>"
146+
}
147+
```
148+
149+
Then publish it&#x20;
150+
151+
```
152+
beam publish event.signed.json
153+
```
154+
155+
156+

getting-started/quickstart.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
description: Setup spaces on mainnet
3+
cover: ../.gitbook/assets/Fabric bg (1).svg
4+
coverY: 0
35
---
46

5-
# Quickstart
7+
# Quick start
68

79
### Install Bitcoin Core
810

@@ -15,9 +17,9 @@ rpcuser=<your-username>
1517
rpcpassword=<your-password>
1618
```
1719

18-
### Install Spaces Daemon
20+
### Install Spaces
1921

20-
`spaces` is a tiny layer that connects to Bitcoin Core over RPC and scans transactions relevant to the protocol.&#x20;
22+
`spaced` is a tiny layer that connects to Bitcoin Core over RPC and scans transactions relevant to the protocol.&#x20;
2123

2224
1. Install the latest version:
2325

@@ -93,3 +95,7 @@ space-cli register bitcoin
9395
```
9496

9597
You may also watch the status of auctions on the [explorer](https://explorer.spacesprotocol.org)
98+
99+
### Publish records <a href="#placing-a-bid" id="placing-a-bid"></a>
100+
101+
Once you register a space, you can publish records over the [Fabric DHT](fabric-dht.md) without adding any on-chain bloat!

getting-started/resolver.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
cover: ../.gitbook/assets/Fabric bg (1).svg
3+
coverY: 0
4+
---
5+
16
# Name resolution
27

38
The Spaces protocol functions primarily as a Bitcoin certificate authority, minimizing on-chain footprint. Its trustless nature makes it an ideal foundation for Peer-to-Peer (P2P) protocols that leverage spaces as trust anchors, enabling off-chain record storage and other use cases.&#x20;

getting-started/subspaces.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
cover: ../.gitbook/assets/Fabric bg (1).svg
3+
coverY: 0
4+
---
5+
16
# Subspaces
27

38
Subspaces are individual identities within a community Space. Examples of this hierarchical structure:

0 commit comments

Comments
 (0)