This page covers the portal-facing clients
@swig-wallet/api and @swig-wallet/developer. For the
primary prepare-first Swig Developer SDK, see
What the Developer SDK Does.
Treat @swig-wallet/developer as the legacy SDK for new
integrations. The current @swig-wallet/developer-sdk package is
optimized for prepared wallet operations. It does expose
swig.wallets.getPolicy(policyId), but it returns raw policy
metadata rather than the richer helper surface from the legacy SDK.Prerequisites
Before fetching policies, ensure you have:- An API key created in the Developer Portal
- A policy created that you want to fetch
- The policy ID (visible in the portal’s policy details)
Choose the Right Package
- API SDK
- Current SDK
- Legacy SDK
Fetching a Policy
Using the REST API
Make a GET request to the policies endpoint:{policyId} with your actual policy ID (e.g., clx1234567890abcdef).
Example Response:
Using a Portal Client
- API SDK
- Legacy SDK
If You’re Already Using the Current SDK
If your app already uses@swig-wallet/developer-sdk for prepared wallet
operations, you can read the same raw policy metadata the SDK uses during
wallet creation and recovery flows:
@swig-wallet/api. For richer helper methods around
actions and authorities, use the legacy @swig-wallet/developer client.
Package Fit
Response Types
Policy
Authority Configuration
Theauthority field can be one of several types:
Action Configuration
Theactions array contains one or more action configurations:
Error Handling
- API SDK
- Legacy SDK
Common Errors
Retry Configuration
Both SDKs support automatic retries for transient failures:- API SDK
- Legacy SDK
Complete Example
- API SDK
- Legacy SDK

