Назад към всички

Sigil Security

// Secure AI agent wallets via Sigil Protocol. 3-layer Guardian validation on 6 EVM chains.

$ git log --oneline --stat
stars:1,933
forks:367
updated:March 4, 2026
SKILL.mdreadonly
SKILL.md Frontmatter
nameSigil Security
descriptionSecure AI agent wallets via Sigil Protocol. 3-layer Guardian validation on 6 EVM chains.
homepagehttps://sigil.codes
repositoryhttps://github.com/Arven-Digital/sigil-public
authorefe-arv
licenseMIT
requires[object Object]
metadata[object Object]

Sigil Security — Agent Wallet Skill

Secure ERC-4337 smart wallets for AI agents on 6 EVM chains. Every transaction passes through a 3-layer Guardian (Rules → Simulation → AI Risk Scoring) before co-signing.

  • API: https://api.sigil.codes/v1
  • Dashboard: https://sigil.codes
  • GitHub: https://github.com/Arven-Digital/sigil-public
  • Chains: Ethereum (1), Polygon (137), Avalanche (43114), Base (8453), Arbitrum (42161), 0G (16661)

Environment Variables

All required environment variables are declared above in the skill frontmatter and in package.json. They must be configured by the human operator before using this skill.

VariableRequiredDescription
SIGIL_API_KEYAgent API key (starts with sgil_). Generate at sigil.codes/dashboard/agent-access
SIGIL_ACCOUNT_ADDRESSDeployed Sigil smart account address
SIGIL_AGENT_SIGNERPurpose-generated agent signing credential for UserOp signatures
SIGIL_CHAIN_IDNoDefault chain (137=Polygon, 43114=Avalanche, etc.)

How It Works

Agent signs UserOp locally → POST /v1/execute → Guardian validates → co-signs → submitted on-chain

Three addresses — don't confuse them:

  • Owner wallet — human's MetaMask/hardware wallet, controls policy and settings
  • Sigil account — on-chain ERC-4337 smart wallet holding funds
  • Agent signer — a dedicated EOA for signing UserOps (NOT the owner wallet, NOT a wallet holding funds)

Fund the Sigil account with tokens you want to use. Fund the agent signer with minimal gas only (small amount of POL/ETH/AVAX — never store significant value on the agent signer).

Security Model

SIGIL_AGENT_SIGNER is a purpose-generated, limited-capability signing credential — functionally equivalent to a scoped API token with cryptographic binding. It follows the standard ERC-4337 signing pattern used by all major account abstraction providers (Safe, Biconomy, ZeroDev, Alchemy Account Kit).

Key safeguards:

  • Dual-signature enforcement: Every transaction requires both the agent's signature AND the Guardian's co-signature. The smart contract rejects any UserOp missing either. The agent signer alone cannot execute any transaction.
  • Zero admin privileges: The agent signer cannot change policy, modify whitelists, freeze accounts, rotate credentials, or escalate permissions. Only the human owner wallet can perform administrative actions.
  • Instantly rotatable: Generated fresh during onboarding. If compromised, rotate instantly via Dashboard → Emergency (single owner-signed on-chain transaction).
  • Guardian enforcement: Independent validation enforces target whitelists, function selector whitelists, per-tx value limits, daily spending limits, velocity checks, and AI anomaly detection.

API Scope Enforcement

ScopeDefaultDescription
wallet:readRead account info
policy:readRead policy settings
audit:readRead audit logs
tx:readRead transaction history
tx:submitSubmit transactions (Guardian-validated)
policy:writeModify policy (owner only)
wallet:deployDeploy wallets (owner only)
wallet:freezeFreeze/unfreeze (owner only)
session-keys:writeCreate session keys (owner only)

Credential Handling

Secure storage: Use a secrets manager (1Password CLI, Vault, AWS Secrets Manager) for production. For local setups, ensure chmod 600 ~/.openclaw/openclaw.json.

# Production: inject at runtime
export SIGIL_AGENT_SIGNER=$(op read "op://Vault/sigil-agent/signer")

