@atlas-world/cli 1.0.0
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/README.md +72 -0
- package/dist/client.js +15 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/admin.js +56 -0
- package/dist/commands/admin.js.map +1 -0
- package/dist/commands/collect.js +37 -0
- package/dist/commands/collect.js.map +1 -0
- package/dist/commands/createWorld.js +159 -0
- package/dist/commands/createWorld.js.map +1 -0
- package/dist/commands/init.js +98 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/leaderboard.js +36 -0
- package/dist/commands/leaderboard.js.map +1 -0
- package/dist/commands/mintPlayer.js +44 -0
- package/dist/commands/mintPlayer.js.map +1 -0
- package/dist/commands/status.js +57 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/config.js +92 -0
- package/dist/config.js.map +1 -0
- package/dist/idl.json +2311 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/package.json +50 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const init_1 = require("./commands/init");
|
|
10
|
+
const createWorld_1 = require("./commands/createWorld");
|
|
11
|
+
const mintPlayer_1 = require("./commands/mintPlayer");
|
|
12
|
+
const collect_1 = require("./commands/collect");
|
|
13
|
+
const status_1 = require("./commands/status");
|
|
14
|
+
const leaderboard_1 = require("./commands/leaderboard");
|
|
15
|
+
const admin_1 = require("./commands/admin");
|
|
16
|
+
const program = new commander_1.Command();
|
|
17
|
+
program
|
|
18
|
+
.name("atlas-cli")
|
|
19
|
+
.description(chalk_1.default.cyan("Atlas World Protocol") + " — crea y administra mundos persistentes en Solana")
|
|
20
|
+
.version("1.0.0");
|
|
21
|
+
program
|
|
22
|
+
.command("init")
|
|
23
|
+
.description("Configura tu wallet y red por primera vez")
|
|
24
|
+
.action(init_1.initCommand);
|
|
25
|
+
program
|
|
26
|
+
.command("create-world")
|
|
27
|
+
.description("Crea un nuevo mundo (interactivo, con templates de GameFi/DAO/Marketplace)")
|
|
28
|
+
.action(createWorld_1.createWorldCommand);
|
|
29
|
+
program
|
|
30
|
+
.command("mint-player")
|
|
31
|
+
.description("Mintea tu player en un mundo")
|
|
32
|
+
.option("-n, --name <name>", "Nombre del player")
|
|
33
|
+
.option("-w, --world <id>", "worldId (usa el default si se omite)")
|
|
34
|
+
.action(mintPlayer_1.mintPlayerCommand);
|
|
35
|
+
program
|
|
36
|
+
.command("collect")
|
|
37
|
+
.description("Recolecta un recurso del mundo")
|
|
38
|
+
.option("-t, --type <id>", "ID del tipo de recurso (default: 0)")
|
|
39
|
+
.option("-w, --world <id>", "worldId (usa el default si se omite)")
|
|
40
|
+
.action(collect_1.collectCommand);
|
|
41
|
+
program
|
|
42
|
+
.command("status")
|
|
43
|
+
.description("Muestra el estado del mundo y tu progreso")
|
|
44
|
+
.option("-w, --world <id>", "worldId (usa el default si se omite)")
|
|
45
|
+
.action(status_1.statusCommand);
|
|
46
|
+
program
|
|
47
|
+
.command("leaderboard")
|
|
48
|
+
.description("Muestra el leaderboard del mundo")
|
|
49
|
+
.option("-w, --world <id>", "worldId (usa el default si se omite)")
|
|
50
|
+
.option("-e, --epoch <n>", "Epoch específico (default: epoch actual)")
|
|
51
|
+
.action(leaderboard_1.leaderboardCommand);
|
|
52
|
+
program
|
|
53
|
+
.command("advance-epoch")
|
|
54
|
+
.description("[authority] Avanza el epoch después de un WorldReset")
|
|
55
|
+
.option("-w, --world <id>", "worldId (usa el default si se omite)")
|
|
56
|
+
.action(admin_1.advanceEpochCommand);
|
|
57
|
+
program
|
|
58
|
+
.command("pause")
|
|
59
|
+
.description("[protocol authority] Emergency stop — pausa todo el protocolo")
|
|
60
|
+
.action(admin_1.pauseCommand);
|
|
61
|
+
program
|
|
62
|
+
.command("unpause")
|
|
63
|
+
.description("[protocol authority] Reactiva el protocolo")
|
|
64
|
+
.action(admin_1.unpauseCommand);
|
|
65
|
+
program.parse();
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAmC;AACnC,kDAAyB;AACzB,0CAA6C;AAC7C,wDAA2D;AAC3D,sDAAyD;AACzD,gDAAmD;AACnD,8CAAiD;AACjD,wDAA2D;AAC3D,4CAAoF;AAEpF,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAA;AAE7B,OAAO;KACJ,IAAI,CAAC,WAAW,CAAC;KACjB,WAAW,CACV,eAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,oDAAoD,CAC1F;KACA,OAAO,CAAC,OAAO,CAAC,CAAA;AAEnB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,kBAAW,CAAC,CAAA;AAEtB,OAAO;KACJ,OAAO,CAAC,cAAc,CAAC;KACvB,WAAW,CAAC,4EAA4E,CAAC;KACzF,MAAM,CAAC,gCAAkB,CAAC,CAAA;AAE7B,OAAO;KACJ,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,8BAA8B,CAAC;KAC3C,MAAM,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;KAChD,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,MAAM,CAAC,8BAAiB,CAAC,CAAA;AAE5B,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,gCAAgC,CAAC;KAC7C,MAAM,CAAC,iBAAiB,EAAE,qCAAqC,CAAC;KAChE,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,MAAM,CAAC,wBAAc,CAAC,CAAA;AAEzB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,MAAM,CAAC,sBAAa,CAAC,CAAA;AAExB,OAAO;KACJ,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,kCAAkC,CAAC;KAC/C,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,MAAM,CAAC,iBAAiB,EAAE,0CAA0C,CAAC;KACrE,MAAM,CAAC,gCAAkB,CAAC,CAAA;AAE7B,OAAO;KACJ,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,sDAAsD,CAAC;KACnE,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,MAAM,CAAC,2BAAmB,CAAC,CAAA;AAE9B,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,+DAA+D,CAAC;KAC5E,MAAM,CAAC,oBAAY,CAAC,CAAA;AAEvB,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,sBAAc,CAAC,CAAA;AAEzB,OAAO,CAAC,KAAK,EAAE,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlas-world/cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Atlas World Protocol — CLI para crear y administrar mundos persistentes en Solana",
|
|
5
|
+
"bin": {
|
|
6
|
+
"atlas-cli": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@coral-xyz/anchor": "^0.32.1",
|
|
15
|
+
"@solana/web3.js": "^1.98.4",
|
|
16
|
+
"commander": "^12.1.0",
|
|
17
|
+
"inquirer": "^9.3.7",
|
|
18
|
+
"chalk": "^4.1.2",
|
|
19
|
+
"ora": "^5.4.1",
|
|
20
|
+
"@atlas-world/core": "1.0.0",
|
|
21
|
+
"@atlas-world/sdk": "1.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/inquirer": "^9.0.7",
|
|
25
|
+
"@types/node": "^22",
|
|
26
|
+
"typescript": "^5.7.3"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/usainbluntmx/atlas-sdk.git",
|
|
34
|
+
"directory": "cli"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/usainbluntmx/atlas-sdk#readme",
|
|
37
|
+
"keywords": [
|
|
38
|
+
"solana",
|
|
39
|
+
"cli",
|
|
40
|
+
"gamefi",
|
|
41
|
+
"web3",
|
|
42
|
+
"gaming"
|
|
43
|
+
],
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc --project tsconfig.json && chmod +x dist/index.js",
|
|
47
|
+
"dev": "tsc --project tsconfig.json --watch",
|
|
48
|
+
"clean": "rm -rf dist"
|
|
49
|
+
}
|
|
50
|
+
}
|