The Stage 2 building block to reach the dream of DSNs with Bitcoin DeFi

Overview

rust-nostr

Intro

A complete suite of nostr Bitcoin libraries that can be used to develop Decentralized Social Networks (DSN) with integrated Bitcoin financial products.

If you like the sound of it, check out the vision doc for the whole idea.

This is an idea intended to be built entirely in open public from the very start. The design questions are completely open and everybody is encouraged to participate, either via code or via ideas. If you are a new rust dev there will be a ton of testing work for you to help with polishing up your rust skills.

A Discord server is created to facilitate higher bandwidth dev discussions. That's the best place to start if you are excited about this.

This repo will describe the state of the project. Issues will be used to open design questions and suggestions in public. If you have a specific design idea, design question, or literally anything, feel free to open an Issue.

Project Goals

The goal of the project is to finally produce a nostrd binary, a nostr-cli cli client, and nostr-API. Initial inspirations can be taken from existing nostr rust libraries

nostrd: will be a highly efficient nostr-relay with multiple opt-in database support, that can be activated by feature flags. It should have a well-defined DB interface, that can be used to add any other DB of choice very easily by the user of the library. By default, it will work with SQLite and sled. DB will have extensive unit testing. More DB options can be added later easily by external contributors. The difference between having nostrd with your own favorite DB, and having it by default should be one PR that doesn't touch any other part of the code, easy to review, and passes all the DB tests. Finally, it will have a Bitcoin wallet, interfaced to a public node (electrum or esplora) or a local bitcoin core node, using BDK. An Existing rust nostr relay is nostr-rs-relay.

nostr-cli: will be a command line maintainer tool that can talk with nostrd. It will have functional access to a nostrd via RPC through basic or cookie authentication. This should provide all the relay utility functions and logging. This will be used as a "controller" of the relay. nostr-cli is to nostrd what bitcoin-cli is to bitcoind. No existing code available for this part.

nostr-API: A API module that will expose all the nostr communication rules that client devs can use to build their own nostr clients. Existing nostr API library in rust is nostr-rs.

portal: An encrypted communication protocol to facilitate subscription sharing. This will be an out of bound protocol that doesn't need to be strictly defined, or heavily security guaranteed. Inspiration can be taken from existing project like CypherPost and a simplified example implementation in rust will be added in this repo. But anybody is free to come up with their own custom implementation of encrypted subscription sharing, and be compatible with the whole idea. This part is the lowest priority for now. Discussion is on route with CypherPost folks to have nostr compatible version of their project, which will basically be an alternate portal.

To maintain compatibility between all these parts integration tests are to be made. nostr-cli can include nostr-API to become not only a controller but a command-line nostr-client also. Then in the integration tests nostr-cli will use nostr-API to talk to nostrd and ensure they are always compatible with each other. These tests can be included in the Github CI pipeline to maintain consistency at each commit.

The basic guiding principles for writing code for this project are:

  • Use extensive documentation to describe all parts of the code.
  • Use rust compiler to its fullest by defining every protocol rule as a struct enum or trait.
  • Use rigorous unit and integration testing to ensure all parts are working as expected (code coverage goal > 80%).
  • Have the code very structured and divided into straightforward units.
  • Avoid complexity at all costs. Be dumb and clear, not clever and obscured.

Roadmap

  • basic code for nostrd with sqlite.
  • Support mandatory NIPs
  • Support optional NIPs
  • Cover all parts in unit tests
  • Define DB interface
  • Support sled DB
  • Implement a RPC interface
  • Basic code for nostr-cli
  • Integration test framework with nostr-cli and nostrd
  • Define nostr-API
  • Implement nostr-API in nostr-cli
  • Add Bitcoin support with BDK

I am maintaining a work diary for both myself and other collaborators to see what I am working on. Diary link here

