Giter VIP home page Giter VIP logo

splash's Introduction

Splash!

Splash! is a decentralized network for sharing Offers across the Chia ecosystem based on Rusts libp2p with DHT peer discovery.

Every connected peer receives all offers broadcasted from other peers. There is no centralized connection, the peers connect to each other and are aware of each other.

The Splash! command line tool acts as a proxy between your application and the Splash! network. It will broadcast your offers to the network and relay offers from other peers to your local application through a local HTTP API.

Installation

You can download prebuilt binaries in the releases section.

Building

You can also build and install from source (requires the latest stable [Rust] compiler.)

cargo install --git https://github.com/dexie-space/splash.git splash

Usage

Usage: splash [OPTIONS]

Options:
  -k, --known-peer <MULTIADDR>
          Set initial peer, if missing use dexies DNS introducer
  -l, --listen-address <MULTIADDR>
          Set listen address, defaults to all interfaces, use multiple times for multiple addresses
  -i, --identity-file <IDENTITY_FILE>
          Store and reuse peer identity (only useful for known peers)
      --offer-hook <OFFER_HOOK>
          HTTP endpoint where incoming offers are posted to, sends JSON body {"offer":"offer1..."} (defaults to STDOUT)
      --listen-offer-submission <HOST:PORT>
          Start a HTTP API for offer submission, expects JSON body {"offer":"offer1..."}
  -h, --help
          Print help

Examples

Start the node and listen on all interfaces (will use dexies DNS introducer):

./splash

Start a node and open local webserver for offer submission on port 4000:

./splash --listen-offer-submission 127.0.0.1:4000

Start a node and post incoming offers to a HTTP hook:

./splash --offer-hook http://yourApi/v1/offers

Start a node and bootstrap from a known peer (will not use dexies DNS introducer):

./splash --known-peer /ip6/::1/tcp/12345/p2p/12D3K...

Start a node and listen on a specific interface/port:

./splash --listen-address /ip6/::1/tcp/12345

Start a node and reuse identity:

./splash --identity-file identity.json

Test the API with Docker

docker run -p 11511:11511 -p 4000:4000 dexiespace/splash:latest \
--listen-offer-submission 0.0.0.0:4000 \
--listen-address /ip4/0.0.0.0/tcp/11511
# send the request
curl -X POST -H "Content-Type: application/json" -d '{"offer":"offer1..."}' http://localhost:4000

Become a stable peer

To become a stable peer, you need to open an inbound port in your firewall. Then start Splash! with the --listen-address option and choose your public interface and the selected port (eg. 11511).

./splash --listen-address /ip6/2001:db8::1/tcp/11511 --listen-address /ip4/1.2.3.4/tcp/11511

Running a stable peer? Let us know! We will add you to the default bootstrap list.

splash's People

Contributors

denisu avatar mpwsh avatar rightsexyorc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.