Skip to main content

Introduction

A participant set lets independent members authorize one Swig role with an M-of-N threshold. Use it for shared control, such as requiring two members to approve a transfer. The set determines who approves; the role’s permissions determine what they may do. Each set belongs to one Swig config. Members can use Ed25519, secp256r1/passkeys, or secp256k1. Approvals bind the same operation and shared nonce.

SDK examples

Use Client setup. The examples use two Ed25519 members. signAndSubmit / sign_and_submit is your application’s helper; it signs, submits, and waits for confirmation. Rust inputs use native Pubkey values.

Create the set and add its role

Confirm set creation before adding its role. This role needs both System Program access and a one-time SOL budget; each successful transfer reduces that budget. After adding the role, read its assigned ID for the Rust operation below.

Prepare an operation

Collect member approvals

Distribute each request to its member and collect the returned approval. The TypeScript/Python examples keep both callbacks together to show the full flow. For Rust, run the signer for each selected member’s request from plan.members and collect the results into approvals.
Ed25519 signs the decoded challenge. The secp256k1 participant helper signs its lowercase hexadecimal form with EIP-191. The Rust P-256 participant helper creates a software WebAuthn proof; it does not establish browser user presence. Use application-owned credential selection and RP ID/origin checks for passkeys.

Compile and submit

Compilation validates the approvals and simulates the transaction. It does not sponsor, broadcast, or confirm it.
Add remaining Solana signatures after compilation, then submit before authorizationExpirationSlot / authorization_expiration_slot. Use Paymaster for sponsorship. Keep approvals with their original plan and nonce.

Flow

Input

Serialize operations per set. Concurrent plans share the next nonce; once one lands, prepare and approve the others again. Supported flows include SOL/token transfers, transfer batches, and custom instructions without lookup tables. Swaps and lookup-table transactions need a direct requester. Hosted recovery preparation is not supported.

Errors