This command-line application is a thin wrapper around the Relaynet core library for Node.js and it contains a series of utilities aimed at implementers of the Relaynet protocol suite. If you're porting Relaynet to a new programming language or platform, you may want to check the input and output of your implementation against these utilities.
Relaynet couriers, service providers or end users do not need to use this software at all.
You must have Node.js 10 or newer to use this software. To get the latest stable version, run:
npm install -g @relaycorp/relaydev
And to get or upgrade to the latest development version, run:
npm install -g @relaycorp/relaydev@dev
To learn how to use a sub-command, run it without arguments or with the --help option.
For example, run the following to inspect the generated key:
relaydev key gen-rsa | openssl rsa -check -in - -inform DER -noout -text
For example, run the following to inspect the generated key:
relaydev key gen-ecdh | openssl pkey -in - -inform DER -noout -text
For example, run the following to inspect the extracted public key:
relaydev key gen-rsa | \
relaydev key get-rsa-pub | \
openssl rsa -in - -inform DER -pubin -noout -text
For example, the following will create a self-issued gateway certificate that expires the following week:
END_DATE="$(date --date='next week' --iso-8601=seconds)"
relaydev key gen-rsa > key.der
openssl rsa -in key.der -inform DER -pubout -outform DER | \
relaydev cert issue --type=gateway --end-date="${END_DATE}" key.der \
> cert.der
For example, to inspect the certificate cert.der, run:
relaydev cert inspect < cert.der
For example, run the following to create a cargo cargo.ramf whose payload is contained in the file cargo-message-set.cms:
cat cargo-message-set.cms | relaydev ramf serialize cargo \
--recipient-address=https://example.com \
--sender-key=key.der \
--sender-cert=cert.der \
> cargo.ramf
For example, to inspect the cargo message created above, run:
relaydev ramf deserialize < cargo.ramf
If you're contributing to this package, after installing it locally with npm install, make sure to run npm run build:dev to transpile the TypeScript code and make the relaydev script available in your $PATH -- you'll have to re-run that whenever you want to check your changes.
To run the functional tests, run npm test. Note you'll need the following dependencies in your $PATH to run the tests:
openssljq