@interncom/diplomatic 0.12.10 → 0.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interncom/diplomatic",
3
- "version": "0.12.10",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "description": "Secure sync layer and CLI utilities for DIPLOMATIC",
6
6
  "files": [
@@ -1,30 +0,0 @@
1
- import { Enclave, type PasskeyPrfOpts } from "../shared/crypto/enclave";
2
- import type { SealedMasterKey } from "../shared/seed";
3
- import { type ValStat } from "../shared/valstat";
4
- import type { BundleHost } from "../shared/codecs/bundleHost";
5
- import type { PrfRp } from "../shared/webauthn/prf";
6
- export { type PairPackagePlain, pairPackagePlainCodec, } from "../shared/codecs/pairPackage";
7
- export { PAIR_PACKAGE_VERSION, type PairPackageEnvelope, pairPackageEnvelopeCodec, } from "../shared/codecs/pairPackageEnvelope";
8
- export type OpenedPairPackage = {
9
- enclave: Enclave;
10
- hosts: BundleHost[];
11
- salt: Uint8Array;
12
- credId?: Uint8Array;
13
- /** Sealed master for protocol IDB, under same PRF (single ceremony). */
14
- sealedMaster: SealedMasterKey;
15
- };
16
- /**
17
- * Pair package seal/open under PRF.
18
- */
19
- export declare const PairPackage: {
20
- readonly PREFIX: "dip1:";
21
- readonly VERSION: 1;
22
- /**
23
- * Seal enclave seed + hosts: Enclave runs PRF UV, then AEAD → `dip1:` string.
24
- */
25
- readonly seal: (enclave: Enclave, hosts: BundleHost[], opts?: PasskeyPrfOpts) => Promise<ValStat<string>>;
26
- /**
27
- * Open pair package: decode envelope, Enclave runs PRF UV + decrypt + enclave.
28
- */
29
- readonly open: (pairPkg: string, rp: PrfRp) => Promise<ValStat<OpenedPairPackage>>;
30
- };
@@ -1,18 +0,0 @@
1
- import { ICodecStruct } from "../codec.ts";
2
- export declare const PAIR_PACKAGE_VERSION = 1;
3
- export type PairPackageEnvelope = {
4
- v: number;
5
- salt: Uint8Array;
6
- /** Empty when absent. */
7
- credId: Uint8Array;
8
- /** AEAD ciphertext of pairPackagePlainCodec bytes under KDF(PRF). */
9
- body: Uint8Array;
10
- };
11
- /**
12
- * Outer envelope (metadata is not secret; body is AEAD ciphertext):
13
- * v: varint
14
- * salt: varbytes
15
- * credId: varbytes (length 0 if none)
16
- * body: varbytes (AEAD of pair-package plain)
17
- */
18
- export declare const pairPackageEnvelopeCodec: ICodecStruct<PairPackageEnvelope>;