Skip to content

Commit a3c94a1

Browse files
committed
Merge branch 'main' into site-fixes
# Conflicts: # eslint.config.mjs # gator_versioned_docs/version-0.1.0/get-started/supported-networks.md # gator_versioned_docs/version-0.2.0/get-started/supported-networks.md # gator_versioned_docs/version-0.3.0/get-started/supported-networks.md # gator_versioned_docs/version-1.0.0/get-started/supported-networks.md # smart-accounts-kit/concepts/smart-accounts.md # smart-accounts-kit/get-started/smart-account-quickstart/eip7702.md # smart-accounts-kit/get-started/supported-advanced-permissions.md # smart-accounts-kit/get-started/supported-networks.md # smart-accounts-kit/get-started/use-scaffold-eth/smart-accounts.md # smart-accounts-kit/get-started/use-the-cli.md # smart-accounts-kit/guides/advanced-permissions/create-redelegation.md # smart-accounts-kit/guides/advanced-permissions/execute-on-metamask-users-behalf.md # smart-accounts-kit/guides/advanced-permissions/get-granted-permissions.md # smart-accounts-kit/guides/advanced-permissions/get-supported-permissions.md # smart-accounts-kit/guides/delegation/create-redelegation.md # smart-accounts-kit/guides/delegation/disable-delegation.md # smart-accounts-kit/guides/delegation/use-delegation-scopes/function-call.md # smart-accounts-kit/guides/delegation/use-delegation-scopes/spending-limit.md # smart-accounts-kit/guides/smart-accounts/deploy-smart-account.md # smart-accounts-kit/guides/smart-accounts/generate-multisig-signature.md # smart-accounts-kit/guides/smart-accounts/signers/passkey.md # smart-accounts-kit/reference/advanced-permissions/wallet-client.md # smart-accounts-kit/reference/delegation/caveats.md # smart-accounts-kit/reference/delegation/delegation-scopes.md # smart-accounts-kit/reference/delegation/index.md # smart-accounts-kit/reference/erc7710/bundler-client.md # smart-accounts-kit/reference/erc7710/wallet-client.md # smart-accounts-kit/reference/smart-account.md # smart-accounts-kit/reference/types.md # smart-accounts-kit/troubleshooting/error-codes.md # smart-accounts-kit/troubleshooting/invalid-delegate.md # smart-accounts-kit/troubleshooting/invalid-delegator.md
2 parents 6d2b8b8 + 45eb520 commit a3c94a1

65 files changed

Lines changed: 970 additions & 362 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/product-smart-accounts-kit.mdc

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
2-
description: Product-specific guidance for Smart Accounts Kit documentation, including terminology, delegation concepts, and versioning.
3-
globs: ["smart-accounts-kit/**/*.md", "smart-accounts-kit/**/*.mdx"]
2+
description: Product-specific guidance for Smart Accounts Kit documentation, including terminology, delegation concepts, glossary/tooltips, and versioning.
3+
globs:
4+
[
5+
'smart-accounts-kit/**/*.md',
6+
'smart-accounts-kit/**/*.mdx',
7+
'src/lib/glossary.json',
8+
'scripts/generate-smart-accounts-glossary.js',
9+
]
410
alwaysApply: false
511
---
612

@@ -31,13 +37,13 @@ Smart Accounts Kit has three pillars. Use these terms consistently:
3137

3238
## Content organization
3339

34-
| Folder | Content type |
35-
|---------------------|-------------------------------------------------|
36-
| `concepts/` | Explanation (smart accounts, delegation, permissions) |
37-
| `get-started/` | Quickstart and setup (install, CLI, supported networks) |
38-
| `guides/` | How-to (create/deploy accounts, send ops, delegate) |
39-
| `reference/` | API reference (methods, types, parameters) |
40-
| `troubleshooting/` | Problem/solution (error codes, common issues) |
40+
| Folder | Content type |
41+
| ------------------ | ------------------------------------------------------- |
42+
| `concepts/` | Explanation (smart accounts, delegation, permissions) |
43+
| `get-started/` | Quickstart and setup (install, CLI, supported networks) |
44+
| `guides/` | How-to (create/deploy accounts, send ops, delegate) |
45+
| `reference/` | API reference (methods, types, parameters) |
46+
| `troubleshooting/` | Problem/solution (error codes, common issues) |
4147

4248
## Reference conventions
4349

@@ -47,6 +53,26 @@ Smart Accounts Kit has three pillars. Use these terms consistently:
4753
multi-file examples.
4854
- Types and enums link to `reference/types.md`.
4955

