Skip to content

bisq-network/bisq-relay

Repository files navigation

Bisq Relay

Overview

This service acts as an intermediary between Bisq clients and Apple Push Notification service (APNs) or Firebase Cloud Messaging (FCM) in order to send push notifications to the mobile app. More documentation can be found here.

Building the Source Code

Clone the Repository

This repository has a dependency on git submodules bisq and bisq-gradle.
There are two ways to clone it before it can be built:

  1. Use the --recursive option in the clone command:
$ git clone --recursive  https://github.com/bisq-network/bisq-relay.git
  1. Do a normal clone, and pull down the bisq repo dependency with two git submodule commands:
$ git clone https://github.com/bisq-network/bisq-relay.git
$ cd bisq-relay
$ git submodule init
$ git submodule update

Build the Project

$ ./gradlew clean build

Running the Service

Requirements

Prior to running the service, several files need to be obtained in order to be able to send push notifications to APNs and FCM, and ultimately to the corresponding mobile app.

FCM

An appropriate fcmServiceAccountKey.json file needs to be copied to the root folder. Download it from the Firebase console under project settings > service accounts.

Note, the Android app needs to be built with a corresponding google-services.json file for the same Firebase project.

APNs

An appropriate apnsCertificate.production.p12 file needs to be copied to the root folder, along with the corresponding password stored within a apnsCertificatePassword.txt file.

Note, the APNs certificate needs to be manually renewed every year.

In order to obtain the APNs certificate, the following will need to be done on macOS:

  1. Create and download a cer file from https://developer.apple.com/account/ios/certificate/?teamId=XXXXXX
  2. Add the *.cer file to your keychain.
  3. In keychain, go to "My certificates". Expand the Apple Push Service certificate and select both lines. Then export the certificate as a *.p12 file.

Run the Script

After building the project, a bisq-relay script will be generated at the root of the project. Run the script. If the necessary files as described above are located in the root folder, the service should start running.

$ ./bisq-relay

If you need to specify a custom location/name of the files, you can provide arguments as follows:

$ export BISQ_RELAY_OPTS="-Dfcm.firebaseConfigurationFile=serviceAccountKey.json -Dapns.certificateFile=apnsCert.production.p12 -Dapns.certificatePasswordFile=apnsCertPassword.txt"; ./bisq-relay

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages