@decentrys/sentinel-sdk 0.1.0

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.
@@ -0,0 +1,352 @@
1
+ // src/model.ts
2
+ var ALERT_SEVERITIES = ["INFO", "LOW", "MEDIUM", "HIGH", "CRITICAL"];
3
+ var TARGET_TYPES = [
4
+ "CONTRACT",
5
+ "WALLET",
6
+ "TREASURY",
7
+ "MULTISIG",
8
+ "LP_POOL",
9
+ "ORACLE",
10
+ "BRIDGE",
11
+ "GOVERNANCE"
12
+ ];
13
+
14
+ // src/client.ts
15
+ var SDK_VERSION = "0.1.0";
16
+ var DEFAULT_BASE_URL = "https://api.decentrys.com";
17
+ var DEFAULT_TIMEOUT_MS = 1e4;
18
+ var SentinelError = class extends Error {
19
+ constructor(status, message, code) {
20
+ super(message);
21
+ this.status = status;
22
+ this.code = code;
23
+ this.name = "SentinelError";
24
+ }
25
+ status;
26
+ code;
27
+ };
28
+ var Sentinel = class {
29
+ baseUrl;
30
+ apiKey;
31
+ timeoutMs;
32
+ fetchImpl;
33
+ constructor(config) {
34
+ if (!config.apiKey?.trim()) {
35
+ throw new Error("Sentinel: an apiKey is required. Create one at https://decentrys.com/developers.");
36
+ }
37
+ if (config.apiKey.startsWith("dk_pub_")) {
38
+ throw new Error(
39
+ "Sentinel: that is a publishable key. Monitoring is managed server-side with a secret key \u2014 a publishable key ships inside clients and cannot be trusted to configure detection."
40
+ );
41
+ }
42
+ this.apiKey = config.apiKey;
43
+ this.baseUrl = (config.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
44
+ this.timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
45
+ this.fetchImpl = config.fetch ?? resolveFetch();
46
+ }
47
+ // --- Targets ------------------------------------------------------------
48
+ /** Watch a deployed contract. */
49
+ registerContract(input) {
50
+ return this.addTarget(input, "CONTRACT");
51
+ }
52
+ registerWallet(input) {
53
+ return this.addTarget(input, "WALLET");
54
+ }
55
+ registerTreasury(input) {
56
+ return this.addTarget(input, "TREASURY");
57
+ }
58
+ registerTarget(input, targetType) {
59
+ return this.addTarget(input, targetType);
60
+ }
61
+ listTargets(projectId) {
62
+ const query = projectId ? `?projectId=${encodeURIComponent(projectId)}` : "";
63
+ return this.request("GET", `/v1/monitoring/targets${query}`);
64
+ }
65
+ async setTargetEnabled(targetId, enabled) {
66
+ return this.request("PATCH", `/v1/monitoring/targets/${targetId}`, { enabled });
67
+ }
68
+ async removeTarget(targetId) {
69
+ await this.request("DELETE", `/v1/monitoring/targets/${targetId}`);
70
+ }
71
+ // --- Rules --------------------------------------------------------------
72
+ createRule(input) {
73
+ return this.request("POST", "/v1/monitoring/rules", input);
74
+ }
75
+ updateRule(ruleId, changes) {
76
+ return this.request("PATCH", `/v1/monitoring/rules/${ruleId}`, changes);
77
+ }
78
+ async deleteRule(ruleId) {
79
+ await this.request("DELETE", `/v1/monitoring/rules/${ruleId}`);
80
+ }
81
+ listRules(projectId) {
82
+ const query = projectId ? `?projectId=${encodeURIComponent(projectId)}` : "";
83
+ return this.request("GET", `/v1/monitoring/rules${query}`);
84
+ }
85
+ /**
86
+ * Evaluate a rule against facts without arming it.
87
+ *
88
+ * A rule that has never been tested against a fact set is a rule nobody
89
+ * knows the behaviour of, and finding out during an incident is the worst
90
+ * possible time.
91
+ */
92
+ testRule(ruleId, facts) {
93
+ return this.request("POST", `/v1/monitoring/rules/${ruleId}/test`, { facts });
94
+ }
95
+ /** The vocabulary rules are built from: fields, operators, actions, templates. */
96
+ catalog() {
97
+ return this.request("GET", "/v1/monitoring/catalog");
98
+ }
99
+ // --- Alerts -------------------------------------------------------------
100
+ listAlerts(input = {}) {
101
+ const params = new URLSearchParams();
102
+ if (input.status) params.set("status", input.status);
103
+ if (input.severity) params.set("severity", input.severity);
104
+ if (input.limit) params.set("limit", String(input.limit));
105
+ const query = params.toString();
106
+ return this.request("GET", `/v1/alerts${query ? `?${query}` : ""}`);
107
+ }
108
+ getAlert(alertId) {
109
+ return this.request("GET", `/v1/alerts/${alertId}`);
110
+ }
111
+ acknowledgeAlert(alertId, note) {
112
+ return this.request("PATCH", `/v1/alerts/${alertId}`, {
113
+ status: "ACKNOWLEDGED",
114
+ ...note ? { note } : {}
115
+ });
116
+ }
117
+ // --- Reporting ----------------------------------------------------------
118
+ /**
119
+ * Report an event from your own system.
120
+ *
121
+ * The one method here that never throws. It is called from a customer's hot
122
+ * path — a deploy script, a treasury movement, a governance execution — and
123
+ * a monitoring call must not be able to fail the thing it is monitoring.
124
+ * The boolean says whether it was recorded, so a caller who cares can check.
125
+ */
126
+ async reportEvent(event) {
127
+ try {
128
+ await this.request("POST", "/v1/monitoring/events", event);
129
+ return true;
130
+ } catch {
131
+ return false;
132
+ }
133
+ }
134
+ // --- Internals ----------------------------------------------------------
135
+ addTarget(input, targetType) {
136
+ return this.request("POST", "/v1/monitoring/targets", {
137
+ projectId: input.projectId,
138
+ chainKey: input.chain,
139
+ address: input.address,
140
+ targetType,
141
+ ...input.label ? { label: input.label } : {}
142
+ });
143
+ }
144
+ async request(method, path, body) {
145
+ const controller = new AbortController();
146
+ const timer = setTimeout(() => controller.abort(), this.timeoutMs);
147
+ try {
148
+ const response = await this.fetchImpl(`${this.baseUrl}${path}`, {
149
+ method,
150
+ headers: {
151
+ "content-type": "application/json",
152
+ "x-api-key": this.apiKey,
153
+ "user-agent": `decentrys-sentinel/${SDK_VERSION}`
154
+ },
155
+ ...body === void 0 ? {} : { body: JSON.stringify(body) },
156
+ signal: controller.signal
157
+ });
158
+ const text = await response.text();
159
+ if (!response.ok) {
160
+ const parsed2 = safeParse(text);
161
+ throw new SentinelError(
162
+ response.status,
163
+ typeof parsed2?.message === "string" ? parsed2.message : `Decentrys returned HTTP ${response.status}.`,
164
+ typeof parsed2?.code === "string" ? parsed2.code : void 0
165
+ );
166
+ }
167
+ if (!text) return void 0;
168
+ const parsed = safeParse(text);
169
+ if (parsed === null) throw new SentinelError(response.status, "The response was not valid JSON.");
170
+ return "data" in parsed && !("total" in parsed) && !("page" in parsed) ? parsed.data : parsed;
171
+ } catch (error) {
172
+ if (error instanceof SentinelError) throw error;
173
+ if (controller.signal.aborted) {
174
+ throw new SentinelError(0, `No response within ${this.timeoutMs}ms.`);
175
+ }
176
+ throw new SentinelError(0, error instanceof Error ? error.message : "Request failed.");
177
+ } finally {
178
+ clearTimeout(timer);
179
+ }
180
+ }
181
+ };
182
+ function safeParse(text) {
183
+ try {
184
+ const parsed = JSON.parse(text);
185
+ return typeof parsed === "object" && parsed !== null ? parsed : null;
186
+ } catch {
187
+ return null;
188
+ }
189
+ }
190
+ function resolveFetch() {
191
+ const candidate = globalThis.fetch;
192
+ if (typeof candidate !== "function") {
193
+ throw new Error("Sentinel: no global fetch was found. Pass one via `new Sentinel({ fetch })`.");
194
+ }
195
+ return candidate.bind(globalThis);
196
+ }
197
+
198
+ // src/from-audit.ts
199
+ var DEFAULT_ACTIONS = [{ type: "ALERT", config: {} }];
200
+ var RULES = {
201
+ UPGRADEABLE: {
202
+ name: "Contract logic replaced",
203
+ description: "The proxy now points at different code. Every finding in the audit describes the previous implementation and stops applying the moment this fires.",
204
+ severity: "CRITICAL",
205
+ triggerType: "contract.upgraded",
206
+ conditions: { op: "eq", field: "upgrade.changed", value: true }
207
+ },
208
+ ADMIN_CONTROL: {
209
+ name: "Admin address changed",
210
+ description: "Whoever can upgrade or configure this contract is now a different account.",
211
+ severity: "CRITICAL",
212
+ triggerType: "contract.admin_changed",
213
+ conditions: { op: "eq", field: "admin.changed", value: true }
214
+ },
215
+ OWNERSHIP: {
216
+ name: "Ownership transferred",
217
+ description: "Owner-only functions identified during the audit are now controlled by someone else.",
218
+ severity: "HIGH",
219
+ triggerType: "contract.ownership_transferred",
220
+ conditions: { op: "eq", field: "ownership.changed", value: true }
221
+ },
222
+ MINT_AUTHORITY: {
223
+ name: "Supply increased",
224
+ description: "The mint authority the audit identified was used. Legitimate for many designs \u2014 this reports it so holders are not the last to know.",
225
+ severity: "HIGH",
226
+ triggerType: "token.supply_changed",
227
+ conditions: {
228
+ op: "AND",
229
+ conditions: [
230
+ { op: "eq", field: "token.supplyIncreased", value: true },
231
+ // A percentage rather than an absolute: a fixed figure is meaningless
232
+ // across tokens with different supplies and decimals.
233
+ { op: "gt", field: "token.supplyChangePercent", value: 1 }
234
+ ]
235
+ }
236
+ },
237
+ PAUSABLE: {
238
+ name: "Pause state changed",
239
+ description: "The contract was paused or unpaused. Pausing is usually a defence, and knowing it happened is how you find out an incident started without you.",
240
+ severity: "HIGH",
241
+ triggerType: "contract.paused",
242
+ conditions: { op: "eq", field: "contract.pauseChanged", value: true }
243
+ },
244
+ BLACKLIST: {
245
+ name: "Transfer restriction applied",
246
+ description: "An address was restricted from transferring. Reported because it is invisible on-chain otherwise.",
247
+ severity: "MEDIUM",
248
+ triggerType: "contract.function_called",
249
+ conditions: { op: "contains", field: "event.types", value: "BLACKLIST" }
250
+ },
251
+ FORCED_BALANCE_CHANGE: {
252
+ name: "Balance moved without the holder acting",
253
+ description: "A permanent delegate or equivalent authority moved tokens from an account that did not sign for it. Legitimate for some regulated designs, and always worth knowing about.",
254
+ severity: "CRITICAL",
255
+ triggerType: "contract.function_called",
256
+ conditions: { op: "contains", field: "event.types", value: "FORCED_TRANSFER" }
257
+ },
258
+ GOVERNANCE: {
259
+ name: "Governance proposal executed",
260
+ description: "An executed proposal can change anything the audit assumed was fixed.",
261
+ severity: "HIGH",
262
+ triggerType: "governance.executed",
263
+ conditions: { op: "eq", field: "governance.executed", value: true }
264
+ }
265
+ };
266
+ var ALIASES = {
267
+ // The canonical names the Protect layer emits. Chain-specific spellings —
268
+ // Sui's TreasuryCap, Solana's mintAuthority, an EIP-1967 slot — are already
269
+ // normalised to these before an audit hands anything over, so mapping raw
270
+ // chain vocabulary here would be mapping names that never arrive.
271
+ UPGRADEABLE: "UPGRADEABLE",
272
+ DELEGATED_EXECUTION: "UPGRADEABLE",
273
+ MINT_AUTHORITY: "MINT_AUTHORITY",
274
+ PAUSABLE: "PAUSABLE",
275
+ ACCOUNT_FREEZE: "BLACKLIST",
276
+ FORCED_BALANCE_CHANGE: "FORCED_BALANCE_CHANGE",
277
+ GOVERNANCE: "GOVERNANCE",
278
+ // Accepted because an audit report may use them in prose, and rejecting a
279
+ // reviewer's own wording would silently drop a rule they expected.
280
+ PROXY: "UPGRADEABLE",
281
+ UPGRADE_AUTHORITY: "UPGRADEABLE",
282
+ ADMIN: "ADMIN_CONTROL",
283
+ ADMIN_CONTROL: "ADMIN_CONTROL",
284
+ OWNER: "OWNERSHIP",
285
+ OWNERSHIP: "OWNERSHIP",
286
+ MINT: "MINT_AUTHORITY",
287
+ PAUSE: "PAUSABLE",
288
+ FREEZE_AUTHORITY: "BLACKLIST",
289
+ BLACKLIST: "BLACKLIST"
290
+ };
291
+ function rulesFromAudit(input) {
292
+ const actions = input.actions?.length ? input.actions : DEFAULT_ACTIONS;
293
+ const seen = /* @__PURE__ */ new Set();
294
+ const generated = [];
295
+ for (const capability of input.capabilities) {
296
+ const key = ALIASES[capability.type.toUpperCase()];
297
+ if (!key || seen.has(key)) continue;
298
+ seen.add(key);
299
+ const template = RULES[key];
300
+ if (!template) continue;
301
+ generated.push({
302
+ capability: capability.type,
303
+ rule: {
304
+ projectId: input.projectId,
305
+ name: template.name,
306
+ description: capability.grantedBy ? `${template.description} Granted by ${capability.grantedBy}, identified during the audit.` : `${template.description} Identified during the audit.`,
307
+ severity: template.severity,
308
+ triggerType: template.triggerType,
309
+ conditions: template.conditions,
310
+ actions,
311
+ // Five minutes. Long enough that one event in a loop does not page a
312
+ // team repeatedly, short enough that a second, genuinely separate
313
+ // occurrence still gets through.
314
+ cooldownSeconds: 300
315
+ }
316
+ });
317
+ }
318
+ if (typeof input.treasuryThresholdUsd === "number" && input.treasuryThresholdUsd > 0) {
319
+ generated.push({
320
+ capability: "TREASURY",
321
+ rule: {
322
+ projectId: input.projectId,
323
+ name: "Large treasury outflow",
324
+ description: `An outbound movement above $${input.treasuryThresholdUsd.toLocaleString()}, the threshold agreed during the audit.`,
325
+ severity: "HIGH",
326
+ triggerType: "treasury.transfer",
327
+ conditions: {
328
+ op: "AND",
329
+ conditions: [
330
+ { op: "eq", field: "transfer.direction", value: "OUT" },
331
+ { op: "gt", field: "transfer.valueUsd", value: input.treasuryThresholdUsd }
332
+ ]
333
+ },
334
+ actions,
335
+ cooldownSeconds: 300
336
+ }
337
+ });
338
+ }
339
+ return generated;
340
+ }
341
+ function unmappedCapabilities(capabilities) {
342
+ return capabilities.filter((capability) => !ALIASES[capability.type.toUpperCase()]).map((capability) => capability.type);
343
+ }
344
+ export {
345
+ ALERT_SEVERITIES,
346
+ SDK_VERSION,
347
+ Sentinel,
348
+ SentinelError,
349
+ TARGET_TYPES,
350
+ rulesFromAudit,
351
+ unmappedCapabilities
352
+ };
@@ -0,0 +1,118 @@
1
+ /**
2
+ * The Sentinel client.
3
+ *
4
+ * The contract is the opposite of Protect's, and deliberately.
5
+ *
6
+ * Protect sits between a user and a signing screen, so it never throws: a
7
+ * security service having a bad minute must not cost someone their
8
+ * transaction. Sentinel is management and reporting — you are registering a
9
+ * contract, writing a rule, acknowledging an alert. Swallowing a failure
10
+ * there would leave an operator believing they are monitored when they are
11
+ * not, which is the more dangerous silence of the two.
12
+ *
13
+ * So Sentinel throws. Loudly, with the API's own message.
14
+ *
15
+ * The one exception is `reportEvent`, which runs on a hot path in a
16
+ * customer's own system and must never be able to break it.
17
+ */
18
+ import type { Alert, AlertSeverity, MonitoringRule, MonitoringTarget, RuleAction, RuleTestResult, TargetType } from './model';
19
+ export declare const SDK_VERSION = "0.1.0";
20
+ export type FetchLike = (url: string, init: {
21
+ method: string;
22
+ headers: Record<string, string>;
23
+ body?: string;
24
+ signal?: AbortSignal;
25
+ }) => Promise<{
26
+ ok: boolean;
27
+ status: number;
28
+ text: () => Promise<string>;
29
+ }>;
30
+ export declare class SentinelError extends Error {
31
+ readonly status: number;
32
+ readonly code?: string | undefined;
33
+ constructor(status: number, message: string, code?: string | undefined);
34
+ }
35
+ export interface SentinelConfig {
36
+ apiKey: string;
37
+ baseUrl?: string;
38
+ timeoutMs?: number;
39
+ fetch?: FetchLike;
40
+ }
41
+ export interface RegisterTargetInput {
42
+ projectId: string;
43
+ chain: string;
44
+ address: string;
45
+ label?: string;
46
+ }
47
+ export interface CreateRuleInput {
48
+ projectId: string;
49
+ name: string;
50
+ description?: string;
51
+ severity: AlertSeverity;
52
+ triggerType: string;
53
+ conditions: Record<string, unknown>;
54
+ actions: RuleAction[];
55
+ cooldownSeconds?: number;
56
+ }
57
+ export interface ListAlertsInput {
58
+ status?: string;
59
+ severity?: AlertSeverity;
60
+ limit?: number;
61
+ }
62
+ export declare class Sentinel {
63
+ private readonly baseUrl;
64
+ private readonly apiKey;
65
+ private readonly timeoutMs;
66
+ private readonly fetchImpl;
67
+ constructor(config: SentinelConfig);
68
+ /** Watch a deployed contract. */
69
+ registerContract(input: RegisterTargetInput): Promise<MonitoringTarget>;
70
+ registerWallet(input: RegisterTargetInput): Promise<MonitoringTarget>;
71
+ registerTreasury(input: RegisterTargetInput): Promise<MonitoringTarget>;
72
+ registerTarget(input: RegisterTargetInput, targetType: TargetType): Promise<MonitoringTarget>;
73
+ listTargets(projectId?: string): Promise<MonitoringTarget[]>;
74
+ setTargetEnabled(targetId: string, enabled: boolean): Promise<MonitoringTarget>;
75
+ removeTarget(targetId: string): Promise<void>;
76
+ createRule(input: CreateRuleInput): Promise<MonitoringRule>;
77
+ updateRule(ruleId: string, changes: Partial<CreateRuleInput> & {
78
+ enabled?: boolean;
79
+ }): Promise<MonitoringRule>;
80
+ deleteRule(ruleId: string): Promise<void>;
81
+ listRules(projectId?: string): Promise<{
82
+ data: MonitoringRule[];
83
+ }>;
84
+ /**
85
+ * Evaluate a rule against facts without arming it.
86
+ *
87
+ * A rule that has never been tested against a fact set is a rule nobody
88
+ * knows the behaviour of, and finding out during an incident is the worst
89
+ * possible time.
90
+ */
91
+ testRule(ruleId: string, facts: Record<string, unknown>): Promise<RuleTestResult>;
92
+ /** The vocabulary rules are built from: fields, operators, actions, templates. */
93
+ catalog(): Promise<Record<string, unknown>>;
94
+ listAlerts(input?: ListAlertsInput): Promise<{
95
+ data: Alert[];
96
+ }>;
97
+ getAlert(alertId: string): Promise<Alert>;
98
+ acknowledgeAlert(alertId: string, note?: string): Promise<Alert>;
99
+ /**
100
+ * Report an event from your own system.
101
+ *
102
+ * The one method here that never throws. It is called from a customer's hot
103
+ * path — a deploy script, a treasury movement, a governance execution — and
104
+ * a monitoring call must not be able to fail the thing it is monitoring.
105
+ * The boolean says whether it was recorded, so a caller who cares can check.
106
+ */
107
+ reportEvent(event: {
108
+ projectId: string;
109
+ eventName: string;
110
+ chain?: string;
111
+ address?: string;
112
+ txHash?: string;
113
+ facts?: Record<string, unknown>;
114
+ }): Promise<boolean>;
115
+ private addTarget;
116
+ private request;
117
+ }
118
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAC/F,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,WAAW,UAAU,CAAC;AAKnC,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,KAC3F,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,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