smart-accounts-kit
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
git clone --depth 1 https://github.com/internet-court/internet-court-skill /tmp/smart-accounts-kit && cp -r /tmp/smart-accounts-kit/vendored/metamask/smart-accounts-kit ~/.claude/skills/smart-accounts-kitskill.md
# MetaMask Smart Accounts Kit ## When to use - You want to create ERC-4337 smart accounts (Hybrid, MultiSig, or Stateless7702) - You want to send user operations or batch transactions via bundlers - You want to configure signers (EOA, passkey/WebAuthn, multisig, wallet client) - You want to implement gas abstraction with paymasters - You want to create, sign, or redeem delegations (ERC-7710) - You want to request Advanced Permissions via MetaMask extension (ERC-7715) - You want to build automated backend services (DCA bots, keeper services) using delegations - You want to implement session accounts for AI agents or automated trading - You want to set up parallel user operations with nonce keys ## Installation ```bash npm install @metamask/smart-accounts-kit permissionless ``` ## Which smart account type to use | Name | Usage | |------|-------| | Hybrid | A flexible account with EOA, wallet client, and passkey (WebAuthn) signers. The most flexible option for standard dApp users. | | MultiSig | Requires multiple signers to meet a threshold before transactions execute. Best for treasury, DAO, or shared custody use cases. | | Stateless7702 | Upgrades an existing EOA to a smart account using EIP-7702 while keeping the same address. Best for users with existing embedded EOAs. | If the user hasn't specified which implementation they need, present the options. ## Delegations vs Advanced Permissions | Name | Usage | |------|-------| | Delegations (ERC-7710) | You create, sign, and manage delegations programmatically. The delegator is a smart account you control. You handle the full lifecycle: creation, signing, storage, and redemption. | | Advanced Permissions (ERC-7715) | You request permissions from a MetaMask user through a human-readable UI in the extension. MetaMask creates and enforces the delegations internally. The user can review and adjust parameters before approving. | Advanced Permissions use delegations under the hood — ERC-7715 creates ERC-7710 delegations internally. If the user hasn't specified which to use, present the options. ## API references | Use case | Reference | Workflows | |----------|-----------|-----------| | Create a smart account | [toMetaMaskSmartAccount](./references/smart-accounts.md) | [Create hybrid account](./workflows/create-hybrid-account.md), [Create multisig account](./workflows/create-multisig-account.md), [Create 7702 account](./workflows/create-7702-account.md) | | Create a delegation | [createDelegation](./references/delegations.md) | [Create delegation](./workflows/create-delegation.md), [Create redelegation](./workflows/create-redelegation.md) | | Request ERC-7715 permissions | [requestExecutionPermissions](./references/advanced-permissions.md) | [Request permissions](./workflows/request-permissions.md), [Redeem — smart account](./workflows/redeem-permissions-smart-account.md), [Redeem — EOA](./workflows/redeem-permissions-eoa.md) | ## Workflows | Use case | Workflow | |----------|----------| | Create a Hybrid smart account | [Create hybrid account](./workflows/create-hybrid-account.md) | | Create a MultiSig smart account | [Create multisig account](./workflows/create-multisig-account.md) | | Create a Stateless7702 smart account | [Create 7702 account](./workflows/create-7702-account.md) | | Create and sign a delegation | [Create delegation](./workflows/create-delegation.md) | | Create a delegation chain (redelegation) | [Create redelegation](./workflows/create-redelegation.md) | | Redeem a delegation when the delegate is a smart account | [Redeem delegation — smart account](./workflows/redeem-delegation-smart-account.md) | | Redeem a delegation when the delegate is an EOA | [Redeem delegation — EOA](./workflows/redeem-delegation-eoa.md) | | Request ERC-7715 Advanced Permissions | [Request permissions](./workflows/request-permissions.md) | | Redelegate an ERC-7715 permission context | [Create redelegation for permissions](./workflows/create-redelegation-permissions.md) | | Redeem ERC-7715 permissions when the session account is a smart account | [Redeem permissions — smart account](./workflows/redeem-permissions-smart-account.md) | | Redeem ERC-7715 permissions when the session account is an EOA | [Redeem permissions — EOA](./workflows/redeem-permissions-eoa.md) | ## Important notes - Always use caveats — never create unrestricted delegations. - Deploy the delegator first — the account must be deployed before redeeming delegations. - Function call scope defaults to no native token — use `valueLte` to allow it. - Caveats are cumulative in delegation chains — restrictions stack. - ERC-7715 requires MetaMask Flask 13.5.0+ or MetaMask stable 13.23.0+, and the user must have a smart account. - Always check that the project builds successfully after making changes. - Smart Accounts Kit version: 1.6.0 | Delegation Framework: 1.3.0 ## Resources - NPM: `@metamask/smart-accounts-kit` - Contract deployments: [Delegation Framework deployments](https://github.com/MetaMask/delegation-framework/blob/main/documents/Deployments.md) - Docs: https://docs.metamask.io/smart-accounts-kit - MetaMask Flask: https://metamask.io/flask
Entry point for Internet Court — the trust layer for agent-to-agent commerce. Use whenever an agent needs to transact with another agent or a paid service, or a user mentions agent payments, paid APIs (HTTP 402/x402), wallet custody or trust concerns, spending mandates, delegated permissions (ERC-7710/7715), escrow, agent identity or reputation (ERC-8004), negotiation between agents (A2A), agent jobs (ERC-8183), machine payments (MPP, AP2), supervision of agent behavior, revocation, verification, or dispute resolution (GenLayer) — even if they never say "Internet Court". Routes to the vendored protocol skills and connector skills in this package.
Connect GenLayer Intelligent Contract decisions to ERC-7710-style delegated authority. Use when an agent needs to design the interface, message schema, relayer/bridge path, EVM revocation controller, constraint updates, proof/finality assumptions, and failure handling that turn a GenLayer agent-performance review into ERC-7710 revocation or policy changes.
Internet Court adapter for GenLayer Intelligent Contract supervision. Use to specify agent-performance rubrics, evidence schemas, decision outputs, and ERC-7710 connector expectations, while delegating actual GenLayer contract writing, linting, testing, deployment, and CLI interaction to the official GenLayer skills at https://skills.genlayer.com/.
Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.
0G Compute Network guide for decentralized AI inference, fine-tuning, and GPU services. Covers chatbots, image generation, speech-to-text, SDK integration (0g-serving-broker), processResponse API, broker.inference methods, CLI commands (0g-compute-cli), and account management. Use this skill for any 0G compute, 0G AI, or decentralized GPU question.
Use this skill when the user asks to list, create, inspect, update, disable, re-enable, or revoke AltLLM Portal API keys for external agents or applications. Do NOT use for wallet login, billing history, or payment links.
Use this skill when the user asks to log in or out with a wallet session, fetch a wallet sign-in challenge, verify an externally signed challenge, or troubleshoot AltLLM Portal wallet login for the local altllm CLI. Do NOT use for API key management, billing history, or payment links.
Use this skill when the user asks to inspect AltLLM Portal balance, redeem a promo code, review billing transactions, or view usage analytics by period, model, or API key using the local altllm CLI. Do NOT use for API key lifecycle management or payment-link execution.