@receiz/sdk 95.0.0 → 96.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.
- package/README.md +49 -3
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +238 -0
- package/dist/index.d.ts +71 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +269 -1
- package/docs/cli-and-conformance.md +108 -0
- package/docs/copy-paste-integrations.md +205 -0
- package/docs/proof-memory-and-projections.md +38 -5
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -17,6 +17,16 @@ const receiz = createReceizClient({
|
|
|
17
17
|
});
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
Local proof tooling ships with the same package:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @receiz/sdk conformance
|
|
24
|
+
npx @receiz/sdk inspect ./receiz-asset-manifest.json
|
|
25
|
+
npx @receiz/sdk init ./receiz-integration
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
These commands use packaged SDK validators, projections, and durable proof memory. `conformance` and `inspect` do not call Receiz production, Supabase, or any database; they prove the local SDK can admit and project Receiz proof objects from fixture or file-carried truth.
|
|
29
|
+
|
|
20
30
|
## Primitive Boundary
|
|
21
31
|
|
|
22
32
|
The SDK is convenience, not authority. It reads public API projections, sends delegated actions, validates developer manifests, and verifies webhook delivery signatures. Sealed artifacts, proof bundles, verified appends, ownership appends, and settlement ledger records remain the stronger source of truth.
|
|
@@ -42,19 +52,24 @@ This is the highest-leverage SDK path for most apps:
|
|
|
42
52
|
```ts
|
|
43
53
|
import {
|
|
44
54
|
createReceizClient,
|
|
45
|
-
|
|
55
|
+
createReceizLocalStorageProofMemoryStorage,
|
|
56
|
+
createReceizProofMemory,
|
|
46
57
|
projectReceizAssetManifest,
|
|
47
58
|
} from "@receiz/sdk";
|
|
48
59
|
|
|
49
60
|
const receiz = createReceizClient({ accessToken: process.env.RECEIZ_ACCESS_TOKEN });
|
|
50
|
-
const
|
|
61
|
+
const memory = await createReceizProofMemory({
|
|
62
|
+
ownerId: "local-user-or-workspace-id",
|
|
63
|
+
storage: createReceizLocalStorageProofMemoryStorage("receiz:proof-memory"),
|
|
64
|
+
});
|
|
51
65
|
|
|
52
66
|
const verified = await receiz.verification.verifyArtifact(file);
|
|
53
67
|
if (!verified.ok) throw new Error(verified.errors.join(", "));
|
|
54
68
|
|
|
55
69
|
const manifest = verified.bundle?.assetManifest;
|
|
56
70
|
const projection = projectReceizAssetManifest(manifest);
|
|
57
|
-
|
|
71
|
+
memory.admitAssetManifest(manifest);
|
|
72
|
+
await memory.flush();
|
|
58
73
|
|
|
59
74
|
renderReceizObject({
|
|
60
75
|
title: projection.title,
|
|
@@ -68,11 +83,37 @@ The register is not a cache. It is the app's admitted verified prefix. Use it im
|
|
|
68
83
|
|
|
69
84
|
Full quickstart: `docs/proof-memory-and-projections.md`.
|
|
70
85
|
|
|
86
|
+
For complete copy-paste integrations, use `docs/copy-paste-integrations.md`. It includes a React proof memory hook, browser admission helper, Next append-sync route, webhook receiver, Sports card renderer, and local CLI proof commands.
|
|
87
|
+
|
|
88
|
+
## CLI And Local Conformance
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx @receiz/sdk conformance
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Runs the packaged asset manifest, Sports card manifest, and webhook event fixtures through the SDK validators and durable proof memory. This is existing SDK conformance exposed as an executable developer rail; it is not a new authority layer.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npx @receiz/sdk inspect ./receiz-asset-manifest.json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Validates one proof payload, projects display-ready rows, admits it into in-memory proof memory, and prints the known Kai/proof head your app can use to ask for verified additions.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx @receiz/sdk init ./receiz-integration
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Writes a local-first proof memory starter. The starter opens durable proof memory, admits verified proof objects, projects them immediately, and exposes `knownHead()` for append-only sync.
|
|
107
|
+
|
|
108
|
+
Full quickstart: `docs/cli-and-conformance.md`.
|
|
109
|
+
|
|
71
110
|
## Schemas, Projections, And Proof Memory
|
|
72
111
|
|
|
73
112
|
```ts
|
|
74
113
|
import {
|
|
75
114
|
RECEIZ_SCHEMAS,
|
|
115
|
+
createReceizInMemoryProofMemoryStorage,
|
|
116
|
+
createReceizProofMemory,
|
|
76
117
|
createReceizProofRegister,
|
|
77
118
|
projectReceizSportsCardManifest,
|
|
78
119
|
} from "@receiz/sdk";
|
|
@@ -85,6 +126,11 @@ memory.admitSportsCardManifest(cardManifest);
|
|
|
85
126
|
memory.admitWebhookEvent(webhookEvent);
|
|
86
127
|
|
|
87
128
|
const snapshot = memory.snapshot();
|
|
129
|
+
|
|
130
|
+
const durableMemory = await createReceizProofMemory({
|
|
131
|
+
storage: createReceizInMemoryProofMemoryStorage(snapshot),
|
|
132
|
+
});
|
|
133
|
+
const additionsAfter = durableMemory.knownHead(50);
|
|
88
134
|
```
|
|
89
135
|
|
|
90
136
|
Use schemas for developer validation, projections for display-ready proof rows, and proof memory for first-admission-then-append-forever UX.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { assertReceizAssetManifest, assertReceizProofRegisterSnapshot, assertReceizSportsCardManifest, assertReceizWebhookEvent, createReceizInMemoryProofMemoryStorage, createReceizProofMemory, projectReceizAssetManifest, projectReceizSportsCardManifest, receizProofMemoryAdditionsQuery, } from "./index.js";
|
|
6
|
+
const moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const packageRoot = moduleDir.endsWith(`${join("packages", "receiz-sdk", "dist")}`)
|
|
8
|
+
? dirname(moduleDir)
|
|
9
|
+
: dirname(moduleDir);
|
|
10
|
+
function printJson(value) {
|
|
11
|
+
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
12
|
+
}
|
|
13
|
+
function printError(error, detail) {
|
|
14
|
+
const payload = detail
|
|
15
|
+
? { ok: false, schema: "receiz.sdk.cli.error.v1", error, detail }
|
|
16
|
+
: { ok: false, schema: "receiz.sdk.cli.error.v1", error };
|
|
17
|
+
process.stderr.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
18
|
+
}
|
|
19
|
+
function readJsonFile(path) {
|
|
20
|
+
return JSON.parse(readFileSync(resolve(path), "utf8"));
|
|
21
|
+
}
|
|
22
|
+
async function inspectProofObject(path) {
|
|
23
|
+
const value = readJsonFile(path);
|
|
24
|
+
const storage = createReceizInMemoryProofMemoryStorage();
|
|
25
|
+
const memory = await createReceizProofMemory({ storage });
|
|
26
|
+
try {
|
|
27
|
+
const manifest = assertReceizAssetManifest(value);
|
|
28
|
+
memory.admitAssetManifest(manifest);
|
|
29
|
+
await memory.flush();
|
|
30
|
+
return {
|
|
31
|
+
ok: true,
|
|
32
|
+
schema: "receiz.sdk.cli.inspect.v1",
|
|
33
|
+
kind: "asset_manifest",
|
|
34
|
+
sourcePath: resolve(path),
|
|
35
|
+
projection: projectReceizAssetManifest(manifest),
|
|
36
|
+
knownHead: memory.knownHead(100),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// Try the next implemented Receiz proof payload shape.
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const manifest = assertReceizSportsCardManifest(value);
|
|
44
|
+
memory.admitSportsCardManifest(manifest);
|
|
45
|
+
await memory.flush();
|
|
46
|
+
return {
|
|
47
|
+
ok: true,
|
|
48
|
+
schema: "receiz.sdk.cli.inspect.v1",
|
|
49
|
+
kind: "sports_card_manifest",
|
|
50
|
+
sourcePath: resolve(path),
|
|
51
|
+
projection: projectReceizSportsCardManifest(manifest),
|
|
52
|
+
knownHead: memory.knownHead(100),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// Try the next implemented Receiz proof payload shape.
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const event = assertReceizWebhookEvent(value);
|
|
60
|
+
memory.admitWebhookEvent(event);
|
|
61
|
+
await memory.flush();
|
|
62
|
+
const entry = memory.entries()[0];
|
|
63
|
+
return {
|
|
64
|
+
ok: true,
|
|
65
|
+
schema: "receiz.sdk.cli.inspect.v1",
|
|
66
|
+
kind: "webhook_event",
|
|
67
|
+
sourcePath: resolve(path),
|
|
68
|
+
projection: (entry?.projection ?? {}),
|
|
69
|
+
knownHead: memory.knownHead(100),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// Try the register snapshot shape before failing.
|
|
74
|
+
}
|
|
75
|
+
const snapshot = assertReceizProofRegisterSnapshot(value);
|
|
76
|
+
return {
|
|
77
|
+
ok: true,
|
|
78
|
+
schema: "receiz.sdk.cli.inspect.v1",
|
|
79
|
+
kind: "proof_register_snapshot",
|
|
80
|
+
sourcePath: resolve(path),
|
|
81
|
+
projection: {
|
|
82
|
+
schema: snapshot.schema,
|
|
83
|
+
ownerId: snapshot.ownerId ?? null,
|
|
84
|
+
count: snapshot.head.count,
|
|
85
|
+
head: snapshot.head,
|
|
86
|
+
},
|
|
87
|
+
knownHead: receizProofMemoryAdditionsQuery(snapshot, 100),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async function admitFixture(memory, path) {
|
|
91
|
+
const value = readJsonFile(path);
|
|
92
|
+
memory.admit(value);
|
|
93
|
+
await memory.flush();
|
|
94
|
+
}
|
|
95
|
+
async function runConformance() {
|
|
96
|
+
const fixtures = [
|
|
97
|
+
join(packageRoot, "fixtures", "receiz-asset-manifest.example.json"),
|
|
98
|
+
join(packageRoot, "fixtures", "receiz-sports-card-manifest.example.json"),
|
|
99
|
+
join(packageRoot, "fixtures", "receiz-webhook-event.example.json"),
|
|
100
|
+
];
|
|
101
|
+
const failures = [];
|
|
102
|
+
const storage = createReceizInMemoryProofMemoryStorage();
|
|
103
|
+
const memory = await createReceizProofMemory({ ownerId: "receiz-sdk-conformance", storage });
|
|
104
|
+
for (const fixture of fixtures) {
|
|
105
|
+
try {
|
|
106
|
+
await admitFixture(memory, fixture);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
failures.push({
|
|
110
|
+
fixture,
|
|
111
|
+
error: error instanceof Error ? error.message : String(error),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const reopened = await createReceizProofMemory({ ownerId: "receiz-sdk-conformance", storage });
|
|
116
|
+
printJson({
|
|
117
|
+
ok: failures.length === 0,
|
|
118
|
+
schema: "receiz.sdk.cli.conformance.v1",
|
|
119
|
+
summary: {
|
|
120
|
+
fixtures: fixtures.length,
|
|
121
|
+
proofMemoryEntries: reopened.snapshot().head.count,
|
|
122
|
+
networkCalls: 0,
|
|
123
|
+
dbCalls: 0,
|
|
124
|
+
},
|
|
125
|
+
knownHead: reopened.knownHead(100),
|
|
126
|
+
failures,
|
|
127
|
+
});
|
|
128
|
+
if (failures.length > 0)
|
|
129
|
+
process.exitCode = 1;
|
|
130
|
+
}
|
|
131
|
+
function writeStarter(targetDir) {
|
|
132
|
+
mkdirSync(targetDir, { recursive: true });
|
|
133
|
+
writeFileSync(join(targetDir, "receiz-proof-memory.ts"), `import {
|
|
134
|
+
assertReceizAssetManifest,
|
|
135
|
+
assertReceizSportsCardManifest,
|
|
136
|
+
assertReceizWebhookEvent,
|
|
137
|
+
createReceizLocalStorageProofMemoryStorage,
|
|
138
|
+
createReceizProofMemory,
|
|
139
|
+
projectReceizAssetManifest,
|
|
140
|
+
projectReceizSportsCardManifest,
|
|
141
|
+
type ReceizProofMemory,
|
|
142
|
+
} from "@receiz/sdk";
|
|
143
|
+
|
|
144
|
+
export async function openReceizProofMemory(ownerId: string): Promise<ReceizProofMemory> {
|
|
145
|
+
return createReceizProofMemory({
|
|
146
|
+
ownerId,
|
|
147
|
+
storage: createReceizLocalStorageProofMemoryStorage(\`receiz:proof-memory:\${ownerId}:v1\`),
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export async function admitVerifiedProofObject(memory: ReceizProofMemory, value: unknown) {
|
|
152
|
+
if (typeof value !== "object" || value === null) throw new Error("receiz_proof_object_required");
|
|
153
|
+
const schema = "schema" in value ? value.schema : null;
|
|
154
|
+
|
|
155
|
+
if (schema === "receiz.asset_manifest.v1") {
|
|
156
|
+
const manifest = assertReceizAssetManifest(value);
|
|
157
|
+
memory.admitAssetManifest(manifest);
|
|
158
|
+
await memory.flush();
|
|
159
|
+
return projectReceizAssetManifest(manifest);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (schema === "receiz.sports_arena.card_manifest.v1") {
|
|
163
|
+
const manifest = assertReceizSportsCardManifest(value);
|
|
164
|
+
memory.admitSportsCardManifest(manifest);
|
|
165
|
+
await memory.flush();
|
|
166
|
+
return projectReceizSportsCardManifest(manifest);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (schema === "receiz.webhook_event.v1") {
|
|
170
|
+
const event = assertReceizWebhookEvent(value);
|
|
171
|
+
memory.admitWebhookEvent(event);
|
|
172
|
+
await memory.flush();
|
|
173
|
+
return memory.snapshot().entries.find((entry) => entry.id === \`webhook:\${event.id}\`)?.projection ?? null;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
throw new Error(\`receiz_unsupported_proof_schema:\${String(schema ?? "unknown")}\`);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function verifiedAdditionsAfterKnownHead(memory: ReceizProofMemory) {
|
|
180
|
+
return memory.knownHead(100);
|
|
181
|
+
}
|
|
182
|
+
`, "utf8");
|
|
183
|
+
}
|
|
184
|
+
function printHelp() {
|
|
185
|
+
process.stdout.write(`Receiz SDK CLI
|
|
186
|
+
|
|
187
|
+
Usage:
|
|
188
|
+
receiz inspect <path-to-proof-json>
|
|
189
|
+
receiz conformance
|
|
190
|
+
receiz init <target-dir>
|
|
191
|
+
|
|
192
|
+
This CLI uses local Receiz SDK validators, projections, and durable proof memory.
|
|
193
|
+
It does not make network or database calls for inspect or conformance.
|
|
194
|
+
`);
|
|
195
|
+
}
|
|
196
|
+
async function main(argv) {
|
|
197
|
+
const [command, ...args] = argv;
|
|
198
|
+
if (!command || command === "help" || command === "--help" || command === "-h") {
|
|
199
|
+
printHelp();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (command === "inspect") {
|
|
203
|
+
const path = args[0];
|
|
204
|
+
if (!path) {
|
|
205
|
+
printError("missing_path", "Usage: receiz inspect <path-to-proof-json>");
|
|
206
|
+
process.exitCode = 1;
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
printJson(await inspectProofObject(path));
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (command === "conformance") {
|
|
213
|
+
await runConformance();
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (command === "init") {
|
|
217
|
+
const targetDir = args[0];
|
|
218
|
+
if (!targetDir) {
|
|
219
|
+
printError("missing_target_dir", "Usage: receiz init <target-dir>");
|
|
220
|
+
process.exitCode = 1;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
writeStarter(resolve(targetDir));
|
|
224
|
+
printJson({
|
|
225
|
+
ok: true,
|
|
226
|
+
schema: "receiz.sdk.cli.init.v1",
|
|
227
|
+
targetDir: resolve(targetDir),
|
|
228
|
+
files: ["receiz-proof-memory.ts"],
|
|
229
|
+
});
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
printError("unknown_command", command);
|
|
233
|
+
process.exitCode = 1;
|
|
234
|
+
}
|
|
235
|
+
main(process.argv.slice(2)).catch((error) => {
|
|
236
|
+
printError("receiz_cli_failed", error instanceof Error ? error.message : String(error));
|
|
237
|
+
process.exitCode = 1;
|
|
238
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildReceizIdContinueRequest, createReceizIdIdentity, projectReceizIdentityAccount, readReceizIdentityArtifact, signReceizIdentityLoginProof, verifyReceizIdentityLoginProof, type ReceizDeviceIdentity, type ReceizIdContinueOptions } from "./identity.js";
|
|
2
2
|
export * from "./identity.js";
|
|
3
|
-
export declare const RECEIZ_SDK_VERSION = "
|
|
3
|
+
export declare const RECEIZ_SDK_VERSION = "96.0.0";
|
|
4
4
|
export declare const RECEIZ_DEFAULT_BASE_URL = "https://receiz.com";
|
|
5
5
|
export declare const RECEIZ_WEBHOOK_SIGNATURE_HEADER = "x-receiz-signature";
|
|
6
6
|
export declare const RECEIZ_WEBHOOK_TIMESTAMP_HEADER = "x-receiz-timestamp";
|
|
@@ -325,6 +325,41 @@ export type ReceizProofRegisterInput = ReceizProofRegisterSnapshot | {
|
|
|
325
325
|
createdAt?: string;
|
|
326
326
|
entries?: ReceizProofRegisterEntry[];
|
|
327
327
|
};
|
|
328
|
+
export type ReceizProofMemoryStorageValue = string | ReceizProofRegisterSnapshot | null | undefined;
|
|
329
|
+
export type ReceizProofMemoryStorage = {
|
|
330
|
+
read(): ReceizProofMemoryStorageValue | Promise<ReceizProofMemoryStorageValue>;
|
|
331
|
+
write(snapshot: ReceizProofRegisterSnapshot): void | Promise<void>;
|
|
332
|
+
remove?(): void | Promise<void>;
|
|
333
|
+
};
|
|
334
|
+
export type ReceizSdkObservation = {
|
|
335
|
+
schema: "receiz.sdk.observation.v1";
|
|
336
|
+
operation: "proof_memory.append" | "proof_memory.admit" | "proof_memory.persist" | "proof_memory.clear";
|
|
337
|
+
status: "ok" | "error";
|
|
338
|
+
startedAt: string;
|
|
339
|
+
endedAt: string;
|
|
340
|
+
durationMs: number;
|
|
341
|
+
ownerId: string | null;
|
|
342
|
+
entryCount: number;
|
|
343
|
+
headEntryId: string | null;
|
|
344
|
+
headKaiUpulse: string | number | null;
|
|
345
|
+
detail?: JsonObject;
|
|
346
|
+
};
|
|
347
|
+
export type ReceizSdkObserver = (observation: ReceizSdkObservation) => void;
|
|
348
|
+
export type ReceizProofMemoryOptions = ReceizProofRegisterInput & {
|
|
349
|
+
storage?: ReceizProofMemoryStorage;
|
|
350
|
+
autoPersist?: boolean;
|
|
351
|
+
onPersistError?: (error: unknown) => void;
|
|
352
|
+
onObservation?: ReceizSdkObserver;
|
|
353
|
+
};
|
|
354
|
+
export type ReceizProofMemoryAdditionsQuery = {
|
|
355
|
+
afterEntryId: string | null;
|
|
356
|
+
afterKaiUpulse: string | number | null;
|
|
357
|
+
afterCreatedAt: string | null;
|
|
358
|
+
limit?: number;
|
|
359
|
+
};
|
|
360
|
+
export type ReceizInMemoryProofMemoryStorage = ReceizProofMemoryStorage & {
|
|
361
|
+
readText(): string | null;
|
|
362
|
+
};
|
|
328
363
|
export declare const RECEIZ_ASSET_MANIFEST_SCHEMA: {
|
|
329
364
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
330
365
|
readonly $id: "https://receiz.com/standards/receiz.asset-manifest.schema.v1.json";
|
|
@@ -1008,6 +1043,11 @@ export declare class ReceizClient {
|
|
|
1008
1043
|
};
|
|
1009
1044
|
readonly proofMemory: {
|
|
1010
1045
|
createRegister: typeof createReceizProofRegister;
|
|
1046
|
+
createMemory: typeof createReceizProofMemory;
|
|
1047
|
+
createInMemoryStorage: typeof createReceizInMemoryProofMemoryStorage;
|
|
1048
|
+
createLocalStorage: typeof createReceizLocalStorageProofMemoryStorage;
|
|
1049
|
+
assertSnapshot: typeof assertReceizProofRegisterSnapshot;
|
|
1050
|
+
additionsQuery: typeof receizProofMemoryAdditionsQuery;
|
|
1011
1051
|
};
|
|
1012
1052
|
constructor(options?: ReceizClientOptions);
|
|
1013
1053
|
request<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
@@ -1043,12 +1083,14 @@ export declare function assertReceizWebhookEvent(value: unknown): ReceizWebhookE
|
|
|
1043
1083
|
export declare function isReceizWebhookEvent(value: unknown): value is ReceizWebhookEvent;
|
|
1044
1084
|
export declare function projectReceizAssetManifest(value: unknown): ReceizAssetManifestProjection;
|
|
1045
1085
|
export declare function projectReceizSportsCardManifest(value: unknown): ReceizSportsCardManifestProjection;
|
|
1086
|
+
export declare function assertReceizProofRegisterSnapshot(value: unknown): ReceizProofRegisterSnapshot;
|
|
1046
1087
|
export declare class ReceizProofRegister {
|
|
1047
1088
|
readonly ownerId: string | null;
|
|
1048
1089
|
readonly createdAt: string;
|
|
1049
1090
|
private readonly entriesById;
|
|
1050
1091
|
constructor(input?: ReceizProofRegisterInput);
|
|
1051
1092
|
append(entry: ReceizProofRegisterEntry): this;
|
|
1093
|
+
admit(value: unknown): this;
|
|
1052
1094
|
admitAssetManifest(value: unknown): this;
|
|
1053
1095
|
admitSportsCardManifest(value: unknown): this;
|
|
1054
1096
|
admitWebhookEvent(value: unknown): this;
|
|
@@ -1058,6 +1100,34 @@ export declare class ReceizProofRegister {
|
|
|
1058
1100
|
toJSON(): ReceizProofRegisterSnapshot;
|
|
1059
1101
|
}
|
|
1060
1102
|
export declare function createReceizProofRegister(input?: ReceizProofRegisterInput): ReceizProofRegister;
|
|
1103
|
+
export declare class ReceizProofMemory {
|
|
1104
|
+
readonly register: ReceizProofRegister;
|
|
1105
|
+
private readonly storage;
|
|
1106
|
+
private readonly autoPersist;
|
|
1107
|
+
private readonly onPersistError;
|
|
1108
|
+
private readonly onObservation;
|
|
1109
|
+
private persistChain;
|
|
1110
|
+
constructor(register: ReceizProofRegister, options?: Pick<ReceizProofMemoryOptions, "storage" | "autoPersist" | "onPersistError" | "onObservation">);
|
|
1111
|
+
append(entry: ReceizProofRegisterEntry): this;
|
|
1112
|
+
admit(value: unknown): this;
|
|
1113
|
+
admitAssetManifest(value: unknown): this;
|
|
1114
|
+
admitSportsCardManifest(value: unknown): this;
|
|
1115
|
+
admitWebhookEvent(value: unknown): this;
|
|
1116
|
+
has(entryId: string): boolean;
|
|
1117
|
+
entries(): ReceizProofRegisterEntry[];
|
|
1118
|
+
snapshot(): ReceizProofRegisterSnapshot;
|
|
1119
|
+
knownHead(limit?: number): ReceizProofMemoryAdditionsQuery;
|
|
1120
|
+
persist(): Promise<ReceizProofRegisterSnapshot>;
|
|
1121
|
+
flush(): Promise<void>;
|
|
1122
|
+
clear(): Promise<void>;
|
|
1123
|
+
toJSON(): ReceizProofRegisterSnapshot;
|
|
1124
|
+
private schedulePersist;
|
|
1125
|
+
private observe;
|
|
1126
|
+
}
|
|
1127
|
+
export declare function createReceizProofMemory(options?: ReceizProofMemoryOptions): Promise<ReceizProofMemory>;
|
|
1128
|
+
export declare function createReceizInMemoryProofMemoryStorage(initialValue?: ReceizProofMemoryStorageValue): ReceizInMemoryProofMemoryStorage;
|
|
1129
|
+
export declare function createReceizLocalStorageProofMemoryStorage(key?: string, storage?: Pick<Storage, "getItem" | "setItem" | "removeItem"> | null | undefined): ReceizProofMemoryStorage;
|
|
1130
|
+
export declare function receizProofMemoryAdditionsQuery(value: ReceizProofRegister | ReceizProofRegisterSnapshot | ReceizProofMemory, limit?: number): ReceizProofMemoryAdditionsQuery;
|
|
1061
1131
|
export declare function buildReceizWebhookSignaturePayload(input: {
|
|
1062
1132
|
timestamp: string;
|
|
1063
1133
|
body: string | ArrayBuffer | Uint8Array | JsonObject;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,E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BAA+B,CAC7C,KAAK,EAAE,mBAAmB,GAAG,2BAA2B,GAAG,iBAAiB,EAC5E,KAAK,CAAC,EAAE,MAAM,GACb,+BAA+B,CAYjC;AASD,wBAAgB,kCAAkC,CAAC,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAA;CAAE,GAAG,MAAM,CAE7I;AAuCD,wBAAsB,4BAA4B,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAGtG;AAED,wBAAsB,4BAA4B,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CASpG"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildReceizIdContinueRequest, createReceizIdIdentity, projectReceizIdentityAccount, readReceizIdentityArtifact, signReceizIdentityLoginProof, verifyReceizIdentityLoginProof, } from "./identity.js";
|
|
2
2
|
export * from "./identity.js";
|
|
3
|
-
export const RECEIZ_SDK_VERSION = "
|
|
3
|
+
export const RECEIZ_SDK_VERSION = "96.0.0";
|
|
4
4
|
export const RECEIZ_DEFAULT_BASE_URL = "https://receiz.com";
|
|
5
5
|
export const RECEIZ_WEBHOOK_SIGNATURE_HEADER = "x-receiz-signature";
|
|
6
6
|
export const RECEIZ_WEBHOOK_TIMESTAMP_HEADER = "x-receiz-timestamp";
|
|
@@ -425,6 +425,11 @@ export class ReceizClient {
|
|
|
425
425
|
};
|
|
426
426
|
proofMemory = {
|
|
427
427
|
createRegister: createReceizProofRegister,
|
|
428
|
+
createMemory: createReceizProofMemory,
|
|
429
|
+
createInMemoryStorage: createReceizInMemoryProofMemoryStorage,
|
|
430
|
+
createLocalStorage: createReceizLocalStorageProofMemoryStorage,
|
|
431
|
+
assertSnapshot: assertReceizProofRegisterSnapshot,
|
|
432
|
+
additionsQuery: receizProofMemoryAdditionsQuery,
|
|
428
433
|
};
|
|
429
434
|
constructor(options = {}) {
|
|
430
435
|
this.baseUrl = trimTrailingSlash(options.baseUrl ?? RECEIZ_DEFAULT_BASE_URL);
|
|
@@ -863,6 +868,67 @@ function normalizeRegisterEntry(value) {
|
|
|
863
868
|
projection: isRecord(projection) ? projection : null,
|
|
864
869
|
};
|
|
865
870
|
}
|
|
871
|
+
export function assertReceizProofRegisterSnapshot(value) {
|
|
872
|
+
const record = ensureRecord(value, "ReceizProofRegisterSnapshot");
|
|
873
|
+
const issues = [];
|
|
874
|
+
if (record.schema !== "receiz.sdk.proof_register.v1")
|
|
875
|
+
issues.push("schema must be receiz.sdk.proof_register.v1");
|
|
876
|
+
const ownerId = record.ownerId;
|
|
877
|
+
if (ownerId !== null && ownerId !== undefined && typeof ownerId !== "string") {
|
|
878
|
+
issues.push("ownerId must be a string or null when present");
|
|
879
|
+
}
|
|
880
|
+
const createdAt = ensureString(record, "createdAt", issues);
|
|
881
|
+
const updatedAt = ensureString(record, "updatedAt", issues);
|
|
882
|
+
const head = record.head;
|
|
883
|
+
if (!isRecord(head)) {
|
|
884
|
+
issues.push("head must be an object");
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
const entryId = head.entryId;
|
|
888
|
+
if (entryId !== null && entryId !== undefined && typeof entryId !== "string") {
|
|
889
|
+
issues.push("head.entryId must be a string or null");
|
|
890
|
+
}
|
|
891
|
+
const kaiUpulse = head.kaiUpulse;
|
|
892
|
+
if (kaiUpulse !== null && kaiUpulse !== undefined && typeof kaiUpulse !== "string" && typeof kaiUpulse !== "number") {
|
|
893
|
+
issues.push("head.kaiUpulse must be a string, number, or null");
|
|
894
|
+
}
|
|
895
|
+
const headCreatedAt = head.createdAt;
|
|
896
|
+
if (headCreatedAt !== null && headCreatedAt !== undefined && typeof headCreatedAt !== "string") {
|
|
897
|
+
issues.push("head.createdAt must be a string or null");
|
|
898
|
+
}
|
|
899
|
+
if (typeof head.count !== "number" || !Number.isInteger(head.count) || head.count < 0) {
|
|
900
|
+
issues.push("head.count must be a non-negative integer");
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
if (!Array.isArray(record.entries))
|
|
904
|
+
issues.push("entries must be an array");
|
|
905
|
+
failIfIssues("ReceizProofRegisterSnapshot", issues);
|
|
906
|
+
const entries = record.entries.map((entry) => normalizeRegisterEntry(entry));
|
|
907
|
+
return {
|
|
908
|
+
schema: "receiz.sdk.proof_register.v1",
|
|
909
|
+
ownerId: typeof ownerId === "string" || ownerId === null ? ownerId : null,
|
|
910
|
+
createdAt: createdAt ?? "",
|
|
911
|
+
updatedAt: updatedAt ?? "",
|
|
912
|
+
head: {
|
|
913
|
+
entryId: isRecord(head) && typeof head.entryId === "string" ? head.entryId : null,
|
|
914
|
+
kaiUpulse: isRecord(head) && (typeof head.kaiUpulse === "string" || typeof head.kaiUpulse === "number") ? head.kaiUpulse : null,
|
|
915
|
+
createdAt: isRecord(head) && typeof head.createdAt === "string" ? head.createdAt : null,
|
|
916
|
+
count: isRecord(head) && typeof head.count === "number" ? head.count : entries.length,
|
|
917
|
+
},
|
|
918
|
+
entries,
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function parseProofMemoryStorageValue(value) {
|
|
922
|
+
if (value === null || value === undefined)
|
|
923
|
+
return null;
|
|
924
|
+
if (typeof value === "string") {
|
|
925
|
+
const trimmed = value.trim();
|
|
926
|
+
if (!trimmed)
|
|
927
|
+
return null;
|
|
928
|
+
return assertReceizProofRegisterSnapshot(JSON.parse(trimmed));
|
|
929
|
+
}
|
|
930
|
+
return assertReceizProofRegisterSnapshot(value);
|
|
931
|
+
}
|
|
866
932
|
function mergeRegisterEntry(existing, incoming) {
|
|
867
933
|
return {
|
|
868
934
|
id: existing.id,
|
|
@@ -922,6 +988,11 @@ function registerEntryFromWebhookEvent(event) {
|
|
|
922
988
|
},
|
|
923
989
|
};
|
|
924
990
|
}
|
|
991
|
+
function errorDetail(error) {
|
|
992
|
+
if (error instanceof Error)
|
|
993
|
+
return { name: error.name, message: error.message };
|
|
994
|
+
return { message: String(error) };
|
|
995
|
+
}
|
|
925
996
|
export class ReceizProofRegister {
|
|
926
997
|
ownerId;
|
|
927
998
|
createdAt;
|
|
@@ -938,6 +1009,16 @@ export class ReceizProofRegister {
|
|
|
938
1009
|
this.entriesById.set(normalized.id, existing ? mergeRegisterEntry(existing, normalized) : normalized);
|
|
939
1010
|
return this;
|
|
940
1011
|
}
|
|
1012
|
+
admit(value) {
|
|
1013
|
+
if (isReceizAssetManifest(value))
|
|
1014
|
+
return this.admitAssetManifest(value);
|
|
1015
|
+
if (isReceizSportsCardManifest(value))
|
|
1016
|
+
return this.admitSportsCardManifest(value);
|
|
1017
|
+
if (isReceizWebhookEvent(value))
|
|
1018
|
+
return this.admitWebhookEvent(value);
|
|
1019
|
+
const schema = isRecord(value) && typeof value.schema === "string" ? value.schema : "unknown";
|
|
1020
|
+
throw new ReceizValidationError("ReceizProofAdmission", [`unsupported proof object schema ${schema}`]);
|
|
1021
|
+
}
|
|
941
1022
|
admitAssetManifest(value) {
|
|
942
1023
|
return this.append(registerEntryFromAssetManifest(assertReceizAssetManifest(value)));
|
|
943
1024
|
}
|
|
@@ -977,6 +1058,193 @@ export class ReceizProofRegister {
|
|
|
977
1058
|
export function createReceizProofRegister(input = {}) {
|
|
978
1059
|
return new ReceizProofRegister(input);
|
|
979
1060
|
}
|
|
1061
|
+
export class ReceizProofMemory {
|
|
1062
|
+
register;
|
|
1063
|
+
storage;
|
|
1064
|
+
autoPersist;
|
|
1065
|
+
onPersistError;
|
|
1066
|
+
onObservation;
|
|
1067
|
+
persistChain = Promise.resolve();
|
|
1068
|
+
constructor(register, options = {}) {
|
|
1069
|
+
this.register = register;
|
|
1070
|
+
this.storage = options.storage ?? null;
|
|
1071
|
+
this.autoPersist = options.autoPersist ?? true;
|
|
1072
|
+
this.onPersistError = options.onPersistError ?? null;
|
|
1073
|
+
this.onObservation = options.onObservation ?? null;
|
|
1074
|
+
}
|
|
1075
|
+
append(entry) {
|
|
1076
|
+
const startedAtMs = Date.now();
|
|
1077
|
+
try {
|
|
1078
|
+
this.register.append(entry);
|
|
1079
|
+
this.observe("proof_memory.append", startedAtMs, "ok");
|
|
1080
|
+
return this.schedulePersist();
|
|
1081
|
+
}
|
|
1082
|
+
catch (error) {
|
|
1083
|
+
this.observe("proof_memory.append", startedAtMs, "error", errorDetail(error));
|
|
1084
|
+
throw error;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
admit(value) {
|
|
1088
|
+
const startedAtMs = Date.now();
|
|
1089
|
+
try {
|
|
1090
|
+
this.register.admit(value);
|
|
1091
|
+
this.observe("proof_memory.admit", startedAtMs, "ok");
|
|
1092
|
+
return this.schedulePersist();
|
|
1093
|
+
}
|
|
1094
|
+
catch (error) {
|
|
1095
|
+
this.observe("proof_memory.admit", startedAtMs, "error", errorDetail(error));
|
|
1096
|
+
throw error;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
admitAssetManifest(value) {
|
|
1100
|
+
return this.admit(value);
|
|
1101
|
+
}
|
|
1102
|
+
admitSportsCardManifest(value) {
|
|
1103
|
+
return this.admit(value);
|
|
1104
|
+
}
|
|
1105
|
+
admitWebhookEvent(value) {
|
|
1106
|
+
return this.admit(value);
|
|
1107
|
+
}
|
|
1108
|
+
has(entryId) {
|
|
1109
|
+
return this.register.has(entryId);
|
|
1110
|
+
}
|
|
1111
|
+
entries() {
|
|
1112
|
+
return this.register.entries();
|
|
1113
|
+
}
|
|
1114
|
+
snapshot() {
|
|
1115
|
+
return this.register.snapshot();
|
|
1116
|
+
}
|
|
1117
|
+
knownHead(limit) {
|
|
1118
|
+
return receizProofMemoryAdditionsQuery(this.snapshot(), limit);
|
|
1119
|
+
}
|
|
1120
|
+
async persist() {
|
|
1121
|
+
const startedAtMs = Date.now();
|
|
1122
|
+
try {
|
|
1123
|
+
const snapshot = this.snapshot();
|
|
1124
|
+
if (this.storage)
|
|
1125
|
+
await this.storage.write(snapshot);
|
|
1126
|
+
this.observe("proof_memory.persist", startedAtMs, "ok", { persisted: Boolean(this.storage) });
|
|
1127
|
+
return snapshot;
|
|
1128
|
+
}
|
|
1129
|
+
catch (error) {
|
|
1130
|
+
this.observe("proof_memory.persist", startedAtMs, "error", errorDetail(error));
|
|
1131
|
+
throw error;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
async flush() {
|
|
1135
|
+
await this.persistChain;
|
|
1136
|
+
}
|
|
1137
|
+
async clear() {
|
|
1138
|
+
const startedAtMs = Date.now();
|
|
1139
|
+
try {
|
|
1140
|
+
if (this.storage?.remove)
|
|
1141
|
+
await this.storage.remove();
|
|
1142
|
+
this.observe("proof_memory.clear", startedAtMs, "ok", { removed: Boolean(this.storage?.remove) });
|
|
1143
|
+
}
|
|
1144
|
+
catch (error) {
|
|
1145
|
+
this.observe("proof_memory.clear", startedAtMs, "error", errorDetail(error));
|
|
1146
|
+
throw error;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
toJSON() {
|
|
1150
|
+
return this.snapshot();
|
|
1151
|
+
}
|
|
1152
|
+
schedulePersist() {
|
|
1153
|
+
if (!this.autoPersist || !this.storage)
|
|
1154
|
+
return this;
|
|
1155
|
+
this.persistChain = this.persistChain
|
|
1156
|
+
.then(async () => {
|
|
1157
|
+
await this.persist();
|
|
1158
|
+
})
|
|
1159
|
+
.catch((error) => {
|
|
1160
|
+
this.onPersistError?.(error);
|
|
1161
|
+
});
|
|
1162
|
+
return this;
|
|
1163
|
+
}
|
|
1164
|
+
observe(operation, startedAtMs, status, detail) {
|
|
1165
|
+
if (!this.onObservation)
|
|
1166
|
+
return;
|
|
1167
|
+
const endedAtMs = Date.now();
|
|
1168
|
+
const snapshot = this.snapshot();
|
|
1169
|
+
const observation = {
|
|
1170
|
+
schema: "receiz.sdk.observation.v1",
|
|
1171
|
+
operation,
|
|
1172
|
+
status,
|
|
1173
|
+
startedAt: new Date(startedAtMs).toISOString(),
|
|
1174
|
+
endedAt: new Date(endedAtMs).toISOString(),
|
|
1175
|
+
durationMs: Math.max(0, endedAtMs - startedAtMs),
|
|
1176
|
+
ownerId: this.register.ownerId,
|
|
1177
|
+
entryCount: snapshot.head.count,
|
|
1178
|
+
headEntryId: snapshot.head.entryId,
|
|
1179
|
+
headKaiUpulse: snapshot.head.kaiUpulse,
|
|
1180
|
+
};
|
|
1181
|
+
if (detail)
|
|
1182
|
+
observation.detail = detail;
|
|
1183
|
+
try {
|
|
1184
|
+
this.onObservation(observation);
|
|
1185
|
+
}
|
|
1186
|
+
catch {
|
|
1187
|
+
// Observation callbacks are passive evidence only; they must never affect proof admission.
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
export async function createReceizProofMemory(options = {}) {
|
|
1192
|
+
const storedSnapshot = options.storage ? parseProofMemoryStorageValue(await options.storage.read()) : null;
|
|
1193
|
+
const input = storedSnapshot
|
|
1194
|
+
? {
|
|
1195
|
+
...storedSnapshot,
|
|
1196
|
+
ownerId: options.ownerId ?? storedSnapshot.ownerId ?? null,
|
|
1197
|
+
}
|
|
1198
|
+
: {
|
|
1199
|
+
ownerId: options.ownerId ?? null,
|
|
1200
|
+
...(options.createdAt === undefined ? {} : { createdAt: options.createdAt }),
|
|
1201
|
+
...(options.entries === undefined ? {} : { entries: options.entries }),
|
|
1202
|
+
};
|
|
1203
|
+
return new ReceizProofMemory(createReceizProofRegister(input), options);
|
|
1204
|
+
}
|
|
1205
|
+
export function createReceizInMemoryProofMemoryStorage(initialValue = null) {
|
|
1206
|
+
let storedText = typeof initialValue === "string"
|
|
1207
|
+
? initialValue
|
|
1208
|
+
: initialValue
|
|
1209
|
+
? JSON.stringify(assertReceizProofRegisterSnapshot(initialValue))
|
|
1210
|
+
: null;
|
|
1211
|
+
return {
|
|
1212
|
+
read: () => storedText,
|
|
1213
|
+
write: (snapshot) => {
|
|
1214
|
+
storedText = JSON.stringify(assertReceizProofRegisterSnapshot(snapshot));
|
|
1215
|
+
},
|
|
1216
|
+
remove: () => {
|
|
1217
|
+
storedText = null;
|
|
1218
|
+
},
|
|
1219
|
+
readText: () => storedText,
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
export function createReceizLocalStorageProofMemoryStorage(key = "receiz:proof-memory:v1", storage = globalThis.localStorage) {
|
|
1223
|
+
if (!storage)
|
|
1224
|
+
throw new Error("receiz_local_storage_unavailable");
|
|
1225
|
+
return {
|
|
1226
|
+
read: () => storage.getItem(key),
|
|
1227
|
+
write: (snapshot) => {
|
|
1228
|
+
storage.setItem(key, JSON.stringify(assertReceizProofRegisterSnapshot(snapshot)));
|
|
1229
|
+
},
|
|
1230
|
+
remove: () => {
|
|
1231
|
+
storage.removeItem(key);
|
|
1232
|
+
},
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
export function receizProofMemoryAdditionsQuery(value, limit) {
|
|
1236
|
+
const snapshot = value instanceof ReceizProofRegister
|
|
1237
|
+
? value.snapshot()
|
|
1238
|
+
: value instanceof ReceizProofMemory
|
|
1239
|
+
? value.snapshot()
|
|
1240
|
+
: assertReceizProofRegisterSnapshot(value);
|
|
1241
|
+
return {
|
|
1242
|
+
afterEntryId: snapshot.head.entryId,
|
|
1243
|
+
afterKaiUpulse: snapshot.head.kaiUpulse,
|
|
1244
|
+
afterCreatedAt: snapshot.head.createdAt,
|
|
1245
|
+
...(limit === undefined ? {} : { limit }),
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
980
1248
|
function bodyToString(body) {
|
|
981
1249
|
if (typeof body === "string")
|
|
982
1250
|
return body;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# CLI And Local Conformance
|
|
2
|
+
|
|
3
|
+
The Receiz SDK ships an executable `receiz` command for local proof inspection, fixture conformance, and starter generation.
|
|
4
|
+
|
|
5
|
+
The CLI is convenience, not authority. It uses the same SDK validators, projections, and durable proof memory APIs that developer apps import from `@receiz/sdk`. It does not create a new conformance system, issuer, verifier, server confirmation, database confirmation, or truth layer.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @receiz/sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Run without a local install:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @receiz/sdk conformance
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Run Local Fixture Conformance
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @receiz/sdk conformance
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This validates the packaged fixtures:
|
|
26
|
+
|
|
27
|
+
- `receiz.asset_manifest.v1`
|
|
28
|
+
- `receiz.sports_arena.card_manifest.v1`
|
|
29
|
+
- `receiz.webhook_event.v1`
|
|
30
|
+
|
|
31
|
+
Each fixture is admitted into durable proof memory, persisted through the same storage interface developer apps use, reopened from the stored proof register, and summarized with its known Kai/proof head.
|
|
32
|
+
|
|
33
|
+
Expected shape:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"ok": true,
|
|
38
|
+
"schema": "receiz.sdk.cli.conformance.v1",
|
|
39
|
+
"summary": {
|
|
40
|
+
"fixtures": 3,
|
|
41
|
+
"proofMemoryEntries": 3,
|
|
42
|
+
"networkCalls": 0,
|
|
43
|
+
"dbCalls": 0
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`networkCalls` and `dbCalls` are zero by design. Local conformance proves the SDK can admit and project proof objects from carried truth without asking a weaker layer whether the proof is true.
|
|
49
|
+
|
|
50
|
+
## Inspect A Proof Payload
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx @receiz/sdk inspect ./receiz-asset-manifest.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The command validates one JSON payload, projects display-ready rows, admits the payload into in-memory proof memory, and prints the known head:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"ok": true,
|
|
61
|
+
"schema": "receiz.sdk.cli.inspect.v1",
|
|
62
|
+
"kind": "asset_manifest",
|
|
63
|
+
"knownHead": {
|
|
64
|
+
"afterEntryId": "asset:asset_example_01JZ_RECEIZ",
|
|
65
|
+
"afterKaiUpulse": "123456",
|
|
66
|
+
"afterCreatedAt": "2026-06-25T00:00:00.000Z",
|
|
67
|
+
"limit": 100
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The known head is the append-sync boundary. Your app asks for verified additions after this head; it does not rediscover the admitted prefix.
|
|
73
|
+
|
|
74
|
+
## Generate A Starter
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx @receiz/sdk init ./receiz-integration
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This writes:
|
|
81
|
+
|
|
82
|
+
```txt
|
|
83
|
+
receiz-proof-memory.ts
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The starter:
|
|
87
|
+
|
|
88
|
+
- opens durable proof memory through `createReceizProofMemory`
|
|
89
|
+
- persists through `createReceizLocalStorageProofMemoryStorage`
|
|
90
|
+
- admits asset manifests, Sports card manifests, and webhook events
|
|
91
|
+
- projects proof objects immediately after admission
|
|
92
|
+
- exposes `knownHead()` for append-only sync
|
|
93
|
+
|
|
94
|
+
It does not include Supabase, service-role keys, or a parallel source of truth.
|
|
95
|
+
|
|
96
|
+
## Production Rule
|
|
97
|
+
|
|
98
|
+
Use the CLI to prove your local integration shape, then use the typed SDK APIs in your app:
|
|
99
|
+
|
|
100
|
+
1. Verify stronger proof truth when bytes come from an untrusted transport.
|
|
101
|
+
2. Validate the manifest or event shape.
|
|
102
|
+
3. Project display-ready rows from the verified object.
|
|
103
|
+
4. Admit the proof object into durable proof memory.
|
|
104
|
+
5. Persist the proof memory snapshot.
|
|
105
|
+
6. Resume from the known Kai/proof head.
|
|
106
|
+
7. Append later verified additions without rediscovering known truth.
|
|
107
|
+
|
|
108
|
+
That is the same law Receiz uses internally: first admission only, then append forever.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Copy-Paste Integrations
|
|
2
|
+
|
|
3
|
+
These examples are intentionally small. They let a developer build with Receiz proof objects without inventing a parallel authority model.
|
|
4
|
+
|
|
5
|
+
The rule is the same in every example:
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
verify or validate carried proof truth -> project immediately -> admit into durable proof memory -> sync verified additions after knownHead
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The SDK is convenience, not authority. Proof objects, verified appends, ownership appends, settlement rows, and identity artifacts remain stronger truth.
|
|
12
|
+
|
|
13
|
+
## React Hook: `useReceizProofMemory`
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { useEffect, useMemo, useState } from "react";
|
|
17
|
+
import {
|
|
18
|
+
createReceizLocalStorageProofMemoryStorage,
|
|
19
|
+
createReceizProofMemory,
|
|
20
|
+
type ReceizProofMemory,
|
|
21
|
+
type ReceizSdkObservation,
|
|
22
|
+
} from "@receiz/sdk";
|
|
23
|
+
|
|
24
|
+
export function useReceizProofMemory(ownerId: string) {
|
|
25
|
+
const [memory, setMemory] = useState<ReceizProofMemory | null>(null);
|
|
26
|
+
const [observations, setObservations] = useState<ReceizSdkObservation[]>([]);
|
|
27
|
+
|
|
28
|
+
const storageKey = useMemo(() => `receiz:proof-memory:${ownerId}:v1`, [ownerId]);
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
let active = true;
|
|
32
|
+
|
|
33
|
+
void createReceizProofMemory({
|
|
34
|
+
ownerId,
|
|
35
|
+
storage: createReceizLocalStorageProofMemoryStorage(storageKey),
|
|
36
|
+
onObservation: (observation) => {
|
|
37
|
+
setObservations((current) => [...current.slice(-24), observation]);
|
|
38
|
+
},
|
|
39
|
+
}).then((opened) => {
|
|
40
|
+
if (active) setMemory(opened);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return () => {
|
|
44
|
+
active = false;
|
|
45
|
+
};
|
|
46
|
+
}, [ownerId, storageKey]);
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
memory,
|
|
50
|
+
observations,
|
|
51
|
+
entries: memory?.entries() ?? [],
|
|
52
|
+
knownHead: memory?.knownHead(100) ?? null,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `entries` for immediate first paint. Use `knownHead` for append-only sync. Do not ask the server whether those entries are still true.
|
|
58
|
+
|
|
59
|
+
## Browser Proof Object Admission
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import {
|
|
63
|
+
assertReceizAssetManifest,
|
|
64
|
+
createReceizLocalStorageProofMemoryStorage,
|
|
65
|
+
createReceizProofMemory,
|
|
66
|
+
projectReceizAssetManifest,
|
|
67
|
+
} from "@receiz/sdk";
|
|
68
|
+
|
|
69
|
+
const memory = await createReceizProofMemory({
|
|
70
|
+
ownerId: "workspace-or-user-id",
|
|
71
|
+
storage: createReceizLocalStorageProofMemoryStorage("receiz:proof-memory:v1"),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export async function admitAssetManifest(value: unknown) {
|
|
75
|
+
const manifest = assertReceizAssetManifest(value);
|
|
76
|
+
const projection = projectReceizAssetManifest(manifest);
|
|
77
|
+
|
|
78
|
+
memory.admitAssetManifest(manifest);
|
|
79
|
+
await memory.flush();
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
projection,
|
|
83
|
+
knownHead: memory.knownHead(100),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This is not cache. The persisted register is admitted proof memory.
|
|
89
|
+
|
|
90
|
+
## Next Route: Append Sync After Known Head
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import { createReceizClient } from "@receiz/sdk";
|
|
94
|
+
|
|
95
|
+
export async function GET(request: Request) {
|
|
96
|
+
const url = new URL(request.url);
|
|
97
|
+
const afterKaiUpulse = url.searchParams.get("afterKaiUpulse");
|
|
98
|
+
const afterEntryId = url.searchParams.get("afterEntryId");
|
|
99
|
+
|
|
100
|
+
const receiz = createReceizClient({
|
|
101
|
+
accessToken: process.env.RECEIZ_CONNECT_ACCESS_TOKEN,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const ledger = await receiz.wallet.publicLedger({
|
|
105
|
+
limit: 100,
|
|
106
|
+
cursor: afterEntryId ?? undefined,
|
|
107
|
+
since: afterKaiUpulse ?? undefined,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return Response.json({
|
|
111
|
+
ok: true,
|
|
112
|
+
additions: ledger.events,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Use this as transport. Do not let this route replace local proof memory. It only returns possible additions.
|
|
118
|
+
|
|
119
|
+
## Webhook Receiver
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
import {
|
|
123
|
+
assertReceizWebhookEvent,
|
|
124
|
+
createReceizProofMemory,
|
|
125
|
+
createReceizLocalStorageProofMemoryStorage,
|
|
126
|
+
verifyReceizWebhookSignature,
|
|
127
|
+
} from "@receiz/sdk";
|
|
128
|
+
|
|
129
|
+
export async function receiveReceizWebhook(request: Request) {
|
|
130
|
+
const body = await request.text();
|
|
131
|
+
const signature = request.headers.get("x-receiz-signature") ?? "";
|
|
132
|
+
const timestamp = request.headers.get("x-receiz-timestamp") ?? "";
|
|
133
|
+
|
|
134
|
+
const ok = await verifyReceizWebhookSignature({
|
|
135
|
+
secret: process.env.RECEIZ_WEBHOOK_SECRET!,
|
|
136
|
+
timestamp,
|
|
137
|
+
signature,
|
|
138
|
+
body,
|
|
139
|
+
toleranceSeconds: 300,
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
if (!ok) return new Response("invalid signature", { status: 401 });
|
|
143
|
+
|
|
144
|
+
const event = assertReceizWebhookEvent(JSON.parse(body));
|
|
145
|
+
const memory = await createReceizProofMemory({
|
|
146
|
+
ownerId: "webhook-worker",
|
|
147
|
+
storage: createReceizLocalStorageProofMemoryStorage("receiz:webhook-proof-memory:v1"),
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
memory.admitWebhookEvent(event);
|
|
151
|
+
await memory.flush();
|
|
152
|
+
|
|
153
|
+
return Response.json({
|
|
154
|
+
ok: true,
|
|
155
|
+
knownHead: memory.knownHead(100),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Webhook signatures verify delivery. They do not become stronger than the proof bundle or append payload being admitted.
|
|
161
|
+
|
|
162
|
+
## Sports Card Renderer
|
|
163
|
+
|
|
164
|
+
This Sports card renderer keeps the proof object together while giving React developers a direct display component.
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import {
|
|
168
|
+
assertReceizSportsCardManifest,
|
|
169
|
+
projectReceizSportsCardManifest,
|
|
170
|
+
} from "@receiz/sdk";
|
|
171
|
+
|
|
172
|
+
export function SportsCardProof({ manifestJson }: { manifestJson: unknown }) {
|
|
173
|
+
const manifest = assertReceizSportsCardManifest(manifestJson);
|
|
174
|
+
const projection = projectReceizSportsCardManifest(manifest);
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<article>
|
|
178
|
+
<img src={projection.mediaUrl ?? ""} alt={projection.title} />
|
|
179
|
+
<h2>{projection.title}</h2>
|
|
180
|
+
<p>{projection.scoreLabel}</p>
|
|
181
|
+
<a href={projection.verifyUrl ?? manifest.links.proof}>Verify proof</a>
|
|
182
|
+
<dl>
|
|
183
|
+
{projection.rows.map((row) => (
|
|
184
|
+
<div key={row.label}>
|
|
185
|
+
<dt>{row.label}</dt>
|
|
186
|
+
<dd>{row.href ? <a href={row.href}>{row.value}</a> : row.value}</dd>
|
|
187
|
+
</div>
|
|
188
|
+
))}
|
|
189
|
+
</dl>
|
|
190
|
+
</article>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Keep card identity, claim hash, ownership, value basis, append summary, and event proof summary together. They are one proof object projection.
|
|
196
|
+
|
|
197
|
+
## Local CLI Proof
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
npx @receiz/sdk conformance
|
|
201
|
+
npx @receiz/sdk inspect ./receiz-asset-manifest.json
|
|
202
|
+
npx @receiz/sdk init ./receiz-integration
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
These commands prove the SDK can admit and project carried Receiz proof truth without network or database authority.
|
|
@@ -54,26 +54,42 @@ The projection keeps card identity, claim hash, ownership, value basis, append s
|
|
|
54
54
|
## Admit Once, Append Forever
|
|
55
55
|
|
|
56
56
|
```ts
|
|
57
|
-
import {
|
|
57
|
+
import {
|
|
58
|
+
createReceizLocalStorageProofMemoryStorage,
|
|
59
|
+
createReceizProofMemory,
|
|
60
|
+
} from "@receiz/sdk";
|
|
58
61
|
|
|
59
|
-
const memory =
|
|
62
|
+
const memory = await createReceizProofMemory({
|
|
63
|
+
ownerId: currentUserId,
|
|
64
|
+
storage: createReceizLocalStorageProofMemoryStorage(`receiz:${currentUserId}:proof-memory`),
|
|
65
|
+
});
|
|
60
66
|
|
|
61
67
|
memory.admitAssetManifest(assetManifest);
|
|
62
68
|
memory.admitSportsCardManifest(cardManifest);
|
|
63
69
|
memory.admitWebhookEvent(webhookEvent);
|
|
64
70
|
|
|
65
|
-
|
|
71
|
+
await memory.flush();
|
|
66
72
|
```
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
The storage adapter only persists already-admitted truth. It does not verify, mint, rewrite, or outrank the proof object. On next open, the same call reopens the stored register and you render it immediately:
|
|
69
75
|
|
|
70
76
|
```ts
|
|
71
|
-
const memory =
|
|
77
|
+
const memory = await createReceizProofMemory({
|
|
78
|
+
ownerId: currentUserId,
|
|
79
|
+
storage: createReceizLocalStorageProofMemoryStorage(`receiz:${currentUserId}:proof-memory`),
|
|
80
|
+
});
|
|
81
|
+
|
|
72
82
|
const knownTruth = memory.entries();
|
|
73
83
|
```
|
|
74
84
|
|
|
75
85
|
Then ask Receiz for verified additions after your known head. Do not ask whether known proof is still true.
|
|
76
86
|
|
|
87
|
+
```ts
|
|
88
|
+
const after = memory.knownHead(50);
|
|
89
|
+
|
|
90
|
+
await fetch(`/api/receiz/additions?afterKaiUpulse=${after.afterKaiUpulse ?? ""}`);
|
|
91
|
+
```
|
|
92
|
+
|
|
77
93
|
## Receiz Account Restore Boundary
|
|
78
94
|
|
|
79
95
|
Receiz Key, Identity Record, and Identity Seal restore use the same law inside Receiz itself. Current restore artifacts carry `receiz.account.state.v3`, which includes profile/account state, action ledger, calendar events, wallet settlement rows and notes, Sports vault cards, pack purchases, card appends, event proofs, entries, competitions, and tournament state.
|
|
@@ -95,6 +111,23 @@ const retained = memory.snapshot().entries[0];
|
|
|
95
111
|
|
|
96
112
|
This is intentional. Receiz proof memory is not `newest response wins`.
|
|
97
113
|
|
|
114
|
+
## Storage Adapters
|
|
115
|
+
|
|
116
|
+
Browser apps can use `createReceizLocalStorageProofMemoryStorage()`. Server-rendered or test environments can provide the same small interface:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { createReceizProofMemory, type ReceizProofMemoryStorage } from "@receiz/sdk";
|
|
120
|
+
|
|
121
|
+
const storage: ReceizProofMemoryStorage = {
|
|
122
|
+
read: async () => durableStore.get("proof-memory"),
|
|
123
|
+
write: async (snapshot) => durableStore.set("proof-memory", JSON.stringify(snapshot)),
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const memory = await createReceizProofMemory({ storage });
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
For tests and demos, use `createReceizInMemoryProofMemoryStorage()`.
|
|
130
|
+
|
|
98
131
|
## Runtime Schema Exports
|
|
99
132
|
|
|
100
133
|
```ts
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receiz/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "96.0.0",
|
|
4
4
|
"description": "TypeScript SDK for Receiz proof-native artifact, public proof, wallet, sports, and Connect integrations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"receiz": "./dist/cli.js"
|
|
10
|
+
},
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
13
|
"types": "./dist/index.d.ts",
|