Compile from Source

Install OS dependencies and Rust

Clone the Node API

git clone <https://github.com/functionland/sugarfunge-api.git>

Run the Node API

Requires a Node running.

cargo run --release

Using Docker

Install Docker

Build the image

docker build -t sugarfunge-api:local -f docker/Dockerfile .

Run the Node API

Requires a Node running.

docker run --rm -d --network host sugarfunge-api:local

Available arguments

sugarfunge-api 0.1.0

USAGE:
    sugarfunge-api [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -d, --db-uri <db>                  
    -l, --listen <listen>               [default: <http://127.0.0.1:4000>]
    -s, --node-server <node-server>     [default: ws://127.0.0.1:9944]

Subscriptions

Basic support for WebSockets subscriptions is available. Any tool that offers features for WebSockets connections and subscriptions will apply. For example, websocat

websocat ws://127.0.0.1:4000/ws

API Metadata Generation