Comments
  • New 11 channels

    New 11 channels

    Italy

    DVB-T

    https://en.wikipedia.org/wiki/Television_in_Italy#Digital_terrestrial_television https://www.tivusat.tv/sat-eng/tivusat/multicanale.aspx | # | Channel | Link | Logo | |:---:|:--------------:|:-----:|:-----: | 1 | Rai 1 Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803) | | | 2 | Rai 2 Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=308718) | | | 3 | Rai 3 Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=308709) | | | 4 | Rete 4 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(r4)/index.m3u8) | | | 5 | Canale 5 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(c5)/index.m3u8) | | | 6 | Italia 1 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(i1)/index.m3u8) | | | 7 | La7 | [x]() | | | 8 | TV8 | [x]() | | | 9 | Nove | [>](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_3@810997/master.m3u8) | | | 10 | Rai 4 Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=746966) | | | 11 | Rai Premium Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=746992) | | | 12 | Rai 5 Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=395276) | | | 13 | Rai Movie Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=747002) | | | 14 | Rai Storia Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=746990) | | | 15 | Rai Sport + Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=358025) | | | 16 | Rai Scuola Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=747011) | | | 17 | Iris Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(ki)/index.m3u8) | | | 18 | La 5 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(ka)/index.m3u8) | | | 19 | Real Time | [>](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_4@810998/master.m3u8) | | | 20 | Italia 2 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(i2)/index.m3u8) | | | 21 | Canale 20 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(lb)/index.m3u8) | | | 22 | Dmax | [>](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_5@825063/master.m3u8) | | | 23 | Focus Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(fu)/index.m3u8) | | | 24 | Motor Trend | [>](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_1@810993/master.m3u8) | | | 25 | Paramount Channel Ⓢ Ⓖ | [>](https://viacomitalytest-lh.akamaihd.net/i/sbshdlive_1@195657/master.m3u8) | | | 26 | Giallo | [>](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_2@810996/master.m3u8) | | | 27 | Top Crime Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(lt)/index.m3u8) | | | 28 | Mediaset Extra Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(kq)/index.m3u8) | | | 29 | Food Network | [>](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_6@1000854/master.m3u8) | | | 30 | Spike Ⓢ | [>](https://viacomitalytest-lh.akamaihd.net/i/sbshdlive_1@829515/master.m3u8) | | | 31 | BOING Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(kb)/index.m3u8) | | | 32 | K2 | [x](https://sbshdlu2-lh.akamaihd.net/i/sbshdl_21@443297/master.m3u8) | | | 33 | Rai Gulp Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=746953) | | | 34 | Rai YoYo Ⓖ | [>](https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=746899) | | | 35 | Frisbee | [x](https://sbshdlu1-lh.akamaihd.net/i/sbshdl_21@443313/master.m3u8) | | | 36 | Cartoonito Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(la)/index.m3u8) | | | 37 | Super! Ⓢ | [>](https://viacomitalytest-lh.akamaihd.net/i/sbshdlive_1@357018/master.m3u8) | | | 38 | Alice | [x](https://dcunilive130-lh.akamaihd.net/i/dclive_1@352796/master.m3u8) | | | 39 | Marcopolo | [x](https://dcunilive131-lh.akamaihd.net/i/dclive_1@352774/master.m3u8) | | | 40 | HGTV – Home & Garden Tv | [x](https://sbshdlu5-lh.akamaihd.net/i/sbshdl_7@106896/master.m3u8) | | | 41 | Sky TG 24 Ⓢ | [>](https://skyanywhere3-i.akamaihd.net/hls/live/510696/tg24/playlist.m3u8) | | | 42 | TGCOM 24 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(kf)/index.m3u8) | | | 43 | Rai News 24 Ⓖ | [>](http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=1) | | | 44 | Euronews | [>](https://rakuten-euronews-3-it.samsung.wurl.com/manifest/playlist.m3u8) | | | 45 | 7 Gold | [>](http://stream2.xdevel.com/video0s86-21/stream/playlist.m3u8) | | | 46 | TV 2000 Ⓢ | [>](http://mi1.wz.tv2000.it/tv2000_alfa.m3u8) | | | 47 | CINE 34 Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(b6)/index.m3u8) | | | 48 | QVC | [>](https://qrg.akamaized.net/hls/live/2017383/lsqvc1it/master.m3u8) | | | 49 | VH1 | [>](https://content.uplynk.com/channel/36953f5b6546464590d2fcd954bc89cf.m3u8) | | | 50 | RTL 102.5 Ⓢ | [>](https://rtl-video1-stream.thron.com/live-video/video1/ngrp:video1/playlist.m3u8) | | | 51 | Deejay TV Ⓢ | [>](https://deejay-tv-lh.akamaized.net/i/DeejayTv_1@129866/master.m3u8) | | | 52 | RadioItaliaTV Ⓢ | [>](https://radioitaliatv-lh.akamaihd.net/i/radioitaliatv_1@329645/master.m3u8) | | | 53 | Radio 105 TV Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(EC)/index.m3u8) | | | 54 | Radio KISS KISS TV | [>](https://59253971be783.streamlock.net/KissKissTV/KissKissTV.stream/playlist.m3u8) | | | 55 | R101 TV Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(ER)/index.m3u8) | | | 56 | Virgin Radio TV Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(EW)/index.m3u8) | | | 57 | RadioFreccia Ⓢ | [>](https://rtl-video2-stream.thron.com/live-video/video2/ngrp:video2/playlist.m3u8) | | | 58 | RDS Social TV Ⓢ | [>](https://stream.rdstv.radio/out/v1/ec85f72b87f04555aa41d616d5be41dc/index.m3u8) | | | 59 | Radio ZETA Ⓢ | [>](https://rtl-video3-stream.thron.com/live-video/video3/ngrp:video3/playlist.m3u8) | | | 60 | Radio Montecarlo TV Ⓢ Ⓖ | [>](https://live3-mediaset-it.akamaized.net/Content/hls_h0_clr_vos/live/channel(BB)/index.m3u8) | |

    Invalid

    | # | Channel | Link | Logo | |:---:|:--------------:|:-----:|:-----:

    opened by infid0 4
  • Add regional Dutch channels

    Add regional Dutch channels

    Please add also the Dutch regional channels in the Netherlands. Most streams are in HD, some in SD. I don't know if the streams are geo-restricted, but the streams are tested and working well.

    Regional channels in the Netherlands: https://nl.wikipedia.org/wiki/Regionale_omroep#Nederland

    Omrop Fryslân https://d3pvma9xb2775h.cloudfront.net/live/omropfryslan/stream04/index.m3u8

    RTV Noord https://media.rtvnoord.nl/live/rtvnoord/tv/3e8fe3c1-0868-49b0-b2f3-7dd6eb30651f/index.m3u8

    RTV Drenthe https://cdn.rtvdrenthe.nl/live/rtvdrenthe/tv/1080p/prog_index.m3u8

    RTV Oost https://mediacdn.rtvoost.nl/live/rtvoost/tv-oost/index.m3u8

    Omroep Gelderland http://web.omroepgelderland.nl/live/livetv.m3u8

    RTV Utrecht http://media.rtvutrecht.nl/live/rtvutrecht/rtvutrecht/index.m3u8

    Omroep Flevoland https://d5ms27yy6exnf.cloudfront.net/live/omroepflevoland/tv/index.m3u8

    NH Nieuws Stream is protected. Protected stream can be found here: https://www.nhnieuws.nl/media

    RTV Rijnmond http://d3r4bk4fg0k2xi.cloudfront.net/rijnmondTv/index.m3u8

    Omroep West http://d2dslh4sd7yvc1.cloudfront.net/live/omroepwest/ngrp:tv-feed_all/playlist.m3u8

    Omroep Zeeland http://d3isaxd2t6q8zm.cloudfront.net/live/omroepzeeland/tv/index.m3u8

    Omroep Brabant http://d3slqp9xhts6qb.cloudfront.net/live/omroepbrabant/tv/index.m3u8

    L1 http://d34pj260kw1xmk.cloudfront.net/live/l1/tv/index.m3u8

    opened by pvdl 3
  • Misc additions

    Misc additions

    Changelog:

    Belgium

    • Add BX1

    Brazil

    • Add CNN Brasil

    France

    • Add France 24 English, France 24 Spanish

    Germany

    • Add DW, DW English, DW Español

    Portugal

    • Add Porto Canal

    UK

    • Add PBS America, Al Jazeera English, BBC World News

    US

    • Add BBC Food, BBC Home, ABC News Live, CBSN, NBC News Now, Reuters TV

    Movies

    • Add FilmRise Movies, FilmRise Sci-Fi, Film Detective
    opened by loucasal 3
  • Update italy.md

    Update italy.md

    Added more Rai channels.

    opened by sbadux 3
  • VH1 request

    VH1 request

    Not is a issue, but a request. Sorry. VH1 it's a free channel (67) of the italian DDT. ​ Name: VH1 Web Page: https://www.paramountnetwork.it/diretta-tv/1iwm9n/vh1 Streaming: https://content.uplynk.com/channel/36953f5b6546464590d2fcd954bc89cf.m3u8

    The stream maybe is geoblocked, but for me in Italy, works fine on VLC. Thank you so much for this great project. :3

    opened by infid0 3
  • Issues watching the BBC, Channel Four, Channel Five

    Issues watching the BBC, Channel Four, Channel Five

    I am new to GitHub so this may be the wrong place to put this, but I can't watch the channels listed above using VLC. How are you guys able to watch them?

    opened by Dylcarinc 2
  • L'equipe -> Cstar

    L'equipe -> Cstar

    Looks like french chanel "L'equipe" point the exact same url than "cstar"

    http://cdn.webtv4.cdnfr.orange.fr/hs/HALO1/hls/d17-451622/hls/index.m3u8

    opened by s-leger 2
  • Add ATSC (antenna/aerial) channels to usa.md

    Add ATSC (antenna/aerial) channels to usa.md

    Also adding first NASA channel (Public). Second channel is given the name NASA TV Media.

    opened by nrichw-eta 2
  • cdn.webtv4.cdnfr.orange.fr  down ?

    cdn.webtv4.cdnfr.orange.fr down ?

    Can't get most fr chanels to work, is cdn.webtv4.cdnfr.orange.fr down ?

    opened by s-leger 1
  • SD Streams

    SD Streams

    For those of us with low bandwidth, please consider providing SD alternatives to HD streams (if available). Thank you.

    opened by frankgilbert 1
  • Create malta.md

    Create malta.md

    Two channels of Malta.

    opened by infid0 0
