@tinycloud/node-sdk 3.8.0-beta.5 → 3.8.0-beta.6

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.
@@ -2086,7 +2086,7 @@ declare class TinyCloudNode {
2086
2086
  * Sign a wallet (CACAO) revocation of the delegation `cid` for the node's
2087
2087
  * `POST /revoke`, and return its Authorization header value. The node
2088
2088
  * accepts it when the owner delegated `cid` or owns a space its abilities
2089
- * target, whichever key issued it. Valid for 60 seconds. Requires the
2089
+ * target, whichever key issued it. Valid for 10 minutes. Requires the
2090
2090
  * owner wallet signer.
2091
2091
  */
2092
2092
  signOwnerRevocation(cid: string): Promise<string>;
@@ -2086,7 +2086,7 @@ declare class TinyCloudNode {
2086
2086
  * Sign a wallet (CACAO) revocation of the delegation `cid` for the node's
2087
2087
  * `POST /revoke`, and return its Authorization header value. The node
2088
2088
  * accepts it when the owner delegated `cid` or owns a space its abilities
2089
- * target, whichever key issued it. Valid for 60 seconds. Requires the
2089
+ * target, whichever key issued it. Valid for 10 minutes. Requires the
2090
2090
  * owner wallet signer.
2091
2091
  */
2092
2092
  signOwnerRevocation(cid: string): Promise<string>;
@@ -1,7 +1,7 @@
1
1
  import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
2
2
  import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
3
3
  import { ReplicaLocalEraseOutcome, ReplicaPurgeLocalCopyResult, ReplicaPurgeTrigger, ReplicaPurgeFailedEvent, ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
4
- import { T as TinyCloudNode } from './TinyCloudNode-CxRHpusk.cjs';
4
+ import { T as TinyCloudNode } from './TinyCloudNode-C0LgPzzJ.cjs';
5
5
 
6
6
  /** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
7
7
  declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
@@ -1,7 +1,7 @@
1
1
  import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
2
2
  import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
3
3
  import { ReplicaLocalEraseOutcome, ReplicaPurgeLocalCopyResult, ReplicaPurgeTrigger, ReplicaPurgeFailedEvent, ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
4
- import { T as TinyCloudNode } from './TinyCloudNode-BKFo3t4u.js';
4
+ import { T as TinyCloudNode } from './TinyCloudNode-jPL2UqH5.js';
5
5
 
6
6
  /** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
7
7
  declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
package/dist/core.cjs CHANGED
@@ -3334,6 +3334,7 @@ var ROOT_DELEGATION_ACTIONS = [
3334
3334
  import_sdk_core11.DUCKDB.ALL
3335
3335
  ];
3336
3336
  var DEFAULT_SESSION_EXPIRATION_MS = import_sdk_core11.EXPIRY.SESSION_MS;
3337
+ var OWNER_REVOCATION_WINDOW_MS = 10 * 6e4;
3337
3338
  function unifiedRootAttenuation(capabilities) {
3338
3339
  const attenuation = {};
3339
3340
  for (const capability of capabilities) {
@@ -7584,7 +7585,7 @@ var _TinyCloudNode = class _TinyCloudNode {
7584
7585
  * Sign a wallet (CACAO) revocation of the delegation `cid` for the node's
7585
7586
  * `POST /revoke`, and return its Authorization header value. The node
7586
7587
  * accepts it when the owner delegated `cid` or owns a space its abilities
7587
- * target, whichever key issued it. Valid for 60 seconds. Requires the
7588
+ * target, whichever key issued it. Valid for 10 minutes. Requires the
7588
7589
  * owner wallet signer.
7589
7590
  */
7590
7591
  async signOwnerRevocation(cid) {
@@ -7600,7 +7601,7 @@ var _TinyCloudNode = class _TinyCloudNode {
7600
7601
  chainId: session.chainId,
7601
7602
  nonce: (0, import_siwe2.generateNonce)(),
7602
7603
  issuedAt: issuedAt.toISOString(),
7603
- expirationTime: new Date(issuedAt.getTime() + 6e4).toISOString()
7604
+ expirationTime: new Date(issuedAt.getTime() + OWNER_REVOCATION_WINDOW_MS).toISOString()
7604
7605
  }).prepareMessage();
7605
7606
  const signature = await this.signer.signMessage(siwe);
7606
7607
  return this.wasmBindings.siweToDelegationHeaders({ siwe, signature }).Authorization;