Orbitport: User Guide
version: v0.2
Table of Contents
Overview
Orbitport is a gateway to orbital services such as cTRNG
(cosmic True Random Number Generator) or spaceTEE
, served by multiple providers & satellites to ensure high availability and reliability.
Authentication
You need to get an access token from auth0 for interacting with the API. Fill out this form and get yours on the ending page.
- Get credentials
OP_AUTH_URL=dev-1usujmbby8627ni8.us.auth0.com
OP_CLIENT_ID=<your-client-id>
OP_CLIENT_SECRET=<your-client-secret>
- Get access token from auth0:
curl --request POST --url "https://${OP_AUTH_URL}/oauth/token" \
--header 'content-type: application/json' \
--data '{"client_id":"'"${OP_CLIENT_ID}"'","client_secret":"'"${OP_CLIENT_SECRET}"'","audience":"https://op.spacecomputer.io/api","grant_type":"client_credentials"}' \
| jq -r '.access_token'
API Usage
cTRNG
The cosmic True Random Number Generation (cTRNG) is an orbital service that provides true random numbers harvested from hardware on satellites.
To make a trng request, use GET /api/v1/services/trng
endpoint:
curl --request GET --url https://op.spacecomputer.io/api/v1/services/trng \
--header "authorization: Bearer ${ACCESS_TOKEN}"
Example Response
{
"service": "trng",
"src": "aptosorbital",
"data": "0a4c2ea21557418bbc1d57120142ad83e8fa6e030ad35125fe225b97929d2526",
"signature": {
"value": "3046022100da9e9dfbe4167da1bd7b824ab46e57506cfbebc50395fdf0bb3d3407c1d92451022100e33601c04b402fc57d8ffd22d41b01ec5315d4e1a1d2be97bf71323cc5cc3838",
"pk": ""
}
}
Parameters
src
: The source of the random number. Can betrng
orrng
.
Randomness Sources
The gateway supports multiple sources of randomness.
The desired sources can be specified (by order) with src
query parameter, e.g. ?src=aptosorbital&src=...&src=...
Default is [aptosorbital,derived]
, i.e. try to get a TRN from a satellite or fallback to TRN derived from a TRN that was fetched previously.
Available sources are:
-
aptosorbital: Space based randomness provided by
cEDGE
orCrypto2
satellites. -
derived (from cosmic random seed): Randomness derived from a cTRNG (aka
master seed
) that is fetched continuously. The seed is used to generate more random numbers when aptos-orbital's satellites are not responsive, by using it as a seed for a bip32 master key and deriving keys from it.