28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
/**
|
|
* Test-only `DomainTag` constants for `@suaveplan/bitpacker-crypto` tests.
|
|
*
|
|
* Mirrors the canonical `DOMAIN_BITPACKER_*` constants from
|
|
* `@suaveplan/crypto/domain-tags` byte-for-byte, but declared inline so
|
|
* this test surface has NO runtime dep on `@suaveplan/crypto`. That breaks
|
|
* a cycle that would otherwise form when `@suaveplan/crypto` itself adopts
|
|
* primitives from this package (e.g. `chain-bundle` adopting
|
|
* `EnvelopeSchema`).
|
|
*
|
|
* Production callers should import the canonical constants from
|
|
* `@suaveplan/crypto/domain-tags` directly. These test mirrors exist solely
|
|
* to give the bitpacker-crypto test suite valid `DomainTag`-typed values.
|
|
*/
|
|
import type { DomainTag } from "@suaveplan/types";
|
|
|
|
const tag = (s: string): DomainTag => s as DomainTag;
|
|
|
|
export const DOMAIN_BITPACKER_SIGNED_V1 = tag("suaveplan.bitpacker-signed.v1");
|
|
export const DOMAIN_BITPACKER_MULTISIGN_V1 = tag(
|
|
"suaveplan.bitpacker-multisign.v1"
|
|
);
|
|
export const DOMAIN_BITPACKER_HASHCHAIN_V1 = tag(
|
|
"suaveplan.bitpacker-hashchain.v1"
|
|
);
|
|
export const DOMAIN_PUBLIC_KEYCHAIN_V1 = tag("suaveplan.public-keychain.v1");
|
|
export const DOMAIN_AUDIT_V1 = tag("suaveplan.audit.v1");
|