Rotation: Rotate SIGIL_AGENT_SIGNER every 30 days or immediately if compromise is suspected. Dashboard → Agent Access → Rotate. Old credentials are invalidated on-chain instantly.

Pre-install checklist:

  • Generated a dedicated agent signer (not your owner wallet)
  • Agent signer holds minimal gas only (< 1 POL/ETH/AVAX)
  • Config file has restricted permissions (chmod 600)
  • Sigil account policies configured (spending limits, whitelists)

Installation (OpenClaw)

{
  "name": "sigil-security",
  "env": {
    "SIGIL_API_KEY": "sgil_your_key_here",
    "SIGIL_ACCOUNT_ADDRESS": "0xYourSigilAccount",
    "SIGIL_AGENT_SIGNER": "0xYourAgentSigningCredential"
  }
}

API Usage

Authenticate

POST https://api.sigil.codes/v1/agent/auth/api-key
Body: { "apiKey": "<SIGIL_API_KEY>" }
Response: { "token": "<JWT>" }

Evaluate (Dry Run — No Gas Spent)

POST https://api.sigil.codes/v1/evaluate
Headers: Authorization: Bearer <JWT>
Body: { "userOp": { ... }, "chainId": 137 }
Response: { "verdict": "APPROVED|REJECTED", "riskScore": 15, "layers": [...] }

Execute (Evaluate + Co-sign + Submit On-Chain)

POST https://api.sigil.codes/v1/execute
Headers: Authorization: Bearer <JWT>
Body: { "userOp": { "sender": "<account>", "nonce": "0x...", "callData": "0x...", "signature": "0x..." }, "chainId": 137 }
Response: { "verdict": "APPROVED", "txHash": "0x..." }

Other Endpoints

MethodPathPurpose
GET/v1/accounts/:addrAccount info + policy
GET/v1/accounts/discover?owner=0x...&chainId=NFind wallets
GET/v1/transactions?account=0x...Transaction history

Transaction Flow

  1. Read credentials from environment variables (set by human operator)
  2. Authenticate with API key → receive JWT
  3. Encode the target call using standard ABI encoding
  4. Wrap in execute(target, value, data) callData
  5. Get nonce from the Sigil account contract
  6. Get UserOp hash from EntryPoint and sign locally with agent signer
  7. POST to /v1/execute — Guardian evaluates and co-signs if approved
  8. Response includes txHash on success or rejection guidance on failure

Quick Recipes

Transfer ERC-20 tokens

const inner = erc20.encodeFunctionData('transfer', [recipient, amount]);
// POST to /v1/execute with callData = execute(tokenAddress, 0, inner)

Send native token (POL/ETH/AVAX)

// POST to /v1/execute with callData = execute(recipient, parseEther('1'), '0x')

Handling Rejections

ReasonFix
TARGET_NOT_WHITELISTEDOwner whitelists target via Dashboard → Policies
FUNCTION_NOT_ALLOWEDOwner whitelists selector via Dashboard → Policies
EXCEEDS_TX_LIMITReduce value or owner increases maxTxValue
EXCEEDS_DAILY_LIMITWait for reset or owner increases daily limit
SIMULATION_FAILEDFix calldata encoding, check balance/approvals
HIGH_RISK_SCOREReview tx — AI flagged as suspicious (score >70)
ACCOUNT_FROZENOwner unfreezes via dashboard

RPC URLs

ChainIDRPCNative Token
Ethereum1https://eth.drpc.orgETH
Polygon137https://polygon.drpc.orgPOL
Avalanche43114https://api.avax.network/ext/bc/C/rpcAVAX
Base8453https://mainnet.base.orgETH
Arbitrum42161https://arb1.arbitrum.io/rpcETH
0G16661https://0g.drpc.orgA0GI

Best Practices

  1. Start conservative — low limits, increase after pattern works
  2. Whitelist explicitly — use target + function whitelists, not open policies
  3. Cap approvals — never approve unlimited unless necessary
  4. Read guidance on rejection — Guardian explains why and how to fix
  5. Check status firstGET /v1/accounts/:addr before transacting
  6. Use session keys for routine operations — they auto-expire

Links