@bcts/xid 1.0.0-alpha.22 → 1.0.0-alpha.23

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": "@bcts/xid",
3
- "version": "1.0.0-alpha.22",
3
+ "version": "1.0.0-alpha.23",
4
4
  "type": "module",
5
5
  "description": "Blockchain Commons XID for TypeScript",
6
6
  "license": "BSD-2-Clause-Patent",
@@ -57,23 +57,23 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@bcts/eslint": "^0.1.0",
60
- "@bcts/rand": "^1.0.0-alpha.22",
60
+ "@bcts/rand": "^1.0.0-alpha.23",
61
61
  "@bcts/tsconfig": "^0.1.0",
62
62
  "@eslint/js": "^10.0.1",
63
- "@typescript-eslint/eslint-plugin": "^8.56.1",
64
- "@typescript-eslint/parser": "^8.56.1",
65
- "eslint": "^10.0.2",
63
+ "@typescript-eslint/eslint-plugin": "^8.59.0",
64
+ "@typescript-eslint/parser": "^8.59.0",
65
+ "eslint": "^10.2.1",
66
66
  "ts-node": "^10.9.2",
67
- "tsdown": "^0.20.3",
68
- "typedoc": "^0.28.17",
69
- "typescript": "^5.9.3",
70
- "vitest": "^4.0.18"
67
+ "tsdown": "^0.21.0",
68
+ "typedoc": "^0.28.19",
69
+ "typescript": "^6.0.3",
70
+ "vitest": "^4.1.5"
71
71
  },
72
72
  "dependencies": {
73
- "@bcts/components": "^1.0.0-alpha.22",
74
- "@bcts/dcbor": "^1.0.0-alpha.22",
75
- "@bcts/envelope": "^1.0.0-alpha.22",
76
- "@bcts/known-values": "^1.0.0-alpha.22",
77
- "@bcts/provenance-mark": "^1.0.0-alpha.22"
73
+ "@bcts/components": "^1.0.0-alpha.23",
74
+ "@bcts/dcbor": "^1.0.0-alpha.23",
75
+ "@bcts/envelope": "^1.0.0-alpha.23",
76
+ "@bcts/known-values": "^1.0.0-alpha.23",
77
+ "@bcts/provenance-mark": "^1.0.0-alpha.23"
78
78
  }
79
79
  }
package/src/key.ts CHANGED
@@ -17,7 +17,7 @@ import type { EnvelopeEncodableValue } from "@bcts/envelope";
17
17
  import { type Cbor } from "@bcts/dcbor";
18
18
 
19
19
  // Helper to convert KnownValue to EnvelopeEncodableValue
20
- const kv = (v: KnownValue): EnvelopeEncodableValue => v as unknown as EnvelopeEncodableValue;
20
+ const kv = (v: KnownValue): EnvelopeEncodableValue => v;
21
21
  import {
22
22
  Salt,
23
23
  type Reference,
package/src/provenance.ts CHANGED
@@ -16,7 +16,7 @@ import { PROVENANCE_GENERATOR, SALT, type KnownValue } from "@bcts/known-values"
16
16
  import { Salt, type KeyDerivationMethod, defaultKeyDerivationMethod } from "@bcts/components";
17
17
 
18
18
  // Helper to convert KnownValue to EnvelopeEncodableValue
19
- const kv = (v: KnownValue): EnvelopeEncodableValue => v as unknown as EnvelopeEncodableValue;
19
+ const kv = (v: KnownValue): EnvelopeEncodableValue => v;
20
20
  import { ProvenanceMark, ProvenanceMarkGenerator } from "@bcts/provenance-mark";
21
21
  import { XIDError } from "./error";
22
22
 
@@ -289,10 +289,7 @@ export class Provenance implements EnvelopeEncodable {
289
289
  const wrapped = generatorEnvelope.wrap() as EnvelopeExt;
290
290
  const method: KeyDerivationMethod =
291
291
  generatorOptions.method ?? defaultKeyDerivationMethod();
292
- const encrypted = (wrapped as unknown as EnvelopeExt).lockSubject(
293
- method,
294
- generatorOptions.password,
295
- );
292
+ const encrypted = wrapped.lockSubject(method, generatorOptions.password);
296
293
  envelope = envelope.addAssertion(kv(PROVENANCE_GENERATOR), encrypted);
297
294
  envelope = envelope.addAssertion(kv(SALT), salt.toData());
298
295
  }
package/src/service.ts CHANGED
@@ -15,7 +15,7 @@ import { Envelope, type EnvelopeEncodable, type EnvelopeEncodableValue } from "@
15
15
  import { KEY, DELEGATE, NAME, CAPABILITY, ALLOW, type KnownValue } from "@bcts/known-values";
16
16
 
17
17
  // Helper to convert KnownValue to EnvelopeEncodableValue
18
- const kv = (v: KnownValue): EnvelopeEncodableValue => v as unknown as EnvelopeEncodableValue;
18
+ const kv = (v: KnownValue): EnvelopeEncodableValue => v;
19
19
  import { Reference, type PublicKeys, type XID } from "@bcts/components";
20
20
  import { Permissions, type HasPermissions } from "./permissions";
21
21
  import { privilegeFromEnvelope } from "./privilege";
@@ -31,7 +31,7 @@ import {
31
31
  } from "@bcts/known-values";
32
32
 
33
33
  // Helper to convert KnownValue to EnvelopeEncodableValue
34
- const kv = (v: KnownValue): EnvelopeEncodableValue => v as unknown as EnvelopeEncodableValue;
34
+ const kv = (v: KnownValue): EnvelopeEncodableValue => v;
35
35
  import {
36
36
  Reference,
37
37
  XID,