Skip to content

Commit 7f80daf

Browse files
More tweaks
1 parent f6948b4 commit 7f80daf

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

AGENTS.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ yarn build
4545
# Build a single package
4646
yarn workspace @metamask/snaps-controllers build
4747

48-
# Build execution environments (special LavaMoat build, run after main build)
48+
# Build execution environments exclusively (special LavaMoat build, run optionally)
4949
yarn build:execution-environments
5050
```
5151

@@ -184,31 +184,31 @@ snaps-jest
184184
- **SnapId**: Unique identifier (e.g., `npm:@metamask/example-snap`)
185185
- **SnapStatus**: Lifecycle state (`Stopped`, `Running`, `Crashed`)
186186
- **SnapManifest**: Configuration file (`snap.manifest.json`)
187-
- **TruncatedSnap**: Lightweight snap representation
188-
- **PersistedSnap**: Full snap data for storage
187+
- **TruncatedSnap**: Lightweight Snap representation
188+
- **PersistedSnap**: Full Snap data for storage
189189

190190
### Permission System
191191

192192
- **Caveat**: Constraint on a permission
193-
- **Endowment**: Capability granted to a snap (e.g., `endowment:network-access`). May grant access to JavaScript globals.
193+
- **Endowment**: Capability granted to a Snap (e.g., `endowment:network-access`). May grant access to JavaScript globals.
194194
- **Restricted**: JSON-RPC method requiring permission
195195
- **Permitted**: Publicly accessible JSON-RPC method
196196

197197
### Execution
198198

199199
- **ExecutionEnvironment**: Runtime context (iframe, webview, worker)
200200
- **Job**: Execution task with Snap ID, streams, and JSON-RPC engine
201-
- **Endowments**: APIs available in snap context
201+
- **Endowments**: APIs available in Snap context
202202

203203
## Adding New Platform Features
204204

205205
When implementing a new Snaps Platform feature (e.g., a new permission, endowment, or RPC method), include:
206206

207-
1. **An example snap** in `packages/examples/packages/` demonstrating the feature
207+
1. **An example Snap** in `packages/examples/packages/` demonstrating the feature
208208
2. **A test-snaps UI** in `packages/test-snaps/` for manual testing with MetaMask
209209
3. **Simulation support** in `snaps-simulation` and/or `snaps-jest` if needed for the example's E2E tests to pass
210210

211-
New RPC methods, permissions, or platform APIs often require corresponding mock implementations or handlers in the simulation layer before the example snap's tests can function correctly.
211+
New RPC methods, permissions, or platform APIs often require corresponding mock implementations or handlers in the simulation layer before the example Snap's tests can function correctly.
212212

213213
### Example Snap Structure
214214

@@ -224,7 +224,7 @@ packages/examples/packages/<feature-name>/
224224
└── jest.config.js
225225
```
226226

227-
The example snap should:
227+
The example Snap should:
228228

229229
- Export the relevant handler (e.g., `onRpcRequest`, `onTransaction`)
230230
- Request only the permissions needed for the feature
@@ -238,12 +238,12 @@ Add a feature directory in `packages/test-snaps/src/features/snaps/<feature-name
238238
packages/test-snaps/src/features/snaps/<feature-name>/
239239
├── constants.ts # SNAP_ID, SNAP_PORT, VERSION exports
240240
├── index.ts # Re-exports the React component
241-
└── <FeatureName>.tsx # React component with UI to test the snap
241+
└── <FeatureName>.tsx # React component with UI to test the Snap
242242
```
243243

244244
Then:
245245

246-
1. Add the example snap as a `devDependency` in `packages/test-snaps/package.json`
246+
1. Add the example Snap as a `devDependency` in `packages/test-snaps/package.json`
247247
2. Export the feature component from `packages/test-snaps/src/features/snaps/index.ts`
248248

249249
See `packages/examples/packages/multichain-provider/` for a complete example.

0 commit comments

Comments
 (0)