@uvrn/adapter 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +36 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -50,7 +50,43 @@ const extracted = extractDeltaReceipt(drvc3);
50
50
  - **Interop with DRVC3 systems** — Produce standard DRVC3 envelopes that other tools can validate and parse.
51
51
  - **Audit and provenance** — Keep the core receipt hash unchanged while adding issuer and timestamp in the envelope.
52
52
 
53
+ ## DRVC3 customization
54
+
55
+ ### What you can customize
56
+
57
+ You can set these options when wrapping a receipt (no code changes to this package):
58
+
59
+ - **issuer** — Your service or org name (e.g. `'my-app'`, `'acme-corp'`).
60
+ - **event** — Event type (e.g. `'delta-reconciliation'`, `'price-attestation'`).
61
+ - **certificate** — Version or brand string (default `'DRVC3 v1.01'`; you can use e.g. `'MyCorp Receipt v1'`).
62
+ - **description**, **resource**, **replay_instructions**, **tags** — Optional metadata.
63
+ - **extensions** — Arbitrary key-value object for your own metadata (provenance, evidence links, etc.).
64
+
65
+ Example:
66
+
67
+ ```typescript
68
+ const drvc3 = await wrapInDRVC3(receipt, wallet, {
69
+ issuer: 'acme-corp',
70
+ event: 'price-attestation',
71
+ certificate: 'Acme Receipt v1',
72
+ extensions: { source: 'https://acme.com/feed', region: 'us-east' },
73
+ });
74
+ ```
75
+
76
+ ### What is fixed
77
+
78
+ The envelope **structure** is defined by the bundled DRVC3 schema (`schemas/drvc3.schema.json`). Required fields (e.g. `receipt_id`, `issuer`, `event`, `timestamp`, `integrity`, `block_state`, `certificate`, `validation.checks.delta_receipt`) cannot be changed when using `validateDRVC3`. There is no option to pass a different schema.
79
+
80
+ ### Using a different envelope format
81
+
82
+ If you need a completely different envelope spec:
83
+
84
+ - **Fork this package** — Change the types, schema, wrapper, and validator in your own package and publish under your own scope.
85
+ - **Skip DRVC3** — Use `@uvrn/core` (and optionally `@uvrn/sdk`) only; build your own envelope format and signing/validation on top of the core receipt.
86
+
53
87
  ## Links
54
88
 
89
+ **Open source:** Source code and issues: [GitHub (uvrn-packages)](https://github.com/UVRN-org/uvrn-packages). Project landing: [UVRN](https://github.com/UVRN-org/uvrn).
90
+
55
91
  - [Repository](https://github.com/UVRN-org/uvrn-packages) — monorepo (this package: `uvrn-adapter`)
56
92
  - [@uvrn/core](https://www.npmjs.com/package/@uvrn/core) — Delta Engine core (produces the receipts this adapter wraps)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uvrn/adapter",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "UVRN DRVC3 envelope adapter — wraps core receipts with EIP-191 signatures",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "ethers": "^6.0.0",
22
22
  "ajv": "^8.12.0",
23
23
  "ajv-formats": "^2.1.1",
24
- "@uvrn/core": "1.0.1"
24
+ "@uvrn/core": "1.0.2"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/jest": "^29.5.0",