@kubun/credential-types 0.17.0 → 0.17.1

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/lib/index.d.ts CHANGED
@@ -28,3 +28,29 @@ export type CredentialProvider = {
28
28
  }): Promise<void>;
29
29
  delete(providerName: string, ownerDID: string): Promise<void>;
30
30
  };
31
+ /**
32
+ * Opt-in capability: point `(providerName, ownerDID)` at an entry the
33
+ * provider already holds, without minting anything. A `CredentialProvider`
34
+ * that also implements this can bind an alias to an entry created out of
35
+ * band (e.g. a device-to-device credential handoff).
36
+ */
37
+ export type AliasBindingCredentialProvider = {
38
+ bindAlias(providerName: string, ownerDID: string, entryID: string): Promise<void>;
39
+ };
40
+ /**
41
+ * Opt-in capability: read and write a credential together with the entryID
42
+ * it resolves to, so a caller can target that entry directly on a
43
+ * subsequent write without re-resolving the alias.
44
+ */
45
+ export type EntryPairedCredentialProvider = {
46
+ getCredentialRef(providerName: string, ownerDID: string): Promise<{
47
+ credential: Credential;
48
+ entryID: string;
49
+ } | null>;
50
+ setCredentialForEntry(params: {
51
+ providerName: string;
52
+ ownerDID: string;
53
+ entryID: string;
54
+ credential: Credential;
55
+ }): Promise<'updated' | 'absent'>;
56
+ };
package/lib/index.js CHANGED
@@ -2,4 +2,8 @@
2
2
  // that stores/refreshes it. Kept in this leaf package so both the low-level
3
3
  // `@kubun/connector` (which consumes the port) and `@kubun/credential` (which
4
4
  // implements it) can depend on the types without depending on each other.
5
- export { };
5
+ /**
6
+ * Opt-in capability: read and write a credential together with the entryID
7
+ * it resolves to, so a caller can target that entry directly on a
8
+ * subsequent write without re-resolving the alias.
9
+ */ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubun/credential-types",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "keywords": [],
5
5
  "license": "see LICENSE.md",
6
6
  "sideEffects": false,