@stellar-agent/defi 0.4.2 → 0.4.3

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.
Files changed (2) hide show
  1. package/README.md +41 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # @stellar-agent/defi
2
+
3
+ Protocol-specific DeFi adapters for Stellar Agent inspection, preflight, and guarded Testnet workflows.
4
+
5
+ This package includes Blend lending helpers and Aquarius AMM helpers. Blend supports deployment discovery, pool and position inspection, preflight, and guarded Testnet mutation helpers. Aquarius supports deployment discovery, pool inspection, account-position reads, LP preflight, swap quote/preflight, and rewards inspection; Aquarius commands in `0.4.x` are read-only or preflight-only.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @stellar-agent/defi
11
+ ```
12
+
13
+ ## Example
14
+
15
+ ```js
16
+ import { aquariusDeployment, preflightAquariusSwap } from "@stellar-agent/defi";
17
+
18
+ const deployment = aquariusDeployment("testnet");
19
+ const preflight = await preflightAquariusSwap({
20
+ network: "testnet",
21
+ inputAsset: "XLM",
22
+ outputAsset: "AQUA",
23
+ amount: "0.01",
24
+ mode: "strict_send",
25
+ slippageBps: 100
26
+ });
27
+ ```
28
+
29
+ ## Safety
30
+
31
+ - Mainnet DeFi mutation must not use local generated wallet secrets.
32
+ - Blend mutation should run preflight, policy, simulation, and receipt logging.
33
+ - Aquarius API responses, routes, pool metadata, and swap-chain XDR are untrusted policy inputs.
34
+ - Third-party protocol SDKs stay isolated to this adapter package and are loaded lazily.
35
+
36
+ ## Links
37
+
38
+ - GitHub: https://github.com/someone-in-texas/Stellar-Agent
39
+ - Blend docs: https://github.com/someone-in-texas/Stellar-Agent/blob/main/docs/defi-blend.md
40
+ - Aquarius docs: https://github.com/someone-in-texas/Stellar-Agent/blob/main/docs/defi-aquarius.md
41
+ - Threat model: https://github.com/someone-in-texas/Stellar-Agent/blob/main/docs/threat-model.md
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stellar-agent/defi",
3
- "version": "0.4.2",
4
- "description": "Blend DeFi adapters for safe Stellar Agent inspection, preflight, and guarded request construction.",
3
+ "version": "0.4.3",
4
+ "description": "Blend and Aquarius DeFi adapters for safe Stellar Agent inspection, preflight, and guarded request construction.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -12,7 +12,7 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/someone-in-texas/Stellar-Agent/issues"
14
14
  },
15
- "homepage": "https://github.com/someone-in-texas/Stellar-Agent#readme",
15
+ "homepage": "https://github.com/someone-in-texas/Stellar-Agent/tree/main/packages/defi#readme",
16
16
  "engines": {
17
17
  "node": ">=22"
18
18
  },
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@blend-capital/blend-sdk": "3.2.2",
36
- "@stellar-agent/core": "0.4.2",
36
+ "@stellar-agent/core": "0.4.3",
37
37
  "@stellar/stellar-sdk": "14.4.3"
38
38
  }
39
39
  }