Quick Start

1

Create RelayApp Address

Use the command line tool to create a new RelayApp project and obtain a unique address:

relayx-cli create

Upon successful creation, you will receive:

  • πŸ“ RelayApp Unique Address: This is your application's unique identifier on the RelayX Network

  • πŸ”‘ Owner Account: Used for signing operations on the RelayApp

  • πŸš€ Master Account: Used for publishing the RelayApp to the network

Generated directory structure:

{RelayAppAddress}.config/
β”œβ”€β”€ config.json          # RelayApp configuration file
β”œβ”€β”€ owner.json           # Owner account information
β”œβ”€β”€ master.json          # Master account information
└── agents/              # Agent account folder

After creation, a config.json configuration file will be generated in the current directory.

circle-exclamation

πŸ“– View detailed create command documentation β†’arrow-up-right

2

Prepare Frontend Code

Environment requirements:

  • Node.js 16.0 or higher

  • Git version control tool

Clone the official template project and start development:

# Clone the template project
git clone https://github.com/RelayX-Protocol/RelayApp-React-Template.git
cd RelayApp-React-Template

# Install dependencies
npm install

# Configure RelayApp address to environment variable

# Replace your_relayapp_address with the RelayApp address created in Step 1
echo "VITE_RELAYAPP_ADDRESS=your_relayapp_address" > .env.production

# Build the frontend application
npm run build

πŸ“– View detailed React template documentation β†’arrow-up-right

3

Sign and Package

Rename the built frontend files to the RelayApp address, and ensure the .config configuration directory is at the same level as the project folder.

πŸ”” Important Note: The relayx-cli tool is installed globally, so you only need to execute commands in the working directory that contains both the project folder and configuration folder.

Required Directory Structure:

workspace/
β”œβ”€β”€ 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m/          # RelayApp project folder (frontend build output)
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ assets/
β”‚   └── ...
└── 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m.config/   # Configuration folder
    β”œβ”€β”€ config.json
    β”œβ”€β”€ owner.json
    β”œβ”€β”€ master.json
    └── agents/

Operation Steps:

# 1. Create working directory
mkdir -p workspace

# 2. Copy the built frontend project to the working directory
cp -r 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m workspace/1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m

# 3. Move the configuration directory to the working directory
mv 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m.config workspace/

# 4. Enter the working directory
cd workspace

# 5. Execute signing
relayx-cli sign
circle-info

Key Points:

  • The naming of the project folder and configuration folder must strictly follow the format {RelayAppAddress} and {RelayAppAddress}.config

  • All subsequent relayx-cli commands must be executed in the working directory (workspace) that contains both folders

After successful signing, you can proceed with the publishing operation.

πŸ“– View detailed sign command documentation β†’arrow-up-right

4

Apply for Release Certificate

  1. Open the RelayX Certificate application in the RelayX client (such as MarsCat)

  2. Apply for release certificate according to the interface instructions

  3. After obtaining the certificate, import it using the command line:

relayx-cli import --cert "YOUR_CERTIFICATE"

πŸ“ Note: The publishing certificate is used to verify your identity, ensuring that only authorized users can publish RelayApp.

πŸ“– View detailed certificate application and management guide β†’arrow-up-right

5

Publish RelayApp

After completing certificate import, publish your application to RelayX Network:

relayx-cli publish

Upon completion, the publishing status will be returned.

πŸ“– View detailed publish command documentation β†’arrow-up-right

6

Verify Publication

View the publication information and status of your RelayApp:

relayx-cli info

This command will display detailed information such as your RelayApp address, version number, and publication status.

πŸ“– View detailed info command documentation β†’arrow-up-right

7

Test Run

After publishing is complete, you can test the application in the following ways:

  1. Open the RelayX client (such as MarsCat)

  2. Search for your RelayApp address (the address created in Creation step) in the RelayApp list

  3. Download and run the RelayApp for testing

βœ… Complete: Congratulations on successfully publishing your first RelayApp!

Further Learning

After completing the development of your first RelayApp, it is recommended to dive deeper into the following content:

If you encounter any issues during development, please refer to the official documentation or seek help through official channels.

Last updated