@countersign/api-contract
Advanced tools
+4
-35
@@ -28,42 +28,11 @@ import { z } from 'zod'; | ||
| schemaVersion: z.ZodLiteral<1>; | ||
| /** Asset the caps apply to, e.g. "USDC". */ | ||
| asset: z.ZodString; | ||
| /** Max value of a single spend (base units). Absent = no per-tx cap. */ | ||
| perTxCap: z.ZodOptional<z.ZodString>; | ||
| /** Max cumulative spend per rolling day (base units). Absent = no daily cap. */ | ||
| dailyCap: z.ZodOptional<z.ZodString>; | ||
| /** | ||
| * Counterparty allowlist. ABSENT = any counterparty allowed (subject to other rules). | ||
| * PRESENT-but-EMPTY ([]) = deny everything (an explicit "allow nobody" sentinel). | ||
| */ | ||
| allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
| /** Counterparty denylist — always wins over the allowlist. */ | ||
| denylist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
| /** Spends STRICTLY ABOVE this require human approval before signing (base units). */ | ||
| allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>; | ||
| denylist: z.ZodOptional<z.ZodArray<z.ZodString>>; | ||
| approvalThreshold: z.ZodOptional<z.ZodString>; | ||
| /** Hard kill — deny everything regardless of the rest. */ | ||
| frozen: z.ZodOptional<z.ZodBoolean>; | ||
| /** Allowed venues/chains by name (see ./venues.ts). Absent = any venue. */ | ||
| venues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
| }, "strict", z.ZodTypeAny, { | ||
| schemaVersion: 1; | ||
| asset: string; | ||
| perTxCap?: string | undefined; | ||
| dailyCap?: string | undefined; | ||
| allowlist?: string[] | undefined; | ||
| denylist?: string[] | undefined; | ||
| approvalThreshold?: string | undefined; | ||
| frozen?: boolean | undefined; | ||
| venues?: string[] | undefined; | ||
| }, { | ||
| schemaVersion: 1; | ||
| asset: string; | ||
| perTxCap?: string | undefined; | ||
| dailyCap?: string | undefined; | ||
| allowlist?: string[] | undefined; | ||
| denylist?: string[] | undefined; | ||
| approvalThreshold?: string | undefined; | ||
| frozen?: boolean | undefined; | ||
| venues?: string[] | undefined; | ||
| }>; | ||
| venues: z.ZodOptional<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strict>; | ||
| type UnifiedPolicy = z.infer<typeof UnifiedPolicySchema>; | ||
@@ -70,0 +39,0 @@ |
+4
-4
| { | ||
| "name": "@countersign/api-contract", | ||
| "version": "0.1.1", | ||
| "version": "0.2.0", | ||
| "description": "Countersign Core API contract — typed REST + ws schema and OpenAPI spec for the cross-vendor agent-spend control plane.", | ||
@@ -40,8 +40,8 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "zod": "^3.23.8" | ||
| "zod": "^4.4.0" | ||
| }, | ||
| "devDependencies": { | ||
| "tsup": "^8.5.1", | ||
| "@countersign/core": "0.0.0", | ||
| "@countersign/policy": "0.0.0" | ||
| "@countersign/policy": "0.0.0", | ||
| "@countersign/core": "0.0.0" | ||
| }, | ||
@@ -48,0 +48,0 @@ "scripts": { |
36168
-3.6%419
-6.89%+ Added
- Removed
Updated