npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@relaycorp/relaydev

v1.3.3

Published

Development tools for implementers of the Relaynet Protocol Suite

Downloads

12

Readme

relaydev: Development tools for implementers of the Relaynet Protocol Suite

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.

Install

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

relaydev CLI

To learn how to use a sub-command, run it without arguments or with the --help option.

key: Key management

relaydev key gen-rsa: Generate an RSA key

For example, run the following to inspect the generated key:

relaydev key gen-rsa | openssl rsa -check -in - -inform DER -noout -text

relaydev key gen-ecdh: Generate an ECDH key

For example, run the following to inspect the generated key:

relaydev key gen-ecdh | openssl pkey -in - -inform DER -noout -text

relaydev key get-rsa-pub: Derive the public key of an RSA private key

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

relaydev cert issue: Issue a Relaynet PKI Certificate

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

relaydev cert inspect: Inspect a Relaynet PKI Certificate

For example, to inspect the certificate cert.der, run:

relaydev cert inspect < cert.der

relaydev ramf serialize: Create and serialize a RAMF message

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

relaydev ramf deserialize: Deserialize and validate a RAMF message

For example, to inspect the cargo message created above, run:

relaydev ramf deserialize < cargo.ramf

Development

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:

  • openssl
  • jq