[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MW7CDGPR8PDWW9TFHXKZND":3,"skill-same:01M6MW7CDGPR8PDWW9TFHXKZND":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6MW7CDGPR8PDWW9TFHXKZND","smart-accounts-kit",null,"Web3 development using MetaMask Smart Accounts Kit. Use when the user wants to build dApps with ERC-4337 smart accounts, send user operations, batch transactions, configure signers (EOA, passkey, multisig), implement gas abstraction with paymasters, create delegations, or request advanced permissions (ERC-7715). Supports Viem integration, multiple signer types (Dynamic, Web3Auth, Wagmi), gasless transactions, and the Delegation Framework.","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F个人发展\u002Fmetamask-smart-accounts-kit\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"kit","smart accounts kit","metamask","send","request","passkey","viem integration","gasless","advanced","types","io","create","gas","configure","transactions","web3","batch","framework","delegation","permissions","2026-11-10 10:12:30",false,"---\nname: smart-accounts-kit\ndescription: Web3 development using MetaMask Smart Accounts Kit. Use when the user wants to build dApps with ERC-4337 smart accounts, send user operations, batch transactions, configure signers (EOA, passkey, multisig), implement gas abstraction with paymasters, create delegations, or request advanced permissions (ERC-7715). Supports Viem integration, multiple signer types (Dynamic, Web3Auth, Wagmi), gasless transactions, and the Delegation Framework.\nmetadata: {\"openclaw\":{\"emoji\":\"?\",\"homepage\":\"https:\u002F\u002Fdocs.metamask.io\u002Fsmart-accounts-kit\"}}\n---\n## Quick Reference\n\nThis skill file provides quick access to the MetaMask Smart Accounts Kit v0.3.0. For detailed information, refer to the specific reference files.\n\n**? Detailed References:**\n\n- [Smart Accounts Reference](.\u002Freferences\u002Fsmart-accounts.md) - Account creation, implementations, signers\n- [Delegations Reference](.\u002Freferences\u002Fdelegations.md) - Delegation lifecycle, scopes, caveats\n- [Advanced Permissions Reference](.\u002Freferences\u002Fadvanced-permissions.md) - ERC-7715 permissions via MetaMask\n\n## Package Installation\n\n```bash\nnpm install @metamask\u002Fsmart-accounts-kit@0.3.0\n```\n\nFor custom caveat enforcers:\n\n```bash\nforge install metamask\u002Fdelegation-framework@v1.3.0\n```\n\n## Core Concepts Summary\n\n### 1. Smart Accounts (ERC-4337)\n\nThree implementation types:\n\n- **Hybrid** (`Implementation.Hybrid`) - EOA + passkey signers\n- **Multisig** (`Implementation.MultiSig`) - Multiple signers with threshold\n- **Stateless7702** (`Implementation.Stateless7702`) - EIP-7702 upgraded EOA\n\n### 2. Delegation Framework (ERC-7710)\n\nGrant permissions from delegator to delegate:\n\n- **Scopes** - Initial authority (spending limits, function calls)\n- **Caveats** - Restrictions enforced by smart contracts\n- **Types** - Root, open root, redelegation, open redelegation\n- **Lifecycle** - Create → Sign → Store → Redeem\n\n### 3. Advanced Permissions (ERC-7715)\n\nRequest permissions via MetaMask extension:\n\n- Human-readable UI confirmations\n- ERC-20 and native token permissions\n- Requires MetaMask Flask 13.5.0+\n- User must have smart account\n\n## Quick Code Examples\n\n### Create Smart Account\n\n```typescript\nimport { Implementation, toMetaMaskSmartAccount } from '@metamask\u002Fsmart-accounts-kit'\nimport { privateKeyToAccount } from 'viem\u002Faccounts'\n\nconst account = privateKeyToAccount('0x...')\n\nconst smartAccount = await toMetaMaskSmartAccount({\n  client: publicClient,\n  implementation: Implementation.Hybrid,\n  deployParams: [account.address, [], [], []],\n  deploySalt: '0x',\n  signer: { account },\n})\n```\n\n### Create Delegation\n\n```typescript\nimport { createDelegation } from '@metamask\u002Fsmart-accounts-kit'\nimport { parseUnits } from 'viem'\n\nconst delegation = createDelegation({\n  to: delegateAddress,\n  from: delegatorSmartAccount.address,\n  environment: delegatorSmartAccount.environment,\n  scope: {\n    type: 'erc20TransferAmount',\n    tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',\n    maxAmount: parseUnits('10', 6),\n  },\n  caveats: [\n    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },\n    { type: 'limitedCalls', limit: 5 },\n  ],\n})\n```\n\n### Sign Delegation\n\n```typescript\nconst signature = await smartAccount.signDelegation({ delegation })\nconst signedDelegation = { ...delegation, signature }\n```\n\n### Redeem Delegation\n\n```typescript\nimport { createExecution, ExecutionMode } from '@metamask\u002Fsmart-accounts-kit'\nimport { DelegationManager } from '@metamask\u002Fsmart-accounts-kit\u002Fcontracts'\nimport { encodeFunctionData, erc20Abi } from 'viem'\n\nconst callData = encodeFunctionData({\n  abi: erc20Abi,\n  args: [recipient, parseUnits('1', 6)],\n  functionName: 'transfer',\n})\n\nconst execution = createExecution({ target: tokenAddress, callData })\n\nconst redeemCalldata = DelegationManager.encode.redeemDelegations({\n  delegations: [[signedDelegation]],\n  modes: [ExecutionMode.SingleDefault],\n  executions: [[execution]],\n})\n\n\u002F\u002F Via smart account\nconst userOpHash = await bundlerClient.sendUserOperation({\n  account: delegateSmartAccount,\n  calls: [{ to: delegateSmartAccount.address, data: redeemCalldata }],\n})\n\n\u002F\u002F Via EOA\nconst txHash = await delegateWalletClient.sendTransaction({\n  to: environment.DelegationManager,\n  data: redeemCalldata,\n})\n```\n\n### Request Advanced Permissions\n\n```typescript\nimport { erc7715ProviderActions } from '@metamask\u002Fsmart-accounts-kit\u002Factions'\n\nconst walletClient = createWalletClient({\n  transport: custom(window.ethereum),\n}).extend(erc7715ProviderActions())\n\nconst grantedPermissions = await walletClient.requestExecutionPermissions([\n  {\n    chainId: chain.id,\n    expiry: now + 604800,\n    signer: {\n      type: 'account',\n      data: { address: sessionAccount.address },\n    },\n    permission: {\n      type: 'erc20-token-periodic',\n      data: {\n        tokenAddress,\n        periodAmount: parseUnits('10', 6),\n        periodDuration: 86400,\n        justification: 'Transfer 10 USDC daily',\n      },\n    },\n    isAdjustmentAllowed: true,\n  },\n])\n```\n\n### Redeem Advanced Permissions\n\n```typescript\n\u002F\u002F Smart account\nimport { erc7710BundlerActions } from '@metamask\u002Fsmart-accounts-kit\u002Factions'\n\nconst bundlerClient = createBundlerClient({\n  client: publicClient,\n  transport: http(bundlerUrl),\n}).extend(erc7710BundlerActions())\n\nconst permissionsContext = grantedPermissions[0].context\nconst delegationManager = grantedPermissions[0].signerMeta.delegationManager\n\nconst userOpHash = await bundlerClient.sendUserOperationWithDelegation({\n  publicClient,\n  account: sessionAccount,\n  calls: [\n    {\n      to: tokenAddress,\n      data: calldata,\n      permissionsContext,\n      delegationManager,\n    },\n  ],\n})\n\n\u002F\u002F EOA\nimport { erc7710WalletActions } from '@metamask\u002Fsmart-accounts-kit\u002Factions'\n\nconst walletClient = createWalletClient({\n  account: sessionAccount,\n  chain,\n  transport: http(),\n}).extend(erc7710WalletActions())\n\nconst txHash = await walletClient.sendTransactionWithDelegation({\n  to: tokenAddress,\n  data: calldata,\n  permissionsContext,\n  delegationManager,\n})\n```\n\n## Key API Methods\n\n### Smart Accounts\n\n- `toMetaMaskSmartAccount()` - Create smart account\n- `aggregateSignature()` - Combine multisig signatures\n- `signDelegation()` - Sign delegation\n- `signUserOperation()` - Sign user operation\n- `signMessage()` \u002F `signTypedData()` - Standard signing\n\n### Delegations\n\n- `createDelegation()` - Create delegation with delegate\n- `createOpenDelegation()` - Create open delegation\n- `createCaveatBuilder()` - Build caveats array\n- `createExecution()` - Create execution struct\n- `redeemDelegations()` - Encode redemption calldata\n- `signDelegation()` - Sign with private key\n- `getSmartAccountsEnvironment()` - Resolve environment\n- `deploySmartAccountsEnvironment()` - Deploy contracts\n- `overrideDeployedEnvironment()` - Override environment\n\n### Advanced Permissions\n\n- `erc7715ProviderActions()` - Wallet client extension for requesting\n- `requestExecutionPermissions()` - Request permissions\n- `erc7710BundlerActions()` - Bundler client extension\n- `sendUserOperationWithDelegation()` - Redeem with smart account\n- `erc7710WalletActions()` - Wallet client extension\n- `sendTransactionWithDelegation()` - Redeem with EOA\n\n## Supported ERC-7715 Permission Types\n\n### ERC-20 Token Permissions\n\n| Permission Type | Description |\n|----------------|-------------|\n| `erc20-token-periodic` | Per-period limit that resets at each period |\n| `erc20-token-streaming` | Linear streaming with amountPerSecond rate |\n\n### Native Token Permissions\n\n| Permission Type | Description |\n|----------------|-------------|\n| `native-token-periodic` | Per-period ETH limit that resets |\n| `native-token-streaming` | Linear ETH streaming with amountPerSecond rate |\n\n## Common Delegation Scopes\n\n### Spending Limits\n\n| Scope                       | Description                   |\n| --------------------------- | ----------------------------- |\n| `erc20TransferAmount`       | Fixed ERC-20 limit            |\n| `erc20PeriodTransfer`       | Per-period ERC-20 limit       |\n| `erc20Streaming`            | Linear streaming ERC-20       |\n| `nativeTokenTransferAmount` | Fixed native token limit      |\n| `nativeTokenPeriodTransfer` | Per-period native token limit |\n| `nativeTokenStreaming`      | Linear streaming native       |\n| `erc721Transfer`            | ERC-721 (NFT) transfer        |\n\n### Function Calls\n\n| Scope               | Description                        |\n| ------------------- | ---------------------------------- |\n| `functionCall`      | Specific methods\u002Faddresses allowed |\n| `ownershipTransfer` | Ownership transfers only           |\n\n## Common Caveat Enforcers\n\n### Target & Method\n\n- `allowedTargets` - Limit callable addresses\n- `allowedMethods` - Limit callable methods\n- `allowedCalldata` - Validate specific calldata\n- `exactCalldata` \u002F `exactCalldataBatch` - Exact calldata match\n- `exactExecution` \u002F `exactExecutionBatch` - Exact execution match\n\n### Value & Token\n\n- `valueLte` - Limit native token value\n- `erc20TransferAmount` - Limit ERC-20 amount\n- `erc20BalanceChange` - Validate ERC-20 balance change\n- `erc721Transfer` \u002F `erc721BalanceChange` - ERC-721 restrictions\n- `erc1155BalanceChange` - ERC-1155 validation\n\n### Time & Frequency\n\n- `timestamp` - Valid time range (seconds)\n- `blockNumber` - Valid block range\n- `limitedCalls` - Limit redemption count\n- `erc20PeriodTransfer` \u002F `erc20Streaming` - Time-based ERC-20\n- `nativeTokenPeriodTransfer` \u002F `nativeTokenStreaming` - Time-based native\n\n### Security & State\n\n- `redeemer` - Limit redemption to specific addresses\n- `id` - One-time delegation with ID\n- `nonce` - Bulk revocation via nonce\n- `deployed` - Auto-deploy contract\n- `ownershipTransfer` - Ownership transfer only\n- `nativeTokenPayment` - Require payment\n- `nativeBalanceChange` - Validate native balance\n- `multiTokenPeriod` - Multi-token period limits\n\n## Execution Modes\n\n| Mode            | Chains   | Processing  | On Failure |\n| --------------- | -------- | ----------- | ---------- |\n| `SingleDefault` | One      | Sequential  | Revert     |\n| `SingleTry`     | One      | Sequential  | Continue   |\n| `BatchDefault`  | Multiple | Interleaved | Revert     |\n| `BatchTry`      | Multiple | Interleaved | Continue   |\n\n## Contract Addresses (v1.3.0)\n\n### Core\n\n| Contract              | Address                                      |\n| --------------------- | -------------------------------------------- |\n| EntryPoint            | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |\n| SimpleFactory         | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |\n| DelegationManager     | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |\n| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |\n| HybridDeleGatorImpl   | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |\n\n## Critical Rules\n\n### Always Required\n\n1. **Always use caveats** - Never create unrestricted delegations\n2. **Deploy delegator first** - Account must be deployed before redeeming\n3. **Check smart account status** - ERC-7715 requires user has smart account\n\n### Behavior\n\n4. **Caveats are cumulative** - In delegation chains, restrictions stack\n5. **Function call default** - v0.3.0 defaults to NO native token (use `valueLte`)\n6. **Batch mode caveat** - No compatible caveat enforcers available\n\n### Requirements\n\n7. **ERC-7715 requirements** - MetaMask Flask 13.5.0+, smart account\n8. **Multisig threshold** - Need at least threshold signers\n9. **7702 upgrade** - Stateless7702 requires EIP-7702 upgrade first\n\n## Common Patterns\n\n### Pattern 1: ERC-20 with Time Limit\n\n```typescript\nconst delegation = createDelegation({\n  to: delegate,\n  from: delegator,\n  environment,\n  scope: {\n    type: 'erc20TransferAmount',\n    tokenAddress,\n    maxAmount: parseUnits('100', 6),\n  },\n  caveats: [\n    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },\n    { type: 'limitedCalls', limit: 10 },\n    { type: 'redeemer', redeemers: [delegate] },\n  ],\n})\n```\n\n### Pattern 2: Function Call with Value\n\n```typescript\nconst delegation = createDelegation({\n  to: delegate,\n  from: delegator,\n  environment,\n  scope: {\n    type: 'functionCall',\n    targets: [contractAddress],\n    selectors: ['transfer(address,uint256)'],\n    valueLte: { maxValue: parseEther('0.1') },\n  },\n  caveats: [{ type: 'allowedMethods', selectors: ['transfer(address,uint256)'] }],\n})\n```\n\n### Pattern 3: Periodic Native Token\n\n```typescript\nconst delegation = createDelegation({\n  to: delegate,\n  from: delegator,\n  environment,\n  scope: {\n    type: 'nativeTokenPeriodTransfer',\n    periodAmount: parseEther('0.01'),\n    periodDuration: 86400,\n    startDate: now,\n  },\n})\n```\n\n### Pattern 4: Redelegation Chain\n\n```typescript\n\u002F\u002F Alice → Bob (100 USDC)\nconst aliceToBob = createDelegation({\n  to: bob,\n  from: alice,\n  environment,\n  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('100', 6) },\n})\n\n\u002F\u002F Bob → Carol (50 USDC, subset of authority)\nconst bobToCarol = createDelegation({\n  to: carol,\n  from: bob,\n  environment,\n  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('50', 6) },\n  parentDelegation: aliceToBob,\n  caveats: [{ type: 'timestamp', afterThreshold: now, beforeThreshold: expiry }],\n})\n```\n\n## Troubleshooting Quick Fixes\n\n| Issue                    | Solution                                                     |\n| ------------------------ | ------------------------------------------------------------ |\n| Account not deployed     | Use `bundlerClient.sendUserOperation()` to deploy            |\n| Invalid signature        | Verify chain ID, delegation manager, signer permissions      |\n| Caveat enforcer reverted | Check caveat parameters match execution, verify order        |\n| Redemption failed        | Check delegator balance, calldata validity, target contracts |\n| ERC-7715 not working     | Upgrade to Flask 13.5.0+, ensure user has smart account      |\n| Permission denied        | Handle gracefully, provide manual fallback                   |\n| Threshold not met        | Add more signers for multisig                                |\n| 7702 not working         | Confirm EOA upgraded via EIP-7702 first                      |\n\n## Resources\n\n- **NPM:** `@metamask\u002Fsmart-accounts-kit`\n- **Contracts:** `metamask\u002Fdelegation-framework@v1.3.0`\n- **ERC Standards:** ERC-4337, ERC-7710, ERC-7715, ERC-7579\n- **MetaMask Flask:** https:\u002F\u002Fmetamask.io\u002Fflask\n\n## Version Info\n\n- **Toolkit:** 0.3.0\n- **Delegation Framework:** 1.3.0\n- **Breaking Change:** Function call scope defaults to no native token transfer\n\n---\n\n**For detailed documentation, see the reference files in the `\u002Freferences` directory.**\n","## Quick Reference\n\nThis skill file provides quick access to the MetaMask Smart Accounts Kit v0.3.0. For detailed information, refer to the specific reference files.\n\n**? Detailed References:**\n\n- [Smart Accounts Reference](.\u002Freferences\u002Fsmart-accounts.md) - Account creation, implementations, signers\n- [Delegations Reference](.\u002Freferences\u002Fdelegations.md) - Delegation lifecycle, scopes, caveats\n- [Advanced Permissions Reference](.\u002Freferences\u002Fadvanced-permissions.md) - ERC-7715 permissions via MetaMask\n\n## Package Installation\n\n```bash\nnpm install @metamask\u002Fsmart-accounts-kit@0.3.0\n```\n\nFor custom caveat enforcers:\n\n```bash\nforge install metamask\u002Fdelegation-framework@v1.3.0\n```\n\n## Core Concepts Summary\n\n### 1. Smart Accounts (ERC-4337)\n\nThree implementation types:\n\n- **Hybrid** (`Implementation.Hybrid`) - EOA + passkey signers\n- **Multisig** (`Implementation.MultiSig`) - Multiple signers with threshold\n- **Stateless7702** (`Implementation.Stateless7702`) - EIP-7702 upgraded EOA\n\n### 2. Delegation Framework (ERC-7710)\n\nGrant permissions from delegator to delegate:\n\n- **Scopes** - Initial authority (spending limits, function calls)\n- **Caveats** - Restrictions enforced by smart contracts\n- **Types** - Root, open root, redelegation, open redelegation\n- **Lifecycle** - Create → Sign → Store → Redeem\n\n### 3. Advanced Permissions (ERC-7715)\n\nRequest permissions via MetaMask extension:\n\n- Human-readable UI confirmations\n- ERC-20 and native token permissions\n- Requires MetaMask Flask 13.5.0+\n- User must have smart account\n\n## Quick Code Examples\n\n### Create Smart Account\n\n```typescript\nimport { Implementation, toMetaMaskSmartAccount } from '@metamask\u002Fsmart-accounts-kit'\nimport { privateKeyToAccount } from 'viem\u002Faccounts'\n\nconst account = privateKeyToAccount('0x...')\n\nconst smartAccount = await toMetaMaskSmartAccount({\n  client: publicClient,\n  implementation: Implementation.Hybrid,\n  deployParams: [account.address, [], [], []],\n  deploySalt: '0x',\n  signer: { account },\n})\n```\n\n### Create Delegation\n\n```typescript\nimport { createDelegation } from '@metamask\u002Fsmart-accounts-kit'\nimport { parseUnits } from 'viem'\n\nconst delegation = createDelegation({\n  to: delegateAddress,\n  from: delegatorSmartAccount.address,\n  environment: delegatorSmartAccount.environment,\n  scope: {\n    type: 'erc20TransferAmount',\n    tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',\n    maxAmount: parseUnits('10', 6),\n  },\n  caveats: [\n    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },\n    { type: 'limitedCalls', limit: 5 },\n  ],\n})\n```\n\n### Sign Delegation\n\n```typescript\nconst signature = await smartAccount.signDelegation({ delegation })\nconst signedDelegation = { ...delegation, signature }\n```\n\n### Redeem Delegation\n\n```typescript\nimport { createExecution, ExecutionMode } from '@metamask\u002Fsmart-accounts-kit'\nimport { DelegationManager } from '@metamask\u002Fsmart-accounts-kit\u002Fcontracts'\nimport { encodeFunctionData, erc20Abi } from 'viem'\n\nconst callData = encodeFunctionData({\n  abi: erc20Abi,\n  args: [recipient, parseUnits('1', 6)],\n  functionName: 'transfer',\n})\n\nconst execution = createExecution({ target: tokenAddress, callData })\n\nconst redeemCalldata = DelegationManager.encode.redeemDelegations({\n  delegations: [[signedDelegation]],\n  modes: [ExecutionMode.SingleDefault],\n  executions: [[execution]],\n})\n\n\u002F\u002F Via smart account\nconst userOpHash = await bundlerClient.sendUserOperation({\n  account: delegateSmartAccount,\n  calls: [{ to: delegateSmartAccount.address, data: redeemCalldata }],\n})\n\n\u002F\u002F Via EOA\nconst txHash = await delegateWalletClient.sendTransaction({\n  to: environment.DelegationManager,\n  data: redeemCalldata,\n})\n```\n\n### Request Advanced Permissions\n\n```typescript\nimport { erc7715ProviderActions } from '@metamask\u002Fsmart-accounts-kit\u002Factions'\n\nconst walletClient = createWalletClient({\n  transport: custom(window.ethereum),\n}).extend(erc7715ProviderActions())\n\nconst grantedPermissions = await walletClient.requestExecutionPermissions([\n  {\n    chainId: chain.id,\n    expiry: now + 604800,\n    signer: {\n      type: 'account',\n      data: { address: sessionAccount.address },\n    },\n    permission: {\n      type: 'erc20-token-periodic',\n      data: {\n        tokenAddress,\n        periodAmount: parseUnits('10', 6),\n        periodDuration: 86400,\n        justification: 'Transfer 10 USDC daily',\n      },\n    },\n    isAdjustmentAllowed: true,\n  },\n])\n```\n\n### Redeem Advanced Permissions\n\n```typescript\n\u002F\u002F Smart account\nimport { erc7710BundlerActions } from '@metamask\u002Fsmart-accounts-kit\u002Factions'\n\nconst bundlerClient = createBundlerClient({\n  client: publicClient,\n  transport: http(bundlerUrl),\n}).extend(erc7710BundlerActions())\n\nconst permissionsContext = grantedPermissions[0].context\nconst delegationManager = grantedPermissions[0].signerMeta.delegationManager\n\nconst userOpHash = await bundlerClient.sendUserOperationWithDelegation({\n  publicClient,\n  account: sessionAccount,\n  calls: [\n    {\n      to: tokenAddress,\n      data: calldata,\n      permissionsContext,\n      delegationManager,\n    },\n  ],\n})\n\n\u002F\u002F EOA\nimport { erc7710WalletActions } from '@metamask\u002Fsmart-accounts-kit\u002Factions'\n\nconst walletClient = createWalletClient({\n  account: sessionAccount,\n  chain,\n  transport: http(),\n}).extend(erc7710WalletActions())\n\nconst txHash = await walletClient.sendTransactionWithDelegation({\n  to: tokenAddress,\n  data: calldata,\n  permissionsContext,\n  delegationManager,\n})\n```\n\n## Key API Methods\n\n### Smart Accounts\n\n- `toMetaMaskSmartAccount()` - Create smart account\n- `aggregateSignature()` - Combine multisig signatures\n- `signDelegation()` - Sign delegation\n- `signUserOperation()` - Sign user operation\n- `signMessage()` \u002F `signTypedData()` - Standard signing\n\n### Delegations\n\n- `createDelegation()` - Create delegation with delegate\n- `createOpenDelegation()` - Create open delegation\n- `createCaveatBuilder()` - Build caveats array\n- `createExecution()` - Create execution struct\n- `redeemDelegations()` - Encode redemption calldata\n- `signDelegation()` - Sign with private key\n- `getSmartAccountsEnvironment()` - Resolve environment\n- `deploySmartAccountsEnvironment()` - Deploy contracts\n- `overrideDeployedEnvironment()` - Override environment\n\n### Advanced Permissions\n\n- `erc7715ProviderActions()` - Wallet client extension for requesting\n- `requestExecutionPermissions()` - Request permissions\n- `erc7710BundlerActions()` - Bundler client extension\n- `sendUserOperationWithDelegation()` - Redeem with smart account\n- `erc7710WalletActions()` - Wallet client extension\n- `sendTransactionWithDelegation()` - Redeem with EOA\n\n## Supported ERC-7715 Permission Types\n\n### ERC-20 Token Permissions\n\n| Permission Type | Description |\n|----------------|-------------|\n| `erc20-token-periodic` | Per-period limit that resets at each period |\n| `erc20-token-streaming` | Linear streaming with amountPerSecond rate |\n\n### Native Token Permissions\n\n| Permission Type | Description |\n|----------------|-------------|\n| `native-token-periodic` | Per-period ETH limit that resets |\n| `native-token-streaming` | Linear ETH streaming with amountPerSecond rate |\n\n## Common Delegation Scopes\n\n### Spending Limits\n\n| Scope                       | Description                   |\n| --------------------------- | ----------------------------- |\n| `erc20TransferAmount`       | Fixed ERC-20 limit            |\n| `erc20PeriodTransfer`       | Per-period ERC-20 limit       |\n| `erc20Streaming`            | Linear streaming ERC-20       |\n| `nativeTokenTransferAmount` | Fixed native token limit      |\n| `nativeTokenPeriodTransfer` | Per-period native token limit |\n| `nativeTokenStreaming`      | Linear streaming native       |\n| `erc721Transfer`            | ERC-721 (NFT) transfer        |\n\n### Function Calls\n\n| Scope               | Description                        |\n| ------------------- | ---------------------------------- |\n| `functionCall`      | Specific methods\u002Faddresses allowed |\n| `ownershipTransfer` | Ownership transfers only           |\n\n## Common Caveat Enforcers\n\n### Target & Method\n\n- `allowedTargets` - Limit callable addresses\n- `allowedMethods` - Limit callable methods\n- `allowedCalldata` - Validate specific calldata\n- `exactCalldata` \u002F `exactCalldataBatch` - Exact calldata match\n- `exactExecution` \u002F `exactExecutionBatch` - Exact execution match\n\n### Value & Token\n\n- `valueLte` - Limit native token value\n- `erc20TransferAmount` - Limit ERC-20 amount\n- `erc20BalanceChange` - Validate ERC-20 balance change\n- `erc721Transfer` \u002F `erc721BalanceChange` - ERC-721 restrictions\n- `erc1155BalanceChange` - ERC-1155 validation\n\n### Time & Frequency\n\n- `timestamp` - Valid time range (seconds)\n- `blockNumber` - Valid block range\n- `limitedCalls` - Limit redemption count\n- `erc20PeriodTransfer` \u002F `erc20Streaming` - Time-based ERC-20\n- `nativeTokenPeriodTransfer` \u002F `nativeTokenStreaming` - Time-based native\n\n### Security & State\n\n- `redeemer` - Limit redemption to specific addresses\n- `id` - One-time delegation with ID\n- `nonce` - Bulk revocation via nonce\n- `deployed` - Auto-deploy contract\n- `ownershipTransfer` - Ownership transfer only\n- `nativeTokenPayment` - Require payment\n- `nativeBalanceChange` - Validate native balance\n- `multiTokenPeriod` - Multi-token period limits\n\n## Execution Modes\n\n| Mode            | Chains   | Processing  | On Failure |\n| --------------- | -------- | ----------- | ---------- |\n| `SingleDefault` | One      | Sequential  | Revert     |\n| `SingleTry`     | One      | Sequential  | Continue   |\n| `BatchDefault`  | Multiple | Interleaved | Revert     |\n| `BatchTry`      | Multiple | Interleaved | Continue   |\n\n## Contract Addresses (v1.3.0)\n\n### Core\n\n| Contract              | Address                                      |\n| --------------------- | -------------------------------------------- |\n| EntryPoint            | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |\n| SimpleFactory         | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |\n| DelegationManager     | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |\n| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |\n| HybridDeleGatorImpl   | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |\n\n## Critical Rules\n\n### Always Required\n\n1. **Always use caveats** - Never create unrestricted delegations\n2. **Deploy delegator first** - Account must be deployed before redeeming\n3. **Check smart account status** - ERC-7715 requires user has smart account\n\n### Behavior\n\n4. **Caveats are cumulative** - In delegation chains, restrictions stack\n5. **Function call default** - v0.3.0 defaults to NO native token (use `valueLte`)\n6. **Batch mode caveat** - No compatible caveat enforcers available\n\n### Requirements\n\n7. **ERC-7715 requirements** - MetaMask Flask 13.5.0+, smart account\n8. **Multisig threshold** - Need at least threshold signers\n9. **7702 upgrade** - Stateless7702 requires EIP-7702 upgrade first\n\n## Common Patterns\n\n### Pattern 1: ERC-20 with Time Limit\n\n```typescript\nconst delegation = createDelegation({\n  to: delegate,\n  from: delegator,\n  environment,\n  scope: {\n    type: 'erc20TransferAmount',\n    tokenAddress,\n    maxAmount: parseUnits('100', 6),\n  },\n  caveats: [\n    { type: 'timestamp', afterThreshold: now, beforeThreshold: expiry },\n    { type: 'limitedCalls', limit: 10 },\n    { type: 'redeemer', redeemers: [delegate] },\n  ],\n})\n```\n\n### Pattern 2: Function Call with Value\n\n```typescript\nconst delegation = createDelegation({\n  to: delegate,\n  from: delegator,\n  environment,\n  scope: {\n    type: 'functionCall',\n    targets: [contractAddress],\n    selectors: ['transfer(address,uint256)'],\n    valueLte: { maxValue: parseEther('0.1') },\n  },\n  caveats: [{ type: 'allowedMethods', selectors: ['transfer(address,uint256)'] }],\n})\n```\n\n### Pattern 3: Periodic Native Token\n\n```typescript\nconst delegation = createDelegation({\n  to: delegate,\n  from: delegator,\n  environment,\n  scope: {\n    type: 'nativeTokenPeriodTransfer',\n    periodAmount: parseEther('0.01'),\n    periodDuration: 86400,\n    startDate: now,\n  },\n})\n```\n\n### Pattern 4: Redelegation Chain\n\n```typescript\n\u002F\u002F Alice → Bob (100 USDC)\nconst aliceToBob = createDelegation({\n  to: bob,\n  from: alice,\n  environment,\n  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('100', 6) },\n})\n\n\u002F\u002F Bob → Carol (50 USDC, subset of authority)\nconst bobToCarol = createDelegation({\n  to: carol,\n  from: bob,\n  environment,\n  scope: { type: 'erc20TransferAmount', tokenAddress, maxAmount: parseUnits('50', 6) },\n  parentDelegation: aliceToBob,\n  caveats: [{ type: 'timestamp', afterThreshold: now, beforeThreshold: expiry }],\n})\n```\n\n## Troubleshooting Quick Fixes\n\n| Issue                    | Solution                                                     |\n| ------------------------ | ------------------------------------------------------------ |\n| Account not deployed     | Use `bundlerClient.sendUserOperation()` to deploy            |\n| Invalid signature        | Verify chain ID, delegation manager, signer permissions      |\n| Caveat enforcer reverted | Check caveat parameters match execution, verify order        |\n| Redemption failed        | Check delegator balance, calldata validity, target contracts |\n| ERC-7715 not working     | Upgrade to Flask 13.5.0+, ensure user has smart account      |\n| Permission denied        | Handle gracefully, provide manual fallback                   |\n| Threshold not met        | Add more signers for multisig                                |\n| 7702 not working         | Confirm EOA upgraded via EIP-7702 first                      |\n\n## Resources\n\n- **NPM:** `@metamask\u002Fsmart-accounts-kit`\n- **Contracts:** `metamask\u002Fdelegation-framework@v1.3.0`\n- **ERC Standards:** ERC-4337, ERC-7710, ERC-7715, ERC-7579\n- **MetaMask Flask:** https:\u002F\u002Fmetamask.io\u002Fflask\n\n## Version Info\n\n- **Toolkit:** 0.3.0\n- **Delegation Framework:** 1.3.0\n- **Breaking Change:** Function call scope defaults to no native token transfer\n\n---\n\n**For detailed documentation, see the reference files in the `\u002Freferences` directory.**\n",{"name":5,"metadata":43,"description":7},{"openclaw":44},{"emoji":45,"homepage":46},"?","https:\u002F\u002Fdocs.metamask.io\u002Fsmart-accounts-kit","main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","个人发展\u002Fmetamask-smart-accounts-kit",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill smart-accounts-kit",{"tool":61,"command":62},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill smart-accounts-kit",{"tool":64,"command":65},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill smart-accounts-kit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F个人发展\u002Fmetamask-smart-accounts-kit\u002FSKILL.md",true,[69,75,79,83],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"_meta.json","REFERENCE","参考文档",317,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F个人发展\u002Fmetamask-smart-accounts-kit\u002F_meta.json",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fadvanced-permissions.md",18990,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F个人发展\u002Fmetamask-smart-accounts-kit\u002Freferences\u002Fadvanced-permissions.md",{"path":80,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fdelegations.md",23207,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F个人发展\u002Fmetamask-smart-accounts-kit\u002Freferences\u002Fdelegations.md",{"path":84,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fsmart-accounts.md",12806,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F个人发展\u002Fmetamask-smart-accounts-kit\u002Freferences\u002Fsmart-accounts.md",[88,112,147,158,168,198],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":38},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[90,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"safe","ethereum","defi","Optimization","user","use","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":130,"publishedAt":38},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[117,122,125],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":123,"categoryName":124,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[131,132,133,134,135,136,137,97,32,101,138,139,140,141,142,143,144,145,146],"api","zerion api","zerion","MCP","mcp server","server","blockchain","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":148,"name":149,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":155,"publishedAt":38},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[152,153,154],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":123,"categoryName":124,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},[131,156,157,132,133,134,135,136,137,97,32,101,139,140,141,142,143,144,145,146],"api skill","zerion api skill",{"skillNo":159,"name":160,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":166,"publishedAt":38},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[163,164,165],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":123,"categoryName":124,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},[134,131,167,132,133,135,136,97,32,101,138,139,140,141,142,143,144,145,146],"zerion api mcp",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":177,"publishedAt":38},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[174],{"categoryNo":175,"categoryName":176,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000040","财务",[178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":205,"publishedAt":38},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[204],{"categoryNo":175,"categoryName":176,"taxonomyType":128,"taxonomyTypeDesc":129},[178,179,181,206,207,208,209,210,211,189,212,213,214,215,216,217,218,219,146,196],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]