Skip to main content
The Swig Developer SDK is a server-side toolkit for TypeScript and Python. It authenticates to Swig’s hosted API, prepares wallet operations as unsigned transactions, reads wallet state, and submits transactions your application has signed.

Install

Published package @swig-wallet/developer-sdk, version 0.10.0, includes general role creation, ParticipantSet support, and the unified ramp client.
Both packages live in anagrambuild/swig-developer-sdk and default to https://api.onswig.com.

What the SDK owns

  • API-key authentication and retry behavior
  • wallet creation and unsigned transaction preparation
  • transfers, swaps, grouped operations, and custom instructions
  • threshold ParticipantSet creation, role assignment, and approval compilation
  • wallet, role, paymaster, and ramp reads
  • fiat ramp order operations, buying and selling
  • sponsorship of application-signed transactions and mainnet bundles
  • optional signing helpers that combine application-provided signatures with prepared transactions

What your application owns

  • end-user authentication and authorization
  • frontend transport and user interfaces
  • wallet-provider, passkey, hardware-wallet, or custody integration
  • every private key and user authorization decision
  • confirmation and finality tracking after submission
The server SDK returns unsigned prepared transactions and signature-request metadata. Your application obtains the signature. The optional signing helpers can assemble that signature into the prepared transaction without receiving an API key or private key.

Choose the matching Swig product

  • Use this SDK when a trusted server should call Swig’s hosted API.
  • Use the Developer API for direct REST integration.
  • Use the Protocol SDK when your application integrates directly with the on-chain protocol and owns the full transaction lifecycle.
  • Use the IDP SDK for browser or mobile authentication flows.

Set up your integration

Start with an SDK language and an API key for your trusted server. Then choose what each wallet role may do and how its authority will sign. An API key authenticates hosted API requests; wallet operations still require the appropriate authority’s signature or approval proofs.

Choose a Language

Initialize a TypeScript or Python server client

API Keys

Connect your server to Swig’s hosted API

Permissions

Choose what each wallet role may do

Create Wallets

Prepare a wallet from a template or an inline authority

Transfer SOL and Tokens

Prepare a transfer for your application to sign

Sponsor & Submit

Sponsor and submit signed transactions

Configure wallet access

Use Policy Templates to save wallet-creation configuration and Read Policy Templates to inspect it. For an existing wallet, use Add Roles to attach an authority and its permissions. Signers explains application-owned signing; Participant Sets extends one role to require M-of-N approvals.
Guardian recovery requires additional protocol and SDK integration. See Guardian recovery for scoped key replacement, the proposed multiple-approval extension, and current support boundaries.