@buildaureon/sdk 0.1.2 → 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/LICENSE +21 -21
- package/README.md +21 -3
- package/config/network.json +20 -10
- package/dist/index.d.ts +706 -100
- package/dist/index.js +1813 -205
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +11 -9
- package/docs/auth.md +5 -3
- package/docs/client-api.md +187 -4
- package/docs/data-contracts.md +81 -6
- package/docs/error-model.md +2 -2
- package/docs/integration-guide.md +169 -26
- package/docs/receipt-validation.md +66 -0
- package/docs/security.md +1 -1
- package/docs/transport.md +2 -1
- package/examples/ai-to-objective-to-portfolio/main.ts +130 -0
- package/examples/audit-trail/main.ts +55 -0
- package/examples/drift-detect-restore/main.ts +99 -0
- 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 +86 -0
- package/examples/green-vs-plan/main.ts +142 -0
- package/examples/market-event/main.ts +8 -3
- package/examples/portfolio-watch/main.ts +87 -0
- package/examples/quickstart/main.ts +8 -5
- package/examples/receipt-verification/main.ts +90 -0
- package/examples/sdk-demo-terminal/main.ts +6 -4
- package/fixtures/reference-objectives.json +18 -18
- package/fixtures/reference-portfolio.json +10 -10
- package/package.json +70 -61
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 AUREON Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AUREON Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Financial Compass, capital health, and verified restore plans: one typed integra
|
|
|
11
11
|
|
|
12
12
|
[](https://www.typescriptlang.org/)
|
|
13
13
|
[](#requirements)
|
|
14
|
-
[](https://github.com/buildaureon)
|
|
15
15
|
[](LICENSE)
|
|
16
16
|
[](#requirements)
|
|
17
17
|
|
|
@@ -114,6 +114,8 @@ flowchart LR
|
|
|
114
114
|
| Prepare non-custodial vault deposit / withdraw steps | `prepareVaultDeposit`, related vault helpers |
|
|
115
115
|
| Fetch and execute restore plans | `getRestorePlan`, `restoreObjective` |
|
|
116
116
|
| Apply controlled market events for integration rehearsal | `applyMarketEvent` |
|
|
117
|
+
| Register agent intent as objective + portfolio flow | `applyFinancialIntent`, `getObjectivePortfolioFlow` |
|
|
118
|
+
| Compare objective vs actual allocation | `getAllocationVsTarget` |
|
|
117
119
|
| Manage developer API keys | `createApiKey`, `listApiKeys`, `toggleApiKey`, `revokeApiKey` |
|
|
118
120
|
|
|
119
121
|
**This package alone does not:**
|
|
@@ -331,9 +333,11 @@ import { createAureonClient } from "@buildaureon/sdk";
|
|
|
331
333
|
|
|
332
334
|
async function run() {
|
|
333
335
|
const aureon = createAureonClient({
|
|
334
|
-
baseUrl: "https://api.aureonlabs.network",
|
|
335
336
|
apiKey: process.env.AUREON_API_KEY!, // issued key from Developers console
|
|
336
337
|
});
|
|
338
|
+
// Default network is mainnet (4663 / http://127.0.0.1:8788).
|
|
339
|
+
// Opt in to testnet: createAureonClient({ network: "testnet", apiKey })
|
|
340
|
+
// Public api.aureonlabs.network is still chain 46630.
|
|
337
341
|
|
|
338
342
|
const me = await aureon.me();
|
|
339
343
|
console.log("wallet", me.walletAddress);
|
|
@@ -523,7 +527,8 @@ await aureon.revokeApiKey(newKey.id);
|
|
|
523
527
|
|
|
524
528
|
| Parameter | Type | Default | Description |
|
|
525
529
|
| --- | --- | --- | --- |
|
|
526
|
-
| `
|
|
530
|
+
| `network` | `"mainnet" \| "testnet"` | `"mainnet"` | Bundles chain + API. Mainnet is 4663 / local 8788. Testnet is optional (public host, still 46630). |
|
|
531
|
+
| `baseUrl` | `string` | mainnet `http://127.0.0.1:8788` | Explicit URL still wins. Must not disagree with `network`. |
|
|
527
532
|
| `apiKey` | `string` | `undefined` | Sent as `X-Aureon-Api-Key` |
|
|
528
533
|
| `authToken` | `string` | `undefined` | Static JWT bearer |
|
|
529
534
|
| `getAccessToken` | `() => string \| null` | `undefined` | Dynamic bearer resolver |
|
|
@@ -598,6 +603,19 @@ pnpm --filter @buildaureon/sdk cli portfolio
|
|
|
598
603
|
pnpm --filter @buildaureon/sdk cli objectives
|
|
599
604
|
```
|
|
600
605
|
|
|
606
|
+
### Runnable examples (live API)
|
|
607
|
+
|
|
608
|
+
Requires `AUREON_API_KEY`:
|
|
609
|
+
|
|
610
|
+
```bash
|
|
611
|
+
pnpm example:ai-to-objective-to-portfolio
|
|
612
|
+
pnpm example:drift-detect-restore
|
|
613
|
+
pnpm example:receipt-verification
|
|
614
|
+
pnpm example:portfolio-watch
|
|
615
|
+
pnpm example:full-aureon-loop
|
|
616
|
+
pnpm example:green-vs-plan
|
|
617
|
+
```
|
|
618
|
+
|
|
601
619
|
---
|
|
602
620
|
|
|
603
621
|
## Design principles & settlement honesty
|
package/config/network.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"defaultNetwork": "mainnet",
|
|
3
|
+
"note": "Omitted network is local mainnet 4663 / 8788. Public api.aureonlabs.network is still testnet 46630.",
|
|
4
|
+
"mainnet": {
|
|
5
|
+
"baseUrl": "http://127.0.0.1:8788",
|
|
6
|
+
"chainId": 4663,
|
|
7
|
+
"chain": "Robinhood Chain",
|
|
8
|
+
"explorer": "https://robinhoodchain.blockscout.com",
|
|
9
|
+
"rpcUrl": "https://rpc.mainnet.chain.robinhood.com"
|
|
10
|
+
},
|
|
11
|
+
"testnet": {
|
|
12
|
+
"baseUrl": "https://api.aureonlabs.network",
|
|
13
|
+
"localBaseUrl": "http://127.0.0.1:8787",
|
|
14
|
+
"appUrl": "https://app.aureonlabs.network",
|
|
15
|
+
"chainId": 46630,
|
|
16
|
+
"chain": "Robinhood Chain Testnet"
|
|
17
|
+
},
|
|
18
|
+
"sdkPackage": "@buildaureon/sdk",
|
|
19
|
+
"sdkVersion": "0.1.8"
|
|
20
|
+
}
|