agent-wallet
Skill1 starsChanged 7 days agoMITView on GitHub
Create and use a local agent EOA with encrypted JSON keystores (ethers/Node by default; Foundry cast optional) — sign personal_sign / typed data / tx hashes, send transactions, and build or sign EIP-7710 delegations (including redelegation and EIP-7702 auth) without printing private keys, mnemonics, or passwords into chat context. Use when an agent needs its own wallet, agent private key storage, non-interactive casting, or MetaMask Smart Accounts Kit delegations from a headless environment. Also use when an agent needs an address for a CoinOperated (or other product) funding/registration deeplink after create — product URL shape lives in the consuming skill (e.g. coinoperated). Also use when signing EIP-7702 auth or EIP-7710 root/redelegations that will be submitted via the public-relayer skill (relayer_estimate7710Transaction / relayer_send7710Transaction, including batched executions and multichain).
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ChainGPT-org/chaingpt-claude-skilltheir own version, first seen Nov 1, 2026
- hec-ovi/blockchain-skilltheir own version, first seen Jul 26, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ChainGPT-org/chaingpt-claude-skill★ 7same name
- hec-ovi/blockchain-skill★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 1shot-apiSkill
- 1shot-walletSkill
- coinoperatedSkill
- ows-branding-layerSkill
- public-relayerSkill
- unit-testsSkill
- webauthn-prf-walletSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 1 is distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
If depsOk is false → cd scripts && npm install (path in depsInstallHint).
- Very specific: line 57
If cast is null → fine for create/SIWE/auth7702/redelegate.
- Distinctive: line 59
Create a wallet (idempotent.
- Very specific: line 66
Prefer aw over raw cast wallet new / cast wallet private-key (those leak keys to stdout).
- Very specific: line 70
Run from the skill root, or with an absolute path to scripts/aw.mjs.
- Very specific: line 89
Every command supports --help.
- Very specific: line 118
First tx on a chain: always run auth7702 and include authorizationList until the EOA has Stateless7702 code.
- Very specific: line 122
Multichain: run auth7702 / redelegate (or delegation-sign) per chain as needed, then relayer_estimate7710TransactionMultichain / …
- Very specific: line 133
Run doctor before first use.
- Very specific: line 134
After create, tell the user the address only — never open or dump the password file or keystore JSON into chat.
- Very specific: line 135
Do not run cast wallet private-key, cast wallet new without --unsafe-password, or interactive password prompts.
- Very specific: line 137
Treat stdout as the only success channel.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent wallet (keystore CLI)
Product-agnostic skill for coding agents that need a local EOA and optional EIP-7710 delegations. Keys live in encrypted JSON keystores under ~/.agent-wallet/ (or AGENT_WALLET_HOME). The CLI never prints private keys, mnemonics, or passwords — only JSON results on stdout.
These scripts reduce accidental key leakage into model context. Anyone or any process with filesystem access to the keystore + password file can still use the key. The sandbox / host filesystem is the trust boundary — see references/security.md.
Install this skill
Claude Code / Cursor (user-level, ~/.claude/skills is read by both):
npx skills add 1Shot-API/skills/agent-wallet -g -a claude-code -y
cd ~/.claude/skills/agent-wallet/scripts && npm installAny agent / cloud sandbox:
git clone --depth 1 https://github.com/1Shot-API/skills.git
cd skills/agent-wallet/scripts && npm installnpm install pulls @metamask/smart-accounts-kit ^2.0.0, viem, and ethers (~seconds). That is enough for create, address, sign-personal, sign-hash, auth7702, and delegation-*/redelegate.
Foundry cast is optional for the CoinOperated / public-relayer path. It is still required for send, mktx, and sign-typed. Avoid foundryup in tiny cloud snapshots when you only need EIP-7710 signing (~294 MB of forge/cast/anvil binaries).
First run
node scripts/aw.mjs doctor- If
depsOkis false →cd scripts && npm install(path indepsInstallHint). - If
castis null → fine for create/SIWE/auth7702/redelegate;foundryHintlists commands that still need cast.
Create a wallet (idempotent; show the user address only):
node scripts/aw.mjs create
# → {"ok":true,"address":"0x…","name":"agent",…}Prefer aw over raw cast wallet new / cast wallet private-key (those leak keys to stdout).
Command cheat sheet
Run from the skill root, or with an absolute path to scripts/aw.mjs.
| Command | Purpose | Success stdout | Needs cast? |
doctor | cast / node / wallet / deps | status object | no |
create [--name] [--force] | encrypted keystore + password file | { address, name, keystorePath, storageTier } | no (ethers) |
address [--name] | resolve address | { address } | no |
sign-personal --message … | EIP-191 | { signature } | no (viem fallback) |
sign-hash --hash 0x… | raw 32-byte hash | { signature } | no (viem fallback) |
sign-typed --file typed.json | EIP-712 | { signature } | yes |
send --rpc … --to … | broadcast | { txHash } | yes |
mktx … | signed raw tx, no broadcast | { rawTransaction } | yes |
auth7702 --rpc … --chain-id N | EIP-7702 Stateless7702 auth | { authorization, … } | no |
delegation-create --file input.json | unsigned delegation | { delegation, chainId } | no |
delegation-sign --file input.json | sign delegation in-process | { signedDelegation, chainId } | no |
redelegate --parent parent.json --file input.json | child delegation + sign | { signedDelegation, chainId } | no |
Exit codes: 0 ok, 2 missing cast/deps, 3 no wallet, 4 bad args, 5 runtime failure.
Every command supports --help. Unknown flags fail loudly. Optional --home / AGENT_WALLET_HOME and --name (default agent).
Examples
node scripts/aw.mjs sign-personal --message "hello"
# Arc first redeem — Stateless7702 auth for the relayer (pending nonce)
node scripts/aw.mjs auth7702 --rpc https://rpc.mainnet.arc.io --chain-id 5042
node scripts/aw.mjs redelegate --parent ./parent.json --file ./child-input.jsonDelegation input schema, scopes, amounts, and 7702: references/eip7710.md.
Arc mainnet: kit env for 5042 is registered via Arc Testnet template (overrideDeployedEnvironment). Kit must be ^2.0.0. See references/eip7710.md.
After create — product deeplinks
This skill only supplies the address. For CoinOperated owner linking (additional signer + spending delegation), follow skill coinoperated: build https://coinoperated.finance/agent/link?accountAddress=…&name=…, ask the user to open it, then SIWE with sign-personal for a Bearer token.
Redeeming via the public relayer
aw signs (7702 auth, root delegation, redelegation). It does not call relayer_*. Follow skill public-relayer (Path D, Example 0d) for capabilities → estimate → send.
| Goal | aw commands | Then (public-relayer) |
| First-time smart account on a chain | auth7702 --rpc … --chain-id N | Pass authorizationList: [authorization] on estimate and send |
| Agent pays fee + work itself | delegation-sign --file … with to: targetAddress | permissionContext: [signedDelegation] |
| Spend a user grant to this agent (CoinOperated) | redelegate --parent parent.json --file child.json (to: targetAddress, narrower scope) | permissionContext: **[child, parent]** (leaf → root) |
First tx on a chain: always run auth7702 and include authorizationList until the EOA has Stateless7702 code. aw signs the current pending nonce (relayer is the outer sender — never viem executor: "self").
Batching (same chain): one permissionContext + multiple executions[] (e.g. fee transfer + pull-to-agent). Do not run separate aw send calls for gas-abstracted redeem.
Multichain: run auth7702 / redelegate (or delegation-sign) per chain as needed, then relayer_estimate7710TransactionMultichain / relayer_send7710TransactionMultichain with per-chain context from contextByChainId.
# Example — Arc D2 (CoinOperated)
node scripts/aw.mjs auth7702 --rpc https://rpc.mainnet.arc.io --chain-id 5042
node scripts/aw.mjs redelegate --parent ./parent.json --file ./child-input.json
# → authorizationList + permissionContext [child, parent] on estimate/send (Example 0d)Agent rules
- Run
doctorbefore first use; fixnpm installfrom its hints. Install Foundry only if you needsend/mktx/sign-typed. - After
create, tell the user the address only — never open or dump the password file or keystore JSON into chat. - Do not run
cast wallet private-key,cast wallet newwithout--unsafe-password, or interactive password prompts. - For EIP-7710 submit/redeem, use skill public-relayer (
relayer_*) — notaw send. - Treat stdout as the only success channel; parse JSON (
ok: true). BigInts in auth are stringified safely.
Storage layout
See references/storage.md. Tier B only in v1: encrypted keystore + 0600 password file. OS keyring deferred.
See also
- references/casting.md — cast flag mapping (optional path)
- references/security.md — threat model
- references/eip7710.md — delegation JSON + 7702
- Skill public-relayer — submit signed EIP-7710 contexts (
relayer_send7710Transaction) - Skill coinoperated — CoinOperated agent link deeplink + SIWE Bearer + OpenAPI
- Skill smart-accounts-kit (MetaMask) — broader kit workflows
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

