nanosolana 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example ADDED
@@ -0,0 +1,281 @@
1
+ # ╔══════════════════════════════════════════════════════════════╗
2
+ # ║ NanoSolana — TypeScript Runtime Environment ║
3
+ # ║ One-shot trading agent bootstrap + autonomous daemon ║
4
+ # ╚══════════════════════════════════════════════════════════════╝
5
+ #
6
+ # Fastest path:
7
+ # 1) Copy to `.env`: cp .env.example .env
8
+ # 2) Fill in the minimum live keys:
9
+ # OPENROUTER_API_KEY
10
+ # HELIUS_RPC_URL
11
+ # HELIUS_API_KEY
12
+ # 3) Run:
13
+ # npx nanosolana go
14
+ #
15
+ # For a long-running daemon after setup:
16
+ # npx nanosolana daemon
17
+ #
18
+ # NEVER commit your .env — it contains secrets!
19
+
20
+ # ─── Agent Identity ──────────────────────────────────────────
21
+ NANO_AGENT_NAME=NanoSolana
22
+ ASSISTANT_NAME=Mawd
23
+ ASSISTANT_HAS_OWN_NUMBER=false
24
+
25
+ # ============================================
26
+ # Solana — RPC & Infrastructure
27
+ # ============================================
28
+ RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
29
+ SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
30
+ HELIUS_API_KEY=your_helius_api_key
31
+ HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
32
+ HELIUS_WSS_URL=wss://mainnet.helius-rpc.com/?api-key=YOUR_KEY
33
+ HELIUS_PARSE_URL=https://api-mainnet.helius-rpc.com/v0/transactions/?api-key=YOUR_KEY
34
+ ALCHEMY_RPC_URL=https://solana-mainnet.g.alchemy.com/v2/YOUR_KEY
35
+ ALCHEMY_API_KEY=your_alchemy_api_key
36
+
37
+ # ============================================
38
+ # Solana — Market Data (Birdeye)
39
+ # ============================================
40
+ BIRDEYE_API_KEY=your_birdeye_api_key
41
+ BIRDEYE_WSS_URL=wss://public-api.birdeye.so/socket/solana?x-api-key=YOUR_KEY
42
+
43
+ # ============================================
44
+ # Solana — DEX & Trading (Jupiter)
45
+ # ============================================
46
+ JUPITER_API_KEY=your_jupiter_api_key
47
+ JUP_SWAP_V1_API_KEY=your_jupiter_api_key
48
+ JUPITER_ENDPOINT=https://api.jup.ag
49
+ JUPITER_ULTRA_ENDPOINT=https://api.jup.ag/ultra
50
+ JUPITER_REFERRAL=your_referral_address
51
+
52
+ # Bags.fm
53
+ BAGS_API_KEY=your_bags_api_key
54
+ BAGS_WALLET=your_bags_wallet_address
55
+ BAGS_PRIVATE_KEY=your_bags_private_key
56
+ BAGS_PARTNER_CONFIG=your_bags_partner_config
57
+
58
+ # ─── Solana Wallet ────────────────────────────────────────────
59
+ # Auto-generated on `nano birth` if not set.
60
+ # SOLANA_PRIVATE_KEY=your-base58-private-key
61
+
62
+ # ============================================
63
+ # Wallet & Auth (Privy, Phantom, Thirdweb)
64
+ # ============================================
65
+ PRIVY_APP_ID=your_privy_app_id
66
+ PRIVY_APP_SECRET=your_privy_app_secret
67
+ PRIVY_JWKS=https://auth.privy.io/api/v1/apps/YOUR_APP_ID/jwks.json
68
+ PRIVY_CLIENT_ID=your_privy_client_id
69
+ PHANTOM_APP_ID=your_phantom_app_id
70
+ REOWN_PROJECT_ID=your_reown_project_id
71
+ WALLET_CONNECT_PROJECT_ID=your_wallet_connect_project_id
72
+
73
+ # Thirdweb
74
+ THIRDWEB_CLIENT_ID=your_thirdweb_client_id
75
+ THIRDWEB_SECRET_KEY=your_thirdweb_secret_key
76
+ THIRDWEB_WALLET=your_thirdweb_wallet_address
77
+
78
+ # ============================================
79
+ # AI Provider API Keys
80
+ # ============================================
81
+ OPENROUTER_API_KEY=sk-or-v1-your-key-here
82
+ OPENROUTER_MODEL=openrouter/healer-alpha
83
+ ANTHROPIC_API_KEY=your_anthropic_api_key
84
+ OPENAI_API_KEY=your_openai_api_key
85
+ XAI_API_KEY=your_xai_api_key
86
+ GROK_MODEL=grok-4-1-fast
87
+ MOONSHOT_API_KEY=your_moonshot_api_key
88
+ MOONSHOT_MODEL=kimi-k2.5
89
+ NVIDIA_API_KEY=your_nvidia_api_key
90
+
91
+ # RedPill AI - TEE-Secured Models
92
+ REDPILL_API_KEY=your_redpill_api_key
93
+
94
+ # MiniMax
95
+ MINIMAX_GROUP_ID=your_minimax_group_id
96
+ MINIMAX_SECRET_KEY=your_minimax_secret_key
97
+ MINIMAX_API_KEY=your_minimax_api_key
98
+
99
+ # ============================================
100
+ # Google Vertex AI & Gemini
101
+ # ============================================
102
+ GOOGLE_PROJECT_ID=your_project_id
103
+ GOOGLE_CLOUD_PROJECT=your_project_id
104
+ GOOGLE_CLOUD_LOCATION=us-central1
105
+ GOOGLE_API_KEY=your_google_api_key
106
+ GEMINI_API_KEY=your_gemini_api_key
107
+ GEMINI_DEFAULT_MODEL=gemini-3-pro-preview
108
+ GEMINI_IMAGE_MODEL=gemini-3-pro-image-preview
109
+ GOOGLE_GENAI_USE_VERTEXAI=false
110
+
111
+ # ============================================
112
+ # Voice / Audio
113
+ # ============================================
114
+ ELEVEN_LABS_API_KEY=your_elevenlabs_api_key
115
+ ELEVEN_LABS_AGENT_ID=your_elevenlabs_agent_id
116
+ CARTESIA_API_KEY=your_cartesia_api_key
117
+ DEEPGRAM_API_KEY=your_deepgram_api_key
118
+ LIVEKIT_URL=wss://your-project.livekit.cloud
119
+ LIVEKIT_API_KEY=your_livekit_api_key
120
+ LIVEKIT_API_SECRET=your_livekit_api_secret
121
+
122
+ # ============================================
123
+ # Databases
124
+ # ============================================
125
+ DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=require
126
+ MONGODB_URI=mongodb+srv://user:password@cluster.mongodb.net/dbname
127
+ REDIS_URL=redis://default:password@host:port
128
+
129
+ # Supabase
130
+ SUPABASE_URL=https://your-project.supabase.co
131
+ SUPABASE_ANON_PUBLIC=your_supabase_anon_key
132
+ SUPABASE_SERVICE_ROLE=your_supabase_service_role_key
133
+
134
+ # Vector Databases (Qdrant)
135
+ QDRANT_CLUSTER_URL=https://your-cluster.cloud.qdrant.io
136
+ QDRANT_URL=https://your-cluster.cloud.qdrant.io
137
+ QDRANT_COLLECTION_NAME=mawdbot
138
+ QDRANT_API_KEY=your_qdrant_api_key
139
+
140
+ # Pinecone
141
+ PINECONE_API_KEY=your_pinecone_api_key
142
+
143
+ # Graph Database (Neo4j)
144
+ NEONJ_PASSWORD=your_neo4j_password
145
+ NEONJ_USERNAME=neo4j
146
+
147
+ # ============================================
148
+ # Cloud Infrastructure
149
+ # ============================================
150
+ # Cloudflare
151
+ CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id
152
+ CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
153
+
154
+ # Pinata IPFS
155
+ PINATA_JWT=your_pinata_jwt
156
+ PINATA_API_KEY=your_pinata_api_key
157
+ PINATA_API_SECRET=your_pinata_api_secret
158
+ PINATA_GATEWAY_URL=your-gateway.mypinata.cloud
159
+
160
+ # Browser / Scraping / Sandbox
161
+ STEEL_API_KEY=your_steel_api_key
162
+ E2B_API_KEY=your_e2b_api_key
163
+ FIRECRAWL_API_KEY=your_firecrawl_api_key
164
+
165
+ # Vercel
166
+ VERCEL_AI_GATEWAY_API_KEY=your_vercel_ai_gateway_key
167
+
168
+ # Email (Resend)
169
+ RESEND_API_KEY=your_resend_api_key
170
+
171
+ # ─── Gateway ─────────────────────────────────────────────────
172
+ NANO_GATEWAY_PORT=18790
173
+ # NANO_GATEWAY_HOST=0.0.0.0
174
+ # NANO_GATEWAY_SECRET=your-hmac-secret
175
+
176
+ # ─── Nano Hub ────────────────────────────────────────────────
177
+ # NANO_HUB_URL=http://localhost:3000
178
+ # NANO_HUB_API_KEY=your-hub-api-key
179
+
180
+ # ─── Memory ──────────────────────────────────────────────────
181
+ # NANO_MEMORY_DB_PATH=~/.nanosolana/memory.db
182
+ # NANO_MEMORY_TEMPORAL_DECAY_HOURS=168
183
+
184
+ # ─── Vault ───────────────────────────────────────────────────
185
+ # NANO_VAULT_PASSWORD=your-custom-vault-password
186
+
187
+ # ─── Tailscale (Mesh Networking) ─────────────────────────────
188
+ # TAILSCALE_AUTH_KEY=tskey-auth-...
189
+ # TAILSCALE_DOMAIN=your-tailnet.ts.net
190
+
191
+ # ============================================
192
+ # Twitter / X (Optional)
193
+ # ============================================
194
+ CONSUMER_KEY=your_twitter_consumer_key
195
+ SECRET_KEY=your_twitter_secret_key
196
+ BEARER_TOKEN=your_twitter_bearer_token
197
+ ACCESS_TOKEN=your_twitter_access_token
198
+ ACCESS_TOKEN_SECRET=your_twitter_access_token_secret
199
+
200
+ # ============================================
201
+ # Crossmint & Coinbase (Payments)
202
+ # ============================================
203
+ CROSSMINT_SERVERSIDE_API_KEY=your_crossmint_key
204
+ CDP_API_KEY_ID=your_cdp_key_id
205
+ COINBASE_CLIENT_ID=your_coinbase_client_id
206
+
207
+ # ============================================
208
+ # Financial Datasets
209
+ # ============================================
210
+ FINANCIAL_DATASET_API_KEY=your_financial_datasets_api_key
211
+
212
+ # ============================================
213
+ # FAL AI
214
+ # ============================================
215
+ FAL_KEY=your_fal_key
216
+ FAL_API_KEY=your_fal_api_key
217
+
218
+ # ============================================
219
+ # Moltbot / Gateway
220
+ # ============================================
221
+ MOLTBOT_SANDBOX_URL=https://your-sandbox.workers.dev
222
+ MOLTBOT_GATEWAY_TOKEN=your_gateway_token
223
+
224
+ # ============================================
225
+ # Convex
226
+ # ============================================
227
+ CONVEX_DEPLOY_KEY=your_convex_deploy_key
228
+
229
+ # ============================================
230
+ # Misc
231
+ # ============================================
232
+ LIFI_API_KEY=your_lifi_api_key
233
+ PHALA_API_KEY=your_phala_api_key
234
+
235
+ # ============================================
236
+ # Pump.Fun Swarm — Agent Orchestration
237
+ # ============================================
238
+ # Telegram Gateway — required for remote swarm control
239
+ TELEGRAM_BOT_TOKEN=your_telegram_bot_token
240
+ TELEGRAM_ADMIN_IDS=123456789,987654321
241
+ TELEGRAM_ALLOWED_IDS=
242
+ TELEGRAM_WEBHOOK_URL=
243
+
244
+ # Swarm Configuration
245
+ SWARM_MAX_AGENTS=25
246
+ SWARM_MAX_POSITION_SOL=1
247
+ SWARM_MAX_TOTAL_SOL=10
248
+ SWARM_DEFAULT_SLIPPAGE_BPS=100
249
+ SWARM_POLL_INTERVAL=5000
250
+ SWARM_HEALTH_INTERVAL=30000
251
+ SWARM_DB_PATH=./data/swarm.db
252
+
253
+ # ============================================
254
+ # PumpKit Bot Tokens (one per bot)
255
+ # ============================================
256
+ PUMPKIT_MONITOR_BOT_TOKEN=your_monitor_bot_token
257
+ PUMPKIT_CHANNEL_BOT_TOKEN=your_channel_bot_token
258
+ PUMPKIT_CHANNEL_ID=-1001234567890
259
+ PUMPKIT_CLAIM_BOT_TOKEN=your_claim_bot_token
260
+ PUMPKIT_OUTSIDERS_BOT_TOKEN=your_outsiders_bot_token
261
+ PUMPKIT_LAIR_BOT_TOKEN=your_lair_bot_token
262
+
263
+ # ============================================
264
+ # Tokenized Agent Payments (@pump-fun/agent-payments-sdk)
265
+ # ============================================
266
+ # Your agent's token mint address on pump.fun
267
+ AGENT_TOKEN_MINT_ADDRESS=your_agent_mint_address
268
+ # Payment currency: USDC or wrapped SOL
269
+ # USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
270
+ # SOL: So11111111111111111111111111111111111111112
271
+ CURRENCY_MINT=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
272
+
273
+ # ─── Container (NanoClaw) ────────────────────────────────────
274
+ CONTAINER_IMAGE=nanoclaw-agent:latest
275
+ # CONTAINER_TIMEOUT=1800000
276
+ # MAX_CONCURRENT_CONTAINERS=5
277
+ # IDLE_TIMEOUT=1800000
278
+
279
+ # ─── Logging ─────────────────────────────────────────────────
280
+ NANO_LOG_LEVEL=info
281
+ LOG_LEVEL=info
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to NanoSolana will be documented in this file.
4
4
 