Owner
Raj
Rusty Bitcoin Dev
Raj
Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

BPNS 1 May 2, 2022
Minimal Bitcoin wallet intended for teaching rust-bitcoin

Insanely minimal Bitcoin wallet intended for demonstration of Rust Bitcoin ecosystem Absolutely DO NOT use with mainnet funds!!! No privacy - address

Martin Habovštiak 4 May 5, 2023
Modern, lightweight & standard-compliant bitcoin wallet runtime & cli without rust-bitcoin dependencies

Bitcoin protocol command-line wallet & tools Modern, minimalistic & standard-compliant cold wallet from LNP/BP Standards Association. Contributing Con

BP: Bitcoin protocol 3 Jul 31, 2023
Collection of block cipher algorithms written in pure Rust

RustCrypto: block ciphers Collection of block ciphers and block modes written in pure Rust. Warnings Currently only the aes crate provides constant-ti

Rust Crypto 506 Jan 3, 2023
A small block explorer for geth PoAs written in rust

Tesseracts A minimalistic block explorer initially created to learn rust. This block explorer has been created as a rust self-learning project to give

adria0.eth 15 Jun 25, 2022
Example of a block root with a Verkle state root

Example of a block root with a Verkle state root Block content This is a standard RLP block containing 3 transactions, and an added VerkleProof field

