@loro-dev/flock 2.1.2 → 3.0.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.d.mts CHANGED
@@ -31,8 +31,7 @@ type ExportBundle = {
31
31
  type EntryClock = {
32
32
  physicalTime: number;
33
33
  logicalCounter: number;
34
- peerIdHex: string;
35
- peerId: Uint8Array;
34
+ peerId: string;
36
35
  };
37
36
  type ExportPayload = {
38
37
  data?: Value;
@@ -111,12 +110,12 @@ type EventBatch = {
111
110
  };
112
111
  declare class Flock {
113
112
  private inner;
114
- constructor(peerId?: Uint8Array);
113
+ constructor(peerId?: string);
115
114
  private static fromInner;
116
- static fromJson(bundle: ExportBundle, peerId: Uint8Array): Flock;
115
+ static fromJson(bundle: ExportBundle, peerId: string): Flock;
117
116
  static checkConsistency(a: Flock, b: Flock): boolean;
118
117
  checkInvariants(): void;
119
- setPeerId(peerId: Uint8Array): void;
118
+ setPeerId(peerId: string): void;
120
119
  private putWithMetaInternal;
121
120
  private putWithMetaWithHooks;
122
121
  /**
@@ -148,7 +147,7 @@ declare class Flock {
148
147
  importJson(bundle: ExportBundle): ImportReport;
149
148
  importJson(options: ImportOptions): Promise<ImportReport>;
150
149
  getMaxPhysicalTime(): number;
151
- peerId(): Uint8Array;
150
+ peerId(): string;
152
151
  digest(): string;
153
152
  kvToJson(): ExportBundle;
154
153
  putMvr(key: KeyPart[], value: Value, now?: number): void;
package/dist/index.d.ts CHANGED
@@ -31,8 +31,7 @@ type ExportBundle = {
31
31
  type EntryClock = {
32
32
  physicalTime: number;
33
33
  logicalCounter: number;
34
- peerIdHex: string;
35
- peerId: Uint8Array;
34
+ peerId: string;
36
35
  };
37
36
  type ExportPayload = {
38
37
  data?: Value;
@@ -111,12 +110,12 @@ type EventBatch = {
111
110
  };
112
111
  declare class Flock {
113
112
  private inner;
114
- constructor(peerId?: Uint8Array);
113
+ constructor(peerId?: string);
115
114
  private static fromInner;
116
- static fromJson(bundle: ExportBundle, peerId: Uint8Array): Flock;
115
+ static fromJson(bundle: ExportBundle, peerId: string): Flock;
117
116
  static checkConsistency(a: Flock, b: Flock): boolean;
118
117
  checkInvariants(): void;
119
- setPeerId(peerId: Uint8Array): void;
118
+ setPeerId(peerId: string): void;
120
119
  private putWithMetaInternal;
121
120
  private putWithMetaWithHooks;
122
121
  /**
@@ -148,7 +147,7 @@ declare class Flock {
148
147
  importJson(bundle: ExportBundle): ImportReport;
149
148
  importJson(options: ImportOptions): Promise<ImportReport>;
150
149
  getMaxPhysicalTime(): number;
151
- peerId(): Uint8Array;
150
+ peerId(): string;
152
151
  digest(): string;
153
152
  kvToJson(): ExportBundle;
154
153
  putMvr(key: KeyPart[], value: Value, now?: number): void;