solforge 0.2.0 → 0.2.2

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.
Files changed (56) hide show
  1. package/LICENSE +21 -0
  2. package/docs/API.md +379 -0
  3. package/docs/CONFIGURATION.md +407 -0
  4. package/package.json +67 -45
  5. package/src/api-server-entry.ts +109 -0
  6. package/src/commands/add-program.ts +337 -0
  7. package/src/commands/init.ts +122 -0
  8. package/src/commands/list.ts +136 -0
  9. package/src/commands/mint.ts +288 -0
  10. package/src/commands/start.ts +877 -0
  11. package/src/commands/status.ts +99 -0
  12. package/src/commands/stop.ts +406 -0
  13. package/src/config/manager.ts +157 -0
  14. package/src/gui/public/build/main.css +1 -0
  15. package/src/gui/public/build/main.js +303 -0
  16. package/src/gui/public/build/main.js.txt +231 -0
  17. package/src/index.ts +188 -0
  18. package/src/services/api-server.ts +485 -0
  19. package/src/services/port-manager.ts +177 -0
  20. package/src/services/process-registry.ts +154 -0
  21. package/src/services/program-cloner.ts +317 -0
  22. package/src/services/token-cloner.ts +809 -0
  23. package/src/services/validator.ts +295 -0
  24. package/src/types/config.ts +110 -0
  25. package/src/utils/shell.ts +110 -0
  26. package/src/utils/token-loader.ts +115 -0
  27. package/.agi/agi.sqlite +0 -0
  28. package/.claude/settings.local.json +0 -9
  29. package/.github/workflows/release-binaries.yml +0 -133
  30. package/.tmp/.787ebcdbf7b8fde8-00000000.hm +0 -0
  31. package/.tmp/.bffe6efebdf8aedc-00000000.hm +0 -0
  32. package/AGENTS.md +0 -271
  33. package/CLAUDE.md +0 -106
  34. package/PROJECT_STRUCTURE.md +0 -124
  35. package/SOLANA_KIT_GUIDE.md +0 -251
  36. package/SOLFORGE.md +0 -119
  37. package/biome.json +0 -34
  38. package/bun.lock +0 -743
  39. package/drizzle/0000_friendly_millenium_guard.sql +0 -53
  40. package/drizzle/0001_stale_sentinels.sql +0 -2
  41. package/drizzle/meta/0000_snapshot.json +0 -329
  42. package/drizzle/meta/0001_snapshot.json +0 -345
  43. package/drizzle/meta/_journal.json +0 -20
  44. package/drizzle.config.ts +0 -12
  45. package/index.ts +0 -21
  46. package/mint.sh +0 -47
  47. package/postcss.config.js +0 -6
  48. package/rpc-server.ts.backup +0 -519
  49. package/sf.config.json +0 -38
  50. package/tailwind.config.js +0 -27
  51. package/test-client.ts +0 -120
  52. package/tmp/inspect-html.ts +0 -4
  53. package/tmp/response-test.ts +0 -5
  54. package/tmp/test-html.ts +0 -5
  55. package/tmp/test-server.ts +0 -13
  56. package/tsconfig.json +0 -29
