vana-cli 0.29.2 → 0.30.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 +5 -2
- package/dist/cli/index.js +1 -1
- package/dist/core/network.d.ts +8 -5
- package/dist/core/network.d.ts.map +1 -1
- package/dist/core/network.js +11 -7
- package/dist/core/network.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,8 +73,10 @@ it from escrow and `--max-fee` to cap it. The rest of the group:
|
|
|
73
73
|
| `vana app escrow balance\|fund` | what the app can spend, and funding it |
|
|
74
74
|
| `vana app onchain <scope> --owner <addr>` | data point version, hashes, deletion state |
|
|
75
75
|
|
|
76
|
-
Everything defaults to **
|
|
77
|
-
|
|
76
|
+
Everything defaults to **mainnet**, where your data and apps live. Paying is
|
|
77
|
+
never implied: a paid read stops with the exact price until you add `--pay`,
|
|
78
|
+
and `--max-fee` caps it. `--network moksha` is the testnet, where fees are
|
|
79
|
+
play money.
|
|
78
80
|
|
|
79
81
|
## For agents
|
|
80
82
|
|
|
@@ -88,6 +90,7 @@ Install the skills that teach an agent each half:
|
|
|
88
90
|
|
|
89
91
|
```bash
|
|
90
92
|
vana skills install builder # ask for access, read, pay
|
|
93
|
+
vana skills install agent-access # give your own agent (OpenClaw, Hermes) scoped, paid access
|
|
91
94
|
vana skills install connect-data # collect your own data
|
|
92
95
|
```
|
|
93
96
|
|
package/dist/cli/index.js
CHANGED
|
@@ -203,7 +203,7 @@ More:
|
|
|
203
203
|
for (const [flags, description] of GLOBAL_FLAG_DEFS) {
|
|
204
204
|
program.option(flags, description);
|
|
205
205
|
}
|
|
206
|
-
program.addOption(new Option("--network <network>", "Vana network
|
|
206
|
+
program.addOption(new Option("--network <network>", "Vana network: mainnet (default) or moksha, the testnet").choices([...VANA_NETWORKS]));
|
|
207
207
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
208
208
|
mergeParsedGlobalOptions(parsedOptions, actionCommand);
|
|
209
209
|
});
|
package/dist/core/network.d.ts
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The owner-side commands keep using {@link getEnvConfig} from constants.ts
|
|
5
5
|
* (a dev/prod host axis) untouched. Builder commands need one resolved
|
|
6
|
-
* object carrying the chain and every host, selected with `--network
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* object carrying the chain and every host, selected with `--network`.
|
|
7
|
+
* mainnet is the default: it is where a person's data and apps live. Paying
|
|
8
|
+
* is never implied by it; a paid read still stops at exit 4 until `--pay`,
|
|
9
|
+
* and `--max-fee` caps it. `--network moksha` is the testnet, where fees
|
|
10
|
+
* are play money.
|
|
9
11
|
*
|
|
10
12
|
* `VANA_ENV=dev` swaps in the dev host set (internal use; dev serves the
|
|
11
|
-
* moksha chain).
|
|
13
|
+
* moksha chain), and there moksha stays the default.
|
|
12
14
|
*/
|
|
13
15
|
export type VanaNetworkName = "moksha" | "mainnet";
|
|
14
16
|
export declare const VANA_NETWORKS: readonly VanaNetworkName[];
|
|
@@ -44,7 +46,8 @@ export declare function isVanaNetworkName(value: string): value is VanaNetworkNa
|
|
|
44
46
|
/**
|
|
45
47
|
* Resolve a network selection into hosts and chain.
|
|
46
48
|
*
|
|
47
|
-
* @param name - `--network` value; falls back to `VANA_NETWORK`, then
|
|
49
|
+
* @param name - `--network` value; falls back to `VANA_NETWORK`, then
|
|
50
|
+
* mainnet (moksha under `VANA_ENV=dev`, which has no mainnet hosts).
|
|
48
51
|
* @param env - process env, injectable for tests.
|
|
49
52
|
* @throws {UnknownNetworkError} for a name outside {@link VANA_NETWORKS}.
|
|
50
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,SAAS,eAAe,EAG1C,CAAC;AAEX,eAAO,MAAM,eAAe,EAAE,eAA2B,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,wEAAwE;IACxE,GAAG,EAAE,KAAK,GAAG,MAAM,CAAC;IACpB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf;0EACsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAsCD,qBAAa,mBAAoB,SAAQ,KAAK;aAChB,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAM1C;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,eAAe,CAajB"}
|
package/dist/core/network.js
CHANGED
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The owner-side commands keep using {@link getEnvConfig} from constants.ts
|
|
5
5
|
* (a dev/prod host axis) untouched. Builder commands need one resolved
|
|
6
|
-
* object carrying the chain and every host, selected with `--network
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* object carrying the chain and every host, selected with `--network`.
|
|
7
|
+
* mainnet is the default: it is where a person's data and apps live. Paying
|
|
8
|
+
* is never implied by it; a paid read still stops at exit 4 until `--pay`,
|
|
9
|
+
* and `--max-fee` caps it. `--network moksha` is the testnet, where fees
|
|
10
|
+
* are play money.
|
|
9
11
|
*
|
|
10
12
|
* `VANA_ENV=dev` swaps in the dev host set (internal use; dev serves the
|
|
11
|
-
* moksha chain).
|
|
13
|
+
* moksha chain), and there moksha stays the default.
|
|
12
14
|
*/
|
|
13
15
|
export const VANA_NETWORKS = [
|
|
14
16
|
"moksha",
|
|
15
17
|
"mainnet",
|
|
16
18
|
];
|
|
17
|
-
export const DEFAULT_NETWORK = "
|
|
19
|
+
export const DEFAULT_NETWORK = "mainnet";
|
|
18
20
|
const NETWORKS = {
|
|
19
21
|
moksha: {
|
|
20
22
|
name: "moksha",
|
|
@@ -63,12 +65,14 @@ export function isVanaNetworkName(value) {
|
|
|
63
65
|
/**
|
|
64
66
|
* Resolve a network selection into hosts and chain.
|
|
65
67
|
*
|
|
66
|
-
* @param name - `--network` value; falls back to `VANA_NETWORK`, then
|
|
68
|
+
* @param name - `--network` value; falls back to `VANA_NETWORK`, then
|
|
69
|
+
* mainnet (moksha under `VANA_ENV=dev`, which has no mainnet hosts).
|
|
67
70
|
* @param env - process env, injectable for tests.
|
|
68
71
|
* @throws {UnknownNetworkError} for a name outside {@link VANA_NETWORKS}.
|
|
69
72
|
*/
|
|
70
73
|
export function resolveNetwork(name, env = process.env) {
|
|
71
|
-
const
|
|
74
|
+
const fallback = env.VANA_ENV === "dev" ? "moksha" : DEFAULT_NETWORK;
|
|
75
|
+
const raw = (name ?? env.VANA_NETWORK ?? fallback).toLowerCase();
|
|
72
76
|
if (!isVanaNetworkName(raw)) {
|
|
73
77
|
throw new UnknownNetworkError(raw);
|
|
74
78
|
}
|
package/dist/core/network.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"A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