Skip to main content
The Developer SDK remains a server-side product: SwigClient and the API key stay on your server. After the server prepares a transaction, the TypeScript /browser entrypoint provides a small set of signers for application-owned wallets and passkeys. The helpers accept no API key, cannot call Swig’s hosted API, and never receive a private key. Your application still owns user authorization, the signer, and key custody.

Decide how to sign

Do not use an empty signatureRequests / signature_requests array as proof that a transaction needs no application signature. Those records describe embedded secp256r1 or secp256k1 signatures. A native Ed25519 authority is a required signer in the serialized Solana transaction instead, so the array can be empty while the Ed25519 transaction signature is still missing. Match the signing path to the requester authority used during preparation and to the transaction’s required signer set. Use each signature request to select and patch the corresponding secp256r1 or secp256k1 signer.

Ed25519 and application-defined signers

Use the generic helper when your application already knows how to sign a serialized Solana transaction:
TypeScript
The application callback receives the base64 serialized transaction and the full prepared record, then returns the signed base64 serialized transaction. The SDK does not load or store the signing key.

Secp256r1 and passkeys

The passkey adapter requests an assertion from the application environment and patches the returned WebAuthn data into the prepared Swig transaction:
TypeScript
The TypeScript adapter is the only part of this flow intended for a WebAuthn browser environment. It has no access to the server client or API key. Python uses an application-provided assertion callback and does not initiate browser navigation itself.

Secp256k1 and EVM wallets

The EVM adapter wraps an EIP-1193 provider with personal_sign and formats the result for a Swig secp256k1 authority:
TypeScript

Return to the server

Send the signed serialized transaction back through an authenticated application route. The server can then call swig.transactions.sponsor(...), submit through its own RPC path, and track confirmation or finality. Do not send the Swig developer API key, signer object, private key, or raw credential material across this boundary.