Files
2026-07-12 14:35:58 +08:00

547 B

SOL / WSOL Operations

中文

Demonstrates wrapping SOL, partially unwrapping WSOL through the SDK seed account, and closing the WSOL account to recover the remaining SOL.

All three steps submit real transactions. Set PRIVATE_KEY and RPC, use a test wallet first, and reduce amounts as appropriate.

cargo run --package wsol_wrapper

Closing WSOL unwraps the account's full remaining balance and removes the account. Do not run that step when another workflow expects the same WSOL account to remain available.