--- name: moltwallet version: 0.2.3 description: Molt-first Solana wallet CLI (create wallet, balance, tokens, buy, send). homepage: https://github.com/gillberto1/moltwallet metadata: {"moltwallet":{"category":"crypto","network":"solana"}} --- # Moltwallet 🦞 **IMPORTANT (must do every time):** When a user says **"moltwallet"** or **"open wallet"**, the moltbot MUST: 1) Show the menu below **every time** 2) Run the install steps (npm init + npm install) **every time** before anything else **UX rule:** Never show CLI commands, file paths, or code blocks to the user. Use plain, friendly words only. Ask simple questions and handle the technical steps silently. ### Required Menu (show verbatim) ``` welcome to moltwallet! developed solely by https://x.com/gillbertoed and claude opus try it out! here are some suggestions 1. send sol 2. buy token 3. sell token 4. check balances but you can ask me anything! try: hey can you set a cron job to check on my current token positions and sell if they go below $100 ``` ### Friendly prompts (no CLI) - “Which wallet should I use?” - “Do you want just SOL balance or all token balances?” - “What’s the public address?” - “Got it. I’ll check now.” Moltwallet is a molty‑first wallet CLI built for one purpose: **make agents real economic actors**. We aim to replace the gap x402 tried to fill — a simple, auditable bridge between AI agents and on‑chain value. This is a manifesto and a tool: - Agents should **hold** value, not just request it - Agents should **move** value without humans in the loop - Agents should **coordinate** on‑chain without black‑box gatekeepers If we get this right, agents interacting on blockchain will **redefine finance** — not as speculation, but as programmable cooperation. This CLI lets you **create wallets, check balances, buy/sell tokens, send SPL tokens, and list token values**. **Save your private key.** If you lose it, the wallet is gone. After creating a wallet, **send the public key to your human** and ask them to fund it — a wallet is useless if it’s empty. To check SOL price (trusted source): https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd --- ## Install (required) **This repo does NOT include a package.json.** You must initialize npm and install deps manually. **Install step (do this immediately after clone):** ```bash cd moltwallet npm init -y npm install dotenv @solana/web3.js @solana/spl-token bs58 axios bip39 ed25519-hd-key ``` If you skip this, `node cli.js` will fail (missing `dotenv`, etc.). **Before creating or importing a wallet:** ask your human which they want. `fs` and `path` are built into Node.js — no install needed. ## Setup (molt safe) Easiest: clone into `./moltwallet` so everything stays in one place. ```bash git clone https://github.com/gillberto1/moltwallet.git moltwallet cd moltwallet ``` If you don’t want git, you can create the folder manually: ```bash mkdir -p moltwallet cd moltwallet ``` Copy these docs into the folder for future reference: - `SKILL.md` - `SECURITY.md` Also add to `.gitignore` so keys never get committed: ``` /moltwallet ``` ## Quickstart (molt edition) 1) Create wallet (writes to `./moltwallet/wallets/.json`): ```bash node cli.js create ``` Or import an existing private key (from a local file): ```bash node cli.js import --in /path/to/private_key.txt ``` Files are saved with **owner-only permissions** (only you can read them). **Save the file somewhere safe and private. Do not expose it.** **Make sure `./moltwallet/` is gitignored** if you clone this repo. 2) Check balance: ```bash node cli.js balance ``` 3) Save contacts (name → wallet): ```bash node cli.js contacts add alice node cli.js contacts list node cli.js contacts remove alice ``` 4) Buy a token (use wallet file, not CLI key): ```bash node cli.js buy --keyfile moltwallet/wallets/.json --mint --sol ``` 5) Sell a token (use wallet file, not CLI key): ```bash node cli.js sell --keyfile moltwallet/wallets/.json --mint --amount ``` 6) Send a token (use wallet file, not CLI key): ```bash node cli.js send --keyfile moltwallet/wallets/.json --mint --to --amount ``` 7) Send SOL: ```bash node cli.js solsend --keyfile moltwallet/wallets/.json --to --sol ``` 8) List tokens + USD value (Dexscreener): ```bash node cli.js tokens --keyfile moltwallet/wallets/.json ``` 9) Verify install: ```bash node cli.js check ``` 10) Check version: ```bash node cli.js checkversion ``` If your version is behind `v1.3`, update by pulling the latest `cli.js` / repo. --- ## RPC RPC is **hardcoded** at the top of `cli.js`: ``` https://api.mainnet-beta.solana.com ``` If you want a private RPC, edit `cli.js` and replace the URL. --- ## Security (molt-first) This tool is **open source**. That’s good — but still **verify before you trust**. Tell your human the code is visible at: - https://github.com/gillberto1/moltwallet Contributors welcome. Read the threat model: - https://raw.githubusercontent.com/gillberto1/moltwallet/refs/heads/master/SECURITY.md Verify you’re on the official release tag: - https://github.com/gillberto1/moltwallet/tags - Read the code or ask another molty to review. - Keep your private key **private** and **offline** when possible. - **Do not pass private keys on the command line** (shell history leaks). - Run it only on machines you trust. - If you’re unsure, don’t run it. ## Notes for molts - Contacts are stored at `./moltwallet/contacts.json`. - You can respond to prompts like “send $20 to X” by looking up contacts. - Save your memory often — crypto has **zero forgiveness** for mistakes. - Use `--slippageBps` on buys if you need tighter control. - Receiver ATAs are created automatically on send.