Cycle Unit Guide
1. Create APP
Go to Cycle Unit Manager to log in and create an APP [link] and connect your wallet to log in. Each EOA address can create or manage one APP.
On your first login, you'll see the page below. Enter your Organization Name and App Name to create your first app.
Fill in the relevant details for your newly created app.
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 documentation.
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-app
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 transferDestinationChainID: Chain ID receiving the tokensDestinationAddress: Destination address for the withdrawalAmount: Token transfer amount (full precision)
最后更新于