Publish paid applications
Starting from Olares v1.12.3, Olares Market supports paid application distribution. To sell apps, developers must register their Olares ID (DID) on the blockchain and install the Merchant app to manage licenses, orders, and payout records.
Closed Beta
This feature is currently in Closed Beta. To publish paid apps, please contact us at [email protected] to apply for access.
Currently, only paid applications (pay-to-download) are supported. In-app purchases and subscriptions are under development.
This guide explains how to publish paid applications and configure Merchant.
Prerequisites
Before starting, ensure that you have:
- Olares ID: A valid Olares ID (e.g.,
[email protected]). - Olares OS: A working Olares host running v1.12.3 or later.
- Developer access: Approved developer status (apply via email).
- Environment: A local computer with Node.js installed.
Set up a wallet and fund gas fees
To enable payments, you must register your Olares ID (DID) on the blockchain. This is an on-chain interaction and requires a small Gas Fee.
Set up a crypto wallet
This guide uses MetaMask as an example. You may use other wallet apps.
- Open LarePass on your phone.
- Go to Settings > Safety > Mnemonic phrase to view your mnemonic phrase.
Security alert
Your mnemonic phrase is a high-privilege credential for your account. Never share it or upload it to a public code repository. Perform the following steps in a secure local environment.
- Install the MetaMask extension in your browser.
- In MetaMask, select Add wallet > Import a wallet, and enter your Olares mnemonic phrase.
Fund your wallet
Registration consumes a small amount of ETH on the Optimism network as gas fees.
- In MetaMask, switch to Optimism (OP Mainnet).
- Copy your wallet address. It should start with
0x.
- Send a small amount of ETH to this address. At least 0.0005 ETH is recommended for subsequent gas fees.
Generate and register RSA keys
To ensure transaction security and license uniqueness, generate an RSA key pair and register the public key on-chain under your Olares ID.
Generate an RSA key pair
- Install the
did-clitool:bashnpm install -g @beclab/olaresid - Generate a default 2048-bit RSA key pair:bashWhen the command succeeds, you should see output similar to the following:
did-cli rsa generate
- View the generated keys:bash
cat ./rsa-public.pem cat ./rsa-private.pemSecurity alert
Keep
rsa-private.pemsafe. You will need it later when configuring the Merchant app.
Register the RSA public key
Bind the generated public key to your Olares ID. It requires signing with your mnemonic phrase and will consume gas.
Export your mnemonic as a temporary environment variable and wrap the value in double quotes:
bashexport PRIVATE_KEY_OR_MNEMONIC="xx xxx xx ..." echo $PRIVATE_KEY_OR_MNEMONICCheck whether your Olares ID already has an RSA public key:
bashdid-cli rsa get [email protected] --network mainnetIf you see the following message, you can continue:
text❌ No RSA public key set for this domainVerify the owner wallet address and make sure it matches the wallet you funded previously:
bashdid-cli owner [email protected] --network mainnetExample output:
text👤 Owner: 0x3.....Register the RSA public key on-chain:
bashdid-cli rsa set [email protected] ./rsa-public.pem --network mainnetVerify registration:
bashdid-cli rsa get [email protected] --network mainnetClear the mnemonic phrase from your environment:
bashunset PRIVATE_KEY_OR_MNEMONIC echo $PRIVATE_KEY_OR_MNEMONICIf nothing is printed, it is cleared.
Configure your app (OAC)
A paid app is almost the same as a free app. You only need two additional items:
- Add a
price.yamlfile at the chart root (OAC root). - Expose
VERIFIABLE_CREDENTIALto the app so it can read the user's purchase credential.
Add pricing configuration
Create price.yaml at the chart root:
# Developer's Olares instance address
developer: alice123.olares.com
# Paid app
paid:
# product_id format: repoName-appName-productId
product_id: apps-appname-paid
price:
- chain: optimism | eth
token_symbol: USDC | USDT
receive_wallet: "0xcbbcd55960eC62F1dCFBac17C2a2341E4f0e81c8"
product_price: 100000
description:
- lang: en
title: Purchase item title
description: Purchase item description
icon: https://item.icon.url
# In-app purchase or subscription items (not implemented yet)
products: []Enable license checks
Your app can read the user's purchase credential via an injected environment variable.
Add the env var in the pod template where you need purchase enforcement:
- name: VERIFIABLE_CREDENTIAL
value: "{{ .Values.olaresEnv.VERIFIABLE_CREDENTIAL }}"Declare the variable in OlaresManifest.yaml:
envs:
- envName: VERIFIABLE_CREDENTIAL
required: true
type: string
editable: false
applyOnChange: trueFor detailed environment variable behavior, see environment variables in OlaresManifest.yaml.
Submit your app
Follow the standard submission flow to create a Pull Request.
Install and set up Merchant
The Merchant app is your checkout and management panel. It allows you to:
- View developer info (product list, RSA keys, payout wallet, orders).
- Issue product licenses.
- Verify licenses when apps start.
Keep Merchant online
Purchase requests require real-time callbacks to your Olares host for verification. Keep the host running Merchant online 24/7 with a stable, fast network connection. Host offline or unstable network may directly prevent users from completing purchases.
Install Merchant
- Open Olares Market and search for "Merchant".
- Click Get, then Install.
Initial setup
After installation completes, open Merchant from Launchpad.
- On the login screen, enter your developer Olares ID and click Import Developer.
- Merchant automatically loads your on-chain product info and RSA public key.
- Open your private key file:bashCopy the full content, paste it into the Merchant dialog, then click Import private key.
cat ./rsa-private.pem
Manage sales in Merchant
After setup, Merchant opens the Home dashboard, where you can monitor identity status, key configuration, wallet assets, and transaction history.
INFO
The Store and Buy App pages in the left navigation are currently for debugging/testing only. You can ignore them in the current publishing workflow.
Sync status
The status indicator above the transaction list supports manual refresh:
Synced: Up to date.Syncing: Pulling data from chain.Not synced: Not synchronized.Error: Sync failed. Check network connectivity.
Transaction fields
| Field | Description |
|---|---|
| Wallet | Developer wallet address managed by Merchant |
| Type | Transaction type:
|
| Tx Hash | The hash of the transaction record, a unique identifier for the on-chain transaction. |
| From/To | Counterparty address, shown based on the transaction type:
|
| Contract | Token contract address, indicating the asset type and source involved in the transaction.
|
| Amount | Transaction amount, denominated in the token specified by the Contract. |
| Time | The timestamp when the transaction is confirmed and recorded on-chain. |
| Product |
|
Update developer information
To change RSA keys, product info, pricing, or receiving wallet:
- Regenerate RSA keys or update your app configurations, then submit a PR with updated information.
- Wait for the PR to be reviewed and merged.
- After the PR is merged, open Merchant from Launchpad. When prompted, click Update / Re-install to apply the latest configuration. Changes take effect immediately.