User Guide

1. Role Overview

  • Developer: Developers act as component providers. They can build components within the Luffa ecosystem and list them for sale in the Component Marketplace. Revenue is generated through the sale of these components.

  • User (Buyer): Users, or buyers, are the primary audience of this documentation. They are the consumers of components. Users can browse and purchase components from the marketplace, combine them to build their own applications, and meet specific development needs.

2. Login Instructions

2.1 To log in, click the “Connect Wallet” button in the navigation bar on the homepage. A login QR code will be displayed.

2.2 Open the Luffa App, tap the “+” icon, select the appropriate QR scanning feature, and scan the login QR code to complete authentication.

2.3 Once logged in successfully, click the dropdown menu to access your User Dashboard for further operations.

3. EDS Staking Guide for Users

3.1 Navigate to your User Dashboard and click the “Staking” button to initiate the EDS staking process.

3.2 In the input field that appears, enter the amount of EDS you wish to stake (precision up to 8 decimal places). After verifying the input, click the “Staking” button again. The system will generate a staking QR code.

3.3 Open the Luffa App, scan the staking QR code using the scanner, and complete the payment.

Note: The QR code is valid for 5 minutes. If the payment is not completed within this period, you will need to repeat the process and generate a new QR code.

4. Component Purchase Guide

4.1 Select Component Version and Quantity

Component versions are categorized based on supported TPS (transactions per second), with different pricing tiers (note: pricing may vary between components):

  • Basic Version: Supports up to 1k TPS (e.g., for lightweight or test use cases).

  • Standard Version: Supports up to 10k TPS, suitable for typical business scenarios.

  • Professional Version: Supports up to 100k TPS, designed for high-performance applications.

The minimum subscription duration for any component is 30 days. To purchase a longer duration, increase the purchase quantity. For example: To subscribe for 6 months, set the quantity to 6 (each unit = 30 days; total duration = quantity × 30 days).

4.2 After selecting the version and quantity, click the “Buy Now” button. The system will generate a payment QR code(ensure you are logged in before proceeding).

4.3 Use the Luffa App to scan the payment QR code and complete the transaction.

Note: The payment QR code is valid for 5 minutes. If it expires, you must either generate a new QR code by placing another order or revisit the Order Management section to retry payment.

4.4 All order and payment records can be reviewed in the Order Management section of your User Dashboard, allowing you to track the status of each order at any time.

5. Component Usage Examples

5.1 HTTP Component Integration Example

The routing format for HTTP components is structured as follows: [Gateway URL] / [Component Name] / [Component Key] / [Endpoint]

  • Component Key: An API key obtained after successfully purchasing the component. It is used for authentication when invoking the component service.

  • Component Name: The unique identifier for the component within the system, globally unique.

  • Endpoint: The specific API endpoint for the component. This is defined in the component’s integration documentation. Typically, HTTP components use API function names as endpoints, while MCP components use SSE (Server-Sent Events) or messaging endpoints.

Take a simple component service for testing API connectivity as an example.

The component name is ping292929, the apiKey is d0926a421a8340ae, and the endpoint is ping.

The corresponding request URL is:

https://component-store-test.endless.link/ping292929/d0926a421a8340ae/ping

If the component service is called successfully, it should return:

{"message": "pong"}

Example command:

curl 'https://component-store-test.endless.link/ping292929/d0926a421a8340ae/ping'

# Response

> {"message":"pong"}

5.2 MCP SSE Component Invocation Example

The routing format of an MCP component is as follows:

Routing Gateway/Endpoint

  • endpoint: Use the /sse endpoint to connect to the MCP service, and /message to invoke the MCP service

Taking a component service for querying prices based on symbols as an example:

  • Component name: price

  • API Key: fe41c68085e51054

  • Tool: query-price-by-symbol

The specific invocation steps are as follows:

Connect to the MCP Component SSE Service

