@coinfello/agent-cli 0.1.6 → 0.1.7

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 CHANGED
@@ -13,13 +13,29 @@ You can run the CLI via `node dist/index.js` after building.
13
13
 
14
14
  ### 1. create_account
15
15
 
16
- Generates a new private key, creates a MetaMask smart account on the specified chain, and saves both the key and address to `~/.clawdbot/skills/coinfello/config.json`.
16
+ Creates a MetaMask Hybrid smart account on the specified chain. By default, the signing key is generated in the **macOS Secure Enclave** (hardware-backed, non-exportable). If Secure Enclave is unavailable, the CLI warns and falls back to a software key.
17
+
18
+ Pass `--use-unsafe-private-key` to explicitly use a plaintext software key (development/testing only).
17
19
 
18
20
  ```bash
21
+ # Default: Secure Enclave
19
22
  node dist/index.js create_account sepolia
23
+
24
+ # Development/testing: plaintext private key
25
+ node dist/index.js create_account sepolia --use-unsafe-private-key
20
26
  ```
21
27
 
22
- Expected output:
28
+ Expected output (Secure Enclave):
29
+
30
+ ```
31
+ Creating Secure Enclave-backed smart account on sepolia...
32
+ Secure Enclave smart account created successfully.
33
+ Address: 0x...
34
+ Key tag: ...
35
+ Config saved to: /home/<user>/.clawdbot/skills/coinfello/config.json
36
+ ```
37
+
38
+ Expected output (unsafe private key):
23
39
 
24
40
  ```
25
41
  Creating smart account on sepolia...
@@ -28,61 +44,64 @@ Address: 0x...
28
44
  Config saved to: /home/<user>/.clawdbot/skills/coinfello/config.json
29
45
  ```
30
46
 
31
- Verify the config was written:
47
+ To overwrite an existing account, pass `--delete-existing-private-key`.
48
+
49
+ ### 2. get_account
50
+
51
+ Displays the current smart account address from local config.
32
52
 
33
53
  ```bash
34
- cat ~/.clawdbot/skills/coinfello/config.json
54
+ node dist/index.js get_account
35
55
  ```
36
56
 
37
- ### 2. set_delegation
57
+ ### 3. sign_in
38
58
 
39
- Stores a parent delegation JSON object in config. Only needed if you plan to use `--use-redelegation` with `send_prompt`.
59
+ Authenticates with CoinFello using Sign-In with Ethereum (SIWE). Saves the session token to local config.
40
60
 
41
61
  ```bash
42
- node dist/index.js set_delegation '{"delegate":"0x0000000000000000000000000000000000000001","delegator":"0x...","authority":"0x0","caveats":[],"salt":"0x0","signature":"0x..."}'
62
+ node dist/index.js sign_in
43
63
  ```
44
64
 
45
65
  Expected output:
46
66
 
47
67
  ```
48
- Delegation saved successfully.
49
- Config saved to: /home/<user>/.clawdbot/skills/coinfello/config.json
68
+ Signing in with smart account...
69
+ Sign-in successful.
70
+ User ID: ...
71
+ Session token saved to config.
50
72
  ```
51
73
 
52
- ### 3. send_prompt
74
+ ### 4. set_delegation
53
75
 
54
- Sends a prompt to CoinFello with a locally-created ERC-20 subdelegation. Requires `create_account` to have been run first. The private key is read from the config file.
76
+ Stores a parent delegation JSON object in config.
55
77
 
56
78
  ```bash
57
- node dist/index.js send_prompt "swap 5 USDC for ETH" \
58
- --token-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
59
- --max-amount 5 \
60
- --decimals 6
79
+ node dist/index.js set_delegation '{"delegate":"0x...","delegator":"0x...","authority":"0x0","caveats":[],"salt":"0x0","signature":"0x..."}'
61
80
  ```
62
81
 
63
- With redelegation (requires `set_delegation` first):
82
+ ### 5. send_prompt
83
+
84
+ Sends a natural language prompt to CoinFello. If the server requires a delegation to execute the action, the CLI creates and signs a subdelegation automatically based on the server's requested scope and chain. Requires `create_account` and `sign_in` to have been run first.
64
85
 
65
86
  ```bash
66
- node dist/index.js send_prompt "swap 5 USDC for ETH" \
67
- --token-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
68
- --max-amount 5 \
69
- --decimals 6 \
70
- --use-redelegation
87
+ node dist/index.js send_prompt "send 5 USDC to 0xRecipient..."
71
88
  ```
72
89
 
73
90
  Expected output:
74
91
 
75
92
  ```
93
+ Sending prompt...
94
+ Delegation requested: scope=erc20, chainId=8453
76
95
  Fetching CoinFello delegate address...
77
96
  Loading smart account...
78
97
  Creating subdelegation...
79
98
  Signing subdelegation...
80
- Sending to conversation endpoint...
99
+ Sending signed delegation...
81
100
  Transaction submitted successfully.
82
101
  Transaction ID: <txn_id>
83
102
  ```
84
103
 
85
- ### 4. get_transaction_status
104
+ ### 6. get_transaction_status
86
105
 
87
106
  Checks the status of a previously submitted transaction.
88
107
 
@@ -98,5 +117,6 @@ View all commands and options:
98
117
 
99
118
  ```bash
100
119
  node dist/index.js --help
120
+ node dist/index.js create_account --help
101
121
  node dist/index.js send_prompt --help
102
122
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinfello/agent-cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",