How funding works
Shield Swap runs on the Aleo network and uses token records for private trading. Each record holds an amount your account can spend in a swap.To fund your trading account from a supported EVM chain or Solana, you bridge assets to Aleo, then convert the received public balance into token records. This conversion is called shielding. USDC can be bridged directly into USDCx records, without a separate shielding step.Once trading is complete, you can bridge your funds out to another supported chain. If your account already holds spendable token records, you can go straight to getting a quote.Check spendable funds
Prerequisites: Your account and trading clients from Setup:client for TypeScript, dex for Python, or a configured CLI profile. For practice with test assets, use the separate testnet funding flow.Check your USDCx balance to decide whether you need funding or record preparation.- TypeScript
- Python
- CLI
privateBalance is a decimal string in USDCx units. For example, "1" means 1 USDCx, not one base unit.Bridge assets
Use these mainnet examples to transfer ETH between Ethereum and Aleo through Hyperlane. Choose TypeScript, Python, or REST, and use the same interface through delivery so you can track one transfer throughout.For the supported pairs and examples covering Solana, USDCx delivery modes, frontend integration, and embedded wallets, see the Bridging integration guide. Use the Shield Swap CLI to check balances before and after funding.1. Configure access
You need a source account that can sign the transfer and a destination address to receive it. Keep funds for network fees in the source account in addition to the transfer amount. When funding, use your mainnet Aleo account from Setup as the recipient.The examples below use private keys managed by your application. For a Dynamic or Privy signer, follow Use Embedded Wallets for bridging, then continue at route discovery.Your application must supply the keys, RPC URL, and wallet addresses from an external source, such as its configuration or a secret manager. The examples below use environment variables:- TypeScript
- Python
- REST
Install the packages in an ES module application using Node.js 22 or later:You now have a mainnet
--legacy-peer-deps avoids a conflict between the bridge package’s optional Solana and server-wallet peers in npm.Connect your Aleo trading account and Ethereum signer to the bridge. Your Ethereum RPC connection handles chain reads and transaction submission:bridge client and Aleo account. Keep both in the same session for the TypeScript steps that follow.2. Discover assets and routes
Prerequisites: Thebridge client or REST shell configuration from Configure access.A route identifies the asset and the provider that can move it between two chains. Discover routes to check where you can send your funds. Use the returned chain and asset identifiers when quoting; a symbol alone does not identify an asset across chains.- TypeScript
- Python
- REST
assets lists the registered assets; inboundRoutes and outboundRoutes list routes in each direction. Check availability before quoting: metadata-required means deployment metadata is still needed.For an Aleo-to-Ethereum withdrawal, Hyperlane spends your public balance. If your ETH is held in records, unshield the withdrawal amount and wait for acceptance before quoting.
3. Request and review a quote
Prerequisites: The client or REST shell configuration from Configure access, a supported route from Discover assets and routes, and your recipient address.Request a quote to see how much your recipient can expect and the route fees before you move funds. Choose one direction below. Each example requests 0.01 ETH in display units, not base units.For an Ethereum destination, replaceETHEREUM_RECIPIENT with the receiving wallet’s Ethereum address. For an Aleo destination, the SDKs use your configured trading account. In REST, set SOURCE_ADDRESS and DESTINATION_ADDRESS to the wallets for your chosen direction.- TypeScript
- Python
- REST
Ethereum to Aleo:
ETHEREUM_RECIPIENT:quote.plan contains the selected route, amount, and recipient. Review the returned fees and transfer details before using that plan to submit.4. Submit the reviewed transfer
Prerequisites: Your client from Configure access and thequote or QUOTES response you reviewed in Request and review a quote.Submission moves funds into the bridge. Save a reference so you can check delivery after a restart: the SDKs use checkpoints, while REST uses an order ID.- TypeScript
- Python
- REST
Supply You receive
saveCheckpoint, your storage callback, before running this example. It receives a BridgeCheckpoint and must persist it before returning; it can return void or Promise<void>. The SDK has no default persistent store for this callback.execution.receipt, which identifies the submitted work for the delivery check. Some token routes require an approval before the transfer.5. Check delivery
Prerequisites: Your configured client and the submission result from Submit the reviewed transfer:quote.plan and execution.receipt for TypeScript, progress for Python, or ORDER_ID for REST.Your source transaction can be confirmed while delivery is still pending. Check the existing transfer to see whether the destination has received the funds. These calls do not sign another transaction.- TypeScript
- Python
- REST
progress.next to decide what to do:For Hyperlane withdrawals from Aleo, both SDKs can use the recipient’s balance increase to detect delivery. Spending from that destination account before the check can leave a delivered transfer marked as pending; unrelated incoming funds can also make the balance check misleading. Confirm the original transfer in the Hyperlane explorer and check its destination transaction before resubmitting or treating the balance change as proof.After inbound Hyperlane delivery, shield your public balance to prepare it for trading. After a withdrawal, check the destination receipt and recipient balance.
6. Recover an interrupted transfer
Prerequisites: Recreate the client from Configure access with the same account, then load the checkpoint or order ID saved during submission.You can inspect an interrupted transfer without sending funds again. Recovery uses its saved reference to find how far the original transfer progressed.- TypeScript
- Python
- REST
Load
checkpoint, the BridgeCheckpoint object saved by your saveCheckpoint callback. Pass that object to your recreated client:recovered.next using the delivery result table. If it requests resume or complete, follow the route’s packaged example. A Circle mint using a secret nonce also needs the original nonce; retain it separately because checkpoints and public transaction history cannot reconstruct it.Shield public balances
Prerequisites: Yourbridge client from Configure access, plus a public ETH balance for shielding or a sufficient ETH record for unshielding.Shield the amount you want to trade after Hyperlane delivers it to your public balance. To withdraw through Hyperlane, unshield that amount instead. Unshielding exposes the recipient and amount in public balance state.Each example converts 0.01 ETH in display units and submits a separate transaction with a fee. The CLI and wallet services order endpoints do not provide this conversion.- TypeScript
- Python
Use your configured mainnet client to shield 0.01 ETH:To unshield, supply You receive
record as an encoded plaintext string from your account’s record scanner. It must be an unspent ETH record covering at least 0.01 ETH:conversion.transactionId. Wait for acceptance before spending the converted amount. A connected wallet that supports record requests can select the record if you omit it; the local-key example supplies it explicitly.Request testnet tokens
Testnet prerequisites: The separate account and clients from the Quickstart:client and account for TypeScript, shield_swap_client for Python, or the CLI testnet profile. For the Python examples below, set dex = shield_swap_client.Use the faucet to practice without transferring mainnet assets. The SDK calls wait for the faucet transfer and its token records. With the Quickstart’s delegated proving setup, you do not need a public ALEO balance.A faucet job can deliver USDCx even if another asset transfer fails. Check the same account’s USDCx records before requesting more tokens; an available record covering your input is enough to continue the testnet swap.- TypeScript
- Python
- CLI
jobId to the job ID reported by the timeout, then inspect that request:Next steps
Get a trading quote
Use the Quote guide to find a pool and review a swap once your input is available in a record.Run packaged examples
Run a complete mainnet example for your chosen route. Each repository documents the accounts and connections you need.- TypeScript
- Python
Follow the Veil bridge examples README to configure your accounts, then run the ETH example for your direction from its example directory:You receive a quote without submitting funds. To execute, supply the acknowledgement documented in the example. The same directory covers USDC/USDCx routes and checkpoint recovery.
The Fund page moves assets from an Ethereum or Solana wallet into Shield Wallet so you can trade them. You can reverse the direction on the same page to bridge assets out.Shield Swap trades from your confidential balance. USDC arrives as USDCx without a separate shielding step. For other assets, funding includes shielding the received balance. The source-chain transfer remains public; see the risk disclosures.
Connect your wallets
Before you startYou’ll need:- Shield Wallet installed with your account selected. Setup covers creating or importing an account.
- A compatible Ethereum or Solana wallet, such as MetaMask, Brave Wallet, or Phantom, holding the asset you want to bridge and funds for network fees.
- Open Fund Wallet.
- If you’re sending SOL, select SOL in the asset selector to use the Solana wallet options.
- Under You send, select Connect Wallet and choose your external wallet.
- Approve the connection in that wallet.
- Under You receive, select Connect Wallet to connect Shield Wallet.
- Read the terms in Connect Shield Wallet before selecting Agree and Connect.
- Approve the connection request in Shield Wallet after checking that the site is swap.shield.fi.
- Sign the challenge in Shield Wallet. It records acceptance of the terms shown in the app; signing this message creates no transaction.
Bridge assets into Shield Wallet
- Select an available asset, such as USDC, ETH, or WBTC, under You send. You receive shows the corresponding destination asset.
- Enter the amount to send.
- Review the fees and estimated time shown by the app.
- Select the bridge button to open Review bridge.
- Select Confirm & Bridge when the amount and recipient are correct.
- Approve the requests in your source wallet. An asset approval may be required before the transfer.
- Wait for the bridge and any shielding step to finish.
Check the funds available for trading
Open Portfolio to see the assets available to trade. If a non-USDC transfer arrived but its shielding step failed, the asset can remain in your public balance. You can finish shielding it in Shield Wallet:- Open Shield Wallet and select Shield.
- Select the received asset.
- Enter the amount with Shield selected.
- Select Next.
- Review the fee and balance changes, then select Continue.
- Select Confirm.
Bridge assets out
The direction control on Fund Wallet reverses the transfer: Shield Wallet sends the asset, and your Ethereum or Solana wallet receives it.Keep enough public ALEO in Shield Wallet for the bridge fee on Hyperlane routes. The app shows the required fee before submission.- Select the arrow between You send and You receive. The panel changes to Bridge from Shield Swap.
- Select the asset and enter the amount to withdraw.
- Connect the receiving wallet under You receive.
- Review the destination address and fee before confirming the bridge.
- Approve the request in Shield Wallet.