xitdb 0.5.0 → 0.6.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/README.md CHANGED
@@ -37,7 +37,7 @@ const db = await Database.create(core, hasher);
37
37
 
38
38
  // to get the benefits of immutability, the top-level data structure
39
39
  // must be an ArrayList, so each transaction is stored as an item in it
40
- const history = await WriteArrayList.create(await db.rootCursor());
40
+ const history = await WriteArrayList.create(db.rootCursor());
41
41
 
42
42
  // this is how a transaction is executed. we call history.appendContext,
43
43
  // providing it with the most recent copy of the db and a context
@@ -4,6 +4,7 @@ import { Tag } from './tag';
4
4
  import { Slot } from './slot';
5
5
  import { SlotPointer } from './slot-pointer';
6
6
  import { type WriteableData } from './writeable-data';
7
+ import { WriteCursor } from './write-cursor';
7
8
  export declare const VERSION = 0;
8
9
  export declare const MAGIC_NUMBER: Uint8Array<ArrayBuffer>;
9
10
  export declare const BIT_COUNT = 4;
@@ -220,7 +221,7 @@ export declare class Database {
220
221
  txStart: number | null;
221
222
  private constructor();
222
223
  static create(core: Core, hasher: Hasher): Promise<Database>;
223
- rootCursor(): Promise<any>;
224
+ rootCursor(): WriteCursor;
224
225
  freeze(): Promise<void>;
225
226
  truncate(): Promise<void>;
226
227
  checkHashBytes(hash: Uint8Array): Uint8Array;