@routstr/cocod 0.0.18 → 0.0.19
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 +6 -5
- package/bun.lock +23 -17
- package/docs/API.md +2 -2
- package/package.json +1 -1
- package/src/utils/config.ts +1 -1
package/README.md
CHANGED
|
@@ -101,11 +101,12 @@ cocod x-cashu handle "<encoded-x-cashu-request>"
|
|
|
101
101
|
|
|
102
102
|
Defaults:
|
|
103
103
|
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
104
|
+
- Base directory: `~/.cocod` (or `COCOD_DIR`)
|
|
105
|
+
- Socket: `<base>/cocod.sock` (or `COCOD_SOCKET`)
|
|
106
|
+
- PID file: `<base>/cocod.pid` (or `COCOD_PID`)
|
|
107
|
+
- Daemon log: `<base>/daemon.log` (or `COCOD_LOG_FILE`)
|
|
108
|
+
- Config: `<base>/config.json`
|
|
109
|
+
- Database: `<base>/coco.db`
|
|
109
110
|
|
|
110
111
|
Logging defaults:
|
|
111
112
|
|
package/bun.lock
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"lockfileVersion":
|
|
3
|
-
"configVersion": 1,
|
|
2
|
+
"lockfileVersion": 0,
|
|
4
3
|
"workspaces": {
|
|
5
4
|
"": {
|
|
6
|
-
"name": "cocod",
|
|
7
5
|
"dependencies": {
|
|
8
6
|
"@scure/bip39": "^2.0.1",
|
|
9
7
|
"coco-cashu-core": "1.1.2-rc.50",
|
|
@@ -22,25 +20,25 @@
|
|
|
22
20
|
},
|
|
23
21
|
},
|
|
24
22
|
"packages": {
|
|
25
|
-
"@cashu/cashu-ts": ["@cashu/cashu-ts@3.6.
|
|
23
|
+
"@cashu/cashu-ts": ["@cashu/cashu-ts@3.6.4", "", { "dependencies": { "@noble/curves": "^2.0.1", "@noble/hashes": "^2.0.1", "@scure/base": "^2.0.0", "@scure/bip32": "^2.0.1" } }, "sha512-a6Asqk+wPEk9a6BQmdLMeegngj0KHKicABUEtr1cUMLTAUYHVHfdfEuHDlU+bNUqXXyaTssG7yo/ZhfHrgbSkQ=="],
|
|
26
24
|
|
|
27
25
|
"@noble/ciphers": ["@noble/ciphers@2.1.1", "", {}, "sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw=="],
|
|
28
26
|
|
|
29
|
-
"@noble/curves": ["@noble/curves@2.0
|
|
27
|
+
"@noble/curves": ["@noble/curves@2.2.0", "", { "dependencies": { "@noble/hashes": "2.2.0" } }, "sha512-T/BoHgFXirb0ENSPBquzX0rcjXeM6Lo892a2jlYJkqk83LqZx0l1Of7DzlKJ6jkpvMrkHSnAcgb5JegL8SeIkQ=="],
|
|
30
28
|
|
|
31
|
-
"@noble/hashes": ["@noble/hashes@2.0
|
|
29
|
+
"@noble/hashes": ["@noble/hashes@2.2.0", "", {}, "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg=="],
|
|
32
30
|
|
|
33
|
-
"@scure/base": ["@scure/base@2.
|
|
31
|
+
"@scure/base": ["@scure/base@2.2.0", "", {}, "sha512-b8XEupJibegiXV+tDUseI8oLQc8ei3d/4Jkb2RpbHh3MfE054ov3uIz2dhFkB3FI8iwYkEh0gGCApkrYggkPNg=="],
|
|
34
32
|
|
|
35
|
-
"@scure/bip32": ["@scure/bip32@2.0
|
|
33
|
+
"@scure/bip32": ["@scure/bip32@2.2.0", "", { "dependencies": { "@noble/curves": "2.2.0", "@noble/hashes": "2.2.0", "@scure/base": "2.2.0" } }, "sha512-zFr7t2F+a9+5tB7QbarF2HQNYrgjCNaoLAupZdKkrFMYMozJf5zqH2WJCQibMzm1qQ0QogrxVGO3qXfQDYMaQg=="],
|
|
36
34
|
|
|
37
|
-
"@scure/bip39": ["@scure/bip39@2.0
|
|
35
|
+
"@scure/bip39": ["@scure/bip39@2.2.0", "", { "dependencies": { "@noble/hashes": "2.2.0", "@scure/base": "2.2.0" } }, "sha512-T/Bj/YvYMNkIPq6EENO6/rcs2e7qTNuyoUXf0KBFDmp0ZDu0H2X4Lq6yC3i0c8PcWkov5EbW+yQZZbdMmk154A=="],
|
|
38
36
|
|
|
39
|
-
"@types/bun": ["@types/bun@1.3.
|
|
37
|
+
"@types/bun": ["@types/bun@1.3.13", "", { "dependencies": { "bun-types": "1.3.13" } }, "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw=="],
|
|
40
38
|
|
|
41
|
-
"@types/node": ["@types/node@25.
|
|
39
|
+
"@types/node": ["@types/node@25.6.0", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ=="],
|
|
42
40
|
|
|
43
|
-
"bun-types": ["bun-types@1.3.
|
|
41
|
+
"bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="],
|
|
44
42
|
|
|
45
43
|
"coco-cashu-core": ["coco-cashu-core@1.1.2-rc.50", "", { "dependencies": { "@cashu/cashu-ts": "^3.5.0", "@noble/curves": "^2.0.1", "@noble/hashes": "^2.0.1", "@scure/bip32": "^2.0.1" }, "peerDependencies": { "typescript": "^5" } }, "sha512-eK5YuwvCWpeCwF/GEkMo90FCyek2mS+smQ51wKjkjTKzpkVVlNln52l2h1Wwce4VMnW6GSeL2IgT8IksM8Umuw=="],
|
|
46
44
|
|
|
@@ -48,9 +46,9 @@
|
|
|
48
46
|
|
|
49
47
|
"coco-cashu-sqlite-bun": ["coco-cashu-sqlite-bun@1.1.2-rc.50", "", { "peerDependencies": { "coco-cashu-core": "1.1.2-rc.50", "typescript": "^5" } }, "sha512-wYAZjGmk3Xd75rq7y6AGLji4z5/3v5rWj6xgQoa3Qq+37zKnuCeLqVt+A3x/3EcNRLmNoW/u7vQJTJP4APHhIw=="],
|
|
50
48
|
|
|
51
|
-
"commander": ["commander@14.0.
|
|
49
|
+
"commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="],
|
|
52
50
|
|
|
53
|
-
"nostr-tools": ["nostr-tools@2.
|
|
51
|
+
"nostr-tools": ["nostr-tools@2.23.3", "", { "dependencies": { "@noble/ciphers": "2.1.1", "@noble/curves": "2.0.1", "@noble/hashes": "2.0.1", "@scure/base": "2.0.0", "@scure/bip32": "2.0.1", "@scure/bip39": "2.0.1", "nostr-wasm": "0.1.0" }, "peerDependencies": { "typescript": ">=5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-AALyt9k8xPdF4UV2mlLJ2mgCn4kpTB0DZ8t2r6wjdUh6anfx2cTVBsHUlo9U0EY/cKC5wcNyiMAmRJV5OVEalA=="],
|
|
54
52
|
|
|
55
53
|
"nostr-wasm": ["nostr-wasm@0.1.0", "", {}, "sha512-78BTryCLcLYv96ONU8Ws3Q1JzjlAt+43pWQhIl86xZmWeegYCNLPml7yQ+gG3vR6V5h4XGj+TxO+SS5dsThQIA=="],
|
|
56
54
|
|
|
@@ -58,12 +56,20 @@
|
|
|
58
56
|
|
|
59
57
|
"npubcash-types": ["npubcash-types@0.1.1", "", {}, "sha512-/HGfes2cvQpkrWOuUrdemJJhJUQu+xiXl4x+AxQtKUMGCB8uEhfrXJfAQ0n+DgtkIX1YVLOh0a/e6E5LX+fUew=="],
|
|
60
58
|
|
|
61
|
-
"prettier": ["prettier@3.8.
|
|
59
|
+
"prettier": ["prettier@3.8.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw=="],
|
|
62
60
|
|
|
63
61
|
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
64
62
|
|
|
65
|
-
"undici-types": ["undici-types@7.
|
|
63
|
+
"undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
|
|
66
64
|
|
|
67
|
-
"
|
|
65
|
+
"nostr-tools/@noble/curves": ["@noble/curves@2.0.1", "", { "dependencies": { "@noble/hashes": "2.0.1" } }, "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw=="],
|
|
66
|
+
|
|
67
|
+
"nostr-tools/@noble/hashes": ["@noble/hashes@2.0.1", "", {}, "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw=="],
|
|
68
|
+
|
|
69
|
+
"nostr-tools/@scure/base": ["@scure/base@2.0.0", "", {}, "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w=="],
|
|
70
|
+
|
|
71
|
+
"nostr-tools/@scure/bip32": ["@scure/bip32@2.0.1", "", { "dependencies": { "@noble/curves": "2.0.1", "@noble/hashes": "2.0.1", "@scure/base": "2.0.0" } }, "sha512-4Md1NI5BzoVP+bhyJaY3K6yMesEFzNS1sE/cP+9nuvE7p/b0kx9XbpDHHFl8dHtufcbdHRUUQdRqLIPHN/s7yA=="],
|
|
72
|
+
|
|
73
|
+
"nostr-tools/@scure/bip39": ["@scure/bip39@2.0.1", "", { "dependencies": { "@noble/hashes": "2.0.1", "@scure/base": "2.0.0" } }, "sha512-PsxdFj/d2AcJcZDX1FXN3dDgitDDTmwf78rKZq1a6c1P1Nan1X/Sxc7667zU3U+AN60g7SxxP0YCVw2H/hBycg=="],
|
|
68
74
|
}
|
|
69
75
|
}
|
package/docs/API.md
CHANGED
|
@@ -59,8 +59,8 @@ All commands are available under `cocod`.
|
|
|
59
59
|
|
|
60
60
|
The CLI talks to the daemon over HTTP on a UNIX socket.
|
|
61
61
|
|
|
62
|
-
-
|
|
63
|
-
-
|
|
62
|
+
- Base directory env var: `COCOD_DIR` (default `~/.cocod`)
|
|
63
|
+
- Socket path env var: `COCOD_SOCKET` (default `<COCOD_DIR>/cocod.sock`)
|
|
64
64
|
|
|
65
65
|
### Response shape
|
|
66
66
|
|
package/package.json
CHANGED
package/src/utils/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
2
|
|
|
3
|
-
export const CONFIG_DIR = `${homedir()}/.cocod`;
|
|
3
|
+
export const CONFIG_DIR = process.env.COCOD_DIR || `${homedir()}/.cocod`;
|
|
4
4
|
export const SOCKET_PATH = process.env.COCOD_SOCKET || `${CONFIG_DIR}/cocod.sock`;
|
|
5
5
|
export const PID_FILE = process.env.COCOD_PID || `${CONFIG_DIR}/cocod.pid`;
|
|
6
6
|
export const LOG_FILE = process.env.COCOD_LOG_FILE || `${CONFIG_DIR}/daemon.log`;
|