Ryder Simulator Tutorial

Niclas Wimmerstedt
6 min readJun 8, 2021

Setting up the Ryder Simulator on Linux

TLDR:

Ryder, a user-centric hardware wallet with the ambition of being an easy-to-use device focused on authentication rather than just fund storage, has released a software simulator to give anyone the opportunity to develop apps before their device is officially released. This tutorial provides a guide on how to set up the simulator and get going in creating your own app.

Ryder V2 prototype

Intro

Based on a Maker’s approach, Ryder is a hardware wallet pioneering a new type of market for hardware-based key storage. Started on the belief that key management needs to be made intuitive for the wider adoption of Web3 and dApps.

Hardware wallets available today are mostly focused on either trading or the hodle use case. Where security is of course paramount, but often comes at the cost of ease of use. Ryder is rather putting the use case of Decentralized Identities (DID) front and center.

While managing funds will be possible Ryder is more focused on a device that you bring with you and use throughout the day. Building on a bold vision for the future Ryder believes that keys and DIDs will be used in all transactions no matter if it’s managing your saving, accessing your office, or store your commute credits. With the improved user experience of integrating DID into services, Ryder sees safe and human-centered key management as an important building block to making DID and dApps available for everyone.

For those familiar with it, it might not come as a surprise that Ryder is started by some of the key figures from the stacks.co project. Often mentioned as an ETH competitor, Stacks has a grander vision of being the protocol for own-your-data-apps with minimum disruption to existing web UX. In the Stacks protocol, the DID is central and given its almost stealth integration into existing web apps the need for a similar sleek solution for safe key management is just equally obvious as the need for the stacks.co project itself….

The new Ryder simulator gives anyone the opportunity to get going developing apps and integrate the device to their service even before the wider release of the V3 device.

Pre-requisite

A recent version of Node and NPM is needed. Files and guide on how to install Node can be found here

Download and setup

Installing Ryder-CLI

With Node installed run the following command in terminal

npm install -g @lightlabs/ryder-cli-proto

After successful installation, you can test that the CLI tool is working by running

ryder-cli-proto –-help

The command should respond with a list of commands that can be used to manage the device.

Downloading the Ryder simulator

Head over to Ryder’s notion page to download the latest version of the simulator.

Make sure you pick the right version for your OS.

The download is a zip-file containing all files needed to run the simulator.

As the subsequent steps will be dependent on you knowing where you extracted the file, I recommend extracting the files to:

Documents/Ryder

If you select the location according to the above format it will make it easier to follow subsequent steps.

The next step is to navigate to the location of the extracted files using Terminal.

cd Documents/Ryder/ryder-sim-v2-linux-x86_64

You can now start the simulator by running the following command.

./ryder-sim-v2-linux-x86_64

After executing the command following window with an uninitialized Ryder device should appear.

Take note of the serial port provided in which will be used to communicate with the device.

RyderProto_V2 Simulator starting. 
Opened virtual serialport on: /dev/pts/1

Congratulations you have now managed to get the simulator to work!

The next step is to initialize the device using the CLI tool

Setting up device

To manage the device, we use the Ryder-CLI

Start by running:

ryder-cli-proto setup -R '/dev/pts/1'

This will start the setup process and should render the following screen on the simulator.

Follow the instruction by clicking Ok and writing down your seed phrase.

The initialized Ryder will look as follow and it’s now ready to be used for your app!

You can test to interact with the simulator by requesting to export an identities App Key by running this command.

ryder-cli-proto export identity 0 https://ryder.id -R '/dev/pts/1'

It should render the following screen on the simulator asking you to Confirm or Cancel.

Confirming will return the App Key based on the identity and app domain in Terminal.

RyderSerial JS library

To start using the Ryder in an application the RyderSerial is provided as an easy way to get going integrating the devices.

You can grab the library with NPM

npm install @lightlabs/ryderserial-proto

Below is a simple example of how you can use the library to extract an app key for the domain https://ryder.id. Further reference and documentation can be found at Light Labs GitHub page.

const RyderSerial = require('ryderserial-proto');
let ryder_port = '/dev/pts/1';
const options = {
reconnectTime: 1000, // how long to wait before reconnect (ms).
debug: true // enable debug output to stdout.
};
const ryder_serial = new RyderSerial(ryder_port, options);
ryder_serial.on('open', async ()=>
{
const response = await ryder_serial.send(RyderSerial.COMMAND_INFO);
console.log(response);
const appkeyresponse = await request_app_key(0, 'https://ryder.id');
console.log(`Response: ${appkeyresponse}`)
});
async function request_app_key(identity_number,app_domain){
const data = [RyderSerial.COMMAND_EXPORT_APP_KEY,identity_number];
const response = await ryder_serial.send(data);
if (response === RyderSerial.RESPONSE_SEND_INPUT)
{
// Send the app domain terminated by a null byte.
const app_key = await ryder_serial.send(`${app_domain}\0`);
// app key will be RyderSerial.RESPONSE_REJECTED if the user
// presses Cancel, otherwise the response will be in the following
// format:
// "https://ryder.id,app_key_here"
return app_key;
}else{
console.log('Signin rejected by user');
}
}

Get going

It’s that easy, so if you are yet to download the simulator it’s time to head over to Ryder notion page. With these easy steps, you are on your way to providing your users an easier and safer way to access your application.

As mentioned in the beginning Ryder is a Maker based project and it’s the perfect time for you to get involved. Participation, as well as input, is always welcomed. You can find more information by visiting the Ryder.id website and if you want to join the discussion on Discord don’t forget to tag me and say hello!

--

--