@tinycloud/share-sdk 1.5.0-beta.0 → 1.5.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.
@@ -22,6 +22,8 @@ interface SharePublishOptions {
22
22
  readonly target?: SharePublishTarget;
23
23
  readonly expiresAt?: Date;
24
24
  readonly expiryWasExplicit?: boolean;
25
+ /** The relative expiry the caller asked for, in milliseconds, when it gave a duration (not a date). */
26
+ readonly expiresInMs?: number;
25
27
  readonly origin: string;
26
28
  readonly maxBytes?: number;
27
29
  readonly now?: () => number;
@@ -22,6 +22,8 @@ interface SharePublishOptions {
22
22
  readonly target?: SharePublishTarget;
23
23
  readonly expiresAt?: Date;
24
24
  readonly expiryWasExplicit?: boolean;
25
+ /** The relative expiry the caller asked for, in milliseconds, when it gave a duration (not a date). */
26
+ readonly expiresInMs?: number;
25
27
  readonly origin: string;
26
28
  readonly maxBytes?: number;
27
29
  readonly now?: () => number;
@@ -5586,6 +5586,7 @@ function serialize(value) {
5586
5586
  function canonicalize(value) {
5587
5587
  return serialize(value);
5588
5588
  }
5589
+ var POLICY_ROOT_MAX_LIFETIME_SECONDS = 31 * 24 * 60 * 60;
5589
5590
  function verifyCompactUcanAuthorization(authorization, expectedCid) {
5590
5591
  if (/\s/.test(authorization)) throw new TypeError("compact Authorization contains whitespace");
5591
5592
  const segments = authorization.split(".");