You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Dan Ballard 7a1c1eb97e
Merge branch 'rename' of openprivacy/libricochet-go into master
5 years ago
Godeps Adding bulb to godep 6 years ago
application Rename 5 years ago
channels Rename 5 years ago
connection Rename 5 years ago
examples/echobot Rename 5 years ago
identity Rename 5 years ago
policies Rename 5 years ago
testing Rename 5 years ago
utils Rename 5 years ago
wire Rename 5 years ago
.gitignore Add script for coveralls 7 years ago
.travis.yml fmt and travis update 5 years ago Rename 5 years ago
LICENSE Brand new API v0.2 6 years ago Rename 5 years ago
inbound_version_negotiation_test.go Rename 5 years ago
outbound_version_negotiation_test.go Rename 5 years ago
private_key Refactor GoRicochet 7 years ago
ricochet.go Rename 5 years ago
ricochet_test.go Adding Open Connection Failed Test 5 years ago Adding Open Connection Failed Test 5 years ago

libricochet-go Build Status Go Report Card Coverage Status

libricochet-go is an experimental implementation of the Ricochet Protocol in Go.


  • A simple API that you can use to build Automated Ricochet Applications
  • A suite of regression tests that test protocol compliance.

Building an Automated Ricochet Application

Below is a simple echo bot, which responds to any chat message. You can also find this code under examples/echobot

package main

import (

func main() {
  echobot := new(application.RicochetApplication)
  pk, err := utils.LoadPrivateKeyFromFile("./private_key")

  if err != nil {
    log.Fatalf("error reading private key file: %v", err)

  l, err := application.SetupOnion("", "tcp4", "", pk, 9878)

  if err != nil {
    log.Fatalf("error setting up onion service: %v", err)

  echobot.Init(pk, new(application.AcceptAllContactManager))
  echobot.OnChatMessage(func(rai *application.RicochetApplicationInstance, id uint32, timestamp time.Time, message string) {
    log.Printf("message from %v - %v", rai.RemoteHostname, message)
  log.Printf("echobot listening on %s", l.Addr().String())

Each automated ricochet service can extend of the StandardRicochetService. From there certain functions can be extended to fully build out a complete application.

Security and Usage Note

This project is experimental and has not been independently reviewed. If you are looking for a quick and easy way to use ricochet please check out Ricochet IM.