@uvrn/adapter 1.0.0 → 1.0.1

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 +56 -0
  2. package/package.json +8 -2
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @uvrn/adapter
2
+
3
+ UVRN DRVC3 envelope adapter — wraps Delta Engine receipts in DRVC3 envelopes with EIP-191 signatures. Use this when you need to attach issuer identity and signing to core receipts without changing their deterministic hash.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @uvrn/adapter
9
+ ```
10
+
11
+ Or with pnpm:
12
+
13
+ ```bash
14
+ pnpm add @uvrn/adapter
15
+ ```
16
+
17
+ Requires `@uvrn/core` (peer). Install the core if you do not have it:
18
+
19
+ ```bash
20
+ npm install @uvrn/core @uvrn/adapter
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ 1. Obtain a **DeltaReceipt** from `@uvrn/core` (e.g. `runDeltaEngine(bundle)`).
26
+ 2. Use **wrapInDRVC3** with an ethers signer and options to produce a DRVC3 envelope.
27
+ 3. Use **validateDRVC3** / **extractDeltaReceipt** to validate envelopes and read back the core receipt.
28
+
29
+ ```typescript
30
+ import { runDeltaEngine } from '@uvrn/core';
31
+ import { wrapInDRVC3, validateDRVC3, extractDeltaReceipt } from '@uvrn/adapter';
32
+ import { Wallet } from 'ethers';
33
+
34
+ const bundle = { /* ... DeltaBundle ... */ };
35
+ const receipt = runDeltaEngine(bundle);
36
+
37
+ const wallet = new Wallet(process.env.SIGNER_PRIVATE_KEY);
38
+ const drvc3 = await wrapInDRVC3(receipt, wallet, {
39
+ issuer: 'my-service',
40
+ event: 'delta-reconciliation',
41
+ });
42
+
43
+ const valid = validateDRVC3(drvc3);
44
+ const extracted = extractDeltaReceipt(drvc3);
45
+ ```
46
+
47
+ ## Use cases
48
+
49
+ - **Sign receipts with a known identity** — Attach EIP-191 signatures so consumers can verify who issued the envelope.
50
+ - **Interop with DRVC3 systems** — Produce standard DRVC3 envelopes that other tools can validate and parse.
51
+ - **Audit and provenance** — Keep the core receipt hash unchanged while adding issuer and timestamp in the envelope.
52
+
53
+ ## Links
54
+
55
+ - [Repository](https://github.com/UVRN-org/uvrn-packages) — monorepo (this package: `uvrn-adapter`)
56
+ - [@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.0",
3
+ "version": "1.0.1",
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",
@@ -11,11 +11,17 @@
11
11
  "receipts"
12
12
  ],
13
13
  "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/UVRN-org/uvrn-packages.git",
17
+ "directory": "uvrn-adapter"
18
+ },
19
+ "homepage": "https://github.com/UVRN-org/uvrn-packages#readme",
14
20
  "dependencies": {
15
21
  "ethers": "^6.0.0",
16
22
  "ajv": "^8.12.0",
17
23
  "ajv-formats": "^2.1.1",
18
- "@uvrn/core": "1.0.0"
24
+ "@uvrn/core": "1.0.1"
19
25
  },
20
26
  "devDependencies": {
21
27
  "@types/jest": "^29.5.0",