@hightop/cli 0.1.4 → 0.1.6
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 +4 -0
- package/dist/commandMetadata.js +5 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -85,6 +85,8 @@ Examples:
|
|
|
85
85
|
hightop self --pretty
|
|
86
86
|
hightop balances --pretty
|
|
87
87
|
hightop operations get <operation-id> --include-onchain --pretty
|
|
88
|
+
hightop borrow collateral-options --pretty
|
|
89
|
+
hightop borrow collateral add --asset <option-id> --amount-usd 25 --simulate --pretty
|
|
88
90
|
hightop borrow repay --asset GREEN --amount-usd 25 --simulate --pretty
|
|
89
91
|
hightop one-off-payments create --to 0x... --asset USDC --amount-usd 25 --simulate --pretty
|
|
90
92
|
hightop webhooks create --url https://example.com/hook --event-types payment.executed,webhook.test --pretty
|
|
@@ -94,6 +96,8 @@ hightop raw GET /v1/agent/openapi.json --pretty
|
|
|
94
96
|
|
|
95
97
|
The generated command layer supports all catalogued `/v1/agent/*` endpoints. CLI flags are generated from endpoint query/body field names by converting underscores to dashes, for example `amount_usd` becomes `--amount-usd`.
|
|
96
98
|
|
|
99
|
+
For collateral, fetch `hightop borrow collateral-options` first and pass the returned option `id` as `--asset` to `hightop borrow collateral add`. Vault-backed options use the vault contract address as the option id.
|
|
100
|
+
|
|
97
101
|
For complex bodies, pass a JSON object:
|
|
98
102
|
|
|
99
103
|
```sh
|
package/dist/commandMetadata.js
CHANGED
|
@@ -112,6 +112,11 @@ export function buildCliEndpointCommands(metadata, options) {
|
|
|
112
112
|
if (endpoint.key === 'GET /v1/agent/self/usage') {
|
|
113
113
|
aliases.push({ commandPath: ['usage'], pathParamsAfterCommand: [] });
|
|
114
114
|
}
|
|
115
|
+
// `self/limits` is the agent's way to read its own caps, so give it a short
|
|
116
|
+
// top-level alias (`hightop limits`) mirroring `hightop usage`.
|
|
117
|
+
if (endpoint.key === 'GET /v1/agent/self/limits') {
|
|
118
|
+
aliases.push({ commandPath: ['limits'], pathParamsAfterCommand: [] });
|
|
119
|
+
}
|
|
115
120
|
if (endpoint.method === 'GET' &&
|
|
116
121
|
endpoint.pathParams.length === 0 &&
|
|
117
122
|
endpoint.queryParams.some((param) => param === 'cursor' || param === 'limit')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hightop/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"test": "vitest run --config vitest.config.ts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@hightop/sdk": "0.1.
|
|
44
|
+
"@hightop/sdk": "0.1.6"
|
|
45
45
|
}
|
|
46
46
|
}
|