@dfm-fi/agent 0.2.1075 → 0.2.1079
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 +8 -8
- package/package.json +1 -1
- package/skills.md +4 -5
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ the agent.
|
|
|
34
34
|
publish CI does).
|
|
35
35
|
- A **dedicated throwaway Solana test wallet** (NOT the protocol wallet), funded
|
|
36
36
|
with a few dollars of **USDC** (mainnet mint `EPjFW…`) + a little **SOL** for
|
|
37
|
-
fees
|
|
37
|
+
fees. No allowlisting is required — sign-in is open.
|
|
38
38
|
- For writes: **no client RPC is required** — the backend broadcasts your signed
|
|
39
39
|
tx (`POST /tx/submit`). Set `HELIUS_RPC_URL` only if you want to submit through
|
|
40
40
|
your *own* RPC instead (optional override; power users + the test harness).
|
|
@@ -55,9 +55,9 @@ the agent.
|
|
|
55
55
|
- **Never** use the protocol wallet (`9GjE…`) here. Use a **dedicated throwaway
|
|
56
56
|
test wallet** funded with a few dollars of USDC. The harness hard-refuses to
|
|
57
57
|
load the known protocol pubkey as a tripwire.
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
- No access allowlist exists. SIWS sign-in is open to any wallet; the only
|
|
59
|
+
wallet gate left is `OPS_ADMIN_WALLETS`, which guards `/ops` and the agent
|
|
60
|
+
config, not ordinary use.
|
|
61
61
|
- All **real-money WRITE tools** (deposit / redeem) are **gated behind
|
|
62
62
|
`DFM_AGENT_WRITE_ENABLED=true` and default OFF**. With write off, those tools
|
|
63
63
|
refuse and never touch the chain or load the keypair.
|
|
@@ -70,7 +70,7 @@ SIWS (Sign In With Solana), signed locally, exchanged for a Bearer session:
|
|
|
70
70
|
exact message** (domain-bound to `n2.dfm.finance`, nonce embedded).
|
|
71
71
|
2. Sign **that exact message** locally with the test keypair (Ed25519 → base58).
|
|
72
72
|
3. `POST /auth/siws { wallet, signature, message, client: 'native' }` →
|
|
73
|
-
`{ accessToken, … }`. The server
|
|
73
|
+
`{ accessToken, … }`. The server verifies the wallet, nonce and domain here.
|
|
74
74
|
4. Authed calls send `Authorization: Bearer <accessToken>`; a 401 triggers one
|
|
75
75
|
transparent re-auth + retry.
|
|
76
76
|
|
|
@@ -251,7 +251,7 @@ Generate a dedicated throwaway wallet and fund it with a little USDC + SOL:
|
|
|
251
251
|
|
|
252
252
|
```bash
|
|
253
253
|
solana-keygen new --no-bip39-passphrase -o ~/dfm-test-wallet.json
|
|
254
|
-
solana-keygen pubkey ~/dfm-test-wallet.json
|
|
254
|
+
solana-keygen pubkey ~/dfm-test-wallet.json
|
|
255
255
|
```
|
|
256
256
|
|
|
257
257
|
Then either point the agent at the file (preferred):
|
|
@@ -273,7 +273,7 @@ Only after the parent has reviewed the write path (`create-flow.ts`,
|
|
|
273
273
|
|
|
274
274
|
```bash
|
|
275
275
|
export DFM_API_URL=https://n2-api.dfm.finance
|
|
276
|
-
export DFM_AGENT_KEYPAIR_PATH=$HOME/dfm-test-wallet.json #
|
|
276
|
+
export DFM_AGENT_KEYPAIR_PATH=$HOME/dfm-test-wallet.json # dedicated + funded
|
|
277
277
|
export DFM_AGENT_WRITE_ENABLED=true # the kill-switch
|
|
278
278
|
# export HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY # OPTIONAL — submit via your own RPC
|
|
279
279
|
|
|
@@ -360,7 +360,7 @@ Notes:
|
|
|
360
360
|
| Variable | Required | Default | Description |
|
|
361
361
|
|----------|----------|---------|-------------|
|
|
362
362
|
| `DFM_API_URL` | No | `https://n2-api.dfm.finance` | API base (the `/api/v2` prefix is auto-appended). |
|
|
363
|
-
| `DFM_AGENT_KEYPAIR_PATH` | For auth | — | Path to a Solana secret-key JSON file (preferred).
|
|
363
|
+
| `DFM_AGENT_KEYPAIR_PATH` | For auth | — | Path to a Solana secret-key JSON file (preferred). Use a dedicated wallet funded with USDC + a little SOL. |
|
|
364
364
|
| `DFM_AGENT_KEYPAIR_JSON` | For auth | — | The secret-key JSON array inline (alternative; e.g. injected from a secret manager). |
|
|
365
365
|
| `DFM_AGENT_WRITE_ENABLED` | No | `false` | Master kill-switch for **all** write tools (launch/deposit/redeem/cancel/update-envelope). |
|
|
366
366
|
| `HELIUS_RPC_URL` / `DFM_RPC_URL` | No (optional) | — | OPTIONAL override — submit through your OWN RPC instead of the backend broadcast (`POST /tx/submit`). Writes need NO client RPC by default; mainnet never uses the rate-limited public RPC. |
|
package/package.json
CHANGED
package/skills.md
CHANGED
|
@@ -23,9 +23,8 @@ broadcasts your signed tx.
|
|
|
23
23
|
## Available Tools
|
|
24
24
|
|
|
25
25
|
### whoami (read)
|
|
26
|
-
Report the
|
|
27
|
-
enabled
|
|
28
|
-
confirm the agent is wired up and the wallet is allowlisted.
|
|
26
|
+
Report the wallet public key, API base + cluster, and whether writes are
|
|
27
|
+
enabled. **Call this first** to confirm the agent is wired up.
|
|
29
28
|
|
|
30
29
|
### list_dtfs (read)
|
|
31
30
|
List DTF vaults (`GET /vaults`): `address`, `vaultName`/`vaultSymbol`, type,
|
|
@@ -155,8 +154,8 @@ purely to size the converging legs.
|
|
|
155
154
|
management/performance fees do not exist. Swap slippage is borne by the
|
|
156
155
|
transacting user on top.
|
|
157
156
|
- **Amounts are RAW**: USDC + shares both use 6 decimals. $12 = `"12000000"`.
|
|
158
|
-
- **Auth
|
|
159
|
-
|
|
157
|
+
- **Auth**: SIWS is open to any wallet; the server verifies the signed nonce and
|
|
158
|
+
domain before issuing a session.
|
|
160
159
|
|
|
161
160
|
## Security
|
|
162
161
|
- The programs are **oracle-free**: deposit/mint is proportional in-kind against
|