@tinycloud/node-sdk 3.0.0-beta.17 → 3.0.0-beta.19

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.
@@ -2344,7 +2344,7 @@ declare class TinyCloudNode {
2344
2344
  delegateDID: string;
2345
2345
  /** Whether to prevent the recipient from creating further sub-delegations */
2346
2346
  disableSubDelegation?: boolean;
2347
- /** Expiration time in milliseconds from now (must be before parent's expiry) */
2347
+ /** Expiration in milliseconds from now; defaults to the parent's own expiry, the longest allowed. */
2348
2348
  expiryMs?: number;
2349
2349
  /** Explicit multi-resource projection, including encryption networks. */
2350
2350
  resources?: Array<{
@@ -2344,7 +2344,7 @@ declare class TinyCloudNode {
2344
2344
  delegateDID: string;
2345
2345
  /** Whether to prevent the recipient from creating further sub-delegations */
2346
2346
  disableSubDelegation?: boolean;
2347
- /** Expiration time in milliseconds from now (must be before parent's expiry) */
2347
+ /** Expiration in milliseconds from now; defaults to the parent's own expiry, the longest allowed. */
2348
2348
  expiryMs?: number;
2349
2349
  /** Explicit multi-resource projection, including encryption networks. */
2350
2350
  resources?: Array<{
package/dist/core.cjs CHANGED
@@ -7227,8 +7227,7 @@ var _TinyCloudNode = class _TinyCloudNode {
7227
7227
  const jwk = mySession.jwk;
7228
7228
  const { abilities, rawAbilities } = this.buildActivationAbilities(delegation);
7229
7229
  const now = /* @__PURE__ */ new Date();
7230
- const maxExpiry = new Date(now.getTime() + 60 * 60 * 1e3);
7231
- const expirationTime = delegation.expiry < maxExpiry ? delegation.expiry : maxExpiry;
7230
+ const expirationTime = delegation.expiry;
7232
7231
  const prepared = this.wasmBindings.prepareSession({
7233
7232
  abilities,
7234
7233
  address: this.wasmBindings.ensureEip55(mySession.address),
@@ -7332,8 +7331,7 @@ var _TinyCloudNode = class _TinyCloudNode {
7332
7331
  );
7333
7332
  }
7334
7333
  const now = /* @__PURE__ */ new Date();
7335
- const expiryMs = params.expiryMs ?? 60 * 60 * 1e3;
7336
- const requestedExpiry = new Date(now.getTime() + expiryMs);
7334
+ const requestedExpiry = params.expiryMs === void 0 ? parentDelegation.expiry : new Date(now.getTime() + params.expiryMs);
7337
7335
  const actualExpiry = requestedExpiry > parentDelegation.expiry ? parentDelegation.expiry : requestedExpiry;
7338
7336
  const abilities = {};
7339
7337
  const rawAbilities = {};