5
+ ## [1.0.3] — 2026-03-20
6
+
7
+ ### Improved
8
+
9
+ - Reframed the published package around the TypeScript runtime, one-shot bootstrap, and explicit daemon workflow.
10
+ - Bundled `SOUL.md`, `RESEARCH.md`, and the Go-to-TypeScript parity map in the npm package.
11
+ - Added clearer `daemon` and `bootstrap` aliases for the long-running runtime and one-shot setup paths.
12
+
13
+ ## [1.0.2] — 2026-03-16
14
+
15
+ ### Fixed
16
+
17
+ - Aligned the CLI-reported version with the published npm package so `npx nanosolana --version` matches the release installed by `npx nanosolana go`.
18
+
5
19
  ## [1.0.1] — 2026-03-16
6
20
 
7
21
  ### Fixed
package/GO_PARITY.md ADDED
@@ -0,0 +1,82 @@
1
+ # Go Package Parity Map
2
+
3
+ This file maps the Go daemon package surface from `nanosolana-go/pkg/*` into the current TypeScript runtime in `nano-core/src/*`.
4
+
5
+ Status meanings:
6
+
7
+ - `covered`: there is a clear TypeScript home for the capability
8
+ - `partial`: the concept exists in TypeScript, but not at full Go parity
9
+ - `planned`: no dedicated TypeScript module yet
10
+
11
+ ## Runtime Core
12
+
13
+ | Go package | TypeScript area | Status | Notes |
14
+ | --- | --- | --- | --- |
15
+ | `agent` | `src/trading`, `src/strategy`, `src/ai` | `covered` | OODA-style trading loop and AI-guided decisions live here. |
16
+ | `agentregistry` | `src/registry`, `src/hub` | `covered` | Local registry helpers and NanoHub registration flows exist. |
17
+ | `auth` | `src/config`, `src/gateway` | `partial` | Vault and gateway secret handling exist; broader auth surface is smaller than Go. |
18
+ | `autoreply` | `src/nanobot`, `src/telegram` | `partial` | Conversation handling exists, but not a full standalone autoreply package. |
19
+ | `bus` | event emitters across runtime | `partial` | Runtime events exist, but not a shared bus package matching Go. |
20
+ | `channels` | `src/claw/channels`, `src/telegram` | `covered` | Channel abstractions and Telegram paths exist. |
21
+ | `commands` | `src/cli` | `covered` | CLI command surface lives here. |
22
+ | `config` | `src/config/vault.ts` | `covered` | Encrypted config and secret handling live here. |
23
+ | `constants` | scattered runtime defaults | `partial` | Constants exist, but not a dedicated namespace. |
24
+ | `cron` | scheduled runtime loops | `partial` | Timed loops exist, but not a first-class scheduler package yet. |
25
+ | `daemon` | `nanosolana daemon`, `src/trading`, `src/gateway`, `src/nanobot` | `covered` | Long-running runtime path exists under the CLI. |
26
+ | `delegation` | `src/claw/task-loader`, `src/claw/personas`, Pump swarm helpers | `partial` | Persona/task delegation exists; not a full Go planner yet. |
27
+ | `fileutil` | internal FS helpers across modules | `partial` | Handled inline today. |
28
+ | `gateway` | `src/gateway/server.ts` | `covered` | Gateway server exists. |
29
+ | `health` | `status`, wallet heartbeat, registry status | `partial` | Health reporting exists without a dedicated module. |
30
+ | `heartbeat` | `src/wallet/manager.ts`, registry heartbeat | `covered` | Wallet heartbeat and registry heartbeat both exist. |
31
+ | `identity` | `src/wallet`, `src/nft`, `src/registry` | `covered` | Wallet identity and registry identity are present. |
32
+ | `learning` | `src/memory/clawvault.ts` | `partial` | Lessons and replay exist; not a separate learning manager yet. |
33
+ | `llm` | `src/ai/provider.ts` | `covered` | AI provider and system prompt injection live here. |
34
+ | `logger` | `chalk`, runtime logs | `partial` | Logging exists, but without a dedicated logger package. |
35
+ | `memory` | `src/memory` | `covered` | ClawVault and compatibility memory engines exist. |
36
+ | `migrate` | none | `planned` | No dedicated migration package yet. |
37
+ | `routing` | `src/claw/router.ts` | `covered` | Routing layer exists for channel-style flows. |
38
+ | `runtimeenv` | `src/config`, runtime bootstrap | `partial` | Runtime env loading exists, but not a standalone registry. |
39
+ | `session` | `src/telegram/persistence.ts` | `partial` | Conversation/session persistence exists in narrower scope. |
40
+ | `state` | `src/pet/tamagochi.ts`, registry state | `partial` | Companion state exists; broader runtime state packaging is smaller. |
41
+ | `tools` | `docs`, `tasks`, `hub`, CLI helpers | `partial` | Tooling exists across the runtime rather than under one module. |
42
+ | `utils` | shared helpers inside modules | `partial` | No central utils package. |
43
+
44
+ ## Trading and Solana
45
+
46
+ | Go package | TypeScript area | Status | Notes |
47
+ | --- | --- | --- | --- |
48
+ | `aster` | none | `planned` | No dedicated Aster client in `nano-core` yet. |
49
+ | `bitaxe` | none | `planned` | No dedicated Bitaxe integration yet. |
50
+ | `honcho` | none | `planned` | Not implemented in the current TS runtime. |
51
+ | `hyperliquid` | none | `planned` | Not implemented in the current TS runtime. |
52
+ | `onchain` | `src/onchain`, `src/trading` | `covered` | Helius clients and wallet scans exist. |
53
+ | `providers` | `src/ai/provider.ts`, trading clients | `partial` | AI provider is first-class; market providers live inside trading modules. |
54
+ | `pumplaunch` | `src/claw/pump` | `partial` | Pump SDK and swarm support exist; startup launch daemon parity is not complete. |
55
+ | `research` | `src/ai/provider.ts`, `src/memory/clawvault.ts` | `partial` | Research workflows exist as prompts and memory agenda items. |
56
+ | `skills` | `src/hub/public-client.ts`, `src/hub/oneshot.ts`, repo `skills/` | `covered` | Skill discovery and manifest-driven bootstrap exist. |
57
+ | `solana` | `src/wallet`, `src/onchain`, `src/trading` | `covered` | Wallet, RPC, market, and execution paths live here. |
58
+ | `strategy` | `src/strategy/engine.ts` | `covered` | RSI/EMA/ATR strategy engine exists. |
59
+ | `x402` | `src/payments` | `covered` | Payment surface exists in TypeScript. |
60
+
61
+ ## Interfaces and Surfaces
62
+
63
+ | Go package | TypeScript area | Status | Notes |
64
+ | --- | --- | --- | --- |
65
+ | `devices` | `apps/`, `ui/` | `partial` | Surface-level app workspaces exist; not a TS hardware abstraction layer. |
66
+ | `hardware` | none | `planned` | Hardware drivers from Go are not in `nano-core` yet. |
67
+ | `mcp` | none | `planned` | No first-class MCP package in `nano-core` today. |
68
+ | `media` | none | `planned` | No dedicated media package in the runtime today. |
69
+ | `nanobot` | `src/nanobot/server.ts` | `covered` | NanoBot UI server exists. |
70
+ | `node` | `src/network/mesh.ts` | `covered` | Peer and tmux-backed node behavior exists. |
71
+ | `seeker` | monorepo `apps/android/` | `partial` | App workspace exists outside `nano-core`; not a packaged core module. |
72
+ | `tamagochi` | `src/pet/tamagochi.ts` | `covered` | Companion state engine exists. |
73
+ | `voice` | none | `planned` | No dedicated voice module in the current package. |
74
+
75
+ ## Practical Interpretation
76
+
77
+ For the current TypeScript build, the highest-confidence story is:
78
+
79
+ - bootstrap with `nanosolana go`
80
+ - run the daemon with `nanosolana daemon`
81
+ - use ClawVault, NanoBot, NanoHub manifests, and the strategy engine as the core runtime
82
+ - treat Aster, Hyperliquid, Honcho, Bitaxe, hardware, MCP, media, and voice as parity targets rather than already-complete TypeScript modules