56+
## Glossary and tooltips
57+
58+
### Glossary page (`reference/glossary.mdx`)
59+
60+
- **Source of truth:** Add or update definitions in [`src/lib/glossary.json`](src/lib/glossary.json). Each entry needs a `term` string and a `definition` string.
61+
- **Generated file:** [`smart-accounts-kit/reference/glossary.mdx`](smart-accounts-kit/reference/glossary.mdx) is **auto-generated**. Do not edit it by hand.
62+
- **Regeneration:** Run `npm run glossary:generate`, or use `npm start` / `npm run build` (both run the glossary script first). The generator is [`scripts/generate-smart-accounts-glossary.js`](scripts/generate-smart-accounts-glossary.js).
63+
64+
The `term` string in each glossary entry must match exactly what you pass to the `term` prop on `GlossaryTerm` (see below).
65+
66+
### Inline tooltips (`GlossaryTerm`)
67+
68+
- Import the theme component: `import GlossaryTerm from '@theme/GlossaryTerm';`
69+
- Wrap visible text and set `term` to the matching glossary `term` string, for example:
70+
`<GlossaryTerm term="User operation">user operations</GlossaryTerm>` or
71+
`<GlossaryTerm term="MetaMask smart account" />` when the displayed label matches the glossary term.
72+
- Example page: [`smart-accounts-kit/get-started/smart-account-quickstart/index.md`](smart-accounts-kit/get-started/smart-account-quickstart/index.md).
73+
74+
There is no strict rule for when to add tooltips. In practice, use them when a term appears for the first time in a documentation section and readers benefit from a short definition, but the term does **not** warrant linking out to a full concept or guide page. Tooltips add context without the extra step of opening another page.
75+
5076
## Versioning
5177

