@tinycloud/web-sdk 3.0.0-beta.1 → 3.0.0-beta.2

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.
@@ -18,6 +18,8 @@ export declare class CredentialsService {
18
18
  store(verified: VerifiedCredential, requirementValue: CredentialRequirement, options?: CredentialsOperationOptions): Promise<{
19
19
  readonly record: StoredCredentialRecord;
20
20
  readonly receipt: import("@tinycloud/sdk-core").CredentialStorageReceipt;
21
+ } | {
22
+ record: StoredCredentialRecord;
21
23
  }>;
22
24
  acquire(requirementValue: CredentialRequirement, options: CredentialsAcquireOptions): Promise<VerifiedCredential>;
23
25
  ensure(requirementValue: CredentialRequirement, options: CredentialsEnsureOptions): Promise<CredentialsEnsureResult>;
@@ -21,6 +21,23 @@ export interface CredentialClient {
21
21
  * than on {@link ClientSession} so the CID stays out of the public session.
22
22
  */
23
23
  accountAuthorizationCid(): string;
24
+ /** Receiver-local credential custody. Its presence selects accountless mode. */
25
+ readonly receiverCredentialCustody?: ReceiverCredentialCustody;
26
+ }
27
+ export interface ReceiverCredentialCustody {
28
+ find(input: {
29
+ readonly requirement: CredentialRequirement;
30
+ readonly requirementDigest: string;
31
+ readonly holderDid: string;
32
+ readonly now?: Date;
33
+ }): Promise<StoredCredentialRecord | undefined>;
34
+ store(input: {
35
+ readonly verified: VerifiedCredential;
36
+ readonly requirement: CredentialRequirement;
37
+ readonly requirementDigest: string;
38
+ readonly holderDid: string;
39
+ readonly now?: Date;
40
+ }): Promise<StoredCredentialRecord>;
24
41
  }
25
42
  export interface CredentialSigningAdapter {
26
43
  /** Return undefined when the existing exact-request auto-sign policy does not apply. */
@@ -200,6 +217,7 @@ export interface CredentialsPolicyAdmissionOptions {
200
217
  readonly requestedCapabilities: readonly UnifiedPolicyCapability[];
201
218
  readonly nodeOrigin: string;
202
219
  readonly fetch?: typeof fetch;
220
+ readonly signal?: AbortSignal;
203
221
  readonly now?: Date;
204
222
  readonly jti?: string;
205
223
  }