@@ -1,345 +0,0 @@
1
- {
2
- "version": "6",
3
- "dialect": "sqlite",
4
- "id": "4f6ccd4b-6625-4b77-b209-6606cea0dbc6",
5
- "prevId": "b6ef19fa-06b7-4396-874f-2b252549b98f",
6
- "tables": {
7
- "accounts": {
8
- "name": "accounts",
9
- "columns": {
10
- "address": {
11
- "name": "address",
12
- "type": "text",
13
- "primaryKey": true,
14
- "notNull": true,
15
- "autoincrement": false
16
- },
17
- "lamports": {
18
- "name": "lamports",
19
- "type": "integer",
20
- "primaryKey": false,
21
- "notNull": true,
22
- "autoincrement": false
23
- },
24
- "owner_program": {
25
- "name": "owner_program",
26
- "type": "text",
27
- "primaryKey": false,
28
- "notNull": true,
29
- "autoincrement": false
30
- },
31
- "executable": {
32
- "name": "executable",
33
- "type": "integer",
34
- "primaryKey": false,
35
- "notNull": true,
36
- "autoincrement": false
37
- },
38
- "rent_epoch": {
39
- "name": "rent_epoch",
40
- "type": "integer",
41
- "primaryKey": false,
42
- "notNull": true,
43
- "autoincrement": false
44
- },
45
- "data_len": {
46
- "name": "data_len",
47
- "type": "integer",
48
- "primaryKey": false,
49
- "notNull": true,
50
- "autoincrement": false
51
- },
52
- "data_base64": {
53
- "name": "data_base64",
54
- "type": "text",
55
- "primaryKey": false,
56
- "notNull": false,
57
- "autoincrement": false
58
- },
59
- "last_slot": {
60
- "name": "last_slot",
61
- "type": "integer",
62
- "primaryKey": false,
63
- "notNull": true,
64
- "autoincrement": false
65
- }
66
- },
67
- "indexes": {
68
- "idx_accounts_owner": {
69
- "name": "idx_accounts_owner",
70
- "columns": ["owner_program"],
71
- "isUnique": false
72
- },
73
- "idx_accounts_last_slot": {
74
- "name": "idx_accounts_last_slot",
75
- "columns": ["last_slot"],
76
- "isUnique": false
77
- }
78
- },
79
- "foreignKeys": {},
80
- "compositePrimaryKeys": {},
81
- "uniqueConstraints": {},
82
- "checkConstraints": {}
83
- },
84
- "address_signatures": {
85
- "name": "address_signatures",
86
- "columns": {
87
- "address": {
88
- "name": "address",
89
- "type": "text",
90
- "primaryKey": false,
91
- "notNull": true,
92
- "autoincrement": false
93
- },
94
- "signature": {
95
- "name": "signature",
96
- "type": "text",
97
- "primaryKey": false,
98
- "notNull": true,
99
- "autoincrement": false
100
- },
101
- "slot": {
102
- "name": "slot",
103
- "type": "integer",
104
- "primaryKey": false,
105
- "notNull": true,
106
- "autoincrement": false
107
- },
108
- "err": {
109
- "name": "err",
110
- "type": "integer",
111
- "primaryKey": false,
112
- "notNull": true,
113
- "autoincrement": false
114
- },
115
- "block_time": {
116
- "name": "block_time",
117
- "type": "integer",
118
- "primaryKey": false,
119
- "notNull": false,
120
- "autoincrement": false
121
- }
122
- },
123
- "indexes": {
124
- "idx_address_signatures_addr_slot": {
125
- "name": "idx_address_signatures_addr_slot",
126
- "columns": ["address", "slot"],
127
- "isUnique": false
128
- }
129
- },
130
- "foreignKeys": {},
131
- "compositePrimaryKeys": {
132
- "pk_address_signatures": {
133
- "columns": ["address", "signature"],
134
- "name": "pk_address_signatures"
135
- }
136
- },
137
- "uniqueConstraints": {},
138
- "checkConstraints": {}
139
- },
140
- "transactions": {
141
- "name": "transactions",
142
- "columns": {
143
- "signature": {
144
- "name": "signature",
145
- "type": "text",
146
- "primaryKey": true,
147
- "notNull": true,
148
- "autoincrement": false
149
- },
150
- "slot": {
151
- "name": "slot",
152
- "type": "integer",
153
- "primaryKey": false,
154
- "notNull": true,
155
- "autoincrement": false
156
- },
157
- "block_time": {
158
- "name": "block_time",
159
- "type": "integer",
160
- "primaryKey": false,
161
- "notNull": false,
162
- "autoincrement": false
163
- },
164
- "version": {
165
- "name": "version",
166
- "type": "text",
167
- "primaryKey": false,
168
- "notNull": true,
169
- "autoincrement": false
170
- },
171
- "err_json": {
172
- "name": "err_json",
173
- "type": "text",
174
- "primaryKey": false,
175
- "notNull": false,
176
- "autoincrement": false
177
- },
178
- "fee": {
179
- "name": "fee",
180
- "type": "integer",
181
- "primaryKey": false,
182
- "notNull": true,
183
- "autoincrement": false
184
- },
185
- "raw_base64": {
186
- "name": "raw_base64",
187
- "type": "text",
188
- "primaryKey": false,
189
- "notNull": true,
190
- "autoincrement": false
191
- },
192
- "pre_balances_json": {
193
- "name": "pre_balances_json",
194
- "type": "text",
195
- "primaryKey": false,
196
- "notNull": true,
197
- "autoincrement": false
198
- },
199
- "post_balances_json": {
200
- "name": "post_balances_json",
201
- "type": "text",
202
- "primaryKey": false,
203
- "notNull": true,
204
- "autoincrement": false
205
- },
206
- "logs_json": {
207
- "name": "logs_json",
208
- "type": "text",
209
- "primaryKey": false,
210
- "notNull": true,
211
- "autoincrement": false
212
- },
213
- "pre_token_balances_json": {
214
- "name": "pre_token_balances_json",
215
- "type": "text",
216
- "primaryKey": false,
217
- "notNull": true,
218
- "autoincrement": false,
219
- "default": "'[]'"
220
- },
221
- "post_token_balances_json": {
222
- "name": "post_token_balances_json",
223
- "type": "text",
224
- "primaryKey": false,
225
- "notNull": true,
226
- "autoincrement": false,
227
- "default": "'[]'"
228
- }
229
- },
230
- "indexes": {
231
- "idx_transactions_slot": {
232
- "name": "idx_transactions_slot",
233
- "columns": ["slot"],
234
- "isUnique": false
235
- }
236
- },
237
- "foreignKeys": {},
238
- "compositePrimaryKeys": {},
239
- "uniqueConstraints": {},
240
- "checkConstraints": {}
241
- },
242
- "tx_accounts": {
243
- "name": "tx_accounts",
244
- "columns": {
245
- "signature": {
246
- "name": "signature",
247
- "type": "text",
248
- "primaryKey": false,
249
- "notNull": true,
250
- "autoincrement": false
251
- },
252
- "account_index": {
253
- "name": "account_index",
254
- "type": "integer",
255
- "primaryKey": false,
256
- "notNull": true,
257
- "autoincrement": false
258
- },
259
- "address": {
260
- "name": "address",
261
- "type": "text",
262
- "primaryKey": false,
263
- "notNull": true,
264
- "autoincrement": false
265
- },
266
- "signer": {
267
- "name": "signer",
268
- "type": "integer",
269
- "primaryKey": false,
270
- "notNull": true,
271
- "autoincrement": false
272
- },
273
- "writable": {
274
- "name": "writable",
275
- "type": "integer",
276
- "primaryKey": false,
277
- "notNull": true,
278
- "autoincrement": false
279
- },
280
- "program_id_index": {
281
- "name": "program_id_index",
282
- "type": "integer",
283
- "primaryKey": false,
284
- "notNull": false,
285
- "autoincrement": false
286
- }
287
- },
288
- "indexes": {
289
- "idx_tx_accounts_address": {
290
- "name": "idx_tx_accounts_address",
291
- "columns": ["address"],
292
- "isUnique": false
293
- },
294
- "idx_tx_accounts_address_signature": {
295
- "name": "idx_tx_accounts_address_signature",
296
- "columns": ["address", "signature"],
297
- "isUnique": false
298
- }
299
- },
300
- "foreignKeys": {},
301
- "compositePrimaryKeys": {
302
- "pk_tx_accounts": {
303
- "columns": ["signature", "account_index"],
304
- "name": "pk_tx_accounts"
305
- }
306
- },
307
- "uniqueConstraints": {},
308
- "checkConstraints": {}
309
- },
310
- "meta_kv": {
311
- "name": "meta_kv",
312
- "columns": {
313
- "key": {
314
- "name": "key",
315
- "type": "text",
316
- "primaryKey": true,
317
- "notNull": true,
318
- "autoincrement": false
319
- },
320
- "value": {
321
- "name": "value",
322
- "type": "text",
323
- "primaryKey": false,
324
- "notNull": true,
325
- "autoincrement": false
326
- }
327
- },
328
- "indexes": {},
329
- "foreignKeys": {},
330
- "compositePrimaryKeys": {},
331
- "uniqueConstraints": {},
332
- "checkConstraints": {}
333
- }
334
- },
335
- "views": {},
336
- "enums": {},
337
- "_meta": {
338
- "schemas": {},
339
- "tables": {},
340
- "columns": {}
341
- },
342
- "internal": {
343
- "indexes": {}
344
- }
345
- }
@@ -1,20 +0,0 @@
1
- {
2
- "version": "7",
3
- "dialect": "sqlite",
4
- "entries": [
5
- {
6
- "idx": 0,
7
- "version": "6",
8
- "when": 1757791582272,
9
- "tag": "0000_friendly_millenium_guard",
10
- "breakpoints": true
11
- },
12
- {
13
- "idx": 1,
14
- "version": "6",
15
- "when": 1757872206845,
16
- "tag": "0001_stale_sentinels",
17
- "breakpoints": true
18
- }
19
- ]
20
- }
package/drizzle.config.ts DELETED
@@ -1,12 +0,0 @@
1
- import { defineConfig } from "drizzle-kit";
2
-
3
- const dbPath = process.env.SOLFORGE_DB_PATH || ".solforge/db.db";
4
-
5
- export default defineConfig({
6
- dialect: "sqlite",
7
- schema: ["./src/db/schema"],
8
- out: "./drizzle",
9
- dbCredentials: {
10
- url: `file:${dbPath}`,
11
- },
12
- });
package/index.ts DELETED
@@ -1,21 +0,0 @@
1
- import { createLiteSVMRpcServer, createLiteSVMWebSocketServer } from "./server";
2
-
3
- const PORT = Number(process.env.RPC_PORT) || 8899;
4
-
5
- const { httpServer, rpcServer } = createLiteSVMRpcServer(PORT);
6
- createLiteSVMWebSocketServer(rpcServer, PORT + 1);
7
-
8
- console.log(`
9
- 🚀 LiteSVM RPC Server is running!
10
-
11
- HTTP endpoint: http://localhost:${PORT}
12
- WS endpoint: ws://localhost:${PORT + 1}
13
-
14
- Connect with Solana CLI:
15
- $ solana config set -u http://localhost:${PORT}
16
-
17
- Or use with @solana/kit:
18
- const rpc = createSolanaRpc('http://localhost:${PORT}')
19
-
20
- Press Ctrl+C to stop the server
21
- `);
package/mint.sh DELETED
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- # Usage: ./mint.sh [AMOUNT]
6
- # - AMOUNT defaults to 1000 (base units; SPL default decimals is 9)
7
-
8
- amount="${1:-1000}"
9
-
10
- if ! command -v spl-token >/dev/null 2>&1; then
11
- echo "Error: spl-token CLI not found. Install Solana CLI tools." >&2
12
- exit 1
13
- fi
14
-
15
- echo "Creating new SPL token..."
16
- create_out=$(spl-token create-token)
17
- echo "$create_out"
18
-
19
- mint_address=$(printf '%s\n' "$create_out" | awk '/Creating token/ {print $3; exit}')
20
-
21
- if [[ -z "${mint_address:-}" ]]; then
22
- echo "Error: Failed to parse token mint address." >&2
23
- exit 1
24
- fi
25
-
26
- echo
27
- echo "Creating associated token account for mint $mint_address ..."
28
- acct_out=$(spl-token create-account "$mint_address")
29
- echo "$acct_out"
30
-
31
- acct_address=$(printf '%s\n' "$acct_out" | awk '/Creating account/ {print $3; exit}')
32
-
33
- echo
34
- echo "Minting $amount tokens to your associated account..."
35
- mint_out=$(spl-token mint "$mint_address" "$amount")
36
- echo "$mint_out"
37
-
38
- echo
39
- echo "Done. Summary:"
40
- echo "- Token Mint Address: $mint_address"
41
- if [[ -n "${acct_address:-}" ]]; then
42
- echo "- Associated Token Account: $acct_address"
43
- fi
44
- echo "- Minted Amount: $amount"
45
- echo
46
- echo "Tip: Save the mint address above; it represents your token mint."
47
-
package/postcss.config.js DELETED
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- };