[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CMPPPYCNE8PE3AD655JJZ5":3,"skill-same:01M6CMPPPYCNE8PE3AD655JJZ5":99},{"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":6,"updatedAt":53,"install":54,"resources":67},"01M6CMPPPYCNE8PE3AD655JJZ5","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.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fayushbherwani1998\u002Fsmart-accounts-kit\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"smart accounts kit","web3","metamask","build","use","operations","gas","user","configure","transactions","docs","integration","https","batch","framework","delegation","permissions","create","development","implement","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","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fayushbherwani1998\u002Fsmart-accounts-kit",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add kbarbel640-del\u002Fskills --skill smart-accounts-kit",{"tool":60,"command":61},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill smart-accounts-kit",{"tool":63,"command":64},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill smart-accounts-kit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fayushbherwani1998\u002Fsmart-accounts-kit\u002FSKILL.md",true,[68,74,79,83,87,91,95],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"_meta.json","REFERENCE","参考文档",486,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fayushbherwani1998\u002Fsmart-accounts-kit\u002F_meta.json",{"path":75,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"LICENSE","许可证",1063,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-map-third-party-data-processors\u002FLICENSE",{"path":80,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fadvanced-permissions.md",18990,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fayushbherwani1998\u002Fsmart-accounts-kit\u002Freferences\u002Fadvanced-permissions.md",{"path":84,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fdelegations.md",23207,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fayushbherwani1998\u002Fsmart-accounts-kit\u002Freferences\u002Fdelegations.md",{"path":88,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fsmart-accounts.md",12806,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fayushbherwani1998\u002Fsmart-accounts-kit\u002Freferences\u002Fsmart-accounts.md",{"path":92,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":93,"sourceHtmlUrl":94},"SOURCE.md",357,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-map-third-party-data-processors\u002FSOURCE.md",{"path":96,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":97,"sourceHtmlUrl":98},"TRUST.auto.yaml",2217,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-map-third-party-data-processors\u002FTRUST.auto.yaml",[100,129,156,177,183,203],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":111,"publishedAt":38},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[106],{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[112,113,114,115,116,117,118,119,23,120,121,122,123,124,125,126,30,127,128],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","instructions","text","tool","system","improve","productivity","marketplace","content","ai agents",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":140,"publishedAt":38},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[135],{"categoryNo":136,"categoryName":137,"taxonomyType":138,"taxonomyTypeDesc":139},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[141,114,142,143,144,145,35,146,147,148,149,150,151,152,153,154,155,119,22],"dilemm ai","arena","analyze","browser","openclaw agent","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":165,"publishedAt":38},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[162],{"categoryNo":163,"categoryName":164,"taxonomyType":138,"taxonomyTypeDesc":139},"01JBSEEDCAT000000000000021","资料检索与研究",[166,167,168,169,170,171,172,115,173,154,22,174,114,175,176],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":178,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":182,"publishedAt":38},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[181],{"categoryNo":163,"categoryName":164,"taxonomyType":138,"taxonomyTypeDesc":139},[169,168,167,166,176,171,172,115,170,154,22,173,174,114,175],{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":38},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[190,191,192,193,194,195,196,197,198,199,200,201,202],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":213,"publishedAt":38},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[209,210],{"categoryNo":136,"categoryName":137,"taxonomyType":138,"taxonomyTypeDesc":139},{"categoryNo":211,"categoryName":212,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000037","律师与法务",[214,215,216,217,115,218,219,47,220,174,221,222,223,224,225,30,226,227,228],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]