Skip to main content
This guide covers how to create, sign, and send sponsored transactions using the Swig Paymaster SDK.

Available Methods

The paymaster client provides several methods for working with transactions:

Creating Transactions

Legacy Transactions (Classic Only)

Use legacy transactions for fixed account lists and versioned transactions for address lookup table support:

Versioned Transactions

Versioned transactions (v0) support address lookup tables for more efficient transactions:

Signing Transactions

The simplest approach - sign and submit in one call:

Sign Only (For Inspection)

Sign without sending - useful for inspecting the transaction before submission:

Full Signature Validation (Kit Only)

The Kit SDK provides fullySign() which validates that all required signatures are present:

Complete Examples

SOL Transfer with Memo

Multiple Signers

When a transaction requires multiple user signatures:

Best Practices

Test on Devnet First

Always test your integration on devnet before deploying to mainnet. Create a separate devnet paymaster for testing.

Handle Errors Gracefully

Wrap paymaster calls in try-catch and handle errors appropriately. See Advanced Usage for error handling patterns.

Monitor Your Balance

Keep your paymaster funded. Set up alerts in the Developer Portal to avoid running out of SOL.

Use Retry Options

Configure retry options for production to handle transient network issues automatically.

Next Steps