Swap Side Tokens to Main Tokens
Luniverse provides a way to swap Side Tokens to Main Tokens via following processes:

Create Redeem to Main Token Tx Action

Refer to the link below to create Tx Action from redeem function of side tokens.
Create a Side Token Tx Action

Created API

https://api.luniverse.io/tx/v2.0/transactions/{YOUR_ACITON_NAME}

Run Redeem to Main Token Tx Action

curl -X POST 'https://api.luniverse.io/tx/v2.0/transactions/<YOUR_ACTION_NAME>' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"txId": "<UUID>",
"from": "<YOUR_EOA_ADDRESS>",
"inputs": {
"valueAmount": "<VALUE_AMOUNT>"
}
}'
  • txId: You must create and input this in a UUID format each time.
  • valueAmount: Quantity of tokens you want to transfer * 10 ** <TOKEN_DECIMALS>
    • TOKEN_DECIMALS represents the decimal value entered when creating the token..
    • If your decimal is 18 and you want to send 1 token, you would enter "10000000000000000000" which is 1 * 10 to the power of 18.
Token decimals entered when creating tokens.
Running Tx Action might differ in process depending on whether it is EOA and DEOA. Please refer to the link below to run.
Run TxAction

Viewing Results

View results via API.
https://api.luniverse.io/mx/v2.0/transactions/redeems/{TX_ID or TX_HASH}
curl -X GET 'https://api.luniverse.io/mx/v2.0/transactions/redeems/<TX_ID or TX_HASH>' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"sideEnvironmentId": "<SIDE_ENVIRONMENT_ID>"
}'
Check whether the main tokens have been sent to the main chain address corresponding to "from" via scan.
https://scan.luniverse.io/accounts/{address}