@loyal-labs/loyal-smart-accounts.
What It Exposes
The public surface is split by feature namespace instead of one flat API:programConfigsmartAccountsproposalstransactionsbatchespoliciesspendingLimitsexecution
generatedaccountspdacodecserrorsPROGRAM_ID
Install
Create A Client
Three Ways To Work
This is the most important pattern in the SDK:- Build a raw instruction
- Build a prepared operation
- Use the client send flow
1. Raw Instruction
UsesmartAccounts.instructions.create(...) when you want full transaction assembly control.
2. Prepared Operation
UsesmartAccounts.prepare.create(...) when you want the SDK to package the operation cleanly before sending it yourself.
3. Client Send Flow
Useclient.smartAccounts.create(...) when you want the highest-level path.
Choosing The Right Level
Every feature namespace follows the same model: raw account classes, optional raw instruction builders, prepared-operation builders, account queries, and bound client methods. For example, proposals expose create/approve/reject/cancel operations, transactions expose create/buffer/log-event operations, and execution exposes async, synchronous, settings, batch, and policy execution helpers.
The low-level SDK exposes both current policy APIs and legacy spending-limit instructions. For new Loyal product flows, prefer policy-based spending limits through the vault adapter described below.
PDA Helpers You Will Use Early
Two helpers matter immediately:pda.getSettingsPda({ accountIndex })pda.getSmartAccountPda({ settingsPda, accountIndex })
App-Facing Vault Adapter
Most Loyal frontend flows use@loyal-labs/smart-account-vaults on top of this SDK. That package turns the lower-level Squads account model into app-ready APIs for:
- vault portfolio and activity reads
- proposal summaries and approval actions
- policy signer connect/disconnect flows
- spending-limit policy create, update, delete, and top-up actions
- wallet-adapter sending for prepared operations
What To Read Next
- Concepts for the vocabulary behind the fields
- Policies and Execution for the governance and execution model
- Frontend and Vault APIs for the app-facing package and frontend flow
The TS SDK already exposes the broader feature namespaces listed above. This page stays centered on the create flow and the main integration pattern so it remains useful instead of turning into a dump of every operation.

