Fabric DHT
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!
Who can use it?
Own a Space? Publish forward records tied to your handle e.g.,
@example. To grab one, see quick start or buy one from a secondary marketplace.No Space? No Problem! Use your
npubto publish Nostr events (like NIP-65 relay lists) instead.
npm install -g @spacesprotocol/fabric and verify installation
fabric --version
beam --versionBy 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, you can load the file from an external source that you trust e.g.
export FABRIC_REMOTE_ANCHORS=https://bitpki.com/root-anchors.jsonDon't trust, verify! Run your own Bitcoin full node and spaces client.\
DNS Records
beam <space> <record-type>For example:
beam @buffrr TXTNostr events
beam <space-or-pubkey> <event-kind> <optional-d-tag>Publishing records by handle
If you own a space, you can publish forward records resolvable by your handle e.g. @example
Publish DNS records
Create a zone file:
Add your records to a file and save it e.g. myexample.zone
@example. 3600 CLASS2 TXT "Hello Fabric"
@example. 3600 CLASS2 A 127.0.0.1Remember to replace @examplewith your space name, and remember to put the .at the end. It's not a typo in DNS zone files!
Sign the file
space-cli signzone @example myexample.zone > signed.event.jsonThe wallet will turn it into a signed Nostr event and bundles proof information to make it ready for publishing to Fabric.
Publish it with
beam
beam publish signed.event.jsonPublish Nostr Events
To sign a forward event (lookup by a space handle), you could do the following:
Note: there's no standard yet for using kind 0 for forward lookups yet but it's here as an example.
{
"kind": 0,
"created_at": 1679673265,
"content": "{\"name\": \"Alice\", \"about\": \"A Nostr enthusiast\", \"picture\": \"https://example.com/avatar.jpg\"}",
"tags": []
}space-cli signevent @example event.json --anchor > event.signed.jsonFor lookups by handle, you should use the --anchoroption to include trust path information and append the spacetag to the event.
beam publish event.signed.jsonPublishing records by pubkey
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:
{
"kind": 10002,
"created_at": 1679673265,
"pubkey": "97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322",
"tags": [
["r", "wss://alicerelay.example.com"],
["r", "wss://brando-relay.com"],
["r", "wss://expensive-relay.example2.com", "write"],
["r", "wss://nostr-relay.example.com", "read"]
],
"content": "",
"sig": "<signature>"
}Then publish it
beam publish event.signed.jsonLast updated
Was this helpful?