This development guide assumes you have Go installed on your development machine, and you have a flexible infrastructure environment where you can control a domain called
home.arpa (an example
db.home.arpa is provided for running with CoreDNS).
- An appropriate UNIX-like development workstation like Linux or macOS (Windows is not recommended, unless you use WSL/WSL2).
- Go and CoreDNS installed.
- A cup of coffee ☕️
make depsto install the required dependencies for this project. This will install CoreDNS and MiniCA
corednsin a directory that contains the sample Corefile and db.home.arpa to run a local authorities DNS server for the domain
home.arpaused for development purposes.
make certsto create a CA and Certificates for
*.home.arpa. You will have to add
certs/minica.pemto your system's certificate trust store. This depends on your system, on macOS you can run
open certs/minica.pemto open the Keychain utility and change the trust for the CA to "Always Trust".
To build the Salty broker
saltyd and the command-line Client tools and TUI
$ make dev
This will build all binaries and run the
saltyd broker. You should see something like this on startup:
salty-chat command-line client which also includes a terminal ui (TUI) has a configuration file (in addition to command-line options and environment variables) to make it a bit easier to work with.
Setup a configuration file (
$HOME/.config/salty/config.json) with JSON content similar to:
NB: Note that this is taken from my own configuration file where I have setup a default identity and user for my public Salty Address
Identies and Registration
Creating an identity is as simple as running the
$ ./salty-chat make-user user@domaiun
Instead you can create an identity (key pair) and register it against a Salty Broker such as the one running locally from the
make dev step above in Building.
$ ./salty-chat register user@domain [optional broker]
NB: Note that the Salty Broker to register against is looked up automatically from the DNS SRV record on the Domain. This is why the DNS Setup step above is important and an important part of the Discovery process and Delegation.
Send and Read
Sending a message to a Salty User and reading from your Salty Inbox is straight forward.
To send a message:
$ ./salty-chat send <address> <message|->
And to read from your inbox:
$ ./salty-chat read
For example (sending a message to
email@example.com and reading our
Chat Client (TUI)
In addition to various commands for managing identities, registration, sending and receiving messages, there is also a builtin Terminal UI (TUI) client. Simple run with:
$ ./salty-chat chat <address>
For example chatting with
And the other way around: