@buildaureon/sdk 0.1.7 → 0.1.8
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 +6 -3
- package/config/network.json +17 -7
- package/dist/index.d.ts +64 -12
- package/dist/index.js +98 -9
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +10 -8
- package/docs/auth.md +5 -3
- package/docs/client-api.md +9 -3
- package/docs/error-model.md +2 -2
- package/docs/integration-guide.md +28 -25
- package/docs/receipt-validation.md +4 -1
- package/docs/security.md +1 -1
- package/docs/transport.md +2 -1
- package/examples/ai-to-objective-to-portfolio/main.ts +6 -3
- package/examples/audit-trail/main.ts +4 -2
- package/examples/drift-detect-restore/main.ts +6 -3
- package/examples/e2e-policy-rebalance/main.ts +13 -8
- package/examples/e2e-policy-rebalance/underrun.ts +13 -8
- package/examples/e2e-policy-rebalance/verify-sizing.ts +13 -8
- package/examples/e2e-vault-flow/main.ts +13 -8
- package/examples/full-aureon-loop/main.ts +6 -3
- package/examples/green-vs-plan/main.ts +6 -3
- package/examples/market-event/main.ts +6 -3
- package/examples/portfolio-watch/main.ts +6 -3
- package/examples/quickstart/main.ts +8 -5
- package/examples/receipt-verification/main.ts +6 -3
- package/examples/sdk-demo-terminal/main.ts +6 -4
- package/package.json +25 -23
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Env:
|
|
5
5
|
* AUREON_API_KEY issued developer key (required)
|
|
6
|
-
*
|
|
6
|
+
* AUREON_NETWORK optional; omit for mainnet (4663 / 8788); set testnet for public host (still 46630)
|
|
7
|
+
* AUREON_API_URL optional override (must match network if both set)
|
|
7
8
|
*
|
|
8
9
|
* pnpm example:portfolio-watch
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
createAureonClient,
|
|
13
|
-
|
|
14
|
+
resolveAureonNetworkFromEnv,
|
|
14
15
|
formatWeight,
|
|
15
16
|
isAureonError,
|
|
16
17
|
type PortfolioWatchFlow,
|
|
@@ -65,8 +66,10 @@ async function main(): Promise<void> {
|
|
|
65
66
|
throw new Error("Set AUREON_API_KEY to an issued developer key.");
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
const resolved = resolveAureonNetworkFromEnv();
|
|
68
70
|
const aureon = createAureonClient({
|
|
69
|
-
|
|
71
|
+
network: resolved.network,
|
|
72
|
+
baseUrl: resolved.baseUrl,
|
|
70
73
|
apiKey,
|
|
71
74
|
});
|
|
72
75
|
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
* @fileoverview Quickstart — control-plane calls with an issued developer API key.
|
|
3
3
|
*
|
|
4
4
|
* Env (required for integrators — nothing else):
|
|
5
|
-
* AUREON_API_KEY
|
|
6
|
-
*
|
|
5
|
+
* AUREON_API_KEY issued key from Developers
|
|
6
|
+
* AUREON_NETWORK optional; omit for mainnet (4663 / 8788); set testnet for public host (still 46630)
|
|
7
|
+
* AUREON_API_URL optional override (must match network if both set)
|
|
7
8
|
*
|
|
8
9
|
* pnpm --filter @buildaureon/sdk example:quickstart
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
createAureonClient,
|
|
13
|
-
DEFAULT_API_BASE_URL,
|
|
14
14
|
formatWeight,
|
|
15
15
|
isAureonError,
|
|
16
|
+
resolveAureonNetworkFromEnv,
|
|
16
17
|
} from "../../src/index.js";
|
|
17
18
|
|
|
18
19
|
async function main(): Promise<void> {
|
|
@@ -23,8 +24,10 @@ async function main(): Promise<void> {
|
|
|
23
24
|
);
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
const resolved = resolveAureonNetworkFromEnv();
|
|
26
28
|
const aureon = createAureonClient({
|
|
27
|
-
|
|
29
|
+
network: resolved.network,
|
|
30
|
+
baseUrl: resolved.baseUrl,
|
|
28
31
|
apiKey,
|
|
29
32
|
});
|
|
30
33
|
|
|
@@ -58,7 +61,7 @@ async function main(): Promise<void> {
|
|
|
58
61
|
);
|
|
59
62
|
|
|
60
63
|
console.log(
|
|
61
|
-
"hint:
|
|
64
|
+
"hint: empty vault restore is 409. prepare-deposit is unsigned — the user broadcasts when they fund. Agents do not."
|
|
62
65
|
);
|
|
63
66
|
}
|
|
64
67
|
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Env:
|
|
7
7
|
* AUREON_API_KEY issued developer key (required)
|
|
8
|
-
*
|
|
8
|
+
* AUREON_NETWORK optional; omit for mainnet (4663 / 8788); set testnet for public host (still 46630)
|
|
9
|
+
* AUREON_API_URL optional override (must match network if both set)
|
|
9
10
|
*
|
|
10
11
|
* pnpm example:receipt-verification
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import {
|
|
14
15
|
createAureonClient,
|
|
15
|
-
|
|
16
|
+
resolveAureonNetworkFromEnv,
|
|
16
17
|
isAureonError,
|
|
17
18
|
type ReceiptVerificationFlow,
|
|
18
19
|
} from "../../src/index.js";
|
|
@@ -68,8 +69,10 @@ async function main(): Promise<void> {
|
|
|
68
69
|
throw new Error("Set AUREON_API_KEY to an issued developer key.");
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
const resolved = resolveAureonNetworkFromEnv();
|
|
71
73
|
const aureon = createAureonClient({
|
|
72
|
-
|
|
74
|
+
network: resolved.network,
|
|
75
|
+
baseUrl: resolved.baseUrl,
|
|
73
76
|
apiKey,
|
|
74
77
|
});
|
|
75
78
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Env:
|
|
5
5
|
* AUREON_API_KEY issued developer key (required)
|
|
6
|
-
*
|
|
6
|
+
* AUREON_NETWORK optional; omit for mainnet (4663 / 8788); set testnet for public host (still 46630)
|
|
7
|
+
* AUREON_API_URL optional override (must match network if both set)
|
|
7
8
|
*
|
|
8
9
|
* pnpm --filter @buildaureon/sdk example:sdk-demo-terminal
|
|
9
10
|
* pnpm --filter @buildaureon/sdk example:sdk-demo-terminal -- --create-only
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
|
|
12
13
|
import {
|
|
13
14
|
createAureonClient,
|
|
14
|
-
|
|
15
|
+
resolveAureonNetworkFromEnv,
|
|
15
16
|
formatWeight,
|
|
16
17
|
isAureonError,
|
|
17
18
|
type PortfolioPositionInput,
|
|
@@ -74,7 +75,8 @@ async function main(): Promise<void> {
|
|
|
74
75
|
throw new Error("Set AUREON_API_KEY to an issued developer key.");
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
const
|
|
78
|
+
const resolved = resolveAureonNetworkFromEnv();
|
|
79
|
+
const baseUrl = resolved.baseUrl;
|
|
78
80
|
line(
|
|
79
81
|
"meta",
|
|
80
82
|
CREATE_ONLY
|
|
@@ -82,7 +84,7 @@ async function main(): Promise<void> {
|
|
|
82
84
|
: `@buildaureon/sdk · Automatic demo loop · ${baseUrl}`
|
|
83
85
|
);
|
|
84
86
|
|
|
85
|
-
const aureon = createAureonClient({ baseUrl, apiKey });
|
|
87
|
+
const aureon = createAureonClient({ network: resolved.network, baseUrl, apiKey });
|
|
86
88
|
|
|
87
89
|
line("cmd", "aureon.ping()");
|
|
88
90
|
const ping = await aureon.ping();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildaureon/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Official TypeScript SDK for AUREON Financial Compass on Robinhood Chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,27 +21,6 @@
|
|
|
21
21
|
"config",
|
|
22
22
|
"fixtures"
|
|
23
23
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsup",
|
|
26
|
-
"dev": "tsup --watch",
|
|
27
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
28
|
-
"test": "tsx --test tests/**/*.test.ts",
|
|
29
|
-
"bench": "tsx benchmarks/client-throughput.ts",
|
|
30
|
-
"example:quickstart": "tsx examples/quickstart/main.ts",
|
|
31
|
-
"example:market": "tsx examples/market-event/main.ts",
|
|
32
|
-
"example:green-vs-plan": "tsx examples/green-vs-plan/main.ts",
|
|
33
|
-
"example:ai-to-objective-to-portfolio": "tsx examples/ai-to-objective-to-portfolio/main.ts",
|
|
34
|
-
"example:drift-detect-restore": "tsx examples/drift-detect-restore/main.ts",
|
|
35
|
-
"example:receipt-verification": "tsx examples/receipt-verification/main.ts",
|
|
36
|
-
"example:portfolio-watch": "tsx examples/portfolio-watch/main.ts",
|
|
37
|
-
"example:full-aureon-loop": "tsx examples/full-aureon-loop/main.ts",
|
|
38
|
-
"example:audit-trail": "tsx examples/audit-trail/main.ts",
|
|
39
|
-
"example:sdk-demo-terminal": "tsx examples/sdk-demo-terminal/main.ts",
|
|
40
|
-
"example:e2e": "tsx examples/e2e-vault-flow/main.ts",
|
|
41
|
-
"example:e2e-policy": "tsx examples/e2e-policy-rebalance/main.ts",
|
|
42
|
-
"cli": "tsx cli/aureon-cli.ts",
|
|
43
|
-
"prepublishOnly": "pnpm build"
|
|
44
|
-
},
|
|
45
24
|
"keywords": [
|
|
46
25
|
"aureon",
|
|
47
26
|
"robinhood-chain",
|
|
@@ -55,6 +34,9 @@
|
|
|
55
34
|
"url": "https://github.com/buildaureon/aureon-sdk"
|
|
56
35
|
},
|
|
57
36
|
"license": "MIT",
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
58
40
|
"engines": {
|
|
59
41
|
"node": ">=20"
|
|
60
42
|
},
|
|
@@ -64,5 +46,25 @@
|
|
|
64
46
|
"tsx": "^4.19.3",
|
|
65
47
|
"typescript": "^5.8.2",
|
|
66
48
|
"viem": "^2.55.1"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"dev": "tsup --watch",
|
|
53
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
54
|
+
"test": "tsx --test tests/**/*.test.ts",
|
|
55
|
+
"bench": "tsx benchmarks/client-throughput.ts",
|
|
56
|
+
"example:quickstart": "tsx examples/quickstart/main.ts",
|
|
57
|
+
"example:market": "tsx examples/market-event/main.ts",
|
|
58
|
+
"example:green-vs-plan": "tsx examples/green-vs-plan/main.ts",
|
|
59
|
+
"example:ai-to-objective-to-portfolio": "tsx examples/ai-to-objective-to-portfolio/main.ts",
|
|
60
|
+
"example:drift-detect-restore": "tsx examples/drift-detect-restore/main.ts",
|
|
61
|
+
"example:receipt-verification": "tsx examples/receipt-verification/main.ts",
|
|
62
|
+
"example:portfolio-watch": "tsx examples/portfolio-watch/main.ts",
|
|
63
|
+
"example:full-aureon-loop": "tsx examples/full-aureon-loop/main.ts",
|
|
64
|
+
"example:audit-trail": "tsx examples/audit-trail/main.ts",
|
|
65
|
+
"example:sdk-demo-terminal": "tsx examples/sdk-demo-terminal/main.ts",
|
|
66
|
+
"example:e2e": "tsx examples/e2e-vault-flow/main.ts",
|
|
67
|
+
"example:e2e-policy": "tsx examples/e2e-policy-rebalance/main.ts",
|
|
68
|
+
"cli": "tsx cli/aureon-cli.ts"
|
|
67
69
|
}
|
|
68
|
-
}
|
|
70
|
+
}
|