Welcome to the TypeScript SWIG SDK tutorial! This comprehensive guide will walk you through all the essential functions and features of the SWIG SDK, helping you understand how to integrate SWIG into your TypeScript applications.
The tutorial code is available in the swig-ts repository.
- For the Classic version (compatible with @solana/web3.js ), see: examples/classic/transfer/tutorial
- For the Kit version (compatible with @solana/kit), see: examples/kit/transfer/tutorial
Note:
This tutorial provides two versions of each code example:
  • Classic: Uses the @solana/web3.js library and is compatible with the classic Solana SDK.
  • Kit: Uses the new @solana/kit library for a modern, streamlined Solana development experience.
You can switch between Classic and Kit code snippets using the tabs above each example.

What You’ll Learn

In this tutorial, you’ll learn how to:
  • Set up your development environment for SWIG
  • Create and manage SWIGs
  • Manage authorities and permissions with
  • Sign transactions using the new instruction-based approach
  • Migrate from previous versions

Time Commitment

This tutorial is designed to be completed in approximately 30 minutes. Each section builds upon the previous one, providing a clear progression through the SDK’s capabilities.

Tutorial Scope

This guide focuses on creating and managing SWIGs using regular Solana keypair authorities. While this covers the most common use cases, SWIG supports other authority types as well.

Tutorial Sections

Follow these tutorials in order for the best learning experience:
  1. Environment Setup - Set up your development environment
  2. Creating Your First SWIG - Learn how to create and initialize a SWIG
  3. Managing Authorities and Actions - Learn how to manage authorities and actions
  4. Signing Transactions - Learn how to sign transactions with Swig
Let’s get started with building your first SWIG!