Use the command line to call the /sse endpoint and create a session with the service terminal:

curl 'https://component-store-test.endless.link/sse' \

--header 'Authorization: Cluster price:fe41c68085e51054'

Sample response:

> event: endpoint

> data: /message?sessionId=722545aa-d71c-45df-b905-d35e5ed6906c

Here, /message?sessionId=722545aa-d71c-45df-b905-d35e5ed6906c is the session identifier for this message session.

Subsequent operations using the component or tool must be based on this session ID.

  • Query the List of Tools Supported by the CoinPriceHelper MCP Service

In a new command line window, query the tool list via the /message endpoint:

curl 'https://component-store-test.endless.link/message?sessionId=722545aa-d71c-45df-b905-d35e5ed6906c' \

--header 'Authorization: Cluster price:fe41c68085e51054' \

--header 'Content-Type: application/json' \

--data '{

"method": "tools/list",

"params": {},

"jsonrpc": "2.0",

"id": 1

}'

Sample response (on the session terminal):

> event: message

> data: {

"jsonrpc": "2.0",

"id": 1,

"result": {

"tools": [{

"annotations": {

"destructiveHint": true,

"openWorldHint": true

},

"description": "query symbol price on binance/bybit/okx",

"inputSchema": {

"properties": {

"symbol": {

"description": "symbol ",

"type": "string"

}

},

"required": ["symbol"],

"type": "object"

},

"name": "query-price-by-symbol"

}]

}

}

Invoke the query-price-by-symbol Tool to Query BTC Price

Use the following command to call the tool and query the price:

curl 'https://component-store-test.endless.link/message?sessionId=722545aa-d71c-45df-b905-d35e5ed6906c' \

--header 'Content-Type: application/json' \

--header 'Authorization: Cluster price:fe41c68085e51054' \

--data '{

"method": "tools/call",

"params": {

"name": "query-price-by-symbol",

"arguments": {

"symbol": "BTC"

}

},

"jsonrpc": "2.0",

"id": 1

}'

Sample response (on the session terminal):

> event: message

> data: {

"jsonrpc": "2.0",

"id": 1,

"result": {

"content": [{

"type": "text",

"text": "{\"symbol\":\"BTC\",\"price\":\"101875.24000000\"}"

}]

}

}

6. Order Management

6.1 To access the Order Management page, click your user avatar in the navigation bar and select “My Orders.”

6.2 The Order Management page displays all orders placed by the user, along with their current status:

  • All: Displays a complete list of all user orders.

  • Paid orders: Orders that have been successfully paid. The purchased components are immediately available for use in development.

  • Unpaid orders: Orders that have been placed but not yet paid. This status remains valid for up to 10 minutes. If payment is not completed within this window, the order will be automatically canceled. If the user completes payment within the time limit, the order status will update accordingly.

  • Canceled orders: Orders that were not paid within the 10-minute window after placement are automatically moved to this status.

  • Payment failed orders: Orders for which payment attempts failed due to transaction issues (e.g., failure to finalize on-chain).

The Order Management page also offers advanced filtering options for easy access and tracking:

  • Search by component name (supports partial keyword matching) or specific order ID.

  • Filter orders based on component categories, including all components, basic components, smart contract components, and more.

  • Narrow down results by selecting a custom start and end date to locate specific orders more accurately.

7. Component Management

7.1 Viewing Component Information

Navigate to the User Dashboard and click on the “My Components” section to view a list of all purchased components. The list displays key information such as the component name, component key (API key), version type, remaining usage time, and number of invocations. To access detailed configuration settings and usage documentation for a specific component, simply click on the corresponding component name to open its detail page.

7.2 Query Parameter Descriptions

  • Search by component name

Component Key

  • An authentication token is required to call a component service (you must have the corresponding token for the specific component to access its service)

  • For usage details, please refer to the file Component Call Example.md

  • After a component is successfully purchased, you must manually click to generate the key

Last updated