Unwrap SOL logo

Catalog action Solana Onchain wallet Gas swap

Close the workflow wallet's canonical WSOL Associated Token Account and return its complete balance as native SOL. All-balance only; never run automatically after protocol actions.

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

At a Glance

FieldValue
Action IDunwrap-sol
CategorySolana Onchain
Connectorwallet
Requires gasYes
Funds movementswap
Tagsblockchain, solana, sol, unwrap, token, write

Payload Schema

FieldTypeRequiredDescription
chainIdnumberYesSolana Mainnet chain ID.
amountModestringYesClose the complete canonical WSOL ATA balance. Partial unwrap is not supported.

Result Schema

FieldTypeRequiredDescription
statusstringYes-
signaturestringYesSolana transaction signature.
transactionHashstringYesSolana transaction signature for workflow audit trails.
txStatusstringNo-
chainIdnumberYes-
ownerstringYes-
wsolAtastringYes-
wsolMintstringYes-
rawWsolUnwrappedstringYesPreflight projection of the canonical ATA's complete WSOL balance before signing. External deposits can change the final close amount.
formattedWsolUnwrappedstringYes-
rawSolReceivedstringYesPreflight projection of SOL returned by CloseAccount, including WSOL balance, rent, and observed unsynced lamports. External deposits can change the final amount.
formattedSolReceivedstringYes-
decimalsnumberNo-
rentReturnedLamportsstringNoATA rent returned to the wallet by CloseAccount.
formattedRentReturnedstringNo-
unsyncedLamportsReturnedstringNoPre-existing unsynced lamports in the canonical ATA returned by CloseAccount.
formattedUnsyncedLamportsReturnedstringNo-
modeledFeeLamportsstringNoModeled network fee bound used before wallet signing.
formattedModeledFeestringNo-
projectedSolDeltaLamportsstringNo-
projectedWsolDeltaLamportsstringNo-
actualSolDeltaLamportsstringNo-
actualWsolDeltaLamportsstringNo-
preSolLamportsstringNoObserved native SOL balance before signing.
postSolLamportsstringNoObserved native SOL balance after confirmation.
preWsolRawstringNoObserved canonical WSOL ATA token balance before signing.
postWsolRawstringNoObserved canonical WSOL ATA token balance after confirmation.
computeUnitLimitnumberNo-
unitsConsumednumberNo-
priorityFeeMicroLamportsnumberNo-
slotnumberNo-
confirmationSlotnumberNo-
simulationStatestringYes-
simulationLogsarrayNo-
simulatedbooleanYes-
observationStatusstringNo-
observationErrorstringNo-

Examples

json
{ "type": "unwrap-sol", "payload": { "chainId": 7565164, "amountMode": "all" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.