Guillaume Ballet 25 Nov 25, 2022
A very bare-bone Block Chain demo that purely implemented by Rust and yew

Intro bloc is one of bare-bone blockchain demo written by Rust, Yew during my learning BlockChain, about years ago. see demo here It just demonstrate

null 4 Dec 16, 2022
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 15 Oct 25, 2022
Kinda functional block engine for testing bundles on jito-solana locally

Half Baked Block Engine About This is a half-baked block engine. It can be used for testing bundles running through jito-solana. Shortcomings The bare

null 8 Nov 16, 2022
Bindings for the etherscan API and other block explorers.

foundry-block-explorers Bindings for the etherscan.io web API and other block explorers. Examples use ethers_core::types::Chain; use foundry_block_exp

Foundry 7 Nov 3, 2023
A Rust library for working with Bitcoin SV

Rust-SV A library to build Bitcoin SV applications in Rust. Documentation Features P2P protocol messages (construction and serialization) Address enco

Brenton Gunning 51 Oct 13, 2022
The Parity Bitcoin client

The Parity Bitcoin client. Gitter Installing from source Installing the snap Running tests Going online Importing bitcoind database Command line inter

Parity Technologies 714 Dec 21, 2022
Iterate over bitcoin blocks

Blocks iterator Iterates over Bitcoin blocks, decoding data inside Bitcoin Core's blocks directory. Features: Blocks are returned in height order, it

Riccardo Casatta 38 Nov 8, 2022
EXPERIMENTAL: Bitcoin Core Prometheus exporter based on User-Space, Statically Defined Tracing and eBPF.

bitcoind-observer An experimental Prometheus metric exporter for Bitcoin Core based on Userspace, Statically Defined Tracing and eBPF. This demo is ba

0xB10C 24 Nov 8, 2022
Rust command line program for Bitcoin brainwallet

brainwallet Rust command line program for Bitcoin brainwallet as implemented at https://www.bitaddress.org. To run it, first install Rust, e.g. from h

Frank Buss 3 Dec 30, 2021
Rustcoin - A LightWeight SDK For Bitcoin, Ethernum

Rustcoin - A LightWeight SDK For Bitcoin, Ethernum

Rust Coin 6 Jan 24, 2022
A preview of the integration between Bitcoin and the Internet Computer.

Bitcoin Integration Developer Preview Overview The integration between the Internet Computer and Bitcoin will enable developers to build canisters tha

DFINITY 39 Sep 21, 2022
Library with support for de/serialization, parsing and executing on data-structures and network messages related to Bitcoin

Rust Bitcoin Library with support for de/serialization, parsing and executing on data-structures and network messages related to Bitcoin. Heads up for

Rust Bitcoin Community 1.3k Dec 29, 2022
interBTC A trust-minimized bridge from Bitcoin to Polkadot.

interBTC A trust-minimized bridge from Bitcoin to Polkadot. Explore the specification » Report Bug · Request Feature This repository is hosted on GitH

Interlay 192 Dec 27, 2022