@bcts/provenance-mark 1.0.0-alpha.16 → 1.0.0-alpha.17

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/dist/index.mjs CHANGED
@@ -16,54 +16,54 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
16
16
  /**
17
17
  * Error types for Provenance Mark operations.
18
18
  */
19
- let ProvenanceMarkErrorType = /* @__PURE__ */ function(ProvenanceMarkErrorType$1) {
19
+ let ProvenanceMarkErrorType = /* @__PURE__ */ function(ProvenanceMarkErrorType) {
20
20
  /** Invalid Seed length */
21
- ProvenanceMarkErrorType$1["InvalidSeedLength"] = "InvalidSeedLength";
21
+ ProvenanceMarkErrorType["InvalidSeedLength"] = "InvalidSeedLength";
22
22
  /** Duplicate key */
23
- ProvenanceMarkErrorType$1["DuplicateKey"] = "DuplicateKey";
23
+ ProvenanceMarkErrorType["DuplicateKey"] = "DuplicateKey";
24
24
  /** Missing key */
25
- ProvenanceMarkErrorType$1["MissingKey"] = "MissingKey";
25
+ ProvenanceMarkErrorType["MissingKey"] = "MissingKey";
26
26
  /** Invalid key */
27
- ProvenanceMarkErrorType$1["InvalidKey"] = "InvalidKey";
27
+ ProvenanceMarkErrorType["InvalidKey"] = "InvalidKey";
28
28
  /** Extra keys */
29
- ProvenanceMarkErrorType$1["ExtraKeys"] = "ExtraKeys";
29
+ ProvenanceMarkErrorType["ExtraKeys"] = "ExtraKeys";
30
30
  /** Invalid key length for the given resolution */
31
- ProvenanceMarkErrorType$1["InvalidKeyLength"] = "InvalidKeyLength";
31
+ ProvenanceMarkErrorType["InvalidKeyLength"] = "InvalidKeyLength";
32
32
  /** Invalid next key length for the given resolution */
33
- ProvenanceMarkErrorType$1["InvalidNextKeyLength"] = "InvalidNextKeyLength";
33
+ ProvenanceMarkErrorType["InvalidNextKeyLength"] = "InvalidNextKeyLength";
34
34
  /** Invalid chain ID length for the given resolution */
35
- ProvenanceMarkErrorType$1["InvalidChainIdLength"] = "InvalidChainIdLength";
35
+ ProvenanceMarkErrorType["InvalidChainIdLength"] = "InvalidChainIdLength";
36
36
  /** Invalid message length for the given resolution */
37
- ProvenanceMarkErrorType$1["InvalidMessageLength"] = "InvalidMessageLength";
37
+ ProvenanceMarkErrorType["InvalidMessageLength"] = "InvalidMessageLength";
38
38
  /** Invalid CBOR data in info field */
39
- ProvenanceMarkErrorType$1["InvalidInfoCbor"] = "InvalidInfoCbor";
39
+ ProvenanceMarkErrorType["InvalidInfoCbor"] = "InvalidInfoCbor";
40
40
  /** Date out of range for serialization */
41
- ProvenanceMarkErrorType$1["DateOutOfRange"] = "DateOutOfRange";
41
+ ProvenanceMarkErrorType["DateOutOfRange"] = "DateOutOfRange";
42
42
  /** Invalid date components */
43
- ProvenanceMarkErrorType$1["InvalidDate"] = "InvalidDate";
43
+ ProvenanceMarkErrorType["InvalidDate"] = "InvalidDate";
44
44
  /** Missing required URL parameter */
45
- ProvenanceMarkErrorType$1["MissingUrlParameter"] = "MissingUrlParameter";
45
+ ProvenanceMarkErrorType["MissingUrlParameter"] = "MissingUrlParameter";
46
46
  /** Year out of range for 2-byte serialization */
47
- ProvenanceMarkErrorType$1["YearOutOfRange"] = "YearOutOfRange";
47
+ ProvenanceMarkErrorType["YearOutOfRange"] = "YearOutOfRange";
48
48
  /** Invalid month or day */
49
- ProvenanceMarkErrorType$1["InvalidMonthOrDay"] = "InvalidMonthOrDay";
49
+ ProvenanceMarkErrorType["InvalidMonthOrDay"] = "InvalidMonthOrDay";
50
50
  /** Resolution serialization error */
51
- ProvenanceMarkErrorType$1["ResolutionError"] = "ResolutionError";
51
+ ProvenanceMarkErrorType["ResolutionError"] = "ResolutionError";
52
52
  /** Bytewords encoding/decoding error */
53
- ProvenanceMarkErrorType$1["BytewordsError"] = "BytewordsError";
53
+ ProvenanceMarkErrorType["BytewordsError"] = "BytewordsError";
54
54
  /** CBOR encoding/decoding error */
55
- ProvenanceMarkErrorType$1["CborError"] = "CborError";
55
+ ProvenanceMarkErrorType["CborError"] = "CborError";
56
56
  /** URL parsing error */
57
- ProvenanceMarkErrorType$1["UrlError"] = "UrlError";
57
+ ProvenanceMarkErrorType["UrlError"] = "UrlError";
58
58
  /** Base64 decoding error */
59
- ProvenanceMarkErrorType$1["Base64Error"] = "Base64Error";
59
+ ProvenanceMarkErrorType["Base64Error"] = "Base64Error";
60
60
  /** JSON serialization error */
61
- ProvenanceMarkErrorType$1["JsonError"] = "JsonError";
61
+ ProvenanceMarkErrorType["JsonError"] = "JsonError";
62
62
  /** Integer conversion error */
63
- ProvenanceMarkErrorType$1["IntegerConversionError"] = "IntegerConversionError";
63
+ ProvenanceMarkErrorType["IntegerConversionError"] = "IntegerConversionError";
64
64
  /** Validation error */
65
- ProvenanceMarkErrorType$1["ValidationError"] = "ValidationError";
66
- return ProvenanceMarkErrorType$1;
65
+ ProvenanceMarkErrorType["ValidationError"] = "ValidationError";
66
+ return ProvenanceMarkErrorType;
67
67
  }({});
68
68
  /**
69
69
  * Error class for Provenance Mark operations.
@@ -258,12 +258,12 @@ function dateToDateString(date) {
258
258
  * Resolution levels for provenance marks.
259
259
  * Higher resolution provides more security but larger mark sizes.
260
260
  */
261
- let ProvenanceMarkResolution = /* @__PURE__ */ function(ProvenanceMarkResolution$1) {
262
- ProvenanceMarkResolution$1[ProvenanceMarkResolution$1["Low"] = 0] = "Low";
263
- ProvenanceMarkResolution$1[ProvenanceMarkResolution$1["Medium"] = 1] = "Medium";
264
- ProvenanceMarkResolution$1[ProvenanceMarkResolution$1["Quartile"] = 2] = "Quartile";
265
- ProvenanceMarkResolution$1[ProvenanceMarkResolution$1["High"] = 3] = "High";
266
- return ProvenanceMarkResolution$1;
261
+ let ProvenanceMarkResolution = /* @__PURE__ */ function(ProvenanceMarkResolution) {
262
+ ProvenanceMarkResolution[ProvenanceMarkResolution["Low"] = 0] = "Low";
263
+ ProvenanceMarkResolution[ProvenanceMarkResolution["Medium"] = 1] = "Medium";
264
+ ProvenanceMarkResolution[ProvenanceMarkResolution["Quartile"] = 2] = "Quartile";
265
+ ProvenanceMarkResolution[ProvenanceMarkResolution["High"] = 3] = "High";
266
+ return ProvenanceMarkResolution;
267
267
  }({});
268
268
  /**
269
269
  * Convert a resolution to its numeric value.
@@ -694,9 +694,9 @@ var ProvenanceSeed = class ProvenanceSeed {
694
694
  /**
695
695
  * Create a new seed using custom random data.
696
696
  */
697
- static newUsing(randomData$1) {
698
- if (randomData$1.length < PROVENANCE_SEED_LENGTH) throw new ProvenanceMarkError(ProvenanceMarkErrorType.InvalidSeedLength, void 0, { actual: randomData$1.length });
699
- return ProvenanceSeed.fromBytes(randomData$1.slice(0, PROVENANCE_SEED_LENGTH));
697
+ static newUsing(randomData) {
698
+ if (randomData.length < PROVENANCE_SEED_LENGTH) throw new ProvenanceMarkError(ProvenanceMarkErrorType.InvalidSeedLength, void 0, { actual: randomData.length });
699
+ return ProvenanceSeed.fromBytes(randomData.slice(0, PROVENANCE_SEED_LENGTH));
700
700
  }
701
701
  /**
702
702
  * Create a new seed from a passphrase.
@@ -1269,8 +1269,8 @@ var ProvenanceMarkGenerator = class ProvenanceMarkGenerator {
1269
1269
  /**
1270
1270
  * Create a new generator with custom random data.
1271
1271
  */
1272
- static newUsing(res, randomData$1) {
1273
- const seed = ProvenanceSeed.newUsing(randomData$1);
1272
+ static newUsing(res, randomData) {
1273
+ const seed = ProvenanceSeed.newUsing(randomData);
1274
1274
  return ProvenanceMarkGenerator.newWithSeed(res, seed);
1275
1275
  }
1276
1276
  /**
@@ -1402,14 +1402,14 @@ var ProvenanceMarkGenerator = class ProvenanceMarkGenerator {
1402
1402
  /**
1403
1403
  * Format for validation report output.
1404
1404
  */
1405
- let ValidationReportFormat = /* @__PURE__ */ function(ValidationReportFormat$1) {
1405
+ let ValidationReportFormat = /* @__PURE__ */ function(ValidationReportFormat) {
1406
1406
  /** Human-readable text format */
1407
- ValidationReportFormat$1["Text"] = "text";
1407
+ ValidationReportFormat["Text"] = "text";
1408
1408
  /** Compact JSON format (no whitespace) */
1409
- ValidationReportFormat$1["JsonCompact"] = "json-compact";
1409
+ ValidationReportFormat["JsonCompact"] = "json-compact";
1410
1410
  /** Pretty-printed JSON format (with indentation) */
1411
- ValidationReportFormat$1["JsonPretty"] = "json-pretty";
1412
- return ValidationReportFormat$1;
1411
+ ValidationReportFormat["JsonPretty"] = "json-pretty";
1412
+ return ValidationReportFormat;
1413
1413
  }({});
1414
1414
  /**
1415
1415
  * Format a validation issue as a string.