@tinycloud/sdk-core 3.12.0-beta.4 → 3.12.0-beta.5
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/delegations/index.d.cts +16 -16
- package/dist/delegations/index.d.ts +16 -16
- package/dist/delegations/issued.d.cts +1 -1
- package/dist/delegations/issued.d.ts +1 -1
- package/dist/index.cjs +52 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +52 -22
- package/dist/index.js.map +1 -1
- package/dist/{recipient-types.schema-BIJcihno.d.cts → recipient-types.schema--5j8kRNE.d.ts} +1 -1
- package/dist/{recipient-types.schema-Ebi5aliq.d.ts → recipient-types.schema-C-q64lEk.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/{types.schema-BmN-OnCA.d.cts → types.schema-B0ZUx7Ss.d.cts} +24 -24
- package/dist/{types.schema-BmN-OnCA.d.ts → types.schema-B0ZUx7Ss.d.ts} +24 -24
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as Result, D as DelegationError } from '../types.schema-
|
|
2
|
-
export { A as AccountDelegationPage, a as AccountDelegationQueryOptions, b as AccountDelegationRecord, c as AccountDelegationResource, C as CapabilityEntry, d as CreateDelegationParams, e as CreateDelegationWasmParams, f as CreateDelegationWasmResult, g as DelegatedResource, h as Delegation, i as DelegationApiResponse, j as DelegationChain, k as DelegationChainV2, l as DelegationDirection, m as DelegationErrorCode, n as DelegationErrorCodes, o as DelegationFilters, p as DelegationManagerConfig, q as DelegationRecord, r as DelegationRevocationReceipt, s as DelegationStatus, G as GenerateShareParams, I as IngestOptions, J as JWK, K as KeyInfo, t as KeyProvider, u as KeyType, S as SessionInvocationSigner, v as ShareLink, w as ShareLinkData, x as ShareSchema, y as SpaceInfo, z as SpaceOwnership } from '../types.schema-
|
|
3
|
-
import { I as ICapabilityKeyRegistry } from '../recipient-types.schema-
|
|
4
|
-
export { C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, a as CreateOwnerDelegationParams, b as CredentialInvitationRequest, D as DELIVERY_ADMISSION_DOMAIN, c as DelegateReceivedShareParams, d as DelegatedShareAccess, e as DelegatedShareKey, f as DelegationManager, g as DeliveryAdmission, E as EncodedShareData, h as ISharingService, M as MAX_CONTENT_BYTES, i as MAX_SEALED_SHARE_CONTENT_BYTES, j as MAX_SHARE_ARTIFACT_BYTES, k as MAX_SHARE_CONTENT_BYTES, l as MemorySenderShareKeyStorage, m as MemorySenderShareRecordStorage, n as MemoryShareCache, O as OwnerDelegationPermission, o as OwnerDelegationReceipt, p as OwnerShareAction, q as OwnerShareDecryption, r as OwnerShareMatcher, s as OwnerSharePolicyRegistration, t as OwnerSharePolicyRegistrationReceipt, u as OwnerSharePolicyV2, P as PortableDelegationImportReceipt, R as ReceiveOptions, v as RegisterOwnerSharePolicyParams, S as SenderShareKeyStorage, w as SenderShareRecord, x as SenderShareRecordStorage, y as SenderShareRevocationScope, z as SenderShareStore, A as ShareAccess, B as ShareAccessError, F as ShareAccessV2, G as ShareAction, H as ShareActionSchema, J as ShareAddressedDelegationEnvelopeV2, K as ShareAddressedDelegationEnvelopeV2Schema, L as ShareAddressedDelegationRequestV2, N as ShareAddressedDelegationRequestV2Schema, Q as ShareAddressedDelegationResponseV2, T as ShareAddressedDelegationResponseV2Schema, U as ShareAddressedRecipientMatcher, V as ShareArtifactInput, W as ShareArtifactResult, X as ShareArtifactV2, Y as ShareCache, Z as ShareCacheEntry, _ as ShareCacheKey, $ as ShareCacheMetadata, a0 as ShareCapabilityLike, a1 as ShareConflict, a2 as ShareContentMetadata, a3 as ShareContentSource, a4 as ShareDelegationPreflight, a5 as ShareDeliveryAuthorizationV3Receipt, a6 as ShareDeliveryAuthorizationV3Request, a7 as ShareDeliveryRefusedError, a8 as ShareDetachedProof, a9 as ShareEnvelopeError, aa as ShareEnvelopeV2, ab as ShareExpiryBounds, ac as ShareKvContentSource, ad as ShareLinkLocation, ae as ShareListEntry, af as ShareListResult, ag as ShareNativeAction, ah as ShareNativeInvokeEnvelopeV1, ai as ShareNativeInvokeErrorResult, aj as ShareNativeInvokeInput, ak as ShareNativeInvokeResult, al as ShareNativeInvokeSuccessResult, am as ShareNativeResponse, an as ShareNativeResponseSchema, ao as SharePolicy, ap as SharePolicyBinding, aq as SharePolicySession, ar as SharePolicySessionV1, as as SharePolicySessionWireV1, at as SharePortableDelegation, au as ShareReadInvocationV1, av as ShareReadResult, aw as ShareRecipientClient, ax as ShareRecipientClientOptions, ay as ShareRecipientClientOptionsSchema, az as ShareRecipientPolicy, aA as ShareRecipientPolicySchema, aB as ShareRecipientResult, aC as ShareRecipientTarget, aD as ShareRecipientTargetSchema, aE as ShareResource, aF as ShareResourceSchema, aG as ShareSaveOptions, aH as ShareSqlContentSource, aI as ShareWireAction, aJ as SharingService, aK as SharingServiceConfig, aL as SignedDelegation, aM as VerifyShareEnvelopeOptions, aN as canonicalOwnerSharePolicy, aO as computeOwnerShareRegistrationCid, aP as computeShareCid, aQ as createDelegatedShareKey, aR as createPolicyEnforcementDelegation, aS as createShareArtifact, aT as createShareArtifactAsync, aU as createSharePolicy, aV as createSharingService, aW as decryptShareBytesAsync, aX as delegatePortablePolicySession, aY as encodeInlineShareUrl, aZ as encodeShareArtifact, a_ as encodeShareUrl, a$ as encryptShareBytes, b0 as encryptShareBytesAsync, b1 as importPortableDelegation, b2 as intersectShareCapabilities, b3 as isV2ShareLink, b4 as normalizeShareActions, b5 as normalizeShareRecipientTarget, b6 as normalizeShareResource, b7 as parsePortableDelegation, b8 as parseShareArtifact, b9 as parseShareUrl, ba as restoreDelegatedShareKey, bb as serializePortableDelegation, bc as shareCapabilityAllows, bd as shortDeliveryLinkBodyCid, be as signShareEnvelope, bf as validateOwnerSharePolicyRegistration, bg as validateOwnerSharePolicyRegistrationBytes, bh as verifyShareCid, bi as verifyShareDeliveryAuthorizationV3Bytes, bj as verifyShareEnvelope, bk as withoutShareLink } from '../recipient-types.schema-
|
|
1
|
+
import { R as Result, D as DelegationError } from '../types.schema-B0ZUx7Ss.cjs';
|
|
2
|
+
export { A as AccountDelegationPage, a as AccountDelegationQueryOptions, b as AccountDelegationRecord, c as AccountDelegationResource, C as CapabilityEntry, d as CreateDelegationParams, e as CreateDelegationWasmParams, f as CreateDelegationWasmResult, g as DelegatedResource, h as Delegation, i as DelegationApiResponse, j as DelegationChain, k as DelegationChainV2, l as DelegationDirection, m as DelegationErrorCode, n as DelegationErrorCodes, o as DelegationFilters, p as DelegationManagerConfig, q as DelegationRecord, r as DelegationRevocationReceipt, s as DelegationStatus, G as GenerateShareParams, I as IngestOptions, J as JWK, K as KeyInfo, t as KeyProvider, u as KeyType, S as SessionInvocationSigner, v as ShareLink, w as ShareLinkData, x as ShareSchema, y as SpaceInfo, z as SpaceOwnership } from '../types.schema-B0ZUx7Ss.cjs';
|
|
3
|
+
import { I as ICapabilityKeyRegistry } from '../recipient-types.schema-C-q64lEk.cjs';
|
|
4
|
+
export { C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, a as CreateOwnerDelegationParams, b as CredentialInvitationRequest, D as DELIVERY_ADMISSION_DOMAIN, c as DelegateReceivedShareParams, d as DelegatedShareAccess, e as DelegatedShareKey, f as DelegationManager, g as DeliveryAdmission, E as EncodedShareData, h as ISharingService, M as MAX_CONTENT_BYTES, i as MAX_SEALED_SHARE_CONTENT_BYTES, j as MAX_SHARE_ARTIFACT_BYTES, k as MAX_SHARE_CONTENT_BYTES, l as MemorySenderShareKeyStorage, m as MemorySenderShareRecordStorage, n as MemoryShareCache, O as OwnerDelegationPermission, o as OwnerDelegationReceipt, p as OwnerShareAction, q as OwnerShareDecryption, r as OwnerShareMatcher, s as OwnerSharePolicyRegistration, t as OwnerSharePolicyRegistrationReceipt, u as OwnerSharePolicyV2, P as PortableDelegationImportReceipt, R as ReceiveOptions, v as RegisterOwnerSharePolicyParams, S as SenderShareKeyStorage, w as SenderShareRecord, x as SenderShareRecordStorage, y as SenderShareRevocationScope, z as SenderShareStore, A as ShareAccess, B as ShareAccessError, F as ShareAccessV2, G as ShareAction, H as ShareActionSchema, J as ShareAddressedDelegationEnvelopeV2, K as ShareAddressedDelegationEnvelopeV2Schema, L as ShareAddressedDelegationRequestV2, N as ShareAddressedDelegationRequestV2Schema, Q as ShareAddressedDelegationResponseV2, T as ShareAddressedDelegationResponseV2Schema, U as ShareAddressedRecipientMatcher, V as ShareArtifactInput, W as ShareArtifactResult, X as ShareArtifactV2, Y as ShareCache, Z as ShareCacheEntry, _ as ShareCacheKey, $ as ShareCacheMetadata, a0 as ShareCapabilityLike, a1 as ShareConflict, a2 as ShareContentMetadata, a3 as ShareContentSource, a4 as ShareDelegationPreflight, a5 as ShareDeliveryAuthorizationV3Receipt, a6 as ShareDeliveryAuthorizationV3Request, a7 as ShareDeliveryRefusedError, a8 as ShareDetachedProof, a9 as ShareEnvelopeError, aa as ShareEnvelopeV2, ab as ShareExpiryBounds, ac as ShareKvContentSource, ad as ShareLinkLocation, ae as ShareListEntry, af as ShareListResult, ag as ShareNativeAction, ah as ShareNativeInvokeEnvelopeV1, ai as ShareNativeInvokeErrorResult, aj as ShareNativeInvokeInput, ak as ShareNativeInvokeResult, al as ShareNativeInvokeSuccessResult, am as ShareNativeResponse, an as ShareNativeResponseSchema, ao as SharePolicy, ap as SharePolicyBinding, aq as SharePolicySession, ar as SharePolicySessionV1, as as SharePolicySessionWireV1, at as SharePortableDelegation, au as ShareReadInvocationV1, av as ShareReadResult, aw as ShareRecipientClient, ax as ShareRecipientClientOptions, ay as ShareRecipientClientOptionsSchema, az as ShareRecipientPolicy, aA as ShareRecipientPolicySchema, aB as ShareRecipientResult, aC as ShareRecipientTarget, aD as ShareRecipientTargetSchema, aE as ShareResource, aF as ShareResourceSchema, aG as ShareSaveOptions, aH as ShareSqlContentSource, aI as ShareWireAction, aJ as SharingService, aK as SharingServiceConfig, aL as SignedDelegation, aM as VerifyShareEnvelopeOptions, aN as canonicalOwnerSharePolicy, aO as computeOwnerShareRegistrationCid, aP as computeShareCid, aQ as createDelegatedShareKey, aR as createPolicyEnforcementDelegation, aS as createShareArtifact, aT as createShareArtifactAsync, aU as createSharePolicy, aV as createSharingService, aW as decryptShareBytesAsync, aX as delegatePortablePolicySession, aY as encodeInlineShareUrl, aZ as encodeShareArtifact, a_ as encodeShareUrl, a$ as encryptShareBytes, b0 as encryptShareBytesAsync, b1 as importPortableDelegation, b2 as intersectShareCapabilities, b3 as isV2ShareLink, b4 as normalizeShareActions, b5 as normalizeShareRecipientTarget, b6 as normalizeShareResource, b7 as parsePortableDelegation, b8 as parseShareArtifact, b9 as parseShareUrl, ba as restoreDelegatedShareKey, bb as serializePortableDelegation, bc as shareCapabilityAllows, bd as shortDeliveryLinkBodyCid, be as signShareEnvelope, bf as validateOwnerSharePolicyRegistration, bg as validateOwnerSharePolicyRegistrationBytes, bh as verifyShareCid, bi as verifyShareDeliveryAuthorizationV3Bytes, bj as verifyShareEnvelope, bk as withoutShareLink } from '../recipient-types.schema-C-q64lEk.cjs';
|
|
5
5
|
export { EncryptedSenderShareHistory, EncryptedShareHistoryStorage, MemoryEncryptedShareHistoryStorage, ShareAuthorizationAdapter, ShareAuthorizationDenied, ShareAuthorizationMethod, ShareAuthorizationReady, ShareAuthorizationRequired, ShareAuthorizationResult, ShareDeliveryAdapter, ShareErrorCode, ShareErrorInfo, ShareFetchOptions, ShareHistoryView, ShareInspection, ShareMetadata, ShareNotifyResult, ShareNotifyState, SharePolicyPublishAdapter, ShareReceiveError, ShareReceiveResult, ShareRevocationAdapter, ShareRevocationIncompleteError, ShareRevocationResult, ShareRootRevocationFailure, ShareRootRevocationState, ShareTarget, TargetPublishAdapter, TargetPublishInput, TargetPublishOutcome, authorizationMethodForTarget, authorizeShare, claimShare, inspectShare, listShares, notifyShare, publishPolicyShare, publishTargetShare, receiveShare, resumeShareAuthorization, revokeShare, showShare, toShareErrorInfo } from '@tinycloud/share-sdk';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { ServiceSession, InvokeFunction, FetchFunction, IKVService } from '@tinycloud/sdk-services';
|
|
@@ -42,9 +42,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
42
42
|
crv?: string | undefined;
|
|
43
43
|
x?: string | undefined;
|
|
44
44
|
y?: string | undefined;
|
|
45
|
-
d?: string | undefined;
|
|
46
|
-
e?: string | undefined;
|
|
47
45
|
n?: string | undefined;
|
|
46
|
+
e?: string | undefined;
|
|
47
|
+
d?: string | undefined;
|
|
48
48
|
use?: string | undefined;
|
|
49
49
|
key_ops?: string[] | undefined;
|
|
50
50
|
}, {
|
|
@@ -54,9 +54,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
54
54
|
crv?: string | undefined;
|
|
55
55
|
x?: string | undefined;
|
|
56
56
|
y?: string | undefined;
|
|
57
|
-
d?: string | undefined;
|
|
58
|
-
e?: string | undefined;
|
|
59
57
|
n?: string | undefined;
|
|
58
|
+
e?: string | undefined;
|
|
59
|
+
d?: string | undefined;
|
|
60
60
|
use?: string | undefined;
|
|
61
61
|
key_ops?: string[] | undefined;
|
|
62
62
|
}>, {
|
|
@@ -66,9 +66,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
66
66
|
crv?: string | undefined;
|
|
67
67
|
x?: string | undefined;
|
|
68
68
|
y?: string | undefined;
|
|
69
|
-
d?: string | undefined;
|
|
70
|
-
e?: string | undefined;
|
|
71
69
|
n?: string | undefined;
|
|
70
|
+
e?: string | undefined;
|
|
71
|
+
d?: string | undefined;
|
|
72
72
|
use?: string | undefined;
|
|
73
73
|
key_ops?: string[] | undefined;
|
|
74
74
|
}, {
|
|
@@ -78,9 +78,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
78
78
|
crv?: string | undefined;
|
|
79
79
|
x?: string | undefined;
|
|
80
80
|
y?: string | undefined;
|
|
81
|
-
d?: string | undefined;
|
|
82
|
-
e?: string | undefined;
|
|
83
81
|
n?: string | undefined;
|
|
82
|
+
e?: string | undefined;
|
|
83
|
+
d?: string | undefined;
|
|
84
84
|
use?: string | undefined;
|
|
85
85
|
key_ops?: string[] | undefined;
|
|
86
86
|
}>;
|
|
@@ -148,9 +148,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
148
148
|
crv?: string | undefined;
|
|
149
149
|
x?: string | undefined;
|
|
150
150
|
y?: string | undefined;
|
|
151
|
-
d?: string | undefined;
|
|
152
|
-
e?: string | undefined;
|
|
153
151
|
n?: string | undefined;
|
|
152
|
+
e?: string | undefined;
|
|
153
|
+
d?: string | undefined;
|
|
154
154
|
use?: string | undefined;
|
|
155
155
|
key_ops?: string[] | undefined;
|
|
156
156
|
};
|
|
@@ -182,9 +182,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
182
182
|
crv?: string | undefined;
|
|
183
183
|
x?: string | undefined;
|
|
184
184
|
y?: string | undefined;
|
|
185
|
-
d?: string | undefined;
|
|
186
|
-
e?: string | undefined;
|
|
187
185
|
n?: string | undefined;
|
|
186
|
+
e?: string | undefined;
|
|
187
|
+
d?: string | undefined;
|
|
188
188
|
use?: string | undefined;
|
|
189
189
|
key_ops?: string[] | undefined;
|
|
190
190
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as Result, D as DelegationError } from '../types.schema-
|
|
2
|
-
export { A as AccountDelegationPage, a as AccountDelegationQueryOptions, b as AccountDelegationRecord, c as AccountDelegationResource, C as CapabilityEntry, d as CreateDelegationParams, e as CreateDelegationWasmParams, f as CreateDelegationWasmResult, g as DelegatedResource, h as Delegation, i as DelegationApiResponse, j as DelegationChain, k as DelegationChainV2, l as DelegationDirection, m as DelegationErrorCode, n as DelegationErrorCodes, o as DelegationFilters, p as DelegationManagerConfig, q as DelegationRecord, r as DelegationRevocationReceipt, s as DelegationStatus, G as GenerateShareParams, I as IngestOptions, J as JWK, K as KeyInfo, t as KeyProvider, u as KeyType, S as SessionInvocationSigner, v as ShareLink, w as ShareLinkData, x as ShareSchema, y as SpaceInfo, z as SpaceOwnership } from '../types.schema-
|
|
3
|
-
import { I as ICapabilityKeyRegistry } from '../recipient-types.schema
|
|
4
|
-
export { C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, a as CreateOwnerDelegationParams, b as CredentialInvitationRequest, D as DELIVERY_ADMISSION_DOMAIN, c as DelegateReceivedShareParams, d as DelegatedShareAccess, e as DelegatedShareKey, f as DelegationManager, g as DeliveryAdmission, E as EncodedShareData, h as ISharingService, M as MAX_CONTENT_BYTES, i as MAX_SEALED_SHARE_CONTENT_BYTES, j as MAX_SHARE_ARTIFACT_BYTES, k as MAX_SHARE_CONTENT_BYTES, l as MemorySenderShareKeyStorage, m as MemorySenderShareRecordStorage, n as MemoryShareCache, O as OwnerDelegationPermission, o as OwnerDelegationReceipt, p as OwnerShareAction, q as OwnerShareDecryption, r as OwnerShareMatcher, s as OwnerSharePolicyRegistration, t as OwnerSharePolicyRegistrationReceipt, u as OwnerSharePolicyV2, P as PortableDelegationImportReceipt, R as ReceiveOptions, v as RegisterOwnerSharePolicyParams, S as SenderShareKeyStorage, w as SenderShareRecord, x as SenderShareRecordStorage, y as SenderShareRevocationScope, z as SenderShareStore, A as ShareAccess, B as ShareAccessError, F as ShareAccessV2, G as ShareAction, H as ShareActionSchema, J as ShareAddressedDelegationEnvelopeV2, K as ShareAddressedDelegationEnvelopeV2Schema, L as ShareAddressedDelegationRequestV2, N as ShareAddressedDelegationRequestV2Schema, Q as ShareAddressedDelegationResponseV2, T as ShareAddressedDelegationResponseV2Schema, U as ShareAddressedRecipientMatcher, V as ShareArtifactInput, W as ShareArtifactResult, X as ShareArtifactV2, Y as ShareCache, Z as ShareCacheEntry, _ as ShareCacheKey, $ as ShareCacheMetadata, a0 as ShareCapabilityLike, a1 as ShareConflict, a2 as ShareContentMetadata, a3 as ShareContentSource, a4 as ShareDelegationPreflight, a5 as ShareDeliveryAuthorizationV3Receipt, a6 as ShareDeliveryAuthorizationV3Request, a7 as ShareDeliveryRefusedError, a8 as ShareDetachedProof, a9 as ShareEnvelopeError, aa as ShareEnvelopeV2, ab as ShareExpiryBounds, ac as ShareKvContentSource, ad as ShareLinkLocation, ae as ShareListEntry, af as ShareListResult, ag as ShareNativeAction, ah as ShareNativeInvokeEnvelopeV1, ai as ShareNativeInvokeErrorResult, aj as ShareNativeInvokeInput, ak as ShareNativeInvokeResult, al as ShareNativeInvokeSuccessResult, am as ShareNativeResponse, an as ShareNativeResponseSchema, ao as SharePolicy, ap as SharePolicyBinding, aq as SharePolicySession, ar as SharePolicySessionV1, as as SharePolicySessionWireV1, at as SharePortableDelegation, au as ShareReadInvocationV1, av as ShareReadResult, aw as ShareRecipientClient, ax as ShareRecipientClientOptions, ay as ShareRecipientClientOptionsSchema, az as ShareRecipientPolicy, aA as ShareRecipientPolicySchema, aB as ShareRecipientResult, aC as ShareRecipientTarget, aD as ShareRecipientTargetSchema, aE as ShareResource, aF as ShareResourceSchema, aG as ShareSaveOptions, aH as ShareSqlContentSource, aI as ShareWireAction, aJ as SharingService, aK as SharingServiceConfig, aL as SignedDelegation, aM as VerifyShareEnvelopeOptions, aN as canonicalOwnerSharePolicy, aO as computeOwnerShareRegistrationCid, aP as computeShareCid, aQ as createDelegatedShareKey, aR as createPolicyEnforcementDelegation, aS as createShareArtifact, aT as createShareArtifactAsync, aU as createSharePolicy, aV as createSharingService, aW as decryptShareBytesAsync, aX as delegatePortablePolicySession, aY as encodeInlineShareUrl, aZ as encodeShareArtifact, a_ as encodeShareUrl, a$ as encryptShareBytes, b0 as encryptShareBytesAsync, b1 as importPortableDelegation, b2 as intersectShareCapabilities, b3 as isV2ShareLink, b4 as normalizeShareActions, b5 as normalizeShareRecipientTarget, b6 as normalizeShareResource, b7 as parsePortableDelegation, b8 as parseShareArtifact, b9 as parseShareUrl, ba as restoreDelegatedShareKey, bb as serializePortableDelegation, bc as shareCapabilityAllows, bd as shortDeliveryLinkBodyCid, be as signShareEnvelope, bf as validateOwnerSharePolicyRegistration, bg as validateOwnerSharePolicyRegistrationBytes, bh as verifyShareCid, bi as verifyShareDeliveryAuthorizationV3Bytes, bj as verifyShareEnvelope, bk as withoutShareLink } from '../recipient-types.schema
|
|
1
|
+
import { R as Result, D as DelegationError } from '../types.schema-B0ZUx7Ss.js';
|
|
2
|
+
export { A as AccountDelegationPage, a as AccountDelegationQueryOptions, b as AccountDelegationRecord, c as AccountDelegationResource, C as CapabilityEntry, d as CreateDelegationParams, e as CreateDelegationWasmParams, f as CreateDelegationWasmResult, g as DelegatedResource, h as Delegation, i as DelegationApiResponse, j as DelegationChain, k as DelegationChainV2, l as DelegationDirection, m as DelegationErrorCode, n as DelegationErrorCodes, o as DelegationFilters, p as DelegationManagerConfig, q as DelegationRecord, r as DelegationRevocationReceipt, s as DelegationStatus, G as GenerateShareParams, I as IngestOptions, J as JWK, K as KeyInfo, t as KeyProvider, u as KeyType, S as SessionInvocationSigner, v as ShareLink, w as ShareLinkData, x as ShareSchema, y as SpaceInfo, z as SpaceOwnership } from '../types.schema-B0ZUx7Ss.js';
|
|
3
|
+
import { I as ICapabilityKeyRegistry } from '../recipient-types.schema--5j8kRNE.js';
|
|
4
|
+
export { C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, a as CreateOwnerDelegationParams, b as CredentialInvitationRequest, D as DELIVERY_ADMISSION_DOMAIN, c as DelegateReceivedShareParams, d as DelegatedShareAccess, e as DelegatedShareKey, f as DelegationManager, g as DeliveryAdmission, E as EncodedShareData, h as ISharingService, M as MAX_CONTENT_BYTES, i as MAX_SEALED_SHARE_CONTENT_BYTES, j as MAX_SHARE_ARTIFACT_BYTES, k as MAX_SHARE_CONTENT_BYTES, l as MemorySenderShareKeyStorage, m as MemorySenderShareRecordStorage, n as MemoryShareCache, O as OwnerDelegationPermission, o as OwnerDelegationReceipt, p as OwnerShareAction, q as OwnerShareDecryption, r as OwnerShareMatcher, s as OwnerSharePolicyRegistration, t as OwnerSharePolicyRegistrationReceipt, u as OwnerSharePolicyV2, P as PortableDelegationImportReceipt, R as ReceiveOptions, v as RegisterOwnerSharePolicyParams, S as SenderShareKeyStorage, w as SenderShareRecord, x as SenderShareRecordStorage, y as SenderShareRevocationScope, z as SenderShareStore, A as ShareAccess, B as ShareAccessError, F as ShareAccessV2, G as ShareAction, H as ShareActionSchema, J as ShareAddressedDelegationEnvelopeV2, K as ShareAddressedDelegationEnvelopeV2Schema, L as ShareAddressedDelegationRequestV2, N as ShareAddressedDelegationRequestV2Schema, Q as ShareAddressedDelegationResponseV2, T as ShareAddressedDelegationResponseV2Schema, U as ShareAddressedRecipientMatcher, V as ShareArtifactInput, W as ShareArtifactResult, X as ShareArtifactV2, Y as ShareCache, Z as ShareCacheEntry, _ as ShareCacheKey, $ as ShareCacheMetadata, a0 as ShareCapabilityLike, a1 as ShareConflict, a2 as ShareContentMetadata, a3 as ShareContentSource, a4 as ShareDelegationPreflight, a5 as ShareDeliveryAuthorizationV3Receipt, a6 as ShareDeliveryAuthorizationV3Request, a7 as ShareDeliveryRefusedError, a8 as ShareDetachedProof, a9 as ShareEnvelopeError, aa as ShareEnvelopeV2, ab as ShareExpiryBounds, ac as ShareKvContentSource, ad as ShareLinkLocation, ae as ShareListEntry, af as ShareListResult, ag as ShareNativeAction, ah as ShareNativeInvokeEnvelopeV1, ai as ShareNativeInvokeErrorResult, aj as ShareNativeInvokeInput, ak as ShareNativeInvokeResult, al as ShareNativeInvokeSuccessResult, am as ShareNativeResponse, an as ShareNativeResponseSchema, ao as SharePolicy, ap as SharePolicyBinding, aq as SharePolicySession, ar as SharePolicySessionV1, as as SharePolicySessionWireV1, at as SharePortableDelegation, au as ShareReadInvocationV1, av as ShareReadResult, aw as ShareRecipientClient, ax as ShareRecipientClientOptions, ay as ShareRecipientClientOptionsSchema, az as ShareRecipientPolicy, aA as ShareRecipientPolicySchema, aB as ShareRecipientResult, aC as ShareRecipientTarget, aD as ShareRecipientTargetSchema, aE as ShareResource, aF as ShareResourceSchema, aG as ShareSaveOptions, aH as ShareSqlContentSource, aI as ShareWireAction, aJ as SharingService, aK as SharingServiceConfig, aL as SignedDelegation, aM as VerifyShareEnvelopeOptions, aN as canonicalOwnerSharePolicy, aO as computeOwnerShareRegistrationCid, aP as computeShareCid, aQ as createDelegatedShareKey, aR as createPolicyEnforcementDelegation, aS as createShareArtifact, aT as createShareArtifactAsync, aU as createSharePolicy, aV as createSharingService, aW as decryptShareBytesAsync, aX as delegatePortablePolicySession, aY as encodeInlineShareUrl, aZ as encodeShareArtifact, a_ as encodeShareUrl, a$ as encryptShareBytes, b0 as encryptShareBytesAsync, b1 as importPortableDelegation, b2 as intersectShareCapabilities, b3 as isV2ShareLink, b4 as normalizeShareActions, b5 as normalizeShareRecipientTarget, b6 as normalizeShareResource, b7 as parsePortableDelegation, b8 as parseShareArtifact, b9 as parseShareUrl, ba as restoreDelegatedShareKey, bb as serializePortableDelegation, bc as shareCapabilityAllows, bd as shortDeliveryLinkBodyCid, be as signShareEnvelope, bf as validateOwnerSharePolicyRegistration, bg as validateOwnerSharePolicyRegistrationBytes, bh as verifyShareCid, bi as verifyShareDeliveryAuthorizationV3Bytes, bj as verifyShareEnvelope, bk as withoutShareLink } from '../recipient-types.schema--5j8kRNE.js';
|
|
5
5
|
export { EncryptedSenderShareHistory, EncryptedShareHistoryStorage, MemoryEncryptedShareHistoryStorage, ShareAuthorizationAdapter, ShareAuthorizationDenied, ShareAuthorizationMethod, ShareAuthorizationReady, ShareAuthorizationRequired, ShareAuthorizationResult, ShareDeliveryAdapter, ShareErrorCode, ShareErrorInfo, ShareFetchOptions, ShareHistoryView, ShareInspection, ShareMetadata, ShareNotifyResult, ShareNotifyState, SharePolicyPublishAdapter, ShareReceiveError, ShareReceiveResult, ShareRevocationAdapter, ShareRevocationIncompleteError, ShareRevocationResult, ShareRootRevocationFailure, ShareRootRevocationState, ShareTarget, TargetPublishAdapter, TargetPublishInput, TargetPublishOutcome, authorizationMethodForTarget, authorizeShare, claimShare, inspectShare, listShares, notifyShare, publishPolicyShare, publishTargetShare, receiveShare, resumeShareAuthorization, revokeShare, showShare, toShareErrorInfo } from '@tinycloud/share-sdk';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { ServiceSession, InvokeFunction, FetchFunction, IKVService } from '@tinycloud/sdk-services';
|
|
@@ -42,9 +42,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
42
42
|
crv?: string | undefined;
|
|
43
43
|
x?: string | undefined;
|
|
44
44
|
y?: string | undefined;
|
|
45
|
-
d?: string | undefined;
|
|
46
|
-
e?: string | undefined;
|
|
47
45
|
n?: string | undefined;
|
|
46
|
+
e?: string | undefined;
|
|
47
|
+
d?: string | undefined;
|
|
48
48
|
use?: string | undefined;
|
|
49
49
|
key_ops?: string[] | undefined;
|
|
50
50
|
}, {
|
|
@@ -54,9 +54,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
54
54
|
crv?: string | undefined;
|
|
55
55
|
x?: string | undefined;
|
|
56
56
|
y?: string | undefined;
|
|
57
|
-
d?: string | undefined;
|
|
58
|
-
e?: string | undefined;
|
|
59
57
|
n?: string | undefined;
|
|
58
|
+
e?: string | undefined;
|
|
59
|
+
d?: string | undefined;
|
|
60
60
|
use?: string | undefined;
|
|
61
61
|
key_ops?: string[] | undefined;
|
|
62
62
|
}>, {
|
|
@@ -66,9 +66,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
66
66
|
crv?: string | undefined;
|
|
67
67
|
x?: string | undefined;
|
|
68
68
|
y?: string | undefined;
|
|
69
|
-
d?: string | undefined;
|
|
70
|
-
e?: string | undefined;
|
|
71
69
|
n?: string | undefined;
|
|
70
|
+
e?: string | undefined;
|
|
71
|
+
d?: string | undefined;
|
|
72
72
|
use?: string | undefined;
|
|
73
73
|
key_ops?: string[] | undefined;
|
|
74
74
|
}, {
|
|
@@ -78,9 +78,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
78
78
|
crv?: string | undefined;
|
|
79
79
|
x?: string | undefined;
|
|
80
80
|
y?: string | undefined;
|
|
81
|
-
d?: string | undefined;
|
|
82
|
-
e?: string | undefined;
|
|
83
81
|
n?: string | undefined;
|
|
82
|
+
e?: string | undefined;
|
|
83
|
+
d?: string | undefined;
|
|
84
84
|
use?: string | undefined;
|
|
85
85
|
key_ops?: string[] | undefined;
|
|
86
86
|
}>;
|
|
@@ -148,9 +148,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
148
148
|
crv?: string | undefined;
|
|
149
149
|
x?: string | undefined;
|
|
150
150
|
y?: string | undefined;
|
|
151
|
-
d?: string | undefined;
|
|
152
|
-
e?: string | undefined;
|
|
153
151
|
n?: string | undefined;
|
|
152
|
+
e?: string | undefined;
|
|
153
|
+
d?: string | undefined;
|
|
154
154
|
use?: string | undefined;
|
|
155
155
|
key_ops?: string[] | undefined;
|
|
156
156
|
};
|
|
@@ -182,9 +182,9 @@ declare const EncodedShareDataSchema: z.ZodObject<{
|
|
|
182
182
|
crv?: string | undefined;
|
|
183
183
|
x?: string | undefined;
|
|
184
184
|
y?: string | undefined;
|
|
185
|
-
d?: string | undefined;
|
|
186
|
-
e?: string | undefined;
|
|
187
185
|
n?: string | undefined;
|
|
186
|
+
e?: string | undefined;
|
|
187
|
+
d?: string | undefined;
|
|
188
188
|
use?: string | undefined;
|
|
189
189
|
key_ops?: string[] | undefined;
|
|
190
190
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchFunction } from '@tinycloud/sdk-services';
|
|
2
|
-
import { S as SessionInvocationSigner, a as AccountDelegationQueryOptions, R as Result, A as AccountDelegationPage, b as AccountDelegationRecord, r as DelegationRevocationReceipt } from '../types.schema-
|
|
2
|
+
import { S as SessionInvocationSigner, a as AccountDelegationQueryOptions, R as Result, A as AccountDelegationPage, b as AccountDelegationRecord, r as DelegationRevocationReceipt } from '../types.schema-B0ZUx7Ss.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchFunction } from '@tinycloud/sdk-services';
|
|
2
|
-
import { S as SessionInvocationSigner, a as AccountDelegationQueryOptions, R as Result, A as AccountDelegationPage, b as AccountDelegationRecord, r as DelegationRevocationReceipt } from '../types.schema-
|
|
2
|
+
import { S as SessionInvocationSigner, a as AccountDelegationQueryOptions, R as Result, A as AccountDelegationPage, b as AccountDelegationRecord, r as DelegationRevocationReceipt } from '../types.schema-B0ZUx7Ss.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -452,6 +452,7 @@ __export(index_exports, {
|
|
|
452
452
|
principalDidEquals: () => principalDidEquals,
|
|
453
453
|
projectUnifiedPolicyCapabilities: () => projectUnifiedPolicyCapabilities,
|
|
454
454
|
projectUnifiedPolicyCapability: () => projectUnifiedPolicyCapability,
|
|
455
|
+
publicJwk: () => publicJwk,
|
|
455
456
|
publishLocationRecord: () => publishLocationRecord,
|
|
456
457
|
recapCaveatsEqual: () => recapCaveatsEqual,
|
|
457
458
|
refreshOwnerRegistry: () => refreshOwnerRegistry,
|
|
@@ -1378,6 +1379,35 @@ function makePkhSpaceId(address, chainId, name2) {
|
|
|
1378
1379
|
return `tinycloud:pkh:eip155:${chainId}:${canonicalizeAddress(address)}:${name2}`;
|
|
1379
1380
|
}
|
|
1380
1381
|
|
|
1382
|
+
// src/jwk.ts
|
|
1383
|
+
var PUBLIC_MEMBERS = {
|
|
1384
|
+
OKP: ["kty", "crv", "x"],
|
|
1385
|
+
EC: ["kty", "crv", "x", "y"],
|
|
1386
|
+
RSA: ["kty", "n", "e"]
|
|
1387
|
+
};
|
|
1388
|
+
var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
1389
|
+
function publicJwk(jwk) {
|
|
1390
|
+
if (!jwk || typeof jwk !== "object" || Array.isArray(jwk)) {
|
|
1391
|
+
throw new TypeError("A JWK must be an object");
|
|
1392
|
+
}
|
|
1393
|
+
const source = jwk;
|
|
1394
|
+
const kty = hasOwn(source, "kty") ? source.kty : void 0;
|
|
1395
|
+
const members = typeof kty === "string" && hasOwn(PUBLIC_MEMBERS, kty) ? PUBLIC_MEMBERS[kty] : void 0;
|
|
1396
|
+
if (!members) {
|
|
1397
|
+
throw new TypeError(`JWK key type ${JSON.stringify(kty)} has no public form`);
|
|
1398
|
+
}
|
|
1399
|
+
const result = {};
|
|
1400
|
+
for (const member of members) {
|
|
1401
|
+
const value = hasOwn(source, member) ? source[member] : void 0;
|
|
1402
|
+
if (typeof value !== "string" || value === "") {
|
|
1403
|
+
throw new TypeError(`JWK is missing its public "${member}" member`);
|
|
1404
|
+
}
|
|
1405
|
+
result[member] = value;
|
|
1406
|
+
}
|
|
1407
|
+
if (hasOwn(source, "kid") && typeof source.kid === "string") result.kid = source.kid;
|
|
1408
|
+
return result;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1381
1411
|
// src/requester/index.ts
|
|
1382
1412
|
var import_viem4 = require("viem");
|
|
1383
1413
|
var import_blake32 = require("@noble/hashes/blake3");
|
|
@@ -2388,7 +2418,7 @@ function normalizePolicyCapabilityWithOptions(input, options2) {
|
|
|
2388
2418
|
output.space = canonicalSpace;
|
|
2389
2419
|
output.path = path;
|
|
2390
2420
|
output.actions = actions;
|
|
2391
|
-
if (
|
|
2421
|
+
if (hasOwn2(object4, "caveats")) {
|
|
2392
2422
|
output.caveats = validateCaveats(
|
|
2393
2423
|
requiredValue(object4, "caveats", "$", "policy-capability-malformed-caveats"),
|
|
2394
2424
|
output.service
|
|
@@ -2425,7 +2455,7 @@ function assertExactKeys(object4, allowed, path) {
|
|
|
2425
2455
|
}
|
|
2426
2456
|
}
|
|
2427
2457
|
function requiredValue(object4, key, path, code3) {
|
|
2428
|
-
if (!
|
|
2458
|
+
if (!hasOwn2(object4, key)) {
|
|
2429
2459
|
throw new PolicyCapabilityError(code3, `${path}.${key} is required`);
|
|
2430
2460
|
}
|
|
2431
2461
|
return object4[key];
|
|
@@ -2625,7 +2655,7 @@ function assertCaveatKeys(object4, allowed, path) {
|
|
|
2625
2655
|
}
|
|
2626
2656
|
}
|
|
2627
2657
|
function requiredCaveat(object4, key, path) {
|
|
2628
|
-
if (!
|
|
2658
|
+
if (!hasOwn2(object4, key)) {
|
|
2629
2659
|
throw new PolicyCapabilityError(
|
|
2630
2660
|
"policy-capability-malformed-caveats",
|
|
2631
2661
|
`${path}.${key} is required`
|
|
@@ -2665,7 +2695,7 @@ function caveatsContain(authority, request) {
|
|
|
2665
2695
|
(statement) => authorityStatements.some((candidate) => jcsCanonicalize(candidate) === jcsCanonicalize(statement))
|
|
2666
2696
|
);
|
|
2667
2697
|
}
|
|
2668
|
-
function
|
|
2698
|
+
function hasOwn2(object4, key) {
|
|
2669
2699
|
return objectHasOwn2(object4, key);
|
|
2670
2700
|
}
|
|
2671
2701
|
|
|
@@ -3150,10 +3180,10 @@ function validatePolicyShape(input, signed) {
|
|
|
3150
3180
|
validatePolicyResource(requiredValue2(object4, "resource", "$"), "$.resource");
|
|
3151
3181
|
validateExpression(requiredValue2(object4, "when", "$"), "$.when");
|
|
3152
3182
|
validateGrant(requiredValue2(object4, "grant", "$"), "$.grant");
|
|
3153
|
-
if (
|
|
3183
|
+
if (hasOwn3(object4, "disclosure")) {
|
|
3154
3184
|
validateDisclosure(requiredValue2(object4, "disclosure", "$"), "$.disclosure");
|
|
3155
3185
|
}
|
|
3156
|
-
if (
|
|
3186
|
+
if (hasOwn3(object4, "audit")) {
|
|
3157
3187
|
validateAudit(requiredValue2(object4, "audit", "$"), "$.audit");
|
|
3158
3188
|
}
|
|
3159
3189
|
return object4;
|
|
@@ -3351,7 +3381,7 @@ function validateEvidenceRequirement(input, path) {
|
|
|
3351
3381
|
requiredString2(object4, "requirementId", path);
|
|
3352
3382
|
requiredString2(object4, "verifier", path);
|
|
3353
3383
|
requiredValue2(object4, "requirements", path);
|
|
3354
|
-
if (
|
|
3384
|
+
if (hasOwn3(object4, "authority")) {
|
|
3355
3385
|
const authority = expectJsonObject(requiredValue2(object4, "authority", path), `${path}.authority`);
|
|
3356
3386
|
assertExactKeys2(
|
|
3357
3387
|
authority,
|
|
@@ -3359,12 +3389,12 @@ function validateEvidenceRequirement(input, path) {
|
|
|
3359
3389
|
`${path}.authority`
|
|
3360
3390
|
);
|
|
3361
3391
|
optionalString(authority, "profile", `${path}.authority`);
|
|
3362
|
-
if (
|
|
3392
|
+
if (hasOwn3(authority, "acceptedIssuers")) {
|
|
3363
3393
|
requiredStringArray(authority, "acceptedIssuers", `${path}.authority`);
|
|
3364
3394
|
}
|
|
3365
3395
|
optionalBoolean(authority, "allowOwnerAuthorizedIssuer", `${path}.authority`);
|
|
3366
3396
|
}
|
|
3367
|
-
if (
|
|
3397
|
+
if (hasOwn3(object4, "freshness")) {
|
|
3368
3398
|
const freshness = expectJsonObject(requiredValue2(object4, "freshness", path), `${path}.freshness`);
|
|
3369
3399
|
assertExactKeys2(freshness, ["maxStatusAgeSeconds"], `${path}.freshness`);
|
|
3370
3400
|
requiredInteger(freshness, "maxStatusAgeSeconds", `${path}.freshness`, 0);
|
|
@@ -3424,7 +3454,7 @@ function assertIdMatches(signed, material, descriptor) {
|
|
|
3424
3454
|
throw new SignedObjectIdError(`${descriptor.idField} does not match ${descriptor.idPrefix}`);
|
|
3425
3455
|
}
|
|
3426
3456
|
function assertSigningKeyBindingForCreate(unsigned, signerDid) {
|
|
3427
|
-
if (!
|
|
3457
|
+
if (!hasOwn3(unsigned, "signingKeyDid")) {
|
|
3428
3458
|
return;
|
|
3429
3459
|
}
|
|
3430
3460
|
const signingKeyDid = requiredString2(unsigned, "signingKeyDid", "$");
|
|
@@ -3435,7 +3465,7 @@ function assertSigningKeyBindingForCreate(unsigned, signerDid) {
|
|
|
3435
3465
|
}
|
|
3436
3466
|
}
|
|
3437
3467
|
function assertSigningKeyBindingForVerify(signed, signature) {
|
|
3438
|
-
if (!
|
|
3468
|
+
if (!hasOwn3(signed, "signingKeyDid")) {
|
|
3439
3469
|
return;
|
|
3440
3470
|
}
|
|
3441
3471
|
const signingKeyDid = requiredString2(signed, "signingKeyDid", "$");
|
|
@@ -3576,7 +3606,7 @@ function assertExactKeys2(object4, allowed, path) {
|
|
|
3576
3606
|
}
|
|
3577
3607
|
}
|
|
3578
3608
|
function requiredValue2(object4, key, path) {
|
|
3579
|
-
if (!
|
|
3609
|
+
if (!hasOwn3(object4, key)) {
|
|
3580
3610
|
throw new SignedObjectSchemaError(`${path}.${key} is required`);
|
|
3581
3611
|
}
|
|
3582
3612
|
return object4[key];
|
|
@@ -3585,7 +3615,7 @@ function requiredString2(object4, key, path) {
|
|
|
3585
3615
|
return requireStringType(requiredValue2(object4, key, path), `${path}.${key}`);
|
|
3586
3616
|
}
|
|
3587
3617
|
function optionalString(object4, key, path) {
|
|
3588
|
-
if (!
|
|
3618
|
+
if (!hasOwn3(object4, key)) {
|
|
3589
3619
|
return;
|
|
3590
3620
|
}
|
|
3591
3621
|
requireStringType(requiredValue2(object4, key, path), `${path}.${key}`);
|
|
@@ -3597,7 +3627,7 @@ function requireStringType(value, path) {
|
|
|
3597
3627
|
return value;
|
|
3598
3628
|
}
|
|
3599
3629
|
function optionalBoolean(object4, key, path) {
|
|
3600
|
-
if (!
|
|
3630
|
+
if (!hasOwn3(object4, key)) {
|
|
3601
3631
|
return;
|
|
3602
3632
|
}
|
|
3603
3633
|
if (typeof requiredValue2(object4, key, path) !== "boolean") {
|
|
@@ -3634,7 +3664,7 @@ function requiredDateString(object4, key, path) {
|
|
|
3634
3664
|
assertRfc3339(requiredString2(object4, key, path), `${path}.${key}`);
|
|
3635
3665
|
}
|
|
3636
3666
|
function optionalDateString(object4, key, path) {
|
|
3637
|
-
if (!
|
|
3667
|
+
if (!hasOwn3(object4, key)) {
|
|
3638
3668
|
return;
|
|
3639
3669
|
}
|
|
3640
3670
|
assertRfc3339(requiredString2(object4, key, path), `${path}.${key}`);
|
|
@@ -3669,7 +3699,7 @@ function expectOneOf(actual, allowed, path) {
|
|
|
3669
3699
|
}
|
|
3670
3700
|
throw new SignedObjectSchemaError(`${path} has unsupported value ${actual}`);
|
|
3671
3701
|
}
|
|
3672
|
-
function
|
|
3702
|
+
function hasOwn3(object4, key) {
|
|
3673
3703
|
return objectHasOwn3(object4, key);
|
|
3674
3704
|
}
|
|
3675
3705
|
function assertSupportedSignatureSuite(suite) {
|
|
@@ -3787,7 +3817,7 @@ async function verifyPolicyEngineRecordForRequester(options2) {
|
|
|
3787
3817
|
],
|
|
3788
3818
|
"$"
|
|
3789
3819
|
);
|
|
3790
|
-
if (!
|
|
3820
|
+
if (!hasOwn4(normalized, "signedRecord")) {
|
|
3791
3821
|
throw new PolicyAuthoringError(
|
|
3792
3822
|
"policy-engine-record-absent",
|
|
3793
3823
|
"$.signedRecord must be present"
|
|
@@ -3861,14 +3891,14 @@ async function verifyPolicyEngineRecordForRequester(options2) {
|
|
|
3861
3891
|
"$.signedRecord.grantIssuerDid does not match"
|
|
3862
3892
|
);
|
|
3863
3893
|
}
|
|
3864
|
-
const requiredPolicyVersion =
|
|
3894
|
+
const requiredPolicyVersion = hasOwn4(normalized, "requiredPolicyVersion") ? requiredString3(normalized, "requiredPolicyVersion", "$") : POLICY_VERSION_V0;
|
|
3865
3895
|
if (!verified.supportedPolicyVersions.includes(requiredPolicyVersion)) {
|
|
3866
3896
|
throw new PolicyAuthoringError(
|
|
3867
3897
|
"policy-engine-record-policy-version-unsupported",
|
|
3868
3898
|
"$.signedRecord.supportedPolicyVersions does not include the required version"
|
|
3869
3899
|
);
|
|
3870
3900
|
}
|
|
3871
|
-
const requiredEvidenceVerifier =
|
|
3901
|
+
const requiredEvidenceVerifier = hasOwn4(
|
|
3872
3902
|
normalized,
|
|
3873
3903
|
"requiredEvidenceVerifier"
|
|
3874
3904
|
) ? requiredString3(normalized, "requiredEvidenceVerifier", "$") : W3C_VC_CREDENTIAL_VERIFIER;
|
|
@@ -3909,7 +3939,7 @@ function assertExactKeys3(object4, allowed, path) {
|
|
|
3909
3939
|
}
|
|
3910
3940
|
}
|
|
3911
3941
|
function requiredValue3(object4, key, path) {
|
|
3912
|
-
if (!
|
|
3942
|
+
if (!hasOwn4(object4, key)) {
|
|
3913
3943
|
throw new PolicyAuthoringError(
|
|
3914
3944
|
"policy-authoring-malformed",
|
|
3915
3945
|
`${path}.${key} is required`
|
|
@@ -3928,7 +3958,7 @@ function requiredString3(object4, key, path) {
|
|
|
3928
3958
|
return value;
|
|
3929
3959
|
}
|
|
3930
3960
|
function fieldString(object4, key, path, code3) {
|
|
3931
|
-
if (!
|
|
3961
|
+
if (!hasOwn4(object4, key)) {
|
|
3932
3962
|
throw new PolicyAuthoringError(code3, `${path}.${key} is required`);
|
|
3933
3963
|
}
|
|
3934
3964
|
const value = object4[key];
|
|
@@ -3969,7 +3999,7 @@ function parseStrictRfc3339(value, path) {
|
|
|
3969
3999
|
var objectHasOwn4 = Object.hasOwn ?? Object.prototype.hasOwnProperty.call.bind(
|
|
3970
4000
|
Object.prototype.hasOwnProperty
|
|
3971
4001
|
);
|
|
3972
|
-
function
|
|
4002
|
+
function hasOwn4(object4, key) {
|
|
3973
4003
|
return objectHasOwn4(object4, key);
|
|
3974
4004
|
}
|
|
3975
4005
|
|