Skip to main content

Quickstart

Prerequisites

Orion

Starting Orion and sending a payload

1. Create password file

Create a file containing the password used to encrypt the key pair.

The password is specified when generating the keys, and the file is specified for the passwords property in the configuration file.

2. Generate keys

To generate a public/private key pair for the Orion node:

orion -g nodeKey

At the prompt, specify the password to encrypt the key pair.

The public/private key pair is generated, and the keys are saved in the nodeKey.pub and nodeKey.key files.

3. Create a configuration file

Create a file called orion.conf and add the following properties:

nodeurl = "http://127.0.0.1:8080/"
nodeport = 8080
clienturl = "http://127.0.0.1:8888/"
clientport = 8888
publickeys = ["nodeKey.pub"]
privatekeys = ["nodeKey.key"]
passwords = "<PathToPasswordFile>/passwordFile"
tls = "off"

4. Start Orion

Start Orion specifying the configuration file:

orion orion.conf

5. Confirm Orion is running

Use the upcheck method to confirm Orion is up and running:

curl http://localhost:8888/upcheck

6. Send a payload

With one node running, send a payload to yourself where the from and to values are the generated public key (nodeKey.pub):

curl -X POST \
http://localhost:8888/send \
-H 'Content-Type: application/json' \
-d '{
"payload": "SGVsbG8sIFdvcmxkIQ==",
"from": "<OrionPublicKey>",
"to": ["<OrionPublicKey>"]
}'

7. Receive a payload

Use the key received when sending the payload to receive the payload:

curl -X POST \
http://localhost:8888/receive \
-H 'Content-Type: application/json' \
-d '{
"key": "<KeyReceivedFromSendMethod>",
"to": "<OrionPublicKey>"
}'

Where SGVsbG8sIFdvcmxkIQ== is Hello, World! in Base64.