Cycle Unit Guide

1. Create APP

  1. Go to Cycle Unit Manager to log in and create an APP [link]arrow-up-right and connect your wallet to log in. Each EOA address can create or manage one APP.

  2. On your first login, you'll see the page below. Enter your Organization Name and App Name to create your first app.

  1. Fill in the relevant details for your newly created app.

  1. Click + to add asset managers and select the supported tokens. Then click Submit to complete the setup.

Note: You can update your App Info and App Details anytime. If you need to make changes — such as updating, adding, or removing asset managers — you can do so at any time.

2. Deploy Vault Contract

The Vault contract is used for users to deposit funds. It must implement the deposit method. For specific implementation, please refer to the documentationarrow-up-right.

3. Interfaces

The Cycle Unit SDK helps users implement the withdrawal UI. Withdrawals require the application server to provide a balance query interface and a withdrawal application interface. After configuring the interface addresses, users can initiate withdrawals directly through the client. The application needs to verify the validity of the data and implement the asynchronous withdrawal logic on the server side.

3.1 User Withdrawable Balance Query Interface

Request Method: GET

Request Parameters:

Parameter Name

Type

Required

Description

userAddress

string

Yes

User eoa address

Request Example:

Response Parameters:

3.2 Withdrawal Application Interface

Request Method: POST

Authentication Method: EIP712

Request Parameters:

Parameter Name

Parameter Type

Required

Description

userAddress

string

Yes

User address

message

object[Withdraw]

Yes

Withdrawal information

signature

string

Yes

Signature information

Request Parameter Example:

EIP712 Signature Parameters:

Response Parameters:

4. React Components SDK

4.1 Frontend Usage

Full documentation is available on https://github.com/CycleNetwork-Labs/cycle-unit-apparrow-up-right

5. Withdrawal SDK

When APP users initiate a withdrawal, they can use the following SDK to construct, sign, and submit the transaction. Alternatively, they can refer to the code to customize their own logic.Usage:Import:

Usage Example:

Withdrawal Parameters:

  • TokenSymbol: Token symbol defined by Cycle [link]

  • SourceChainID: Chain ID initiating the transfer

  • DestinationChainID: Chain ID receiving the tokens

  • DestinationAddress: Destination address for the withdrawal

  • Amount: Token transfer amount (full precision)

最后更新于