@fileverse-dev/ddoc 5.1.8 → 5.1.9-opaque-links.0

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/index.es.js CHANGED
@@ -16766,6 +16766,7 @@ class dl {
16766
16766
  fe(this, "ownerUcan");
16767
16767
  fe(this, "collaborationUcan");
16768
16768
  fe(this, "ownerAddress");
16769
+ fe(this, "ddocId");
16769
16770
  fe(this, "editLock");
16770
16771
  fe(this, "encryptedTitle");
16771
16772
  fe(this, "identityToken");
@@ -16868,7 +16869,7 @@ class dl {
16868
16869
  Lt(this.roomKey),
16869
16870
  new TextEncoder().encode(JSON.stringify(this.roomInfo)),
16870
16871
  this.wireFormat
16871
- )), this.ownerKeyPair && (n.ownerToken = await this.getOwnerToken()), this.ownerAddress && (n.ownerAddress = this.ownerAddress), this.contractAddress && (n.contractAddress = this.contractAddress), this.identityToken && (n.identityToken = this.identityToken);
16872
+ )), this.ownerKeyPair && (n.ownerToken = await this.getOwnerToken()), this.ownerAddress && (n.ownerAddress = this.ownerAddress), this.contractAddress && (n.contractAddress = this.contractAddress), this.ddocId && (n.ddocId = this.ddocId), this.identityToken && (n.identityToken = this.identityToken);
16872
16873
  let o;
16873
16874
  if (this.refreshEditClaim) {
16874
16875
  const u = await this.refreshEditClaim();
@@ -16933,7 +16934,7 @@ class dl {
16933
16934
  );
16934
16935
  this.roomKey = t.roomKey, this.roomId = t.roomId, this.collaborationKeyPair = _r.fromSecretKey(
16935
16936
  Xt(r)
16936
- ), t.ownerEdSecret && (this.ownerKeyPair = _r.fromSecretKey(t.ownerEdSecret)), t.contractAddress && (this.contractAddress = t.contractAddress), t.ownerAddress && (this.ownerAddress = t.ownerAddress), t.editLock && (this.editLock = t.editLock), t.identityToken && (this.identityToken = t.identityToken), t.editUcan && (this.editUcan = t.editUcan), this.lastGoodEditUcan = t.editUcan, t.refreshEditClaim && (this.refreshEditClaim = t.refreshEditClaim), t.actorHandle && (this.actorHandle = t.actorHandle), t.joinOnly && (this.joinOnly = t.joinOnly), t.encryptedTitle && (this.encryptedTitle = t.encryptedTitle), t.onHandshakeData && (this._onHandshakeData = t.onHandshakeData), t.onEpochAvailable && (this._onEpochAvailable = t.onEpochAvailable), t.onCutover && (this._onCutover = t.onCutover), t.roomInfo && (this.roomInfo = t.roomInfo);
16937
+ ), t.ownerEdSecret && (this.ownerKeyPair = _r.fromSecretKey(t.ownerEdSecret)), t.contractAddress && (this.contractAddress = t.contractAddress), t.ownerAddress && (this.ownerAddress = t.ownerAddress), t.ddocId && (this.ddocId = t.ddocId), t.editLock && (this.editLock = t.editLock), t.identityToken && (this.identityToken = t.identityToken), t.editUcan && (this.editUcan = t.editUcan), this.lastGoodEditUcan = t.editUcan, t.refreshEditClaim && (this.refreshEditClaim = t.refreshEditClaim), t.actorHandle && (this.actorHandle = t.actorHandle), t.joinOnly && (this.joinOnly = t.joinOnly), t.encryptedTitle && (this.encryptedTitle = t.encryptedTitle), t.onHandshakeData && (this._onHandshakeData = t.onHandshakeData), t.onEpochAvailable && (this._onEpochAvailable = t.onEpochAvailable), t.onCutover && (this._onCutover = t.onCutover), t.roomInfo && (this.roomInfo = t.roomInfo);
16937
16938
  }
16938
16939
  get isConnected() {
16939
16940
  return this._webSocketStatus === _t.CONNECTED;
@@ -17047,7 +17048,8 @@ class dl {
17047
17048
  !this.editLock && !this.encryptedTitle || await this._emitWithAck("/documents/meta", {
17048
17049
  documentId: this.roomId,
17049
17050
  editLock: this.editLock ?? null,
17050
- title: this.encryptedTitle ?? null
17051
+ title: this.encryptedTitle ?? null,
17052
+ ...this.ddocId ? { ddocId: this.ddocId } : {}
17051
17053
  });
17052
17054
  }
17053
17055
  /** Owner rename mid-session: refresh the connect-frozen title artifacts (so
@@ -17057,7 +17059,8 @@ class dl {
17057
17059
  this.encryptedTitle = t.encryptedTitle, this.roomInfo && (this.roomInfo.documentTitle = t.documentTitle), this._webSocketStatus === _t.CONNECTED && await this._emitWithAck("/documents/meta", {
17058
17060
  documentId: this.roomId,
17059
17061
  editLock: this.editLock ?? null,
17060
- title: t.encryptedTitle
17062
+ title: t.encryptedTitle,
17063
+ ...this.ddocId ? { ddocId: this.ddocId } : {}
17061
17064
  });
17062
17065
  }
17063
17066
  async broadcastAwareness(t) {
@@ -17637,6 +17640,7 @@ class TE {
17637
17640
  ownerEdSecret: t.ownerEdSecret,
17638
17641
  contractAddress: t.contractAddress,
17639
17642
  ownerAddress: t.ownerAddress,
17643
+ ddocId: t.ddocId,
17640
17644
  editLock: t.editLock,
17641
17645
  encryptedTitle: t.encryptedTitle,
17642
17646
  identityToken: t.identityToken,
@@ -8,6 +8,7 @@ interface ISocketClientConfig {
8
8
  ownerEdSecret?: string;
9
9
  contractAddress?: string;
10
10
  ownerAddress?: string;
11
+ ddocId?: string;
11
12
  editLock?: string;
12
13
  encryptedTitle?: string;
13
14
  identityToken?: string;
@@ -74,6 +75,7 @@ export declare class SocketClient {
74
75
  private ownerUcan?;
75
76
  private collaborationUcan?;
76
77
  private ownerAddress?;
78
+ private ddocId?;
77
79
  private editLock?;
78
80
  private encryptedTitle?;
79
81
  private identityToken?;
@@ -83,6 +83,8 @@ export interface CollabConnectionConfig {
83
83
  ownerEdSecret?: string;
84
84
  contractAddress?: string;
85
85
  ownerAddress?: string;
86
+ /** Host signal (opaque-link docs): the on-chain ddocId, sent to the server alongside the public room id. */
87
+ ddocId?: string;
86
88
  roomInfo?: {
87
89
  documentTitle: string;
88
90
  portalAddress: string;
@@ -311,6 +313,7 @@ export interface IAuthArgs {
311
313
  ownerToken?: string;
312
314
  ownerAddress?: string;
313
315
  contractAddress?: string;
316
+ ddocId?: string;
314
317
  sessionDid?: string;
315
318
  roomInfo?: string;
316
319
  identityToken?: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "5.1.8",
5
+ "version": "5.1.9-opaque-links.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-ddocs.git"
@@ -197,4 +197,4 @@
197
197
  "vitest": "^2.1.0",
198
198
  "yjs": "13.6.30"
199
199
  }
200
- }
200
+ }