Use this file to discover all available pages before exploring further.
You can convert Primary Assets with the createConvertTransaction method.The example below demonstrates how to convert any primary asset into another—USDC on Arbitrum, in this case:
import { CHAIN_ID, SUPPORTED_TOKEN_TYPE, UniversalAccount } from "@particle-network/universal-account-sdk";import { useEthereum } from "@particle-network/authkit";// extract the provider from Particle Authconst { provider } = useEthereum();// In your appconst transaction = await ua.createConvertTransaction({ expectToken: { type: SUPPORTED_TOKEN_TYPE.USDC, amount: '1' }, chainId: CHAIN_ID.ARBITRUM_MAINNET_ONE,});const signature = await provider.signMessage(transaction.rootHash);const result = await ua.sendTransaction(transaction, signature);console.log("Explorer URL:", `https://universalx.app/activity/details?id=${result.transactionId}`);
This method is useful to convert assets directly to your target chain (for example, upon deposit).