smart-accounts-kit
它能做什么
这项技能涵盖 MetaMask Smart Accounts Kit,它让去中心化应用能够创建智能账户、发送批量用户操作,并请求有范围限制的权限。它说明三种账户类型以及委托如何运作,适合开发钱包功能的开发者。
适用场景
- ✓当你希望用户拥有可灵活选择签名方式的智能账户时。
- ✓当你希望后端机器人通过委托代表用户行事的时候。
- ✓当你希望从 MetaMask 扩展程序请求有范围限制的权限的时候。
技能链接
https://github.com/internet-court/internet-court-skill/blob/main/vendored/metamask/smart-accounts-kit/skill.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我希望我的去中心化应用向 MetaMask 请求一项有限的权限,以便机器人能为用户行事。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会为你的应用选择合适的账户类型,设置签名者,并使用该工具包创建、签名或兑现委托,以及请求权限。它也可以通过 paymaster 设置 Gas 费赞助。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
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 | Create hybrid account, Create multisig account, Create 7702 account |
| Create a delegation | createDelegation | Create delegation, Create redelegation |
| Request ERC-7715 permissions | requestExecutionPermissions | Request permissions, Redeem — smart account, Redeem — EOA |
Workflows
| Use case | Workflow |
|---|---|
| Create a Hybrid smart account | Create hybrid account |
| Create a MultiSig smart account | Create multisig account |
| Create a Stateless7702 smart account | Create 7702 account |
| Create and sign a delegation | Create delegation |
| Create a delegation chain (redelegation) | Create redelegation |
| Redeem a delegation when the delegate is a smart account | Redeem delegation — smart account |
| Redeem a delegation when the delegate is an EOA | Redeem delegation — EOA |
| Request ERC-7715 Advanced Permissions | Request permissions |
| Redelegate an ERC-7715 permission context | Create redelegation for permissions |
| Redeem ERC-7715 permissions when the session account is a smart account | Redeem permissions — smart account |
| Redeem ERC-7715 permissions when the session account is an EOA | Redeem permissions — EOA |
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
常见问题
哪种账户类型最适合大多数去中心化应用用户?
Hybrid 账户,它支持 EOA、钱包客户端和通行密钥签名者,被描述为最灵活的选项。
MultiSig 账户有什么用?
它需要多个签名者批准交易,适合金库、DAO 或共同托管等场景。
Stateless7702 是什么?
它可以把现有钱包升级为智能账户,同时保持地址不变。
详情
作者的原始描述
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
热度
- GitHub 星标
- 7.0k
- 排名
- #13642
- 许可证
- —
- 更新时间
- 2026/10/26
评论
- …
同一仓库的更多技能
internet-court
7.0k帮你的智能体安全地向其他 AI 智能体或付费服务付款、雇用或进行交易,并指引它找到合适的专业指南。
genlayer-erc7710-connector
7.0k帮你的智能体把 AI 审核结果与权限系统连接起来,使不合格的审核可以限制或取消智能体的权限。
genlayer-intelligent-contracts
7.0k帮你的智能体定义 AI 裁判的规则、证据和输出,用于检查另一个智能体是否遵循了其授权范围。
x402-erc7710
7.0k帮你的智能体按次为网络服务付款,并设置在权限预算范围内的持续支出。