@settlemint/dalp-cli 3.1.18-release.34270626122 → 3.1.19-main.34482536277
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 +42 -168
- package/dist/dalp.js +98337 -200656
- package/dist/dalp.js.map +185 -0
- package/package.json +22 -18
package/README.md
CHANGED
|
@@ -8,197 +8,71 @@
|
|
|
8
8
|
</p>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/package/@settlemint/dalp-cli" rel="nofollow"><img src="https://img.shields.io/npm/v/@settlemint/dalp-cli" alt="npm version"></a>
|
|
13
|
-
<a href="https://www.npmjs.com/package/@settlemint/dalp-cli" rel="nofollow"><img src="https://img.shields.io/npm/dw/@settlemint/dalp-cli" alt="npm downloads"></a>
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
<div align="center">
|
|
17
|
-
<a href="https://settlemint.com">Website</a>
|
|
18
|
-
<span> • </span>
|
|
19
|
-
<a href="https://www.npmjs.com/package/@settlemint/dalp-cli">NPM</a>
|
|
20
|
-
<span> • </span>
|
|
21
|
-
<a href="mailto:support@settlemint.com">Support</a>
|
|
22
|
-
<br />
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
11
|
## About
|
|
26
12
|
|
|
27
|
-
|
|
13
|
+
kubectl-style CLI over the public promise-based `@settlemint/dalp-sdk`.
|
|
28
14
|
|
|
29
|
-
|
|
15
|
+
Command paths come from the **OpenAPI URL** (static segments) plus the HTTP verb:
|
|
30
16
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
| HTTP | URL | CLI |
|
|
18
|
+
| ------ | ----------------------------------------- | ---------------------------------------------------- |
|
|
19
|
+
| `GET` | `/api/v2/tokens` | `dalp get tokens` |
|
|
20
|
+
| `GET` | `/api/v2/tokens/{assetId}` | `dalp get tokens <assetId>` |
|
|
21
|
+
| `GET` | `/api/v2/tokens/{tokenAddress}/documents` | `dalp get tokens documents <tokenAddress>` |
|
|
22
|
+
| `POST` | `/api/v2/tokens/{tokenAddress}/mints` | `dalp create tokens mints <tokenAddress> --body '…'` |
|
|
34
23
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
OpenAPI text is extracted at **compile time** (`bun run codegen`) into
|
|
25
|
+
`src/generated/openapi-surface.json` and drives help, args, options, enums,
|
|
26
|
+
examples, and hints for agents (Incur `--llms` / MCP / skills).
|
|
38
27
|
|
|
39
|
-
##
|
|
28
|
+
## Setup
|
|
40
29
|
|
|
41
30
|
```bash
|
|
42
|
-
|
|
31
|
+
dalp config set apiUrl https://dalp.example.com
|
|
43
32
|
dalp login
|
|
44
|
-
|
|
45
|
-
# Show current user
|
|
33
|
+
dalp org switch org_…
|
|
46
34
|
dalp whoami
|
|
47
|
-
|
|
48
|
-
# List all tokens
|
|
49
|
-
dalp tokens list --format json
|
|
50
35
|
```
|
|
51
36
|
|
|
52
|
-
##
|
|
53
|
-
|
|
54
|
-
End-to-end flows you can run as-is. Add `--format json` to any command for machine-readable output.
|
|
55
|
-
|
|
56
|
-
### Authenticate and inspect the platform
|
|
37
|
+
## Examples
|
|
57
38
|
|
|
58
39
|
```bash
|
|
59
|
-
|
|
60
|
-
dalp
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
dalp system list
|
|
67
|
-
dalp tokens list --format json
|
|
40
|
+
dalp get tokens --help
|
|
41
|
+
dalp get tokens index --sort name --limit 25
|
|
42
|
+
dalp get tokens documents index 0x…
|
|
43
|
+
dalp create tokens mints 0x… --body '{"recipients":[…],"amounts":[…]}'
|
|
44
|
+
# Mutations ask the platform to hold the response until settlement (TTY spinner + status).
|
|
45
|
+
# Agents get streamed status events either way.
|
|
46
|
+
dalp create tokens mints 0x… --body '…' --no-wait
|
|
68
47
|
```
|
|
69
48
|
|
|
70
|
-
|
|
49
|
+
## Status UX (Incur best practices)
|
|
71
50
|
|
|
72
|
-
|
|
51
|
+
Long-running work uses `async *run` generators ([Incur Streaming](https://github.com/wevm/incur#streaming)):
|
|
73
52
|
|
|
74
|
-
|
|
53
|
+
- **Humans (TTY):** braille spinner on stderr with clear phase messages (`Preparing…`, `Submitting METHOD /url…`, `Waiting for settlement…`).
|
|
54
|
+
- **Agents (`c.agent`):** structured yields `{ phase, message, status? }` with no spinner noise on stdout.
|
|
55
|
+
- **Blockchain mutations:** the wait belongs to the platform, not the CLI. The default asks it to hold the response until the write settles; `--no-wait` asks it to answer immediately. Either way the command reports what came back, and a write that outlives the wait prints `Request accepted; the transaction is still settling` with the handle. Follow that handle with `dalp get transaction-requests stream <transactionId>`; the CLI does not poll it for you.
|
|
56
|
+
- **SSE endpoints** (`…/stream`): each Server-Sent Event is yielded as a chunk. Use `--format jsonl` for NDJSON (`{"type":"chunk","data":…}`).
|
|
57
|
+
- **Errors:** public `message` stays the headline; `why` / `fix` and mapped resource `links` become an Incur CTA (`meta.cta`) so agents get next commands without scraping free text.
|
|
58
|
+
- **Success links:** JSON:API `links` (`next` / `prev` / related) map to suggested CLI commands when present.
|
|
75
59
|
|
|
76
60
|
```bash
|
|
77
|
-
|
|
78
|
-
dalp tokens create
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
dalp tokens list --query BUND7
|
|
82
|
-
|
|
83
|
-
# Read its details and holder list by contract address
|
|
84
|
-
dalp tokens read <address>
|
|
85
|
-
dalp tokens holders <address>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Expected outcome: a new bond token deployed through the platform, retrievable by address with an empty holder list.
|
|
89
|
-
|
|
90
|
-
> SDK equivalent: the typed `dalp.token.*` namespace in [`@settlemint/dalp-sdk`](../sdk/README.md).
|
|
91
|
-
|
|
92
|
-
### Register an investor identity and run KYC
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
# Create an on-chain identity for a wallet, then register it with a country code
|
|
96
|
-
dalp identities create --wallet 0x1234...abcd
|
|
97
|
-
dalp identities register --wallet 0x1234...abcd --country 276
|
|
98
|
-
|
|
99
|
-
# Check the registration landed
|
|
100
|
-
dalp identities registration-status 0x1234...abcd
|
|
101
|
-
|
|
102
|
-
# Start a KYC submission for the user and send it for review
|
|
103
|
-
dalp kyc version-create <userId>
|
|
104
|
-
dalp kyc version-submit --version-id <versionId>
|
|
61
|
+
dalp get transaction-requests stream <transactionId>
|
|
62
|
+
dalp get tokens create stream <transactionId>
|
|
63
|
+
dalp get actions stream
|
|
64
|
+
dalp get monitoring api request-logs stream
|
|
105
65
|
```
|
|
106
66
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
> SDK equivalent: `dalp.system.identity.*` and `dalp.user.kyc.*` in [`@settlemint/dalp-sdk`](../sdk/README.md).
|
|
110
|
-
|
|
111
|
-
### Using the CLI from an AI agent
|
|
112
|
-
|
|
113
|
-
Every command accepts `--format json` (also `yaml`, `md`, `jsonl`; the default is token-efficient TOON) and a `--json` shorthand, so output is always machine-parseable. Authentication is interactive by design: `dalp login` runs an OAuth 2.0 device flow in a browser, then persists an API key to the system keychain — subsequent commands, including agent-driven ones, run non-interactively against that stored credential. Instance and organization can be pinned via the `DALP_URL` and `DALP_ORG` environment variables.
|
|
114
|
-
|
|
115
|
-
## AI Agent Integration
|
|
116
|
-
|
|
117
|
-
The CLI is built from the ground up for AI agents. Every command is a typed, validated tool that agents can discover and call autonomously.
|
|
118
|
-
|
|
119
|
-
### Model Context Protocol (MCP)
|
|
120
|
-
|
|
121
|
-
Run the CLI as an MCP server, exposing every command as a tool with Zod-validated parameters, descriptions, and examples:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# Auto-register with your AI agent (Claude Code, Cursor, Codex, OpenClaw)
|
|
125
|
-
dalp mcp add
|
|
126
|
-
|
|
127
|
-
# Or run the MCP server directly
|
|
128
|
-
dalp --mcp
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Skills
|
|
132
|
-
|
|
133
|
-
Auto-generate skill files from command metadata for agent discovery:
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
# Install skill files for your agent
|
|
137
|
-
dalp skills add
|
|
138
|
-
|
|
139
|
-
# View as Markdown or JSON Schema
|
|
140
|
-
dalp --llms
|
|
141
|
-
dalp --schema
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Structured Output
|
|
145
|
-
|
|
146
|
-
Every command supports `--format json` for machine-readable output, making it composable with shell tools and agent workflows:
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
# Progressive discovery: systems → tokens → holders
|
|
150
|
-
dalp system list --format json
|
|
151
|
-
dalp tokens list --format json
|
|
152
|
-
dalp tokens holders <address> --format json
|
|
153
|
-
```
|
|
67
|
+
## Architecture
|
|
154
68
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
| Command | Description |
|
|
162
|
-
| ------------------------- | ----------------------------------- |
|
|
163
|
-
| `login` | Authenticate with the DALP platform |
|
|
164
|
-
| `logout` | End the current session |
|
|
165
|
-
| `whoami` | Show the current authenticated user |
|
|
166
|
-
| `tokens` | Manage security tokens |
|
|
167
|
-
| `token-sales` | Manage token sales |
|
|
168
|
-
| `tokens documents` | Manage token-related documents |
|
|
169
|
-
| `identity` | Manage on-chain identities |
|
|
170
|
-
| `identity-recoveries` | Recover lost identities |
|
|
171
|
-
| `kyc` | Manage KYC verification |
|
|
172
|
-
| `compliance-templates` | Manage compliance templates |
|
|
173
|
-
| `asset-type-templates` | Manage asset type templates |
|
|
174
|
-
| `user` | Manage platform users |
|
|
175
|
-
| `contacts` | Manage contacts |
|
|
176
|
-
| `account` | Manage accounts |
|
|
177
|
-
| `admin` | Administrative operations |
|
|
178
|
-
| `auth` | Authentication configuration |
|
|
179
|
-
| `config` | CLI configuration |
|
|
180
|
-
| `exchange-rates` | View exchange rates |
|
|
181
|
-
| `external-tokens` | Manage external tokens |
|
|
182
|
-
| `fixed-yield-schedules` | Manage fixed yield instruments |
|
|
183
|
-
| `monitoring` | Platform monitoring |
|
|
184
|
-
| `search-results` | Search across the platform |
|
|
185
|
-
| `settings` | Platform settings |
|
|
186
|
-
| `system` | System administration |
|
|
187
|
-
| `blockchain-transactions` | View transactions |
|
|
188
|
-
| `xvp-settlements` | Cross-value-payment operations |
|
|
189
|
-
| `actions` | Manage actions |
|
|
190
|
-
|
|
191
|
-
## Security
|
|
192
|
-
|
|
193
|
-
- **OAuth 2.0 Device Authorization Grant** (RFC 8628) — no passwords in your terminal
|
|
194
|
-
- Credentials stored in system keychain (macOS) or encrypted file (Linux/Windows)
|
|
195
|
-
- API key auto-creation during login
|
|
196
|
-
- Agents operate with your user permissions only
|
|
197
|
-
|
|
198
|
-
## Configuration
|
|
199
|
-
|
|
200
|
-
The CLI resolves configuration from (in order): CLI flags, environment variables, project config (`.dalprc.json`), and user config (`~/.config/dalp/`).
|
|
69
|
+
| Concern | Implementation |
|
|
70
|
+
| --------- | ------------------------------------------------------------------ |
|
|
71
|
+
| Framework | Incur + Zod |
|
|
72
|
+
| HTTP | `createDalpClient` + route ids from `@settlemint/dalp-sdk/routes` |
|
|
73
|
+
| Docs | Compile-time OpenAPI surface (`bun run codegen`) |
|
|
74
|
+
| Auth | Device login → API key; `X-Organization-Id` from stored active org |
|
|
201
75
|
|
|
202
76
|
## License
|
|
203
77
|
|
|
204
|
-
|
|
78
|
+
See `LICENSE`.
|