@buildaureon/sdk 0.1.0 → 0.1.1
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 +353 -245
- package/dist/index.d.ts +15 -6
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +139 -138
- package/docs/auth.md +127 -168
- package/docs/client-api.md +5 -4
- package/docs/data-contracts.md +7 -4
- package/docs/error-model.md +151 -116
- package/docs/integration-guide.md +173 -112
- package/docs/security.md +87 -41
- package/docs/transport.md +91 -77
- package/examples/e2e-policy-rebalance/main.ts +24 -36
- package/examples/e2e-policy-rebalance/underrun.ts +28 -24
- package/examples/e2e-policy-rebalance/verify-sizing.ts +29 -26
- package/examples/e2e-vault-flow/main.ts +36 -90
- package/examples/market-event/main.ts +9 -9
- package/examples/quickstart/main.ts +17 -16
- package/examples/sdk-demo-terminal/main.ts +171 -0
- package/package.json +5 -8
|
@@ -1,153 +1,195 @@
|
|
|
1
1
|
# Production Integration Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Integrate `@buildaureon/sdk` into server-side agents and automated rebalancing loops against the live AUREON API.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Automation note:** SDK integrations support **Automatic mode only** (`automationMode: "auto"` — the default). Do not build Manual Approve agent loops with the SDK; use the operator utility for Manual workflows.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 1. End-to-end agent loop
|
|
10
10
|
|
|
11
11
|
```mermaid
|
|
12
12
|
flowchart TD
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
Init[1_issued_API_key_client] --> Sync[2_sync_Capital_Book]
|
|
14
|
+
Sync --> Fund[3_fund_vault_if_empty]
|
|
15
|
+
Fund --> Obj[4_create_Auto_objective]
|
|
16
|
+
Obj --> Loop[5_watchdog_heartbeat]
|
|
17
|
+
Loop -->|breach| Plan[6_restore_plan]
|
|
18
|
+
Plan --> Restore[7_restoreObjective]
|
|
19
|
+
Restore --> Loop
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
### Step 1
|
|
22
|
-
Set up the client, leveraging environment variables for configuration options.
|
|
22
|
+
### Step 1 — Client
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
-
import { createAureonClient
|
|
26
|
-
|
|
27
|
-
const session = createSessionTokenProvider(
|
|
28
|
-
typeof localStorage !== "undefined"
|
|
29
|
-
? localStorage.getItem("aureon_bearer_token")
|
|
30
|
-
: process.env.AUREON_TOKEN ?? null
|
|
31
|
-
);
|
|
25
|
+
import { createAureonClient } from "@buildaureon/sdk";
|
|
32
26
|
|
|
33
27
|
export const aureon = createAureonClient({
|
|
34
28
|
baseUrl: process.env.AUREON_API_URL || "https://api.aureonlabs.network",
|
|
35
|
-
apiKey: process.env.AUREON_API_KEY
|
|
36
|
-
|
|
29
|
+
apiKey: process.env.AUREON_API_KEY!, // issued Developers key
|
|
30
|
+
timeoutMs: 30_000,
|
|
31
|
+
maxRetries: 2,
|
|
32
|
+
retryDelayMs: 500,
|
|
37
33
|
});
|
|
34
|
+
|
|
35
|
+
const me = await aureon.me();
|
|
36
|
+
console.log("operating as", me.walletAddress);
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
Authenticate session tokens using cryptographic challenge-response verification.
|
|
39
|
+
Optional Bearer (usually unnecessary with an issued key):
|
|
42
40
|
|
|
43
41
|
```ts
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const { token } = await aureon.verifyWallet({
|
|
53
|
-
address: walletAddress,
|
|
54
|
-
message,
|
|
55
|
-
signature
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
session.setToken(token);
|
|
59
|
-
return token;
|
|
60
|
-
}
|
|
42
|
+
import { createAureonClient, createSessionTokenProvider } from "@buildaureon/sdk";
|
|
43
|
+
|
|
44
|
+
const session = createSessionTokenProvider(process.env.AUREON_TOKEN ?? null);
|
|
45
|
+
export const aureon = createAureonClient({
|
|
46
|
+
baseUrl: process.env.AUREON_API_URL || "https://api.aureonlabs.network",
|
|
47
|
+
apiKey: process.env.AUREON_API_KEY ?? null,
|
|
48
|
+
getAccessToken: session.getAccessToken,
|
|
49
|
+
});
|
|
61
50
|
```
|
|
62
51
|
|
|
63
|
-
### Step
|
|
64
|
-
Populate local assets into the gateway database.
|
|
52
|
+
### Step 2 — Sync Capital Book
|
|
65
53
|
|
|
66
54
|
```ts
|
|
67
55
|
const { portfolio, chainId } = await aureon.syncPortfolio();
|
|
68
|
-
console.log(
|
|
56
|
+
console.log({
|
|
57
|
+
chainId,
|
|
58
|
+
positions: portfolio.positions.length,
|
|
59
|
+
totalNotionalUsd: portfolio.totalNotionalUsd,
|
|
60
|
+
});
|
|
69
61
|
```
|
|
70
62
|
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
Prefer `syncPortfolio()` over hand-seeded books in production. Use `setPortfolio` only for controlled rehearsals.
|
|
64
|
+
|
|
65
|
+
### Step 3 — Fund vault when needed
|
|
66
|
+
|
|
67
|
+
Automatic restores require vault capital. Prepare returns **unsigned** steps — your host signs and broadcasts.
|
|
73
68
|
|
|
74
69
|
```ts
|
|
75
|
-
|
|
70
|
+
import type { VaultPrepareResult } from "@buildaureon/sdk";
|
|
71
|
+
|
|
72
|
+
async function ensureVaultFunded(
|
|
73
|
+
symbol: string,
|
|
74
|
+
amount: string,
|
|
75
|
+
broadcast: (step: VaultPrepareResult["steps"][number]) => Promise<string>
|
|
76
|
+
) {
|
|
76
77
|
const status = await aureon.getVaultStatus();
|
|
77
|
-
if (status.empty)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
78
|
+
if (!status.empty && status.canRestore) return status;
|
|
79
|
+
|
|
80
|
+
const prep = await aureon.prepareVaultDeposit({ symbol, amount });
|
|
81
|
+
for (const step of prep.steps) {
|
|
82
|
+
const hash = await broadcast(step);
|
|
83
|
+
console.log(step.label, hash);
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
return aureon.getVaultStatus();
|
|
85
87
|
}
|
|
86
88
|
```
|
|
87
89
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
Typical broadcast (viem sketch):
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
// host-owned — not part of the SDK
|
|
94
|
+
await walletClient.sendTransaction({
|
|
95
|
+
to: step.to,
|
|
96
|
+
data: step.data,
|
|
97
|
+
value: step.value ? BigInt(step.value) : 0n,
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Step 4 — Create an Automatic objective
|
|
90
102
|
|
|
91
103
|
```ts
|
|
92
104
|
const objective = await aureon.createObjective({
|
|
93
|
-
name: "
|
|
94
|
-
kind: "
|
|
95
|
-
targetWeight: 0.
|
|
96
|
-
tolerance: 0.03
|
|
105
|
+
name: "Maintain 20% WETH",
|
|
106
|
+
kind: "balanced_portfolio",
|
|
107
|
+
targetWeight: 0.2,
|
|
108
|
+
tolerance: 0.03,
|
|
109
|
+
targetSymbol: "WETH",
|
|
110
|
+
// automationMode defaults to "auto" — keep it that way for SDK agents
|
|
111
|
+
priority: "medium",
|
|
97
112
|
});
|
|
98
|
-
console.log(`Objective ${objective.name} registered. Status: ${objective.status}`);
|
|
99
113
|
```
|
|
100
114
|
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
**Locks:** `targetSymbol` and `automationMode` cannot change after create. Recreate the objective to change token or mode.
|
|
116
|
+
|
|
117
|
+
### Step 5 — Watchdog heartbeat
|
|
103
118
|
|
|
104
119
|
```ts
|
|
105
|
-
async function
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
async function heartbeat() {
|
|
121
|
+
const refreshed = await aureon.refreshWatchdog();
|
|
122
|
+
console.log("breaches", refreshed.breaches.length);
|
|
123
|
+
|
|
124
|
+
for (const breach of refreshed.breaches) {
|
|
125
|
+
const plan = await aureon.getRestorePlan(breach.objectiveId);
|
|
126
|
+
console.log("plan", plan.kind, plan);
|
|
127
|
+
|
|
128
|
+
const receipt = await aureon.restoreObjective(breach.objectiveId);
|
|
129
|
+
console.log({
|
|
130
|
+
settlement: receipt.settlement, // "vault" | "staged"
|
|
131
|
+
status: receipt.status,
|
|
132
|
+
tx: receipt.transactionHash,
|
|
133
|
+
});
|
|
119
134
|
}
|
|
135
|
+
|
|
136
|
+
const health = await aureon.getHealth();
|
|
137
|
+
return health;
|
|
120
138
|
}
|
|
121
139
|
```
|
|
122
140
|
|
|
141
|
+
### Step 6 — Verify
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
await aureon.getHealth(objective.id);
|
|
145
|
+
await aureon.getTimeline(objective.id);
|
|
146
|
+
await aureon.listExecutions(objective.id);
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Always branch UI/agent copy on `receipt.settlement`.
|
|
150
|
+
|
|
123
151
|
---
|
|
124
152
|
|
|
125
|
-
## 2.
|
|
153
|
+
## 2. Recommended objective kinds for agents
|
|
126
154
|
|
|
127
|
-
|
|
128
|
-
|
|
155
|
+
| Kind | Typical use |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| `balanced_portfolio` | Hold `targetSymbol` near a weight band |
|
|
158
|
+
| `stable_allocation` | Keep a stable sleeve near a weight |
|
|
159
|
+
| `risk_ceiling` | Cap portfolio risk score |
|
|
160
|
+
| `reward_reinvestment` | Sweep rewards into a sleeve |
|
|
161
|
+
|
|
162
|
+
Start with one Automatic `balanced_portfolio` objective and a funded vault before adding more policies.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 3. Daemon runners
|
|
167
|
+
|
|
168
|
+
### PM2
|
|
129
169
|
|
|
130
|
-
#### PM2 Configuration (`ecosystem.config.js`)
|
|
131
170
|
```js
|
|
132
171
|
module.exports = {
|
|
133
|
-
apps: [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
172
|
+
apps: [
|
|
173
|
+
{
|
|
174
|
+
name: "aureon-agent-loop",
|
|
175
|
+
script: "./dist/index.js",
|
|
176
|
+
instances: 1,
|
|
177
|
+
autorestart: true,
|
|
178
|
+
env: {
|
|
179
|
+
NODE_ENV: "production",
|
|
180
|
+
AUREON_API_URL: "https://api.aureonlabs.network",
|
|
181
|
+
// AUREON_API_KEY from secret store / PM2 ecosystem secrets
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
],
|
|
144
185
|
};
|
|
145
186
|
```
|
|
146
187
|
|
|
147
|
-
|
|
188
|
+
### systemd
|
|
189
|
+
|
|
148
190
|
```ini
|
|
149
191
|
[Unit]
|
|
150
|
-
Description=
|
|
192
|
+
Description=AUREON Automatic restore agent
|
|
151
193
|
After=network.target
|
|
152
194
|
|
|
153
195
|
[Service]
|
|
@@ -163,34 +205,53 @@ Environment=NODE_ENV=production
|
|
|
163
205
|
WantedBy=multi-user.target
|
|
164
206
|
```
|
|
165
207
|
|
|
166
|
-
###
|
|
167
|
-
Log JSON payloads to persistent logging collectors.
|
|
208
|
+
### Logging
|
|
168
209
|
|
|
169
210
|
```ts
|
|
170
|
-
import winston from "winston";
|
|
171
211
|
import { createAureonClient } from "@buildaureon/sdk";
|
|
172
212
|
|
|
173
|
-
const logger = winston.createLogger({
|
|
174
|
-
level: "info",
|
|
175
|
-
format: winston.format.json(),
|
|
176
|
-
transports: [new winston.transports.File({ filename: "aureon-combined.log" })]
|
|
177
|
-
});
|
|
178
|
-
|
|
179
213
|
const aureon = createAureonClient({
|
|
180
|
-
apiKey: process.env.AUREON_API_KEY
|
|
214
|
+
apiKey: process.env.AUREON_API_KEY!,
|
|
181
215
|
logger: {
|
|
182
|
-
debug: (msg, ctx) =>
|
|
183
|
-
info: (msg, ctx) =>
|
|
184
|
-
warn: (msg, ctx) =>
|
|
185
|
-
error: (msg, ctx) =>
|
|
186
|
-
}
|
|
216
|
+
debug: (msg, ctx) => console.debug(msg, ctx),
|
|
217
|
+
info: (msg, ctx) => console.info(msg, ctx),
|
|
218
|
+
warn: (msg, ctx) => console.warn(msg, ctx),
|
|
219
|
+
error: (msg, ctx) => console.error(msg, ctx),
|
|
220
|
+
},
|
|
187
221
|
});
|
|
188
222
|
```
|
|
189
223
|
|
|
224
|
+
Never log API keys, Bearer tokens, or private keys.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## 4. Frontend / SPA notes
|
|
229
|
+
|
|
230
|
+
- Do not ship issued API keys in public browser bundles.
|
|
231
|
+
- Prefer a backend proxy for agent credentials.
|
|
232
|
+
- Keep `refreshWatchdog` / `restoreObjective` loops on the server.
|
|
233
|
+
- Browser operator UX is the utility app (wallet session), not the SDK agent path.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 5. Troubleshooting
|
|
238
|
+
|
|
239
|
+
| Symptom | Likely cause | Fix |
|
|
240
|
+
| --- | --- | --- |
|
|
241
|
+
| 401 invalid key | Wrong / paused / revoked key | Rotate in Developers |
|
|
242
|
+
| 401 need issued key | Env bootstrap key alone | Use an issued Developers key |
|
|
243
|
+
| Vault empty / cannot restore | No vault capital | `prepareVaultDeposit` → broadcast → sync |
|
|
244
|
+
| Update rejects symbol/mode | Locked at create | Recreate objective |
|
|
245
|
+
| Restore receipt `staged` | Ledger-local path | Do not claim on-chain |
|
|
246
|
+
| Health still violated after restore | Prices / sizing / liquidity | Re-read plan, vault balances, timeline |
|
|
247
|
+
| Network / timeout | RPC or API latency | Raise `timeoutMs`, set `maxRetries` |
|
|
248
|
+
|
|
190
249
|
---
|
|
191
250
|
|
|
192
|
-
##
|
|
251
|
+
## 6. Related docs
|
|
193
252
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
253
|
+
- [Auth](./auth.md)
|
|
254
|
+
- [Architecture](./architecture.md)
|
|
255
|
+
- [Client API](./client-api.md)
|
|
256
|
+
- [Error model](./error-model.md)
|
|
257
|
+
- [Security](./security.md)
|
package/docs/security.md
CHANGED
|
@@ -1,74 +1,120 @@
|
|
|
1
1
|
# Security Model and Practices
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Security architecture for `@buildaureon/sdk`: trust boundaries, credentials, vault signing, and production checklist.
|
|
4
|
+
|
|
5
|
+
**Automation note:** SDK agents should run **Automatic** objectives only. Manual Approve flows are utility concerns, not SDK security surface.
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
7
|
-
## 1. Gateway
|
|
9
|
+
## 1. Gateway trust boundaries
|
|
8
10
|
|
|
9
|
-
AUREON
|
|
11
|
+
AUREON is non-custodial. The API is a policy engine, price indexer, and coordinator. It does not hold private keys and does not broadcast owner withdrawals for you.
|
|
10
12
|
|
|
11
13
|
```mermaid
|
|
12
14
|
flowchart TD
|
|
13
|
-
Host[
|
|
14
|
-
Gateway -->|
|
|
15
|
-
Host -->|
|
|
16
|
-
Wallet -->|
|
|
17
|
-
|
|
18
|
-
subgraph OnChain [
|
|
19
|
-
Vault[
|
|
20
|
-
DX[
|
|
21
|
-
Vault -->|
|
|
15
|
+
Host[Host_application] -->|1_request_calldata| Gateway[Aureon_API]
|
|
16
|
+
Gateway -->|2_unsigned_steps| Host
|
|
17
|
+
Host -->|3_sign_locally| Wallet[Private_key_or_KMS]
|
|
18
|
+
Wallet -->|4_broadcast| Chain[Robinhood_Chain_RPC]
|
|
19
|
+
|
|
20
|
+
subgraph OnChain [Smart_contract_controls]
|
|
21
|
+
Vault[Smart_Vault]
|
|
22
|
+
DX[Allowlisted_DEX_routes]
|
|
23
|
+
Vault -->|keeper_swaps_only| DX
|
|
22
24
|
end
|
|
23
|
-
Wallet -.->|
|
|
25
|
+
Wallet -.->|owner_deposit_withdraw| Vault
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
### 1.1 Private
|
|
27
|
-
|
|
28
|
+
### 1.1 Private key isolation
|
|
29
|
+
|
|
30
|
+
The SDK never loads, stores, or transmits private keys or mnemonics. Signing stays in the host (viem, ethers, HSM, KMS). A gateway breach cannot drain vaults by itself.
|
|
31
|
+
|
|
32
|
+
### 1.2 Issued API keys are wallet credentials
|
|
33
|
+
|
|
34
|
+
An **issued** developer key identifies the bound wallet for control-plane operations (sync, objectives, health, restore, prepare). Treat it like a password:
|
|
35
|
+
|
|
36
|
+
- Create in utility **Developers**
|
|
37
|
+
- Store in env / secret manager
|
|
38
|
+
- Pause or revoke on leak
|
|
39
|
+
- Prefer one key per agent host
|
|
28
40
|
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
Env bootstrap keys on the server unlock product access only. They do **not** identify a wallet and must not be used as agent identity.
|
|
42
|
+
|
|
43
|
+
### 1.3 Unsigned calldata
|
|
44
|
+
|
|
45
|
+
`prepareVaultDeposit` / `prepareVaultWithdraw` return structured steps. Decode against published ABIs before signing. Broadcast is always host-side.
|
|
31
46
|
|
|
32
47
|
---
|
|
33
48
|
|
|
34
|
-
## 2.
|
|
49
|
+
## 2. What a compromised API key can and cannot do
|
|
50
|
+
|
|
51
|
+
| Can | Cannot |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| Read portfolio, vault, health, timeline | Sign owner deposit/withdraw txs |
|
|
54
|
+
| Create / update / pause Auto objectives | Withdraw vault funds to arbitrary addresses |
|
|
55
|
+
| Request restore plans and trigger Automatic restore coordination | Bypass vault keeper allowlists |
|
|
56
|
+
| Create additional developer keys under the same wallet | Recover a private key |
|
|
57
|
+
|
|
58
|
+
Keeper-driven Automatic restores execute allowlisted vault swaps. Keepers cannot send vault assets to arbitrary third parties.
|
|
35
59
|
|
|
36
|
-
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 3. Smart vault access control
|
|
37
63
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
64
|
+
- **Owner path:** deposits and withdrawals require owner-signed txs from prepare steps.
|
|
65
|
+
- **Keeper path:** Automatic restores use registered keepers on allowlisted routes only.
|
|
66
|
+
- **Slippage / limits:** vault and planner enforce execution bounds to reduce bad fills.
|
|
41
67
|
|
|
42
68
|
---
|
|
43
69
|
|
|
44
|
-
##
|
|
70
|
+
## 4. Settlement honesty
|
|
71
|
+
|
|
72
|
+
Every execution receipt includes `settlement`:
|
|
45
73
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
74
|
+
| Value | Meaning | UI rule |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| `vault` | On-chain vault / keeper settlement with verifiable hash | May show as on-chain |
|
|
77
|
+
| `staged` | Ledger-local / rehearsal — not a chain settlement | Must **not** be labeled as on-chain |
|
|
78
|
+
|
|
79
|
+
Never collapse staged into “confirmed on Robinhood Chain.”
|
|
50
80
|
|
|
51
81
|
---
|
|
52
82
|
|
|
53
|
-
##
|
|
83
|
+
## 5. Transport and logging hygiene
|
|
54
84
|
|
|
55
|
-
|
|
85
|
+
- Prefer HTTPS production base URL `https://api.aureonlabs.network`.
|
|
86
|
+
- Do not log raw `Authorization` or `X-Aureon-Api-Key`.
|
|
87
|
+
- Redact prepare step calldata in public logs if it includes sensitive amounts in your threat model.
|
|
88
|
+
- Set `timeoutMs` / `maxRetries` deliberately for agent loops (see [transport.md](./transport.md)).
|
|
56
89
|
|
|
57
|
-
|
|
58
|
-
* **Staged Settlement (`staged`)**: Simulated rebalances that update gateway database states without broadcasting transactions. This is used during rehearsals and testing.
|
|
90
|
+
---
|
|
59
91
|
|
|
60
|
-
|
|
61
|
-
|
|
92
|
+
## 6. Frontend vs agent hosts
|
|
93
|
+
|
|
94
|
+
| Host | Guidance |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| Server agent / cron | Issued API key in secret store; private key in KMS if broadcasting deposits |
|
|
97
|
+
| Browser SPA | Do **not** embed issued API keys in public bundles; proxy through your backend |
|
|
98
|
+
| Operator utility | Wallet Bearer only — separate from SDK agent auth |
|
|
62
99
|
|
|
63
100
|
---
|
|
64
101
|
|
|
65
|
-
##
|
|
102
|
+
## 7. Production checklist
|
|
103
|
+
|
|
104
|
+
- [ ] Issued developer key (not a shared env bootstrap key) in secrets
|
|
105
|
+
- [ ] Private keys isolated from the API key and never logged
|
|
106
|
+
- [ ] Deposit/withdraw broadcast path reviewed and ABI-checked
|
|
107
|
+
- [ ] Automatic objectives only in SDK loops
|
|
108
|
+
- [ ] UI / agent summaries honor `settlement: vault | staged`
|
|
109
|
+
- [ ] Gas reserve on the signing wallet for owner txs
|
|
110
|
+
- [ ] Key rotation plan (pause/revoke in Developers)
|
|
111
|
+
- [ ] Error handling branches on `error.code` (see [error-model.md](./error-model.md))
|
|
112
|
+
|
|
113
|
+
---
|
|
66
114
|
|
|
67
|
-
|
|
115
|
+
## 8. Related docs
|
|
68
116
|
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
71
|
-
- [ ]
|
|
72
|
-
- [ ]
|
|
73
|
-
- [ ] **Staged Handling**: Confirm your user interface clearly distinguishes between staged and vault settlements.
|
|
74
|
-
- [ ] **Slippage Bounds**: Configure appropriate slippage tolerances on objectives to prevent execution failure during market volatility.
|
|
117
|
+
- [Auth](./auth.md)
|
|
118
|
+
- [Architecture](./architecture.md)
|
|
119
|
+
- [Integration guide](./integration-guide.md)
|
|
120
|
+
- [Error model](./error-model.md)
|