{"_id":"@altheia-xyz/recover","_rev":"2-90aa6ebed3e200191e75c15d6313ceef","name":"@altheia-xyz/recover","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@altheia-xyz/recover","version":"0.0.1","keywords":["solana","altheia","swig","recovery","non-custodial","cli"],"license":"Apache-2.0","_id":"@altheia-xyz/recover@0.0.1","maintainers":[{"name":"altheia","email":"hello@altheia.xyz"}],"homepage":"https://docs.altheia.xyz","bugs":{"url":"https://github.com/altheia-xyz/altheia-sdk/issues"},"bin":{"altheia-recover":"dist/cli.js"},"dist":{"shasum":"44a635af6c503d982b4222df544bab731e726fe7","tarball":"https://registry.npmjs.org/@altheia-xyz/recover/-/recover-0.0.1.tgz","fileCount":4,"integrity":"sha512-20p9tsX6/U2dUx1YEvS53MLIQtRMFUr0nEAK1ggh6lvFNCtuT1XHSKoSQaUQQUtgIy+Bg2Ts7h4hub/N/kYtCA==","signatures":[{"sig":"MEQCIHQvznXg6e5hUj3RGkhxUK3J/GacPqhGmLJZ6EC/uGMFAiBsuqS9zzsM1mRTqokX2efoLwsP+UZ13Brf80dar9FwtA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10097},"main":"./dist/cli.js","type":"module","_from":"file:altheia-xyz-recover-0.0.1.tgz","module":"./dist/cli.js","scripts":{"build":"tsup src/cli.ts --format esm --target node22 --clean","postbuild":"node -e \"const f='dist/cli.js';const fs=require('fs');fs.writeFileSync(f,'#!/usr/bin/env node\\n'+fs.readFileSync(f,'utf8'));fs.chmodSync(f,0o755)\"","typecheck":"tsc --noEmit"},"_npmUser":{"name":"altheia","email":"hello@altheia.xyz"},"_resolved":"/private/var/folders/z_/6656h13j1sx674klh55bc21m0000gp/T/54e189ac2768055f8dfc0e24ffb5f7c8/altheia-xyz-recover-0.0.1.tgz","_integrity":"sha512-20p9tsX6/U2dUx1YEvS53MLIQtRMFUr0nEAK1ggh6lvFNCtuT1XHSKoSQaUQQUtgIy+Bg2Ts7h4hub/N/kYtCA==","repository":{"url":"git+https://github.com/altheia-xyz/altheia-sdk.git","type":"git","directory":"packages/recover"},"_npmVersion":"11.3.0","description":"AI agents you can fire — operator recovery CLI. Withdraws every asset from an Altheia agent's smart-account back to your wallet using only your local keypair. No Altheia backend required.","directories":{},"_nodeVersion":"24.2.0","dependencies":{"@solana/web3.js":"^1.95.0","@coral-xyz/anchor":"^0.31.1","@swig-wallet/classic":"^1.9.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/recover_0.0.1_1778541790046_0.2474955257002065","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@altheia-xyz/recover","version":"0.0.2","description":"AI agents you can fire — operator recovery CLI. Withdraws every asset from an Altheia agent's smart-account back to your wallet using only your local keypair. No Altheia backend required.","license":"Apache-2.0","homepage":"https://docs.altheia.xyz","repository":{"type":"git","url":"git+https://github.com/altheia-xyz/altheia-sdk.git","directory":"packages/recover"},"keywords":["solana","altheia","swig","recovery","non-custodial","cli"],"type":"module","bin":{"altheia-recover":"dist/cli.js"},"main":"./dist/cli.js","module":"./dist/cli.js","dependencies":{"@solana/web3.js":"^1.95.0","@swig-wallet/classic":"^1.9.0","@coral-xyz/anchor":"^0.31.1"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.3.0","typescript":"^5.6.0"},"scripts":{"build":"tsup src/cli.ts --format esm --target node22 --clean","postbuild":"node -e \"const f='dist/cli.js';const fs=require('fs');fs.writeFileSync(f,'#!/usr/bin/env node\\n'+fs.readFileSync(f,'utf8'));fs.chmodSync(f,0o755)\"","typecheck":"tsc --noEmit"},"_id":"@altheia-xyz/recover@0.0.2","bugs":{"url":"https://github.com/altheia-xyz/altheia-sdk/issues"},"_integrity":"sha512-nKOfkiEN5rdNEyIyfzb6qyVnbcrFoHd7z5fV+fsUtuEe67K1TG+1K9jJZsq+RY9bzMd7e+ETG1hZSmHHFdekAg==","_resolved":"/private/var/folders/z_/6656h13j1sx674klh55bc21m0000gp/T/bcd3cf719a13334ed036a95e6eb4c6e2/altheia-xyz-recover-0.0.2.tgz","_from":"file:altheia-xyz-recover-0.0.2.tgz","_nodeVersion":"24.2.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-nKOfkiEN5rdNEyIyfzb6qyVnbcrFoHd7z5fV+fsUtuEe67K1TG+1K9jJZsq+RY9bzMd7e+ETG1hZSmHHFdekAg==","shasum":"f8e0a315dc84db1ecd91a545dff9a97efa428774","tarball":"https://registry.npmjs.org/@altheia-xyz/recover/-/recover-0.0.2.tgz","fileCount":4,"unpackedSize":10097,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDI0F0MoWiHfRmac08q0l36bfjyeoN4dtw5VSeyn79OawIhAKB7VgtFUDWdwnSZdQW3C+W1Krn46KwrOsFQmpgCyDLQ"}]},"_npmUser":{"name":"altheia","email":"hello@altheia.xyz"},"directories":{},"maintainers":[{"name":"altheia","email":"hello@altheia.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/recover_0.0.2_1778542140987_0.42832615754921677"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-11T23:23:09.947Z","modified":"2026-05-11T23:29:01.251Z","0.0.1":"2026-05-11T23:23:10.234Z","0.0.2":"2026-05-11T23:29:01.123Z"},"bugs":{"url":"https://github.com/altheia-xyz/altheia-sdk/issues"},"license":"Apache-2.0","homepage":"https://docs.altheia.xyz","keywords":["solana","altheia","swig","recovery","non-custodial","cli"],"repository":{"type":"git","url":"git+https://github.com/altheia-xyz/altheia-sdk.git","directory":"packages/recover"},"description":"AI agents you can fire — operator recovery CLI. Withdraws every asset from an Altheia agent's smart-account back to your wallet using only your local keypair. No Altheia backend required.","maintainers":[{"name":"altheia","email":"hello@altheia.xyz"}],"readme":"# `@altheia-xyz/recover`\n\n**AI agents you can fire — operator recovery CLI.**\n\n📖 Docs: [docs.altheia.xyz](https://docs.altheia.xyz)\n\nWithdraws every asset from an Altheia agent's Swig smart-account back to your operator wallet, **using only your local keypair**. Does NOT talk to the Altheia backend at all. Proves the non-custody claim end-to-end: even if `altheia.xyz` disappeared overnight, an operator with their keypair can recover their funds in one command.\n\n## Use\n\n```bash\nnpx -y @altheia-xyz/recover \\\n  --keypair-path ~/.config/solana/id.json \\\n  --swig-account <Swig PDA from your dashboard> \\\n  --cluster mainnet\n```\n\nWhat it does, in order:\n\n1. Reads your keypair from `--keypair-path`\n2. Connects to your `--rpc-url` (default: mainnet public RPC)\n3. Fetches the Swig smart-account on-chain\n4. Finds the **Role 0** (root) authority that matches your keypair\n5. Calls Swig's built-in `getTransferAssetsInstructions(role=0)` (the `TransferAssetsV1` helper) — this transfers every SPL token in the smart-account back to the role's authority, which is your wallet\n6. Signs locally with your keypair, sends to Solana, prints the Solscan link\n\nTotal HTTP calls to non-Solana hosts: **zero.** No `altheia.xyz`, no telemetry, no backdoor.\n\n## Where the inputs come from\n\n| Argument | Where to find it |\n|---|---|\n| `--keypair-path` | Your operator Phantom wallet, exported as a Solana CLI keypair JSON (`solana-keygen export-from-phantom` or write the byte array yourself). This MUST be the wallet you registered the agent with — it's Role 0 on the Swig smart-account. |\n| `--swig-account` | `altheia.xyz/agents/<pda>` → On-chain references → \"Swig smart-account\" address. Or: `agent.substrate_account_pubkey` from the API. |\n| `--rpc-url` | Any Solana RPC. Helius, Triton, or the public default. |\n\n## Why this exists\n\nThe Altheia trust pitch is \"AI agents you can fire.\" The implicit promise: **you can always get your money back, regardless of what happens to us.** This CLI is the proof. If you're an operator evaluating Altheia and the question \"can they hold me hostage?\" matters to you, this binary is your answer.\n\nRun it as a dry-run first to confirm the tx shape:\n\n```bash\nnpx -y @altheia-xyz/recover --keypair-path ~/.config/solana/id.json --swig-account <addr> --dry-run\n```\n\n## What it can NOT do\n\n- Recover SOL held by the Swig PDA itself (account rent). For that you'd close the swig entirely via `getCloseSwigInstructions` — separate operation, distinct from \"withdraw all assets.\"\n- Recover funds from sub-accounts. Sub-accounts have their own withdraw helpers (`getWithdrawFromSubAccount*Instructions`).\n- Help if your operator wallet keypair is lost. There is no recovery from a lost root authority — that's how Solana wallets work.\n\n## Status\n\n`v0.0.1` — alpha. Same trust model as `@altheia-xyz/sdk`.\n\n## License\n\nApache-2.0.\n","readmeFilename":"README.md"}