createClassicWithdrawPart
Build one classic (provider-free) withdraw receiver part. Unlike the read and write actions on this page, this is a pure helper — it takes no config and makes no network call. Feed the returned part into initiateWithdraw.
import { createClassicWithdrawPart } from "@symmio/trading-core";
const part = createClassicWithdrawPart({
id: 0n,
amount: 1_000000n,
receiver: "0xabc...",
chainId: 999n,
});Parameters
idbigintrequiredCaller-assigned part id, unique within the request.
amountbigintrequiredAmount of collateral for this part, in the collateral token’s smallest unit.
receiverAddressrequiredDestination EVM address.
chainIdbigintrequiredDestination chain id (use the source chain id for a same-chain withdrawal). This is the destination chain, not a config chain override.
Returns
WithdrawReceiverPartidbigintCaller-assigned part id, unique within the request.
amountbigintAmount of collateral for this part, in the collateral token’s smallest unit.
chainIdbigintDestination chain id (int256 on-chain; the source chain for a same-chain part).
receiverHexDestination address as raw bytes (a 20-byte EVM address is its own byte representation).
virtualProviderAddressVirtual (cross-chain) provider, or the zero address for a same-chain part.
expressProviderAddressExpress (instant) provider, or the zero address for a standard-cooldown part.