Build a wallet flow in TypeScript
Set up your environment
Prepare the TypeScript examples and a local Solana validator.
Create a wallet
Create a Swig account and choose its initial authority.
Manage authorities
Add authorities with SOL or token spending permissions.
Sign a transaction
Authorize wallet instructions with the selected role.
Send a transfer
Follow the SOL transfer example with a spending authority.
Sponsor transaction fees
Use Swig’s hosted Paymaster with an API key and funded paymaster.
Choose your client
The TypeScript package guide also covers shared helpers
and lower-level encoding. Use instruction builders
for direct Rust instruction construction.

