Package Exports
- @uvrn/adapter
- @uvrn/adapter/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uvrn/adapter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@uvrn/adapter
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.
Install
npm install @uvrn/adapterOr with pnpm:
pnpm add @uvrn/adapterRequires @uvrn/core (peer). Install the core if you do not have it:
npm install @uvrn/core @uvrn/adapterUsage
- Obtain a DeltaReceipt from
@uvrn/core(e.g.runDeltaEngine(bundle)). - Use wrapInDRVC3 with an ethers signer and options to produce a DRVC3 envelope.
- Use validateDRVC3 / extractDeltaReceipt to validate envelopes and read back the core receipt.
import { runDeltaEngine } from '@uvrn/core';
import { wrapInDRVC3, validateDRVC3, extractDeltaReceipt } from '@uvrn/adapter';
import { Wallet } from 'ethers';
const bundle = { /* ... DeltaBundle ... */ };
const receipt = runDeltaEngine(bundle);
const wallet = new Wallet(process.env.SIGNER_PRIVATE_KEY);
const drvc3 = await wrapInDRVC3(receipt, wallet, {
issuer: 'my-service',
event: 'delta-reconciliation',
});
const valid = validateDRVC3(drvc3);
const extracted = extractDeltaReceipt(drvc3);Use cases
- Sign receipts with a known identity — Attach EIP-191 signatures so consumers can verify who issued the envelope.
- Interop with DRVC3 systems — Produce standard DRVC3 envelopes that other tools can validate and parse.
- Audit and provenance — Keep the core receipt hash unchanged while adding issuer and timestamp in the envelope.
Links
- Repository — monorepo (this package:
uvrn-adapter) - @uvrn/core — Delta Engine core (produces the receipts this adapter wraps)