@tinycloud/sdk-core 3.0.0-beta.0 → 3.0.0-beta.10

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.
@@ -3494,101 +3494,74 @@ declare function validateOwnerSharePolicyRegistration(value: unknown, expected:
3494
3494
  /** Validate the exact UTF-8 response bytes emitted by the registration route. */
3495
3495
  declare function validateOwnerSharePolicyRegistrationBytes(bytesValue: Uint8Array, expected: RegisterOwnerSharePolicyParams): OwnerSharePolicyRegistrationReceipt;
3496
3496
 
3497
- /** Matches V2_DELIVERY_DOMAIN in tinycloud-node-server/src/share_v2.rs. */
3498
- declare const SHARE_DELIVERY_AUTHORIZATION_DOMAIN = "xyz.tinycloud.share/delivery-authorization/v2\0";
3499
- /** Exact camelCase mirror of the Rust `V2DeliveryRequest` wire struct. */
3500
- interface ShareDeliveryAuthorizationRequest {
3501
- readonly envelopeCid: string;
3497
+ declare const CREDENTIAL_INVITATION_REQUEST_DOMAIN = "xyz.tinycloud.credentials/invitation-request/v1\0";
3498
+ declare const DELIVERY_ADMISSION_DOMAIN = "xyz.tinycloud.policy/delivery-admission/v0\0";
3499
+ interface ShareDeliveryAuthorizationV3Request {
3500
+ readonly envelope: Record<string, unknown>;
3501
+ /** Base64url canonical sealed envelope bytes, bound by the Node before delivery. */
3502
+ readonly sealedEnvelope: string;
3503
+ /** Base64url 32-byte AES-GCM key; this is the #k fragment value in the return link. */
3504
+ readonly envelopeKey: string;
3502
3505
  readonly shareCid: string;
3503
- readonly shareId: string;
3504
- readonly registrationCid: string;
3505
- readonly policyCid: string;
3506
- readonly delegationCid: string;
3507
- readonly enforcementDelegationCid: string;
3508
3506
  readonly recipientEmail: string;
3509
3507
  readonly shareUrl: string;
3510
3508
  readonly documentName: string;
3511
3509
  readonly jti: string;
3512
- readonly idempotencyKey: string;
3513
3510
  readonly expiresAt: string;
3514
3511
  readonly requestBodyDigest: string;
3515
3512
  }
3516
- /** Exact mirror of the `authorization` object the Node route signs and returns. */
3517
- interface ShareDeliveryAuthorization {
3518
- readonly type: "TinyCloudShareDeliveryAuthorization";
3519
- readonly version: 2;
3520
- readonly jti: string;
3521
- readonly shareCid: string;
3522
- readonly shareId: string;
3523
- readonly registrationCid: string;
3524
- readonly delegationCid: string;
3525
- readonly enforcementDelegationCid: string;
3526
- readonly envelopeCid: string;
3527
- readonly policyCid: string;
3528
- readonly nodeAudience: string;
3529
- readonly targetOrigin: string;
3530
- /**
3531
- * The OpenCredentials witness this delivery is scoped to, sourced from
3532
- * Node's own trusted credentials origin. Deliberately distinct from
3533
- * `nodeAudience` (the node's own DID) and `returnOrigin` (Share's page
3534
- * origin) — conflating any of these three would let a party impersonate
3535
- * another's audience.
3536
- */
3537
- readonly openCredentialsAudience: string;
3538
- readonly holder: string;
3539
- readonly recipientMatcher: unknown;
3540
- readonly deliveryEmail: string;
3541
- readonly shareUrl: string;
3542
- readonly returnOrigin: string;
3543
- readonly documentName: string;
3544
- readonly senderDid: string;
3545
- readonly senderTrust: string;
3546
- readonly contentSource: unknown;
3547
- readonly contentSourceDigest: string;
3513
+ interface CredentialInvitationRequest {
3514
+ readonly schema: "xyz.tinycloud.credentials/invitation-request/v1";
3515
+ readonly policyId: string;
3516
+ readonly recipient: string;
3517
+ readonly resource: string;
3518
+ readonly credentialType: string;
3519
+ readonly returnLink: string;
3520
+ readonly envelopeRef: string;
3521
+ readonly label: string;
3548
3522
  readonly shareExpiresAt: string;
3523
+ readonly audience: string;
3549
3524
  readonly issuedAt: string;
3550
- readonly reportAbuseToken: string;
3551
- readonly actions: readonly string[];
3525
+ readonly expiresAt: string;
3526
+ readonly nonce: string;
3527
+ }
3528
+ interface DeliveryAdmission {
3529
+ readonly schema: "xyz.tinycloud.policy/delivery-admission/v0";
3530
+ readonly policyId: string;
3531
+ readonly ownerDid: string;
3532
+ readonly recipient: string;
3552
3533
  readonly resource: string;
3553
- readonly authorityMaterialHandle: string;
3554
- readonly authorityMaterialDigest: string;
3555
- readonly requestBodyDigest: string;
3556
- readonly idempotencyKey: string;
3534
+ readonly actions: readonly ["tinycloud.kv/get"];
3535
+ readonly credentialType: string;
3536
+ readonly returnLink: string;
3537
+ readonly envelopeRef: string;
3538
+ readonly label: string;
3539
+ readonly shareExpiresAt: string;
3540
+ readonly senderKeyDid: string;
3541
+ readonly audience: string;
3542
+ readonly issuedAt: string;
3557
3543
  readonly expiresAt: string;
3558
- readonly dataAuthority: false;
3544
+ readonly nonce: string;
3545
+ readonly signature: {
3546
+ readonly suite: "eddsa-ed25519-sha256-jcs-v1";
3547
+ readonly signerDid: string;
3548
+ readonly value: string;
3549
+ };
3559
3550
  }
3560
- interface ShareDeliveryAuthorizationReceipt {
3561
- readonly authorization: ShareDeliveryAuthorization;
3551
+ interface ShareDeliveryAuthorizationV3Receipt {
3552
+ readonly request: CredentialInvitationRequest;
3553
+ readonly admission: DeliveryAdmission;
3562
3554
  readonly proof: {
3563
3555
  readonly alg: "EdDSA";
3564
3556
  readonly kid: string;
3565
3557
  readonly signature: string;
3566
3558
  };
3567
3559
  }
3568
- interface ValidateShareDeliveryAuthorizationExpected {
3569
- readonly request: ShareDeliveryAuthorizationRequest;
3570
- /** The enrolled receipt key from the node trust bundle. */
3571
- readonly nodeProof: {
3572
- readonly kid: string;
3573
- readonly publicKey: Uint8Array;
3574
- };
3575
- /**
3576
- * The OpenCredentials witness origin the caller trusts, from the same
3577
- * trust bundle as `nodeProof`. Validated independently of the
3578
- * authorization's own `nodeAudience`/`returnOrigin` fields so a Node that
3579
- * mislabels or omits its credentials origin fails closed here rather than
3580
- * silently inheriting one of those unrelated identities.
3581
- */
3582
- readonly credentialsAudience: string;
3583
- }
3584
- /**
3585
- * Validate the exact UTF-8 response bytes emitted by
3586
- * `POST /share/v2/deliveries/authorize`, bind them to the submitted
3587
- * request, and verify the Node's detached EdDSA proof.
3588
- */
3589
- declare function validateShareDeliveryAuthorizationBytes(bytesValue: Uint8Array, expected: ValidateShareDeliveryAuthorizationExpected): ShareDeliveryAuthorizationReceipt;
3590
- /** Build the trusted-signer descriptor `did:key:...#z...` expects from a raw node signing key. */
3591
- declare function shareDeliveryTrustedKid(publicKey: Uint8Array): string;
3560
+ declare function validateShareDeliveryAuthorizationV3Bytes(bytes: Uint8Array, expected: {
3561
+ readonly request: ShareDeliveryAuthorizationV3Request;
3562
+ readonly senderKeyDid: string;
3563
+ readonly deliveryAudience: string;
3564
+ }): Omit<ShareDeliveryAuthorizationV3Receipt, "proof">;
3592
3565
 
3593
3566
  /**
3594
3567
  * The durable record a sender needs, after a reload, to display and manage
@@ -4572,4 +4545,4 @@ declare const ShareNativeResponseSchema: z.ZodDiscriminatedUnion<"action", [z.Zo
4572
4545
  }>]>;
4573
4546
  type ShareNativeResponse = z.infer<typeof ShareNativeResponseSchema>;
4574
4547
 
4575
- export { type ReceiveOptions as $, type AccountDelegationPage as A, type KeyProvider as B, type CapabilityEntry as C, DelegationManager as D, type EncodedShareData as E, type KeyType as F, type GenerateShareParams as G, MAX_SEALED_SHARE_CONTENT_BYTES as H, type ICapabilityKeyRegistry as I, type JWK as J, type KeyInfo as K, MAX_SHARE_ARTIFACT_BYTES as L, MAX_CONTENT_BYTES as M, MAX_SHARE_CONTENT_BYTES as N, MemorySenderShareKeyStorage as O, MemorySenderShareRecordStorage as P, MemoryShareCache as Q, type Result as R, type OwnerDelegationPermission as S, type OwnerDelegationReceipt as T, type OwnerShareAction as U, type OwnerShareDecryption as V, type OwnerShareMatcher as W, type OwnerSharePolicyRegistration as X, type OwnerSharePolicyRegistrationReceipt as Y, type OwnerSharePolicyV2 as Z, type PortableDelegationImportReceipt as _, type DelegationError as a, ShareRecipientPolicySchema as a$, type RegisterOwnerSharePolicyParams as a0, SHARE_DELIVERY_AUTHORIZATION_DOMAIN as a1, type SenderShareKeyStorage as a2, type SenderShareRecord as a3, type SenderShareRecordStorage as a4, type SenderShareRevocationScope as a5, SenderShareStore as a6, type ShareAccess as a7, ShareAccessError as a8, type ShareAccessV2 as a9, type ShareExpiryBounds as aA, type ShareKvContentSource as aB, type ShareLink as aC, type ShareLinkData as aD, type ShareLinkLocation as aE, type ShareListEntry as aF, type ShareListResult as aG, type ShareNativeAction as aH, type ShareNativeInvokeEnvelopeV1 as aI, type ShareNativeInvokeErrorResult as aJ, type ShareNativeInvokeInput as aK, type ShareNativeInvokeResult as aL, type ShareNativeInvokeSuccessResult as aM, type ShareNativeResponse as aN, ShareNativeResponseSchema as aO, type SharePolicy as aP, type SharePolicyBinding as aQ, type SharePolicySession as aR, type SharePolicySessionV1 as aS, type SharePolicySessionWireV1 as aT, type PortableDelegation as aU, type ShareReadInvocationV1 as aV, type ShareReadResult as aW, ShareRecipientClient as aX, type ShareRecipientClientOptions as aY, ShareRecipientClientOptionsSchema as aZ, type ShareRecipientPolicy as a_, type ShareAction as aa, ShareActionSchema as ab, type ShareAddressedDelegationEnvelopeV2 as ac, ShareAddressedDelegationEnvelopeV2Schema as ad, type ShareAddressedDelegationRequestV2 as ae, ShareAddressedDelegationRequestV2Schema as af, type ShareAddressedDelegationResponseV2 as ag, ShareAddressedDelegationResponseV2Schema as ah, type ShareAddressedRecipientMatcher as ai, type ShareArtifactInput as aj, type ShareArtifactResult as ak, type ShareArtifactV2 as al, type ShareCache as am, type ShareCacheEntry as an, type ShareCacheKey as ao, type ShareCacheMetadata as ap, type ShareCapabilityLike as aq, ShareConflict as ar, type ShareContentMetadata as as, type ShareContentSource as at, type ShareDeliveryAuthorization as au, type ShareDeliveryAuthorizationReceipt as av, type ShareDeliveryAuthorizationRequest as aw, type ShareDetachedProof as ax, ShareEnvelopeError as ay, type ShareEnvelopeV2 as az, type AccountDelegationQueryOptions as b, type ShareRecipientResult as b0, type ShareRecipientTarget as b1, ShareRecipientTargetSchema as b2, type ShareResource as b3, ShareResourceSchema as b4, type ShareSaveOptions as b5, type ShareSchema as b6, type ShareSqlContentSource as b7, type ShareWireAction as b8, SharingService as b9, normalizeShareRecipientTarget as bA, normalizeShareResource as bB, parsePortableDelegation as bC, parseShareArtifact as bD, parseShareUrl as bE, restoreDelegatedShareKey as bF, serializePortableDelegation as bG, shareCapabilityAllows as bH, shareDeliveryTrustedKid as bI, signShareEnvelope as bJ, validateOwnerSharePolicyRegistration as bK, validateOwnerSharePolicyRegistrationBytes as bL, validateShareDeliveryAuthorizationBytes as bM, verifyShareCid as bN, verifyShareEnvelope as bO, CapabilityKeyRegistry as bP, type CapabilityKeyRegistryErrorCode as bQ, CapabilityKeyRegistryErrorCodes as bR, type StoredDelegationChain as bS, createCapabilityKeyRegistry as bT, type SharingServiceConfig as ba, type SignedDelegation as bb, type SpaceInfo as bc, type SpaceOwnership as bd, type ValidateShareDeliveryAuthorizationExpected as be, type VerifyShareEnvelopeOptions as bf, canonicalOwnerSharePolicy as bg, computeOwnerShareRegistrationCid as bh, computeShareCid as bi, createDelegatedShareKey as bj, createPolicyEnforcementDelegation as bk, createShareArtifact as bl, createShareArtifactAsync as bm, createSharePolicy as bn, createSharingService as bo, decryptShareBytesAsync as bp, delegatePortablePolicySession as bq, encodeInlineShareUrl as br, encodeShareArtifact as bs, encodeShareUrl as bt, encryptShareBytes as bu, encryptShareBytesAsync as bv, importPortableDelegation as bw, intersectShareCapabilities as bx, isV2ShareLink as by, normalizeShareActions as bz, type AccountDelegationRecord as c, type AccountDelegationResource as d, type CreateDelegationParams as e, type CreateDelegationWasmParams as f, type CreateDelegationWasmResult as g, type CreateOwnerDelegationParams as h, type DelegateReceivedShareParams as i, type DelegatedResource as j, type DelegatedShareAccess as k, type DelegatedShareKey as l, type Delegation as m, type DelegationApiResponse as n, type DelegationChain as o, type DelegationChainV2 as p, type DelegationDirection as q, type DelegationErrorCode as r, DelegationErrorCodes as s, type DelegationFilters as t, type DelegationManagerConfig as u, type DelegationRecord as v, type DelegationRevocationReceipt as w, type DelegationStatus as x, type ISharingService as y, type IngestOptions as z };
4548
+ export { type OwnerSharePolicyRegistration as $, type AccountDelegationPage as A, type DelegationStatus as B, CREDENTIAL_INVITATION_REQUEST_DOMAIN as C, DelegationManager as D, type DeliveryAdmission as E, type EncodedShareData as F, type GenerateShareParams as G, type ISharingService as H, type ICapabilityKeyRegistry as I, type IngestOptions as J, type JWK as K, type KeyInfo as L, type KeyProvider as M, type KeyType as N, MAX_CONTENT_BYTES as O, MAX_SEALED_SHARE_CONTENT_BYTES as P, MAX_SHARE_ARTIFACT_BYTES as Q, type Result as R, MAX_SHARE_CONTENT_BYTES as S, MemorySenderShareKeyStorage as T, MemorySenderShareRecordStorage as U, MemoryShareCache as V, type OwnerDelegationPermission as W, type OwnerDelegationReceipt as X, type OwnerShareAction as Y, type OwnerShareDecryption as Z, type OwnerShareMatcher as _, type DelegationError as a, ShareRecipientClientOptionsSchema as a$, type OwnerSharePolicyRegistrationReceipt as a0, type OwnerSharePolicyV2 as a1, type PortableDelegationImportReceipt as a2, type ReceiveOptions as a3, type RegisterOwnerSharePolicyParams as a4, type SenderShareKeyStorage as a5, type SenderShareRecord as a6, type SenderShareRecordStorage as a7, type SenderShareRevocationScope as a8, SenderShareStore as a9, ShareEnvelopeError as aA, type ShareEnvelopeV2 as aB, type ShareExpiryBounds as aC, type ShareKvContentSource as aD, type ShareLink as aE, type ShareLinkData as aF, type ShareLinkLocation as aG, type ShareListEntry as aH, type ShareListResult as aI, type ShareNativeAction as aJ, type ShareNativeInvokeEnvelopeV1 as aK, type ShareNativeInvokeErrorResult as aL, type ShareNativeInvokeInput as aM, type ShareNativeInvokeResult as aN, type ShareNativeInvokeSuccessResult as aO, type ShareNativeResponse as aP, ShareNativeResponseSchema as aQ, type SharePolicy as aR, type SharePolicyBinding as aS, type SharePolicySession as aT, type SharePolicySessionV1 as aU, type SharePolicySessionWireV1 as aV, type PortableDelegation as aW, type ShareReadInvocationV1 as aX, type ShareReadResult as aY, ShareRecipientClient as aZ, type ShareRecipientClientOptions as a_, type ShareAccess as aa, ShareAccessError as ab, type ShareAccessV2 as ac, type ShareAction as ad, ShareActionSchema as ae, type ShareAddressedDelegationEnvelopeV2 as af, ShareAddressedDelegationEnvelopeV2Schema as ag, type ShareAddressedDelegationRequestV2 as ah, ShareAddressedDelegationRequestV2Schema as ai, type ShareAddressedDelegationResponseV2 as aj, ShareAddressedDelegationResponseV2Schema as ak, type ShareAddressedRecipientMatcher as al, type ShareArtifactInput as am, type ShareArtifactResult as an, type ShareArtifactV2 as ao, type ShareCache as ap, type ShareCacheEntry as aq, type ShareCacheKey as ar, type ShareCacheMetadata as as, type ShareCapabilityLike as at, ShareConflict as au, type ShareContentMetadata as av, type ShareContentSource as aw, type ShareDeliveryAuthorizationV3Receipt as ax, type ShareDeliveryAuthorizationV3Request as ay, type ShareDetachedProof as az, type AccountDelegationQueryOptions as b, type ShareRecipientPolicy as b0, ShareRecipientPolicySchema as b1, type ShareRecipientResult as b2, type ShareRecipientTarget as b3, ShareRecipientTargetSchema as b4, type ShareResource as b5, ShareResourceSchema as b6, type ShareSaveOptions as b7, type ShareSchema as b8, type ShareSqlContentSource as b9, normalizeShareActions as bA, normalizeShareRecipientTarget as bB, normalizeShareResource as bC, parsePortableDelegation as bD, parseShareArtifact as bE, parseShareUrl as bF, restoreDelegatedShareKey as bG, serializePortableDelegation as bH, shareCapabilityAllows as bI, signShareEnvelope as bJ, validateOwnerSharePolicyRegistration as bK, validateOwnerSharePolicyRegistrationBytes as bL, validateShareDeliveryAuthorizationV3Bytes as bM, verifyShareCid as bN, verifyShareEnvelope as bO, CapabilityKeyRegistry as bP, type CapabilityKeyRegistryErrorCode as bQ, CapabilityKeyRegistryErrorCodes as bR, type StoredDelegationChain as bS, createCapabilityKeyRegistry as bT, type ShareWireAction as ba, SharingService as bb, type SharingServiceConfig as bc, type SignedDelegation as bd, type SpaceInfo as be, type SpaceOwnership as bf, type VerifyShareEnvelopeOptions as bg, canonicalOwnerSharePolicy as bh, computeOwnerShareRegistrationCid as bi, computeShareCid as bj, createDelegatedShareKey as bk, createPolicyEnforcementDelegation as bl, createShareArtifact as bm, createShareArtifactAsync as bn, createSharePolicy as bo, createSharingService as bp, decryptShareBytesAsync as bq, delegatePortablePolicySession as br, encodeInlineShareUrl as bs, encodeShareArtifact as bt, encodeShareUrl as bu, encryptShareBytes as bv, encryptShareBytesAsync as bw, importPortableDelegation as bx, intersectShareCapabilities as by, isV2ShareLink as bz, type AccountDelegationRecord as c, type AccountDelegationResource as d, type CapabilityEntry as e, type CreateDelegationParams as f, type CreateDelegationWasmParams as g, type CreateDelegationWasmResult as h, type CreateOwnerDelegationParams as i, type CredentialInvitationRequest as j, DELIVERY_ADMISSION_DOMAIN as k, type DelegateReceivedShareParams as l, type DelegatedResource as m, type DelegatedShareAccess as n, type DelegatedShareKey as o, type Delegation as p, type DelegationApiResponse as q, type DelegationChain as r, type DelegationChainV2 as s, type DelegationDirection as t, type DelegationErrorCode as u, DelegationErrorCodes as v, type DelegationFilters as w, type DelegationManagerConfig as x, type DelegationRecord as y, type DelegationRevocationReceipt as z };
@@ -3494,101 +3494,74 @@ declare function validateOwnerSharePolicyRegistration(value: unknown, expected:
3494
3494
  /** Validate the exact UTF-8 response bytes emitted by the registration route. */
3495
3495
  declare function validateOwnerSharePolicyRegistrationBytes(bytesValue: Uint8Array, expected: RegisterOwnerSharePolicyParams): OwnerSharePolicyRegistrationReceipt;
3496
3496
 
3497
- /** Matches V2_DELIVERY_DOMAIN in tinycloud-node-server/src/share_v2.rs. */
3498
- declare const SHARE_DELIVERY_AUTHORIZATION_DOMAIN = "xyz.tinycloud.share/delivery-authorization/v2\0";
3499
- /** Exact camelCase mirror of the Rust `V2DeliveryRequest` wire struct. */
3500
- interface ShareDeliveryAuthorizationRequest {
3501
- readonly envelopeCid: string;
3497
+ declare const CREDENTIAL_INVITATION_REQUEST_DOMAIN = "xyz.tinycloud.credentials/invitation-request/v1\0";
3498
+ declare const DELIVERY_ADMISSION_DOMAIN = "xyz.tinycloud.policy/delivery-admission/v0\0";
3499
+ interface ShareDeliveryAuthorizationV3Request {
3500
+ readonly envelope: Record<string, unknown>;
3501
+ /** Base64url canonical sealed envelope bytes, bound by the Node before delivery. */
3502
+ readonly sealedEnvelope: string;
3503
+ /** Base64url 32-byte AES-GCM key; this is the #k fragment value in the return link. */
3504
+ readonly envelopeKey: string;
3502
3505
  readonly shareCid: string;
3503
- readonly shareId: string;
3504
- readonly registrationCid: string;
3505
- readonly policyCid: string;
3506
- readonly delegationCid: string;
3507
- readonly enforcementDelegationCid: string;
3508
3506
  readonly recipientEmail: string;
3509
3507
  readonly shareUrl: string;
3510
3508
  readonly documentName: string;
3511
3509
  readonly jti: string;
3512
- readonly idempotencyKey: string;
3513
3510
  readonly expiresAt: string;
3514
3511
  readonly requestBodyDigest: string;
3515
3512
  }
3516
- /** Exact mirror of the `authorization` object the Node route signs and returns. */
3517
- interface ShareDeliveryAuthorization {
3518
- readonly type: "TinyCloudShareDeliveryAuthorization";
3519
- readonly version: 2;
3520
- readonly jti: string;
3521
- readonly shareCid: string;
3522
- readonly shareId: string;
3523
- readonly registrationCid: string;
3524
- readonly delegationCid: string;
3525
- readonly enforcementDelegationCid: string;
3526
- readonly envelopeCid: string;
3527
- readonly policyCid: string;
3528
- readonly nodeAudience: string;
3529
- readonly targetOrigin: string;
3530
- /**
3531
- * The OpenCredentials witness this delivery is scoped to, sourced from
3532
- * Node's own trusted credentials origin. Deliberately distinct from
3533
- * `nodeAudience` (the node's own DID) and `returnOrigin` (Share's page
3534
- * origin) — conflating any of these three would let a party impersonate
3535
- * another's audience.
3536
- */
3537
- readonly openCredentialsAudience: string;
3538
- readonly holder: string;
3539
- readonly recipientMatcher: unknown;
3540
- readonly deliveryEmail: string;
3541
- readonly shareUrl: string;
3542
- readonly returnOrigin: string;
3543
- readonly documentName: string;
3544
- readonly senderDid: string;
3545
- readonly senderTrust: string;
3546
- readonly contentSource: unknown;
3547
- readonly contentSourceDigest: string;
3513
+ interface CredentialInvitationRequest {
3514
+ readonly schema: "xyz.tinycloud.credentials/invitation-request/v1";
3515
+ readonly policyId: string;
3516
+ readonly recipient: string;
3517
+ readonly resource: string;
3518
+ readonly credentialType: string;
3519
+ readonly returnLink: string;
3520
+ readonly envelopeRef: string;
3521
+ readonly label: string;
3548
3522
  readonly shareExpiresAt: string;
3523
+ readonly audience: string;
3549
3524
  readonly issuedAt: string;
3550
- readonly reportAbuseToken: string;
3551
- readonly actions: readonly string[];
3525
+ readonly expiresAt: string;
3526
+ readonly nonce: string;
3527
+ }
3528
+ interface DeliveryAdmission {
3529
+ readonly schema: "xyz.tinycloud.policy/delivery-admission/v0";
3530
+ readonly policyId: string;
3531
+ readonly ownerDid: string;
3532
+ readonly recipient: string;
3552
3533
  readonly resource: string;
3553
- readonly authorityMaterialHandle: string;
3554
- readonly authorityMaterialDigest: string;
3555
- readonly requestBodyDigest: string;
3556
- readonly idempotencyKey: string;
3534
+ readonly actions: readonly ["tinycloud.kv/get"];
3535
+ readonly credentialType: string;
3536
+ readonly returnLink: string;
3537
+ readonly envelopeRef: string;
3538
+ readonly label: string;
3539
+ readonly shareExpiresAt: string;
3540
+ readonly senderKeyDid: string;
3541
+ readonly audience: string;
3542
+ readonly issuedAt: string;
3557
3543
  readonly expiresAt: string;
3558
- readonly dataAuthority: false;
3544
+ readonly nonce: string;
3545
+ readonly signature: {
3546
+ readonly suite: "eddsa-ed25519-sha256-jcs-v1";
3547
+ readonly signerDid: string;
3548
+ readonly value: string;
3549
+ };
3559
3550
  }
3560
- interface ShareDeliveryAuthorizationReceipt {
3561
- readonly authorization: ShareDeliveryAuthorization;
3551
+ interface ShareDeliveryAuthorizationV3Receipt {
3552
+ readonly request: CredentialInvitationRequest;
3553
+ readonly admission: DeliveryAdmission;
3562
3554
  readonly proof: {
3563
3555
  readonly alg: "EdDSA";
3564
3556
  readonly kid: string;
3565
3557
  readonly signature: string;
3566
3558
  };
3567
3559
  }
3568
- interface ValidateShareDeliveryAuthorizationExpected {
3569
- readonly request: ShareDeliveryAuthorizationRequest;
3570
- /** The enrolled receipt key from the node trust bundle. */
3571
- readonly nodeProof: {
3572
- readonly kid: string;
3573
- readonly publicKey: Uint8Array;
3574
- };
3575
- /**
3576
- * The OpenCredentials witness origin the caller trusts, from the same
3577
- * trust bundle as `nodeProof`. Validated independently of the
3578
- * authorization's own `nodeAudience`/`returnOrigin` fields so a Node that
3579
- * mislabels or omits its credentials origin fails closed here rather than
3580
- * silently inheriting one of those unrelated identities.
3581
- */
3582
- readonly credentialsAudience: string;
3583
- }
3584
- /**
3585
- * Validate the exact UTF-8 response bytes emitted by
3586
- * `POST /share/v2/deliveries/authorize`, bind them to the submitted
3587
- * request, and verify the Node's detached EdDSA proof.
3588
- */
3589
- declare function validateShareDeliveryAuthorizationBytes(bytesValue: Uint8Array, expected: ValidateShareDeliveryAuthorizationExpected): ShareDeliveryAuthorizationReceipt;
3590
- /** Build the trusted-signer descriptor `did:key:...#z...` expects from a raw node signing key. */
3591
- declare function shareDeliveryTrustedKid(publicKey: Uint8Array): string;
3560
+ declare function validateShareDeliveryAuthorizationV3Bytes(bytes: Uint8Array, expected: {
3561
+ readonly request: ShareDeliveryAuthorizationV3Request;
3562
+ readonly senderKeyDid: string;
3563
+ readonly deliveryAudience: string;
3564
+ }): Omit<ShareDeliveryAuthorizationV3Receipt, "proof">;
3592
3565
 
3593
3566
  /**
3594
3567
  * The durable record a sender needs, after a reload, to display and manage
@@ -4572,4 +4545,4 @@ declare const ShareNativeResponseSchema: z.ZodDiscriminatedUnion<"action", [z.Zo
4572
4545
  }>]>;
4573
4546
  type ShareNativeResponse = z.infer<typeof ShareNativeResponseSchema>;
4574
4547
 
4575
- export { type ReceiveOptions as $, type AccountDelegationPage as A, type KeyProvider as B, type CapabilityEntry as C, DelegationManager as D, type EncodedShareData as E, type KeyType as F, type GenerateShareParams as G, MAX_SEALED_SHARE_CONTENT_BYTES as H, type ICapabilityKeyRegistry as I, type JWK as J, type KeyInfo as K, MAX_SHARE_ARTIFACT_BYTES as L, MAX_CONTENT_BYTES as M, MAX_SHARE_CONTENT_BYTES as N, MemorySenderShareKeyStorage as O, MemorySenderShareRecordStorage as P, MemoryShareCache as Q, type Result as R, type OwnerDelegationPermission as S, type OwnerDelegationReceipt as T, type OwnerShareAction as U, type OwnerShareDecryption as V, type OwnerShareMatcher as W, type OwnerSharePolicyRegistration as X, type OwnerSharePolicyRegistrationReceipt as Y, type OwnerSharePolicyV2 as Z, type PortableDelegationImportReceipt as _, type DelegationError as a, ShareRecipientPolicySchema as a$, type RegisterOwnerSharePolicyParams as a0, SHARE_DELIVERY_AUTHORIZATION_DOMAIN as a1, type SenderShareKeyStorage as a2, type SenderShareRecord as a3, type SenderShareRecordStorage as a4, type SenderShareRevocationScope as a5, SenderShareStore as a6, type ShareAccess as a7, ShareAccessError as a8, type ShareAccessV2 as a9, type ShareExpiryBounds as aA, type ShareKvContentSource as aB, type ShareLink as aC, type ShareLinkData as aD, type ShareLinkLocation as aE, type ShareListEntry as aF, type ShareListResult as aG, type ShareNativeAction as aH, type ShareNativeInvokeEnvelopeV1 as aI, type ShareNativeInvokeErrorResult as aJ, type ShareNativeInvokeInput as aK, type ShareNativeInvokeResult as aL, type ShareNativeInvokeSuccessResult as aM, type ShareNativeResponse as aN, ShareNativeResponseSchema as aO, type SharePolicy as aP, type SharePolicyBinding as aQ, type SharePolicySession as aR, type SharePolicySessionV1 as aS, type SharePolicySessionWireV1 as aT, type PortableDelegation as aU, type ShareReadInvocationV1 as aV, type ShareReadResult as aW, ShareRecipientClient as aX, type ShareRecipientClientOptions as aY, ShareRecipientClientOptionsSchema as aZ, type ShareRecipientPolicy as a_, type ShareAction as aa, ShareActionSchema as ab, type ShareAddressedDelegationEnvelopeV2 as ac, ShareAddressedDelegationEnvelopeV2Schema as ad, type ShareAddressedDelegationRequestV2 as ae, ShareAddressedDelegationRequestV2Schema as af, type ShareAddressedDelegationResponseV2 as ag, ShareAddressedDelegationResponseV2Schema as ah, type ShareAddressedRecipientMatcher as ai, type ShareArtifactInput as aj, type ShareArtifactResult as ak, type ShareArtifactV2 as al, type ShareCache as am, type ShareCacheEntry as an, type ShareCacheKey as ao, type ShareCacheMetadata as ap, type ShareCapabilityLike as aq, ShareConflict as ar, type ShareContentMetadata as as, type ShareContentSource as at, type ShareDeliveryAuthorization as au, type ShareDeliveryAuthorizationReceipt as av, type ShareDeliveryAuthorizationRequest as aw, type ShareDetachedProof as ax, ShareEnvelopeError as ay, type ShareEnvelopeV2 as az, type AccountDelegationQueryOptions as b, type ShareRecipientResult as b0, type ShareRecipientTarget as b1, ShareRecipientTargetSchema as b2, type ShareResource as b3, ShareResourceSchema as b4, type ShareSaveOptions as b5, type ShareSchema as b6, type ShareSqlContentSource as b7, type ShareWireAction as b8, SharingService as b9, normalizeShareRecipientTarget as bA, normalizeShareResource as bB, parsePortableDelegation as bC, parseShareArtifact as bD, parseShareUrl as bE, restoreDelegatedShareKey as bF, serializePortableDelegation as bG, shareCapabilityAllows as bH, shareDeliveryTrustedKid as bI, signShareEnvelope as bJ, validateOwnerSharePolicyRegistration as bK, validateOwnerSharePolicyRegistrationBytes as bL, validateShareDeliveryAuthorizationBytes as bM, verifyShareCid as bN, verifyShareEnvelope as bO, CapabilityKeyRegistry as bP, type CapabilityKeyRegistryErrorCode as bQ, CapabilityKeyRegistryErrorCodes as bR, type StoredDelegationChain as bS, createCapabilityKeyRegistry as bT, type SharingServiceConfig as ba, type SignedDelegation as bb, type SpaceInfo as bc, type SpaceOwnership as bd, type ValidateShareDeliveryAuthorizationExpected as be, type VerifyShareEnvelopeOptions as bf, canonicalOwnerSharePolicy as bg, computeOwnerShareRegistrationCid as bh, computeShareCid as bi, createDelegatedShareKey as bj, createPolicyEnforcementDelegation as bk, createShareArtifact as bl, createShareArtifactAsync as bm, createSharePolicy as bn, createSharingService as bo, decryptShareBytesAsync as bp, delegatePortablePolicySession as bq, encodeInlineShareUrl as br, encodeShareArtifact as bs, encodeShareUrl as bt, encryptShareBytes as bu, encryptShareBytesAsync as bv, importPortableDelegation as bw, intersectShareCapabilities as bx, isV2ShareLink as by, normalizeShareActions as bz, type AccountDelegationRecord as c, type AccountDelegationResource as d, type CreateDelegationParams as e, type CreateDelegationWasmParams as f, type CreateDelegationWasmResult as g, type CreateOwnerDelegationParams as h, type DelegateReceivedShareParams as i, type DelegatedResource as j, type DelegatedShareAccess as k, type DelegatedShareKey as l, type Delegation as m, type DelegationApiResponse as n, type DelegationChain as o, type DelegationChainV2 as p, type DelegationDirection as q, type DelegationErrorCode as r, DelegationErrorCodes as s, type DelegationFilters as t, type DelegationManagerConfig as u, type DelegationRecord as v, type DelegationRevocationReceipt as w, type DelegationStatus as x, type ISharingService as y, type IngestOptions as z };
4548
+ export { type OwnerSharePolicyRegistration as $, type AccountDelegationPage as A, type DelegationStatus as B, CREDENTIAL_INVITATION_REQUEST_DOMAIN as C, DelegationManager as D, type DeliveryAdmission as E, type EncodedShareData as F, type GenerateShareParams as G, type ISharingService as H, type ICapabilityKeyRegistry as I, type IngestOptions as J, type JWK as K, type KeyInfo as L, type KeyProvider as M, type KeyType as N, MAX_CONTENT_BYTES as O, MAX_SEALED_SHARE_CONTENT_BYTES as P, MAX_SHARE_ARTIFACT_BYTES as Q, type Result as R, MAX_SHARE_CONTENT_BYTES as S, MemorySenderShareKeyStorage as T, MemorySenderShareRecordStorage as U, MemoryShareCache as V, type OwnerDelegationPermission as W, type OwnerDelegationReceipt as X, type OwnerShareAction as Y, type OwnerShareDecryption as Z, type OwnerShareMatcher as _, type DelegationError as a, ShareRecipientClientOptionsSchema as a$, type OwnerSharePolicyRegistrationReceipt as a0, type OwnerSharePolicyV2 as a1, type PortableDelegationImportReceipt as a2, type ReceiveOptions as a3, type RegisterOwnerSharePolicyParams as a4, type SenderShareKeyStorage as a5, type SenderShareRecord as a6, type SenderShareRecordStorage as a7, type SenderShareRevocationScope as a8, SenderShareStore as a9, ShareEnvelopeError as aA, type ShareEnvelopeV2 as aB, type ShareExpiryBounds as aC, type ShareKvContentSource as aD, type ShareLink as aE, type ShareLinkData as aF, type ShareLinkLocation as aG, type ShareListEntry as aH, type ShareListResult as aI, type ShareNativeAction as aJ, type ShareNativeInvokeEnvelopeV1 as aK, type ShareNativeInvokeErrorResult as aL, type ShareNativeInvokeInput as aM, type ShareNativeInvokeResult as aN, type ShareNativeInvokeSuccessResult as aO, type ShareNativeResponse as aP, ShareNativeResponseSchema as aQ, type SharePolicy as aR, type SharePolicyBinding as aS, type SharePolicySession as aT, type SharePolicySessionV1 as aU, type SharePolicySessionWireV1 as aV, type PortableDelegation as aW, type ShareReadInvocationV1 as aX, type ShareReadResult as aY, ShareRecipientClient as aZ, type ShareRecipientClientOptions as a_, type ShareAccess as aa, ShareAccessError as ab, type ShareAccessV2 as ac, type ShareAction as ad, ShareActionSchema as ae, type ShareAddressedDelegationEnvelopeV2 as af, ShareAddressedDelegationEnvelopeV2Schema as ag, type ShareAddressedDelegationRequestV2 as ah, ShareAddressedDelegationRequestV2Schema as ai, type ShareAddressedDelegationResponseV2 as aj, ShareAddressedDelegationResponseV2Schema as ak, type ShareAddressedRecipientMatcher as al, type ShareArtifactInput as am, type ShareArtifactResult as an, type ShareArtifactV2 as ao, type ShareCache as ap, type ShareCacheEntry as aq, type ShareCacheKey as ar, type ShareCacheMetadata as as, type ShareCapabilityLike as at, ShareConflict as au, type ShareContentMetadata as av, type ShareContentSource as aw, type ShareDeliveryAuthorizationV3Receipt as ax, type ShareDeliveryAuthorizationV3Request as ay, type ShareDetachedProof as az, type AccountDelegationQueryOptions as b, type ShareRecipientPolicy as b0, ShareRecipientPolicySchema as b1, type ShareRecipientResult as b2, type ShareRecipientTarget as b3, ShareRecipientTargetSchema as b4, type ShareResource as b5, ShareResourceSchema as b6, type ShareSaveOptions as b7, type ShareSchema as b8, type ShareSqlContentSource as b9, normalizeShareActions as bA, normalizeShareRecipientTarget as bB, normalizeShareResource as bC, parsePortableDelegation as bD, parseShareArtifact as bE, parseShareUrl as bF, restoreDelegatedShareKey as bG, serializePortableDelegation as bH, shareCapabilityAllows as bI, signShareEnvelope as bJ, validateOwnerSharePolicyRegistration as bK, validateOwnerSharePolicyRegistrationBytes as bL, validateShareDeliveryAuthorizationV3Bytes as bM, verifyShareCid as bN, verifyShareEnvelope as bO, CapabilityKeyRegistry as bP, type CapabilityKeyRegistryErrorCode as bQ, CapabilityKeyRegistryErrorCodes as bR, type StoredDelegationChain as bS, createCapabilityKeyRegistry as bT, type ShareWireAction as ba, SharingService as bb, type SharingServiceConfig as bc, type SignedDelegation as bd, type SpaceInfo as be, type SpaceOwnership as bf, type VerifyShareEnvelopeOptions as bg, canonicalOwnerSharePolicy as bh, computeOwnerShareRegistrationCid as bi, computeShareCid as bj, createDelegatedShareKey as bk, createPolicyEnforcementDelegation as bl, createShareArtifact as bm, createShareArtifactAsync as bn, createSharePolicy as bo, createSharingService as bp, decryptShareBytesAsync as bq, delegatePortablePolicySession as br, encodeInlineShareUrl as bs, encodeShareArtifact as bt, encodeShareUrl as bu, encryptShareBytes as bv, encryptShareBytesAsync as bw, importPortableDelegation as bx, intersectShareCapabilities as by, isV2ShareLink as bz, type AccountDelegationRecord as c, type AccountDelegationResource as d, type CapabilityEntry as e, type CreateDelegationParams as f, type CreateDelegationWasmParams as g, type CreateDelegationWasmResult as h, type CreateOwnerDelegationParams as i, type CredentialInvitationRequest as j, DELIVERY_ADMISSION_DOMAIN as k, type DelegateReceivedShareParams as l, type DelegatedResource as m, type DelegatedShareAccess as n, type DelegatedShareKey as o, type Delegation as p, type DelegationApiResponse as q, type DelegationChain as r, type DelegationChainV2 as s, type DelegationDirection as t, type DelegationErrorCode as u, DelegationErrorCodes as v, type DelegationFilters as w, type DelegationManagerConfig as x, type DelegationRecord as y, type DelegationRevocationReceipt as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinycloud/sdk-core",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.10",
4
4
  "description": "Core TinyCloud SDK - shared interfaces and TinyCloud class",
5
5
  "author": "TinyCloud, Inc.",
6
6
  "license": "EGPL",
@@ -53,10 +53,10 @@
53
53
  "@multiformats/multiaddr-to-uri": "^12.0.0",
54
54
  "@multiformats/uri-to-multiaddr": "^10.0.0",
55
55
  "@noble/curves": "^1.9.7",
56
- "@tinycloud/share-envelope": "0.2.0",
57
- "@tinycloud/share-sdk": "0.2.0",
56
+ "@tinycloud/share-envelope": "1.0.0-beta.4",
57
+ "@tinycloud/share-sdk": "1.0.0-beta.4",
58
58
  "@tinycloud/bootstrap": "2.7.0",
59
- "@tinycloud/sdk-services": "2.11.0",
59
+ "@tinycloud/sdk-services": "3.0.0-beta.10",
60
60
  "multiformats": "^13.4.1",
61
61
  "ms": "^2.1.3",
62
62
  "siwe": "^3.0.0",