5278
Smart Accounts Kit uses Docusaurus versioning. The current development version is at path

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default [
2121
'node_modules/*',
2222
'.docusaurus/*',
2323
'.integrationBuilderCache/*',
24+
'scripts/*.js',
2425
'**/*.md',
2526
'**/*.mdx',
2627
'static/*',

gator-sidebar.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ const sidebar = {
199199
items: ['reference/erc7710/bundler-client', 'reference/erc7710/wallet-client'],
200200
},
201201
'reference/types',
202+
{
203+
type: 'doc',
204+
id: 'reference/glossary',
205+
label: 'Glossary',
206+
},
202207
],
203208
},
204209
{

gator_versioned_docs/version-0.1.0/get-started/supported-networks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ If you don't see the network you're looking for, you can request support by emai
6464
| Binance Smart Chain ||
6565
| Ethereum ||
6666
| Gnosis ||
67+
| Linea ||
6768
| Optimism ||
6869
| Polygon ||
70+
| Sei ||
6971
| Sonic ||
7072
| Unichain ||
7173

@@ -80,9 +82,11 @@ If you don't see the network you're looking for, you can request support by emai
8082
| Chiado ||
8183
| Citrea ||
8284
| Hoodi ||
85+
| Linea Sepolia ||
8386
| MegaEth ||
8487
| Optimism Sepolia ||
8588
| Polygon Amoy ||
89+
| Sei ||
8690
| Sepolia ||
8791
| Sonic ||
8892
| Unichain Sepolia ||

gator_versioned_docs/version-0.2.0/get-started/supported-networks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ If you don't see the network you're looking for, you can request support by emai
6767
| Citrea |||
6868
| Ethereum |||
6969
| Gnosis |||
70+
| Linea |||
7071
| Monad |||
7172
| Optimism |||
7273
| Polygon |||
74+
| Sei |||
7375
| Sonic |||
7476
| Unichain |||
7577

@@ -84,9 +86,11 @@ If you don't see the network you're looking for, you can request support by emai
8486
| Chiado |||
8587
| Citrea |||
8688
| Hoodi |||
89+
| Linea Sepolia |||
8790
| MegaEth |||
8891
| Optimism Sepolia |||
8992
| Polygon Amoy |||
93+
| Sei |||
9094
| Sepolia |||
9195
| Sonic |||
9296
| Unichain Sepolia |||

gator_versioned_docs/version-0.3.0/get-started/supported-networks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ If you don't see the network you're looking for, you can request support by emai
6767
| Citrea ||||
6868
| Ethereum ||||
6969
| Gnosis ||||
70+
| Linea ||||
7071
| Monad ||||
7172
| Optimism ||||
7273
| Polygon ||||
74+
| Sei ||||
7375
| Sonic ||||
7476
| Unichain ||||
7577

@@ -84,9 +86,11 @@ If you don't see the network you're looking for, you can request support by emai
8486
| Chiado ||||
8587
| Citrea ||||
8688
| Hoodi ||||
89+
| Linea Sepolia ||||
8790
| MegaEth ||||
8891
| Optimism Sepolia ||||
8992
| Polygon Amoy ||||
93+
| Sei ||||
9094
| Sepolia ||||
9195
| Sonic ||||
9296
| Unichain Sepolia ||||

gator_versioned_docs/version-1.0.0/get-started/supported-networks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ If you don't see the network you're looking for, you can request support by emai
7575
| Citrea |||||
7676
| Ethereum |||||
7777
| Gnosis |||||
78+
| Linea |||||
7879
| Monad |||||
7980
| Optimism |||||
8081
| Polygon |||||
82+
| Sei |||||
8183
| Sonic |||||
8284
| Unichain |||||
8385

@@ -92,9 +94,11 @@ If you don't see the network you're looking for, you can request support by emai
9294
| Chiado |||||
9395
| Citrea |||||
9496
| Hoodi |||||
97+
| Linea Sepolia |||||
9598
| MegaETH |||||
9699
| Optimism Sepolia |||||
97100
| Polygon Amoy |||||
101+
| Sei |||||
98102
| Sepolia |||||
99103
| Sonic |||||
100104
| Unichain Sepolia |||||

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"license": "(MIT OR Apache-2.0)",
66
"scripts": {
77
"docusaurus": "docusaurus",
8-
"start": "docusaurus snaps:generate && docusaurus start -p 3003",
9-
"build": "docusaurus snaps:generate && docusaurus build",
8+
"start": "npm run glossary:generate && docusaurus snaps:generate && docusaurus start -p 3003",
9+
"build": "npm run glossary:generate && docusaurus snaps:generate && docusaurus build",
10+
"glossary:generate": "node ./scripts/generate-smart-accounts-glossary.js",
1011
"swizzle": "docusaurus swizzle",
1112
"deploy": "docusaurus deploy",
1213
"clear": "docusaurus clear",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
const fs = require('fs')
2+
const path = require('path')
3+
4+
const rootDir = path.resolve(__dirname, '..')
5+
const glossaryJsonPath = path.join(rootDir, 'src/lib/glossary.json')
6+
const glossaryMdxPath = path.join(rootDir, 'smart-accounts-kit/reference/glossary.mdx')
7+
8+
function loadGlossaryTerms() {
9+
const raw = fs.readFileSync(glossaryJsonPath, 'utf8')
10+
const data = JSON.parse(raw)
11+
12+
if (!data || !Array.isArray(data.terms)) {
13+
throw new Error('Invalid glossary JSON: expected a top-level "terms" array.')
14+
}
15+
16+
return [...data.terms]
17+
.filter(term => term && typeof term.term === 'string' && typeof term.definition === 'string')
18+
.sort((a, b) => a.term.localeCompare(b.term))
19+
}
20+
21+
function buildGlossaryMdx(terms) {
22+
const lines = [
23+
'---',
24+
'description: Glossary of terms used across Smart Accounts Kit documentation.',
25+
'title: Glossary',
26+
'keywords: [glossary, smart accounts kit, delegation, advanced permissions, terms]',
27+
'---',
28+
'',
29+
'This glossary defines common Smart Accounts Kit terms used across the documentation.',
30+
'',
31+
'<!-- AUTO-GENERATED by scripts/generate-smart-accounts-glossary.js. -->',
32+
'<!-- Edit src/lib/glossary.json and run npm run glossary:generate. -->',
33+
'',
34+
]
35+
36+
terms.forEach(({ term, definition }) => {
37+
lines.push(`### ${term}`)
38+
lines.push('')
39+
lines.push(definition.trim())
40+
lines.push('')
41+
})
42+
43+
return `${lines.join('\n')}\n`
44+
}
45+
46+
function main() {
47+
const terms = loadGlossaryTerms()
48+
const mdx = buildGlossaryMdx(terms)
49+
fs.writeFileSync(glossaryMdxPath, mdx, 'utf8')
50+
console.log(
51+
`Generated ${path.relative(rootDir, glossaryMdxPath)} from ${path.relative(rootDir, glossaryJsonPath)} (${terms.length} terms).`
52+
)
53+
}
54+
55+
main()

0 commit comments

Comments
 (0)