thaifi-wallet-cli 0.3.3 → 0.3.4
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/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/** ThaiFi Wallet CLI — agent wallet for the ThaiFi chain (chain 17). */
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
3
4
|
import { Command } from "commander";
|
|
4
5
|
import { login } from "./commands/login.js";
|
|
5
6
|
import { logout } from "./commands/logout.js";
|
|
@@ -10,11 +11,13 @@ import { request } from "./commands/request.js";
|
|
|
10
11
|
import { services } from "./commands/services.js";
|
|
11
12
|
import { fund } from "./commands/fund.js";
|
|
12
13
|
import { tokens } from "./commands/tokens.js";
|
|
14
|
+
// Resolve ../package.json at runtime (works from src/ via tsx and from dist/ when installed) — never hardcode the version here again.
|
|
15
|
+
const { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
13
16
|
const program = new Command();
|
|
14
17
|
program
|
|
15
18
|
.name("thaifi")
|
|
16
19
|
.description("ThaiFi Wallet CLI — pair with wallet.thaifi.com and sign with on-chain access keys")
|
|
17
|
-
.version(
|
|
20
|
+
.version(version);
|
|
18
21
|
program
|
|
19
22
|
.command("login")
|
|
20
23
|
.description("Pair this CLI with your ThaiFi Wallet (opens the browser to approve)")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thaifi-wallet-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "ThaiFi Wallet CLI for AI agents — pair with wallet.thaifi.com, sign with on-chain access keys (spending limits enforced on-chain), x402/MPP payments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|