Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.
Core Insight: API mode and ChainSecured mode aren’t a toggle in the code — they’re an emergent property of how you configure the same system. The only things that vary are who owns the account (a Lit-managed credential vs a SAFE or EOA you control) and what scopes the API keys have. The contracts don’t know or care.
Entity Boundaries
The system spans four distinct trust boundaries. Understanding what lives where is essential to reasoning about security.
User / External
Entity
Description
Account Owner
Top-level identity. An address on Base that can do everything. A SAFE or EOA you control (ChainSecured mode), or a Lit-managed credential (API mode). Ultimate authority.
API Key (Private Key)
User holds the key locally. Sent to TEE over HTTPS per-request. TEE hashes it (keccak256) and checks that hash’s scopes on-chain.
SAFE / Governance
Optional. Multisig, timelocks, voting. Submits txs directly to chain for structural changes — TEE not involved.
TEE Enclave (Phala / dstack)
Entity
Description
Root Key
Master secret managed by Phala’s KMS. Only approved TEE build images can derive from it. Never leaves the enclave.
Key Derivation
Signing key + symmetric encryption key derived transiently from root key using derivation path ID. Never persisted.
Auth Verification
Hashes the API key → reads on-chain scopes → checks group membership of action CID + PKP → allows or rejects.
Sandbox Execution
Runs the Lit Action code sent with the request in a sandboxed JS environment with access to derived key material. Returns result to caller. The TEE doesn’t fetch code from IPFS.
TX Relay
Convenience relay for management operations on API-mode accounts. TEE checks scopes, then signs and submits tx to Base on user’s behalf. The contract rejects relayed writes to a ChainSecured account.
On-Chain (Base)
Entity
Description
Account Contract
Registers the owner address and the account’s managed flag. All permissions flow from this. Writes need msg.sender == owner, or the TEE relay when the account is in API mode.
API Key Registry
On-chain mapping of key hashes → scopes. Includes per-group scope bindings. Owner-managed.
PKP Registry
List of PKP derivation path IDs owned by the account. PKPs are created here, then referenced by Groups.
Groups
Permission policies binding {PKP IDs, Action CIDs}. “Who can execute” is on the API key, not the group.
IPFS (Content-addressed)
Entity
Description
Lit Actions
Immutable JS, referenced by its IPFS CID. You can pin it to IPFS so others can audit it; the TEE runs the copy sent with the request. Not owned by anyone — public, reusable, content-addressed. Like npm packages.
Entity Relationships
USER / EXTERNAL ON-CHAIN (BASE) TEE ENCLAVE───────────────────────────── ────────────────────────── ──────────────────────────────Account Owner Account Contract Root Key EOA / SAFE / Lit-managed ──▶ owner address registered master secret, never exported │ owns │ derives │ API Key Registry Auth + Key DerivationAPI Key (private key) ──▶ key hash → scopes mapping ◀── verify scopes, derive keys Held by user, sent/request │ provides keys │ sent over HTTPS │ reads │ └──────────────────────────▶ TEE Sandbox Execution │ runs Lit Actions w/ key material PKP Registry │ code sent with request derivation path IDs ▼ │ referenced Lit Actions (by CID) Groups ◀── Immutable JS, public CIDs {PKP refs, ACIDs} │ CID ref TX Relay (API mode only) signs + submits mgmt txs
Execution Flow (Inside the TEE)
Step
Action
Who
1
User sends API key + the action code + "run it with pkp_001" over HTTPS. The TEE hashes the code to get its CID, QmABC
user → tee
2
TEE hashes the API key (keccak256 of the key string)
inside tee
3
TEE reads the API Key Registry on Base — does this key hash have execute scope? On which groups?
tee → chain read
4
TEE checks: is there a group this key can execute on where QmABC is a listed action AND pkp_001 is a listed PKP?
tee → chain read
5
If authorized → run the QmABC code from the request in the sandbox → derive pkp_001 key material from root key when the action asks for it → return result
inside tee
✕ Reject
If any check fails → reject the request. No key material is derived.
—
Management Paths
There are two paths for making structural changes (creating groups, adding PKPs, updating scopes):
Path A: Via TEE Relay (convenience)
TEE checks scopes and submits the transaction on the user’s behalf. API-mode accounts only.
User + API Key → TEE (verify scopes) → Permissions Contract
Path B: Direct to Chain (ChainSecured mode)
Owner submits transactions directly — TEE is not involved. The only write path for a ChainSecured account.
SAFE / EOA → Permissions Contract
API Key Scopes
Scope
Allows
Type
execute
Invoke Lit Actions with PKPs
per-group
pkp:create
Create new PKPs in the account’s registry
account-wide
group:create
Create new groups
account-wide
group:delete
Delete groups
account-wide
group:manageActions
Add / remove action CIDs in a group
per-group
group:addPkp
Add PKP references to a group
per-group
group:removePkp
Remove PKP references from a group
per-group
Permission Matrix
The API Key column applies to API-mode accounts, where the TEE relays the call. On a ChainSecured account an API key can only invoke actions; every other row is an owner transaction.
Operation
Owner
API Key
Scope Required
Invoke action + PKP
✓
✓
execute(group_id)
Create PKP
✓
✓
pkp:create
Create group
✓
✓
group:create
Delete group
✓
✓
group:delete
Add/remove actions
✓
✓
group:manageActions(group_id)
Add PKPs to group
✓
✓
group:addPkp(group_id)
Remove PKPs from group
✓
✓
group:removePkp(group_id)
Add / revoke API key
✓
✕
owner only
Update API key scopes
✓
✕
owner only
Transfer ownership
✓
✕
owner only
Configuration Comparison
The same system, two very different security postures — determined by who the owner is, whether the account is managed (API mode) or not (ChainSecured mode), and what scopes the keys carry.
API Mode
Fast iteration, broad scopes, managed recovery
Owner
A Lit-managed credential
API Key
dev_key with execution and group 1 management: execute(*), pkp:create, group:create, group:delete, group:manageActions(group_1), group:addPkp(group_1), group:removePkp(group_1)
Effect
Developer executes actions and manages group 1 via HTTP. The owner grants explicit management permissions for additional groups. Recovery = re-authenticating to the dashboard.
server_key → execute(group_1) only. Management scopes would have no effect, because the contract rejects writes from the TEE to a ChainSecured account.
Effect
Day-to-day execution via server_key. Every change (PKPs, groups, actions, keys) is a SAFE transaction. Leaked key blast radius is minimal.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Documentation","colors":{"primary":"#0D9373","light":"#F97316","dark":"#EA580C"},"logo":{"light":"https://mintcdn.com/litprotocol/QETV3ZoD4rHDsUls/logo/light.svg?fit=max\u0026auto=format\u0026n=QETV3ZoD4rHDsUls\u0026q=85\u0026s=5bf9ff54e3d9d64f6068e4d5aac6035d","dark":"https://mintcdn.com/litprotocol/QETV3ZoD4rHDsUls/logo/dark.svg?fit=max\u0026auto=format\u0026n=QETV3ZoD4rHDsUls\u0026q=85\u0026s=7ed0fceb7a8b48e80cd7e3c2bb75b9ed"},"favicon":"https://mintcdn.com/litprotocol/QETV3ZoD4rHDsUls/favicon.svg?fit=max\u0026auto=format\u0026n=QETV3ZoD4rHDsUls\u0026q=85\u0026s=b3101ee95b738bfffbefda6094e7c657","navbar":{"links":[]},"footer":{"socials":{"x":"https://twitter.com/litprotocol","discord":"https://litgateway.com/discord","github":"https://github.com/LIT-Protocol/chipotle"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"litprotocol","hasAudioNarration":false,"actualSubdomain":"litprotocol","customDomains":["developer.litprotocol.com"],"gitSource":{"type":"github","owner":"lit-protocol","repo":"chipotle","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af7add7a50788a57d5b14a9","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Building on Lit Protocol","count":41},{"language":"default","tag":"Architecture","count":14},{"language":"default","tag":"Lit Actions","count":11},{"language":"default","tag":"Security \u0026 Verification","count":8},{"language":"default","tag":"Management","count":8},{"language":"default","tag":"Lit Agent Keychain","count":6},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Lit Triggers","count":3},{"language":"default","tag":"Migration","count":2},{"language":"default","tag":"Actions Reference","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"architecture/diagram","slug":"/architecture/diagram","pageMetadata":{"title":"Entity Relationships","description":"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.","href":"/architecture/diagram"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Core Insight:`}),` API mode and ChainSecured mode aren’t a toggle in the code — they’re an `,_jsx(_components.strong,{children:`emergent property`}),` of how you configure the same system. The only things that vary are `,_jsx(_components.strong,{children:`who owns the account`}),` (a Lit-managed credential vs a SAFE or EOA you control) and `,_jsx(_components.strong,{children:`what scopes the API keys have`}),`. The contracts don’t know or care.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`entity-boundaries`,children:`Entity Boundaries`}),`\n`,_jsx(_components.p,{children:`The system spans four distinct trust boundaries. Understanding what lives where is essential to reasoning about security.`}),`\n`,_jsx(Heading,{level:`3`,id:`user-/-external`,children:`User / External`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Entity`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Account Owner`})}),_jsxs(_components.td,{children:[`Top-level identity. An address on Base that can do everything. A SAFE or EOA you control (ChainSecured mode), or a Lit-managed credential (API mode). `,_jsx(_components.strong,{children:`Ultimate authority.`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API Key (Private Key)`})}),_jsx(_components.td,{children:`User holds the key locally. Sent to TEE over HTTPS per-request. TEE hashes it (keccak256) and checks that hash’s scopes on-chain.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`SAFE / Governance`})}),_jsx(_components.td,{children:`Optional. Multisig, timelocks, voting. Submits txs directly to chain for structural changes — TEE not involved.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`tee-enclave-phala-/-dstack`,children:`TEE Enclave (Phala / dstack)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Entity`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Root Key`})}),_jsx(_components.td,{children:`Master secret managed by Phala’s KMS. Only approved TEE build images can derive from it. Never leaves the enclave.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Key Derivation`})}),_jsx(_components.td,{children:`Signing key + symmetric encryption key derived transiently from root key using derivation path ID. Never persisted.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Auth Verification`})}),_jsx(_components.td,{children:`Hashes the API key → reads on-chain scopes → checks group membership of action CID + PKP → allows or rejects.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Sandbox Execution`})}),_jsx(_components.td,{children:`Runs the Lit Action code sent with the request in a sandboxed JS environment with access to derived key material. Returns result to caller. The TEE doesn’t fetch code from IPFS.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`TX Relay`})}),_jsx(_components.td,{children:`Convenience relay for management operations on API-mode accounts. TEE checks scopes, then signs and submits tx to Base on user’s behalf. The contract rejects relayed writes to a ChainSecured account.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`on-chain-base`,children:`On-Chain (Base)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Entity`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Account Contract`})}),_jsxs(_components.td,{children:[`Registers the owner address and the account’s `,_jsx(_components.code,{children:`managed`}),` flag. All permissions flow from this. Writes need `,_jsx(_components.code,{children:`msg.sender == owner`}),`, or the TEE relay when the account is in API mode.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API Key Registry`})}),_jsx(_components.td,{children:`On-chain mapping of key hashes → scopes. Includes per-group scope bindings. Owner-managed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PKP Registry`})}),_jsx(_components.td,{children:`List of PKP derivation path IDs owned by the account. PKPs are created here, then referenced by Groups.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Groups`})}),_jsxs(_components.td,{children:[`Permission policies binding `,_jsx(_components.code,{children:`{PKP IDs, Action CIDs}`}),`. “Who can execute” is on the API key, not the group.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`ipfs-content-addressed`,children:`IPFS (Content-addressed)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Entity`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Lit Actions`})}),_jsx(_components.td,{children:`Immutable JS, referenced by its IPFS CID. You can pin it to IPFS so others can audit it; the TEE runs the copy sent with the request. Not owned by anyone — public, reusable, content-addressed. Like npm packages.`})]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`entity-relationships`,children:`Entity Relationships`}),`\n`,_jsx(CodeBlock,{numberOfLines:`20`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`USER / EXTERNAL ON-CHAIN (BASE) TEE ENCLAVE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`───────────────────────────── ────────────────────────── ──────────────────────────────`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Account Owner Account Contract Root Key`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` EOA / SAFE / Lit-managed ──▶ owner address registered master secret, never exported`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ owns │ derives`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ API Key Registry Auth + Key Derivation`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`API Key (private key) ──▶ key hash → scopes mapping ◀── verify scopes, derive keys`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Held by user, sent/request │ provides keys`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ sent over HTTPS │ reads │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └──────────────────────────▶ TEE Sandbox Execution`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ runs Lit Actions w/ key material`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` PKP Registry │ code sent with request`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` derivation path IDs ▼`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ referenced Lit Actions (by CID)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Groups ◀── Immutable JS, public CIDs`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {PKP refs, ACIDs}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ CID ref`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` TX Relay (API mode only)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` signs + submits mgmt txs`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`execution-flow-inside-the-tee`,children:`Execution Flow (Inside the TEE)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Step`}),_jsx(_components.th,{children:`Action`}),_jsx(_components.th,{children:`Who`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`1`})}),_jsxs(_components.td,{children:[`User sends API key + the action code + `,_jsx(_components.code,{children:`\"run it with pkp_001\"`}),` over HTTPS. The TEE hashes the code to get its CID, `,_jsx(_components.code,{children:`QmABC`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`user → tee`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`2`})}),_jsx(_components.td,{children:`TEE hashes the API key (keccak256 of the key string)`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inside tee`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`3`})}),_jsxs(_components.td,{children:[`TEE reads the API Key Registry on Base — does this key hash have `,_jsx(_components.code,{children:`execute`}),` scope? On which groups?`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`tee → chain read`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`4`})}),_jsxs(_components.td,{children:[`TEE checks: is there a group this key can execute on where `,_jsx(_components.strong,{children:`QmABC is a listed action`}),` AND `,_jsx(_components.strong,{children:`pkp_001 is a listed PKP`}),`?`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`tee → chain read`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`5`})}),_jsx(_components.td,{children:`If authorized → run the QmABC code from the request in the sandbox → derive pkp_001 key material from root key when the action asks for it → return result`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inside tee`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`✕ Reject`})}),_jsx(_components.td,{children:`If any check fails → reject the request. No key material is derived.`}),_jsx(_components.td,{children:`—`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`management-paths`,children:`Management Paths`}),`\n`,_jsx(_components.p,{children:`There are two paths for making structural changes (creating groups, adding PKPs, updating scopes):`}),`\n`,_jsxs(Heading,{level:`3`,id:`path-a-via-tee-relay-convenience`,children:[`Path A: Via TEE Relay `,_jsx(_components.em,{children:`(convenience)`})]}),`\n`,_jsx(_components.p,{children:`TEE checks scopes and submits the transaction on the user’s behalf. API-mode accounts only.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`User + API Key → TEE (verify scopes) → Permissions Contract`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`path-b-direct-to-chain-chainsecured-mode`,children:[`Path B: Direct to Chain `,_jsx(_components.em,{children:`(ChainSecured mode)`})]}),`\n`,_jsx(_components.p,{children:`Owner submits transactions directly — TEE is not involved. The only write path for a ChainSecured account.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SAFE / EOA → Permissions Contract`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`api-key-scopes`,children:`API Key Scopes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Allows`}),_jsx(_components.th,{children:`Type`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`execute`})}),_jsx(_components.td,{children:`Invoke Lit Actions with PKPs`}),_jsx(_components.td,{children:`per-group`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pkp:create`})}),_jsx(_components.td,{children:`Create new PKPs in the account’s registry`}),_jsx(_components.td,{children:`account-wide`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`group:create`})}),_jsx(_components.td,{children:`Create new groups`}),_jsx(_components.td,{children:`account-wide`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`group:delete`})}),_jsx(_components.td,{children:`Delete groups`}),_jsx(_components.td,{children:`account-wide`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`group:manageActions`})}),_jsx(_components.td,{children:`Add / remove action CIDs in a group`}),_jsx(_components.td,{children:`per-group`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`group:addPkp`})}),_jsx(_components.td,{children:`Add PKP references to a group`}),_jsx(_components.td,{children:`per-group`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`group:removePkp`})}),_jsx(_components.td,{children:`Remove PKP references from a group`}),_jsx(_components.td,{children:`per-group`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`permission-matrix`,children:`Permission Matrix`}),`\n`,_jsx(_components.p,{children:`The API Key column applies to API-mode accounts, where the TEE relays the call. On a ChainSecured account an API key can only invoke actions; every other row is an owner transaction.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Operation`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Owner`}),_jsx(_components.th,{style:{textAlign:`center`},children:`API Key`}),_jsx(_components.th,{children:`Scope Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Invoke action + PKP`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`execute(group_id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Create PKP`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`pkp:create`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Create group`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`group:create`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Delete group`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`group:delete`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Add/remove actions`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`group:manageActions(group_id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Add PKPs to group`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`group:addPkp(group_id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Remove PKPs from group`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`group:removePkp(group_id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Add / revoke API key`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✕`}),_jsx(_components.td,{children:`owner only`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Update API key scopes`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✕`}),_jsx(_components.td,{children:`owner only`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Transfer ownership`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✕`}),_jsx(_components.td,{children:`owner only`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-comparison`,children:`Configuration Comparison`}),`\n`,_jsx(_components.p,{children:`The same system, two very different security postures — determined by who the owner is, whether the account is managed (API mode) or not (ChainSecured mode), and what scopes the keys carry.`}),`\n`,_jsx(Heading,{level:`3`,id:`api-mode`,children:`API Mode`}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`Fast iteration, broad scopes, managed recovery`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Owner`})}),_jsx(_components.td,{children:`A Lit-managed credential`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API Key`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`dev_key`}),` with execution and group 1 management: `,_jsx(_components.code,{children:`execute(*)`}),`, `,_jsx(_components.code,{children:`pkp:create`}),`, `,_jsx(_components.code,{children:`group:create`}),`, `,_jsx(_components.code,{children:`group:delete`}),`, `,_jsx(_components.code,{children:`group:manageActions(group_1)`}),`, `,_jsx(_components.code,{children:`group:addPkp(group_1)`}),`, `,_jsx(_components.code,{children:`group:removePkp(group_1)`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Effect`})}),_jsx(_components.td,{children:`Developer executes actions and manages group 1 via HTTP. The owner grants explicit management permissions for additional groups. Recovery = re-authenticating to the dashboard.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`chainsecured-mode`,children:`ChainSecured Mode`}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`Auditable governance, restricted scopes, SAFE multisig`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Owner`})}),_jsx(_components.td,{children:`3-of-5 SAFE multisig on Base`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API Keys`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`server_key`}),` → `,_jsx(_components.code,{children:`execute(group_1)`}),` only. Management scopes would have no effect, because the contract rejects writes from the TEE to a ChainSecured account.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Effect`})}),_jsxs(_components.td,{children:[`Day-to-day execution via `,_jsx(_components.code,{children:`server_key`}),`. Every change (PKPs, groups, actions, keys) is a SAFE transaction. Leaked key blast radius is minimal.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Entity Relationships","description":"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.","href":"/architecture/diagram"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Entity Boundaries","slug":"entity-boundaries","depth":2,"children":[{"title":"User / External","slug":"user-/-external","depth":3,"children":[]},{"title":"TEE Enclave (Phala / dstack)","slug":"tee-enclave-phala-/-dstack","depth":3,"children":[]},{"title":"On-Chain (Base)","slug":"on-chain-base","depth":3,"children":[]},{"title":"IPFS (Content-addressed)","slug":"ipfs-content-addressed","depth":3,"children":[]}]},{"title":"Entity Relationships","slug":"entity-relationships","depth":2,"children":[]},{"title":"Execution Flow (Inside the TEE)","slug":"execution-flow-inside-the-tee","depth":2,"children":[]},{"title":"Management Paths","slug":"management-paths","depth":2,"children":[{"title":"Path A: Via TEE Relay (convenience)","slug":"path-a-via-tee-relay-convenience","depth":3,"children":[]},{"title":"Path B: Direct to Chain (ChainSecured mode)","slug":"path-b-direct-to-chain-chainsecured-mode","depth":3,"children":[]}]},{"title":"API Key Scopes","slug":"api-key-scopes","depth":2,"children":[]},{"title":"Permission Matrix","slug":"permission-matrix","depth":2,"children":[]},{"title":"Configuration Comparison","slug":"configuration-comparison","depth":2,"children":[{"title":"API Mode","slug":"api-mode","depth":3,"children":[]},{"title":"ChainSecured Mode","slug":"chainsecured-mode","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/litprotocol/ebcbd32a4055122d/lit-analytics.js"],"subdomain":"litprotocol","siteName":"Documentation","title":"Entity Relationships - Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T23:59:24.232Z","originalFileLocation":"architecture/diagram.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Entity Relationships - Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.litprotocol.com/architecture/diagram\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://litprotocol.mintlify.site/_mintlify/api/og/v2?division=Architecture\u0026amp;title=Entity+Relationships\u0026amp;description=Entity+relationships%2C+on-chain+vs+TEE+boundaries%2C+and+how+API+mode+vs+ChainSecured+mode+emerges+from+configuration.\u0026amp;theme=2dd36420b7ae8ee94becdf36\u0026amp;signature=26895c0bd0c6f73c1e420cf767cdce364df3e311e2937d230dfbf73b3f76bccb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Entity Relationships - Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://litprotocol.mintlify.site/_mintlify/api/og/v2?division=Architecture\u0026amp;title=Entity+Relationships\u0026amp;description=Entity+relationships%2C+on-chain+vs+TEE+boundaries%2C+and+how+API+mode+vs+ChainSecured+mode+emerges+from+configuration.\u0026amp;theme=2dd36420b7ae8ee94becdf36\u0026amp;signature=26895c0bd0c6f73c1e420cf767cdce364df3e311e2937d230dfbf73b3f76bccb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/litprotocol/XrIhJ421GD_nEydJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.litprotocol.com/architecture/diagram\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/architecture/diagram.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.litprotocol.com/#organization\",\"name\":\"Documentation\",\"url\":\"https://developer.litprotocol.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/litprotocol/QETV3ZoD4rHDsUls/logo/light.svg?fit=max\u0026auto=format\u0026n=QETV3ZoD4rHDsUls\u0026q=85\u0026s=5bf9ff54e3d9d64f6068e4d5aac6035d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.litprotocol.com#website\",\"name\":\"Documentation\",\"url\":\"https://developer.litprotocol.com\",\"publisher\":{\"@id\":\"https://developer.litprotocol.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.litprotocol.com/architecture/diagram#webpage\",\"url\":\"https://developer.litprotocol.com/architecture/diagram\",\"name\":\"Entity Relationships\",\"description\":\"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.\",\"dateModified\":\"2026-11-06T23:59:24.232Z\",\"isPartOf\":{\"@id\":\"https://developer.litprotocol.com#website\"},\"breadcrumb\":{\"@id\":\"https://developer.litprotocol.com/architecture/diagram#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.litprotocol.com/architecture/diagram#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Architecture\",\"item\":\"https://developer.litprotocol.com/architecture\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Entity Relationships\",\"item\":\"https://developer.litprotocol.com/architecture/diagram\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developer.litprotocol.com/architecture/diagram#article\",\"headline\":\"Entity Relationships\",\"name\":\"Entity Relationships\",\"description\":\"Entity relationships, on-chain vs TEE boundaries, and how API mode vs ChainSecured mode emerges from configuration.\",\"url\":\"https://developer.litprotocol.com/architecture/diagram\",\"mainEntityOfPage\":{\"@id\":\"https://developer.litprotocol.com/architecture/diagram#webpage\"},\"dateModified\":\"2026-11-06T23:59:24.232Z\",\"publisher\":{\"@id\":\"https://developer.litprotocol.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.litprotocol.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/architecture/diagram.md","siteName":"Documentation","nav":{"global":null,"tabs":[{"tab":"Building on Lit Protocol","pages":[{"title":"Lit Protocol","href":""},{"title":"Quick Start","href":"/quickstart"},{"title":"Glossary","href":"/glossary"},{"group":"Guides","pages":[{"title":"Guides","href":"/guides/index"}]},{"group":"Management","pages":[{"title":"API Keys","href":"/management/api_keys"},{"title":"Dashboard","href":"/management/dashboard"},{"title":"API","href":"/management/api_direct"},{"title":"API Mode vs ChainSecured Mode","href":"/management/account_modes"},{"title":"Pricing","href":"/management/pricing"},{"title":"Crypto Payments","href":"/management/crypto"},{"title":"LITKEY","href":"/management/litkey"},{"title":"Errors","href":"/management/errors"}]},{"group":"Lit Actions","pages":[{"title":"Overview","href":"/lit-actions/index"},{"title":"Module Imports","href":"/lit-actions/imports"},{"title":"WebAssembly (WASM)","href":"/lit-actions/wasm"},{"title":"Examples","href":"/lit-actions/examples"},{"title":"Patterns","href":"/lit-actions/patterns"},{"title":"Derived Actions","href":"/lit-actions/derived-actions"},{"title":"Signed Data in Untrusted Storage","href":"/lit-actions/signed-storage"},{"title":"Secrets","href":"/lit-actions/secrets"},{"title":"Limits","href":"/lit-actions/limits"},{"group":"Migration","pages":[{"title":null,"href":"/lit-actions/migration/changes"},{"title":"Encryption \u0026 Decryption","href":"/lit-actions/migration/encryption"}]}]},{"group":"Lit Triggers","pages":[{"title":"Overview","href":"/lit-triggers/index"},{"title":"Creating Triggers","href":"/lit-triggers/triggers"},{"title":"Examples","href":"/lit-triggers/examples"}]},{"group":"Architecture","pages":[{"title":"Overview","href":"/architecture/index"},{"title":"Chain Secured","href":"/architecture/chain-secured"},{"title":"Authentication Model","href":"/architecture/authModel"},{"title":"Groups","description":"How groups organize wallets, actions, and usage keys in Lit Chipotle.","href":"/architecture/groups"},{"title":"Entity Relationships","href":"/architecture/diagram"},{"group":"Security \u0026 Verification","pages":[{"title":"Security \u0026 Verification","description":"How to verify that your connection to Lit Chipotle terminates inside a genuine TEE running unmodified code.","href":"/architecture/verification/index"},{"title":"What Is Attestation?","href":"/architecture/verification/attestation"},{"title":"Verify in 30 Seconds","href":"/architecture/verification/quick-verify"},{"title":"On-Chain KMS","href":"/architecture/verification/onchain-kms"},{"title":"Upgrade Governance","href":"/architecture/verification/upgrade-governance"},{"title":"Chain of Trust Reference","href":"/architecture/verification/chain-of-trust"},{"title":"Full Verification Guide","href":"/architecture/verification/full-verification"},{"title":"Bug Bounty Program","href":"/architecture/verification/bug-bounty"}]},{"title":"Self-Hosting","href":"/architecture/self-hosting"}]},{"group":"Actions Reference","pages":[{"title":"Lit Actions SDK","href":"/lit-actions/chipotle"}]}]},{"tab":"Lit Agent Keychain","pages":[{"title":"Lit Agent Keychain","href":"/keychain"}]}]},"basePath":"","title":"Entity Relationships - Documentation","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}