Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP/ PoC] Nimbus test #79

merged 1 commit into from Aug 1, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -13,6 +13,13 @@ build:
GOFLAGS=$(GOFLAGS) go build $(BUILD_FLAGS) -o ./bin/status-term-client .
.PHONY: build

# XXX: Multiple ldflags a bit brittle, keeping it simple by having separate build target for now.
# See
build-nimbus: GOFLAGS ?= "-mod=vendor"
GOFLAGS=$(GOFLAGS) go build -ldflags="-r /usr/local/lib" -tags nimbus -o ./bin/status-term-client .
.PHONY: build-nimbus

run: ARGS ?=
run: build
./bin/status-term-client $(ARGS) 2>/tmp/status-term-client.log
@@ -41,6 +41,52 @@ Currently the following commands are supported.

`/contact add <public-key> <name>`

# Packages

The main package contains the console user interface.

* `` contains the current messaging protocol payload encoders and decoders as well as some utilities like creating a Whisper topic for a public chat.

# (Very) Experimental Nimbus support

`status-console-client` supports very experimental Nimbus support for Whisper.

## How it works

1. Nimbus exposes a basic and very rough C API for Whisper polling, posting,
subscribing, and adding peers:

2. This C API is consumed as a standard shared library, ``.

3. [status-nim]( wraps this library to
expose a Go API. Currently, this "API" is more like a hacky spike. The goal is
for this to library to hide the integration details with Nim and provide a clean
Go interface for consumers.

## Building and running

The changes are isolated and won't impact `status-console-client` unless the
appropriate build instruction, flag and patch is provided.


If you have issues with `` (likely) you might want to copy it
into `/usr/local/lib` manually.

make build-nimbus
./bin/status-term-client -keyhex=0x9af3cdb76d76da2b36d2dcc082cb54ea672639331ef03b91a62ad6ef804b4896 -nimbus

Expected output:

[nim-status] posting ["~#c4",["Message:1000","text/plain","~:public-group-user-message",156393648280100,1563936482801,["^ ","~:chat-id","status-test-c","~:text","Message:1000"]]]

And a message being posted in `#status-test-c`.

# License

[Mozilla Public License 2.0](
1 go.mod
@@ -38,6 +38,7 @@ require ( v1.4.2 // indirect v0.29.0-beta.3 v0.0.0-20190624072549-28b2244fed6fef94d43f9c87be8f0b6cf54d7d20 v0.0.0-20190724023117-a5693e6e4820 v0.2.0 // indirect v0.22.0 // indirect v1.10.0
2 go.sum
@@ -518,6 +518,8 @@ v0.29.0-beta.3 h1:0MzV9p1r+CVxCBrg+OrGDQ8v/6p+k6C v0.29.0-beta.3/go.mod h1:8OHekmRoYTn9oZgMsBdhMEgeyfaQ4eI4ycOFHJCoX7M= v0.0.0-20190624072549-28b2244fed6fef94d43f9c87be8f0b6cf54d7d20 h1:MC6dXIfgnqEONfjIhBlMZ6H/nvqanWYeGxgG7YxZRz4= v0.0.0-20190624072549-28b2244fed6fef94d43f9c87be8f0b6cf54d7d20/go.mod h1:K1sZNTGahmrliIsVDTPrruKMZqbbqd8inbfbfh9Wmw4= v0.0.0-20190724023117-a5693e6e4820 h1:vcKYLWz2hFyYfsE5j2il+c3tellhOrkaGREaF6OCof4= v0.0.0-20190724023117-a5693e6e4820/go.mod h1:q3TkDSDrrHpM9QAH2jS0WOKrw0UzhZzCNO/zKd4fBrk= v1.4.14 h1:9VHqx4+PUYfhDnYYtDxHkg/3cfVvkHjPNciY4LO83yc= v1.4.14/go.mod h1:WS6z39YJQ8WJa9s+DmTuEM/s2nVF6Iz3B1SZYw5cYf0= v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -63,13 +63,19 @@ var (

// flags for external node
providerURI = fs.String("provider", "", "an URI pointing at a provider")

useNimbus = fs.Bool("nimbus", false, "use Nimbus node")

func main() {
if err := ff.Parse(fs, os.Args[1:]); err != nil {
exitErr(errors.Wrap(err, "failed to parse flags"))

if *useNimbus {

if *createKeyPair {
key, err := crypto.GenerateKey()
if err != nil {
@@ -0,0 +1,17 @@
// +build nimbus

package main

import (
statusnim ""

func init() {

func startNimbus() {
@@ -0,0 +1,7 @@
// +build !nimbus

package main

func startNimbus() {
panic("executable needs to be built with -tags nimbus")

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.