What is a Group?
A group is the core organizing unit in Lit Chipotle. It binds together three things:- Wallets (PKPs) — which wallets can be used
- IPFS Actions — which lit-actions can be executed
- Usage API Keys — which keys have access (via their permission arrays)
Why Groups Exist
Without groups, every usage key would have access to every wallet and every action in your account. Groups let you:- Scope a key to a single dApp — give your price-oracle service a key that can only execute the price-oracle action using a specific wallet.
- Isolate environments — separate staging actions from production actions.
- Rotate access safely — revoke a usage key without affecting other keys or groups.
How Groups Connect to Everything
| Resource | Relationship to Group |
|---|---|
| Wallet (PKP) | Added via add_pkp_to_group. A wallet can belong to multiple groups. |
| IPFS Action | Added via add_action_to_group (raw CID, server hashes it). An action can belong to multiple groups. |
| Usage API Key | Granted access at creation via permission arrays (e.g., execute_in_groups: [1, 2]). Use [0] as a wildcard for all groups. |
| Account Key | Always has full access to all groups — no group scoping needed. |
Common Patterns
One group per dApp
All-access key for development
Create a usage key withexecute_in_groups: [0] (wildcard). This key can run any action in any group — useful for local development, but never deploy it.
Shared wallets across groups
A single wallet can belong to multiple groups. This is useful when multiple dApps need to sign with the same address but run different actions.Group Lifecycle
- Create —
POST /core/v1/add_groupwith a name and optional pre-permitted PKPs and CID hashes. - Configure — Add wallets (
add_pkp_to_group) and actions (add_action_to_group). - Grant access — Create or update usage keys with the group ID in their permission arrays.
- Update —
POST /core/v1/update_groupto change name, description, or permission lists. - Delete —
POST /core/v1/remove_groupto remove the group. Usage keys that referenced it lose that access.
Permission Flags on Groups
When creating a group, two convenience flags control default access:- All wallets permitted — any wallet in the account can be used via this group (no need to add individually).
- All actions permitted — any registered action can be run via this group.
pkp_ids_permitted and cid_hashes_permitted arrays in the API. On-chain, these flags are not separate booleans: they are encoded using wildcard values in the arrays:
- To permit all wallets, include the zero PKP ID in
pkp_ids_permitted:pkp_ids_permitted: ["0x0000000000000000000000000000000000000000000000000000000000000000"]
- To permit all actions, include
0incid_hashes_permitted:cid_hashes_permitted: [0]
Further Reading
- API Reference — Full endpoint docs for group management
- API Keys — How usage keys connect to groups
- Architecture — System design overview