@certivu/sdk 1.0.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,3 @@
1
+ import type { AuditOptions, AuditPage } from "../types/options";
2
+ export declare function getAuditLog(baseUrl: string, apiKey: string, options?: AuditOptions): Promise<AuditPage>;
3
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/methods/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEhE,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,CAcjH"}
@@ -0,0 +1,3 @@
1
+ import type { SignInput, SignResponse } from "../types/options";
2
+ export declare function signContent(baseUrl: string, apiKey: string, input: SignInput & Required<Pick<SignInput, "generatorId" | "privateKey">>): Promise<SignResponse>;
3
+ //# sourceMappingURL=sign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../src/methods/sign.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhE,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC,GACzE,OAAO,CAAC,YAAY,CAAC,CAuCvB"}
@@ -0,0 +1,5 @@
1
+ import type { VerificationResult } from "@certivu/types";
2
+ import type { BatchItem, BatchVerifyResponse, VerifyInput } from "../types/options";
3
+ export declare function verifyContent(baseUrl: string, apiKey: string, input: VerifyInput): Promise<VerificationResult>;
4
+ export declare function verifyBatch(baseUrl: string, apiKey: string, items: BatchItem[]): Promise<BatchVerifyResponse>;
5
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/methods/verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAepF,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkBpH;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAuBnH"}
@@ -0,0 +1,40 @@
1
+ import type { AuditEvent, VerificationResult } from "@certivu/types";
2
+ export interface ClientConfig {
3
+ apiKey: string;
4
+ baseUrl?: string;
5
+ generatorId?: string;
6
+ privateKey?: string;
7
+ }
8
+ export interface SignInput {
9
+ content: Uint8Array | string;
10
+ model: string;
11
+ generatorId?: string;
12
+ privateKey?: string;
13
+ watermarkId?: string;
14
+ }
15
+ export interface VerifyInput {
16
+ content: Uint8Array | string;
17
+ token?: string;
18
+ }
19
+ export interface BatchItem {
20
+ content: Uint8Array | string;
21
+ token?: string;
22
+ }
23
+ export interface AuditOptions {
24
+ page?: number;
25
+ limit?: number;
26
+ }
27
+ export interface SignResponse {
28
+ token: string;
29
+ record_id: string;
30
+ }
31
+ export interface BatchVerifyResponse {
32
+ results: VerificationResult[];
33
+ }
34
+ export interface AuditPage {
35
+ events: AuditEvent[];
36
+ total: number;
37
+ page: number;
38
+ limit: number;
39
+ }
40
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAErE,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,3 @@
1
+ export type { AuditPage, BatchVerifyResponse, SignResponse } from "./options";
2
+ export type { AuditEvent, VerificationResult } from "@certivu/types";
3
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/types/responses.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9E,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@certivu/sdk",
3
+ "version": "1.0.0",
4
+ "description": "Official SDK for Certivu — quantum-resistant AI content provenance",
5
+ "keywords": ["certivu", "ai", "provenance", "post-quantum", "ml-dsa", "watermark"],
6
+ "homepage": "https://certivu.ai",
7
+ "license": "MIT",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "engines": {
25
+ "node": ">=18"
26
+ },
27
+ "scripts": {
28
+ "build": "bun build src/index.ts --outdir dist --target node --format esm && tsc --project tsconfig.build.json",
29
+ "typecheck": "tsc --noEmit",
30
+ "lint": "biome check src",
31
+ "clean": "rm -rf dist"
32
+ },
33
+ "devDependencies": {
34
+ "@biomejs/biome": "^1.9.4",
35
+ "@certivu/crypto": "0.0.1",
36
+ "@certivu/types": "0.0.1",
37
+ "@types/bun": "latest",
38
+ "typescript": "^5.7.3"
39
+ }
40
+ }