Headless (Java) client for Toshi
Java Shell
Clone or download


Toshi Headless Client

The headless client for connecting to the Toshi platform

The headless client is a full client for the Chat service that exposes a control interface via Redis pubsub. It is primarily intended for use by bots.

Building executable fat jar

> gradle ToshiHeadlessClientCapsule
> #path: build/libs/toshi-headless-1.0-SNAPSHOT-capsule.jar


> java -jar build/libs/toshi-headless-1.0-SNAPSHOT-capsule.jar path/to/config.yml


Configuration is done via passing a config.yml file as an argument to the client. Some configuration keys are optional, and will be pulled from ENV vars if missing.

server: https://token-chat-service.herokuapp.com # URL of Chat service
address: '0x...' # Ethereum address, pulled from env var TOKEN_CLIENT_ADDRESS if omitted
username: '' # username to be registered/updated with the ID server
seed: # wallet master seed, 12 word phrase, pulled from env var TOKEN_CLIENT_SEED if omitted
store: store # path to durable storage directory for Signal store
  uri: redis://username:password@hostname:port
  timeout: 2000

Postgres Configuration

3 different forms are accepted for Postgres configuration:

JDBC url + username/password

  jdbcUrl: jdbc:postgresql://<host>:<port>/<dbname>
  port: 5432
  password: secret


  url: postgres://<username>:<password>@<host>:<port>/<dbname>

EnvKey (useful for environments such as Heroku that set a fixed env variable whose value is the Postgres uri)


Redis Configuration

3 different forms are accepted for Redis configuration:


  uri: redis://<username>:<password>@<host>:<port>


  envKey: REDIS_URL


  host: hostname
  port: 8000
  password: secret

Pinned certificate update

From specific .pem file
CERTFILE=cert.pem ./cert-gen.sh

Copyright © 2017-2018 Toshi Holdings Pte. Ltd. <https://www.toshi.org/>

"Toshi" is a registered trade mark. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor.

This program is free software: you can redistribute it and/or modify it under the terms of the version 3 of the GNU Affero General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.