@peerbit/native-backbone 0.1.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/LICENSE +202 -0
- package/README.md +27 -0
- package/dist/src/benchmark.d.ts +19 -0
- package/dist/src/benchmark.d.ts.map +1 -0
- package/dist/src/benchmark.js +12 -0
- package/dist/src/benchmark.js.map +1 -0
- package/dist/src/index.d.ts +1561 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +3406 -0
- package/dist/src/index.js.map +1 -0
- package/dist/wasm/README.md +27 -0
- package/dist/wasm/native_backbone.d.ts +1609 -0
- package/dist/wasm/native_backbone.js +10221 -0
- package/dist/wasm/native_backbone_bg.wasm +0 -0
- package/dist/wasm/native_backbone_bg.wasm.d.ts +625 -0
- package/package.json +64 -0
- package/src/append_tx/committed_latest.rs +2063 -0
- package/src/append_tx/committed_no_next.rs +1165 -0
- package/src/append_tx/facts.rs +791 -0
- package/src/append_tx/mod.rs +751 -0
- package/src/append_tx/storage.rs +599 -0
- package/src/benchmark.ts +58 -0
- package/src/coordinates.rs +422 -0
- package/src/documents.rs +1698 -0
- package/src/graph_blocks.rs +362 -0
- package/src/index.ts +9134 -0
- package/src/js_interop.rs +448 -0
- package/src/lib.rs +144 -0
- package/src/profile.rs +164 -0
- package/src/raw_receive.rs +1724 -0
- package/src/shared_log_plan.rs +1464 -0
- package/src/sync_send.rs +180 -0
- package/src/wire_sync.rs +727 -0
|
@@ -0,0 +1,1561 @@
|
|
|
1
|
+
export type RangeResolution = "u32" | "u64";
|
|
2
|
+
type NativePeerbitBackboneHandle = {
|
|
3
|
+
log_len: () => number;
|
|
4
|
+
block_len: () => number;
|
|
5
|
+
has_log_entry: (hash: string) => boolean;
|
|
6
|
+
has_block: (hash: string) => boolean;
|
|
7
|
+
entry_coordinate_hashes: () => string[];
|
|
8
|
+
get_entry_coordinates: (hash: string) => unknown[] | undefined;
|
|
9
|
+
find_leaders: (cursors: string[], replicas: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
10
|
+
find_leaders_batch: (cursorBatches: string[][], replicaCounts: number[], roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[][];
|
|
11
|
+
get_grid: (from: string, count: number) => unknown[];
|
|
12
|
+
get_gid_coordinates: (gid: string, count: number) => unknown[];
|
|
13
|
+
entry_hashes_for_hash_numbers: (hashNumbers: string[]) => unknown[];
|
|
14
|
+
entry_hashes_for_hash_numbers_u64?: (hashNumbers: BigUint64Array) => unknown[];
|
|
15
|
+
entry_hashes_for_hash_numbers_flat_u64?: (hashNumbers: BigUint64Array) => string[];
|
|
16
|
+
entry_hash_numbers_in_range: (start1: string, end1: string, start2: string, end2: string) => unknown[];
|
|
17
|
+
entry_hash_numbers_in_range_u64?: (start1: string, end1: string, start2: string, end2: string) => BigUint64Array;
|
|
18
|
+
count_entry_coordinates_in_ranges: (start1: string[], end1: string[], start2: string[], end2: string[], includeAssignedToRangeBoundary: boolean) => number;
|
|
19
|
+
entry_coordinate_fields: () => unknown[];
|
|
20
|
+
coordinate_index_len: () => number;
|
|
21
|
+
coordinate_value_len: () => number;
|
|
22
|
+
coordinate_index_has_hash: (hash: string) => boolean;
|
|
23
|
+
configure_document_schema_ir: (schemaIr: Uint8Array) => [number, number, number];
|
|
24
|
+
set_document_byte_element_index_limit?: (limit: number) => void;
|
|
25
|
+
set_document_context_head_field: (field: number) => void;
|
|
26
|
+
set_document_context_fields: (created: number, modified: number, head: number, gid: number, size: number) => void;
|
|
27
|
+
register_document_projection_plan: (plan: NativeBackboneSimpleDocumentProjectionPlan) => number;
|
|
28
|
+
project_document_index_simple: (encodedDocument: Uint8Array, plan: NativeBackboneSimpleDocumentProjectionPlan, created: string, modified: string, head: string, gid: string, size: number, signer?: Uint8Array) => Uint8Array;
|
|
29
|
+
set_append_profile_enabled: (enabled: boolean) => void;
|
|
30
|
+
reset_append_profile: () => void;
|
|
31
|
+
append_profile: () => number[];
|
|
32
|
+
document_index_len: () => number;
|
|
33
|
+
document_value_len: () => number;
|
|
34
|
+
document_exact_string_first_key: (field: number, value: string) => string | undefined;
|
|
35
|
+
document_value_bytes: (key: string) => Uint8Array | undefined;
|
|
36
|
+
document_entry: (key: string) => [string, Uint8Array] | undefined;
|
|
37
|
+
document_keys_exist?: (keys: string[]) => Uint8Array;
|
|
38
|
+
document_field_value: (key: string, field: number) => NativeBackboneDocumentFieldValue | undefined;
|
|
39
|
+
document_context: (key: string) => [string, string, string, string, number] | undefined;
|
|
40
|
+
document_context_batch?: (keys: string[]) => Array<[string, string, string, string, number] | undefined>;
|
|
41
|
+
document_previous_signature_public_key?: (key: string) => [boolean, Uint8Array | undefined];
|
|
42
|
+
document_context_previous_signature_public_key_batch?: (keys: string[]) => Array<[
|
|
43
|
+
[
|
|
44
|
+
string,
|
|
45
|
+
string,
|
|
46
|
+
string,
|
|
47
|
+
string,
|
|
48
|
+
number
|
|
49
|
+
] | undefined,
|
|
50
|
+
Uint8Array | undefined
|
|
51
|
+
]>;
|
|
52
|
+
document_query: (queryBytes: Uint8Array, sortBytes: Uint8Array) => Array<[string, Uint8Array]>;
|
|
53
|
+
document_query_page: (queryBytes: Uint8Array, sortBytes: Uint8Array, offset: number, limit: number) => Array<[string, Uint8Array]>;
|
|
54
|
+
document_count: (queryBytes: Uint8Array) => number;
|
|
55
|
+
document_sum: (queryBytes: Uint8Array, field: number) => ["none" | "i64" | "u64", string];
|
|
56
|
+
put_document_encoded_parts_stored: (key: string, valuePrefixBytes: Uint8Array, valueSuffixBytes: Uint8Array, byteElementIndexLimit: number) => void;
|
|
57
|
+
put_document_encoded_parts_stored_batch: (keys: string[], valuePrefixBytes: Uint8Array[], valueSuffixBytes: Uint8Array[], byteElementIndexLimit: number) => void;
|
|
58
|
+
delete_document: (key: string) => boolean;
|
|
59
|
+
delete_documents: (keys: string[]) => number;
|
|
60
|
+
delete_documents_result: (keys: string[]) => Uint8Array;
|
|
61
|
+
clear_document_index: () => void;
|
|
62
|
+
document_journal_header: () => Uint8Array;
|
|
63
|
+
document_pending_journal_len: () => number;
|
|
64
|
+
document_pending_journal_byte_len: () => number;
|
|
65
|
+
document_journal_enabled: () => boolean;
|
|
66
|
+
set_document_journal_enabled: (enabled: boolean) => void;
|
|
67
|
+
document_journal: () => Uint8Array;
|
|
68
|
+
clear_document_journal: () => void;
|
|
69
|
+
clear_document_journal_prefix: (byteLength: number, recordCount: number) => void;
|
|
70
|
+
document_snapshot: () => Uint8Array;
|
|
71
|
+
load_document_snapshot_and_journal: (snapshot: Uint8Array, journal: Uint8Array) => number;
|
|
72
|
+
coordinate_journal_header: () => Uint8Array;
|
|
73
|
+
coordinate_pending_journal_len: () => number;
|
|
74
|
+
coordinate_pending_journal_byte_len: () => number;
|
|
75
|
+
coordinate_journal_enabled: () => boolean;
|
|
76
|
+
set_coordinate_journal_enabled: (enabled: boolean) => void;
|
|
77
|
+
coordinate_journal: () => Uint8Array;
|
|
78
|
+
clear_coordinate_journal: () => void;
|
|
79
|
+
clear_coordinate_journal_prefix: (byteLength: number, recordCount: number) => void;
|
|
80
|
+
coordinate_snapshot: () => Uint8Array;
|
|
81
|
+
load_coordinate_snapshot_and_journal: (snapshot: Uint8Array, journal: Uint8Array) => number;
|
|
82
|
+
document_signer_journal_header: () => Uint8Array;
|
|
83
|
+
document_signer_pending_journal_len: () => number;
|
|
84
|
+
document_signer_pending_journal_byte_len: () => number;
|
|
85
|
+
document_signer_journal_enabled: () => boolean;
|
|
86
|
+
set_document_signer_journal_enabled: (enabled: boolean) => void;
|
|
87
|
+
document_signer_journal: () => Uint8Array;
|
|
88
|
+
clear_document_signer_journal: () => void;
|
|
89
|
+
clear_document_signer_journal_prefix: (byteLength: number, recordCount: number) => void;
|
|
90
|
+
document_signer_snapshot: () => Uint8Array;
|
|
91
|
+
load_document_signer_snapshot_and_journal: (snapshot: Uint8Array, journal: Uint8Array) => number;
|
|
92
|
+
graph_has_many: (hashes: string[]) => string[];
|
|
93
|
+
graph_put: (hash: string, gid: string, next: string[], type: number, wallTime: bigint, logical: number, payloadSize: number, head: boolean, data?: Uint8Array) => void;
|
|
94
|
+
graph_put_batch: (hashes: string[], gids: string[], nexts: string[][], entryTypes: Uint8Array, wallTimes: BigUint64Array, logicals: Uint32Array, payloadSizes: Uint32Array, heads: Uint8Array, datas: Array<Uint8Array | undefined>) => void;
|
|
95
|
+
graph_put_append_chain: (hashes: string[], gid: string, initialNext: string[], entryType: number, wallTimes: BigUint64Array, logicals: Uint32Array, payloadSizes: Uint32Array, datas: Array<Uint8Array | undefined>) => void;
|
|
96
|
+
graph_clear: () => void;
|
|
97
|
+
commit_log_blocks_and_graph_batch: (hashes: string[], blockBytes: Uint8Array[], gids: string[], nexts: string[][], entryTypes: Uint8Array, wallTimes: BigUint64Array, logicals: Uint32Array, payloadSizes: Uint32Array, heads: Uint8Array, datas: Array<Uint8Array | undefined>) => void;
|
|
98
|
+
commit_log_blocks_graph_and_coordinates_batch: (hashes: string[], blockBytes: Uint8Array[], gids: string[], nexts: string[][], entryTypes: Uint8Array, wallTimes: BigUint64Array, logicals: Uint32Array, payloadSizes: Uint32Array, heads: Uint8Array, datas: Array<Uint8Array | undefined>, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: string[], coordinateBatches: string[][], coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: number[]) => void;
|
|
99
|
+
prepare_raw_receive_batch: (blocks: Uint8Array[]) => NativeBackboneRawReceivePreparedFactsRow[];
|
|
100
|
+
prepare_raw_receive_columns_batch?: (blocks: Uint8Array[]) => NativeBackboneRawReceivePreparedFactsColumns;
|
|
101
|
+
prepare_raw_receive_unverified_columns_batch?: (blocks: Uint8Array[]) => NativeBackboneRawReceivePreparedFactsColumns;
|
|
102
|
+
prepare_raw_receive_expected_columns_batch?: (blocks: Uint8Array[], hashes: string[]) => NativeBackboneRawReceivePreparedFactsColumns;
|
|
103
|
+
prepare_raw_receive_expected_compact_columns_batch?: (blocks: Uint8Array[], hashes: string[]) => NativeBackboneRawReceivePreparedFactsColumns;
|
|
104
|
+
prepare_raw_receive_unverified_expected_columns_batch?: (blocks: Uint8Array[], hashes: string[]) => NativeBackboneRawReceivePreparedFactsColumns;
|
|
105
|
+
prepare_raw_receive_unverified_expected_compact_columns_batch?: (blocks: Uint8Array[], hashes: string[]) => NativeBackboneRawReceivePreparedFactsColumns;
|
|
106
|
+
prepare_raw_receive_unverified_expected_compact_columns_and_selection_batch?: (blocks: Uint8Array[], hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean, fromHash: string) => [
|
|
107
|
+
NativeBackboneRawReceivePreparedFactsColumns,
|
|
108
|
+
NativeBackboneRawReceiveSelectionRow | undefined
|
|
109
|
+
];
|
|
110
|
+
prepare_stashed_raw_receive_expected_compact_columns_batch?: (session: NativeWireSyncSessionHandle, id: Uint8Array, indexes: Uint32Array, hashes: string[], verifySignatures: boolean) => NativeBackboneRawReceivePreparedFactsColumns | undefined;
|
|
111
|
+
prepare_stashed_raw_receive_expected_compact_columns_and_selection_batch?: (session: NativeWireSyncSessionHandle, id: Uint8Array, indexes: Uint32Array, hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean, fromHash: string) => [
|
|
112
|
+
NativeBackboneRawReceivePreparedFactsColumns,
|
|
113
|
+
NativeBackboneRawReceiveSelectionRow | undefined
|
|
114
|
+
] | undefined;
|
|
115
|
+
raw_receive_block_bytes?: (hash: string) => Uint8Array | undefined;
|
|
116
|
+
plan_prepared_raw_receive_groups?: (hashes: string[], minReplicas: number, maxReplicas?: number) => NativeBackboneRawReceiveGroupPlanRow[] | undefined;
|
|
117
|
+
plan_prepared_raw_receive_group_indexes?: (hashes: string[], minReplicas: number, maxReplicas?: number) => NativeBackboneRawReceiveGroupIndexPlanRow[] | undefined;
|
|
118
|
+
plan_prepared_raw_receive_group_leaders?: (hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => NativeBackboneRawReceiveGroupLeaderPlanRow[] | undefined;
|
|
119
|
+
plan_prepared_raw_receive_group_assignments?: (hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean, fromHash: string) => NativeBackboneRawReceiveGroupAssignmentPlanRow[] | undefined;
|
|
120
|
+
plan_prepared_raw_receive_fast_drop?: (hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean, fromHash: string) => [boolean, number, number] | undefined;
|
|
121
|
+
plan_prepared_raw_receive_selection?: (hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean, fromHash: string) => NativeBackboneRawReceiveSelectionRow | undefined;
|
|
122
|
+
select_prepared_raw_receive_hashes?: (hashes: string[], minReplicas: number, maxReplicas: number | undefined, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean, fromHash: string) => NativeBackboneRawReceiveSelectionRow | undefined;
|
|
123
|
+
verify_prepared_raw_receive_entries?: (hashes: string[]) => Uint8Array | undefined;
|
|
124
|
+
commit_prepared_raw_receive_batch: (hashes: string[], heads: Uint8Array, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: string[], coordinateBatches: string[][], coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: number[]) => boolean;
|
|
125
|
+
commit_prepared_raw_receive_batch_u64?: (hashes: string[], heads: Uint8Array, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: BigUint64Array, coordinateCounts: Uint32Array, coordinates: BigUint64Array, coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: Uint32Array) => boolean;
|
|
126
|
+
commit_prepared_raw_receive_join_batch?: (hashes: string[], heads: Uint8Array, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: string[], coordinateBatches: string[][], coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: number[]) => boolean;
|
|
127
|
+
commit_prepared_raw_receive_join_batch_u64?: (hashes: string[], heads: Uint8Array, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: BigUint64Array, coordinateCounts: Uint32Array, coordinates: BigUint64Array, coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: Uint32Array) => boolean;
|
|
128
|
+
commit_verified_prepared_raw_receive_join_batch?: (hashes: string[], heads: Uint8Array, verifyHashes: string[], coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: string[], coordinateBatches: string[][], coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: number[]) => boolean;
|
|
129
|
+
commit_verified_prepared_raw_receive_join_batch_u64?: (hashes: string[], heads: Uint8Array, verifyHashes: string[], coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: BigUint64Array, coordinateCounts: Uint32Array, coordinates: BigUint64Array, coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: Uint32Array) => boolean;
|
|
130
|
+
commit_verified_all_prepared_raw_receive_join_batch?: (hashes: string[], heads: Uint8Array, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: string[], coordinateBatches: string[][], coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: number[]) => boolean;
|
|
131
|
+
commit_verified_all_prepared_raw_receive_join_batch_u64?: (hashes: string[], heads: Uint8Array, coordinateHashes: string[], coordinateGids: string[], coordinateHashNumbers: BigUint64Array, coordinateCounts: Uint32Array, coordinates: BigUint64Array, coordinateNextHashBatches: string[][], coordinateAssignedToRangeBoundaries: Uint8Array, coordinateRequestedReplicas: Uint32Array) => boolean;
|
|
132
|
+
clear_prepared_raw_receive_entries: (hashes: string[]) => number;
|
|
133
|
+
graph_delete: (hash: string) => boolean;
|
|
134
|
+
graph_delete_many: (hashes: string[]) => number;
|
|
135
|
+
graph_oldest_entries: (limit: number) => unknown[];
|
|
136
|
+
graph_heads: (gid?: string) => string[];
|
|
137
|
+
graph_has_head: (gid?: string) => boolean;
|
|
138
|
+
graph_has_any_head: (gids: string[]) => boolean;
|
|
139
|
+
graph_has_any_head_batch: (gidSets: string[][]) => boolean[];
|
|
140
|
+
graph_head_entries: (gid?: string) => unknown[];
|
|
141
|
+
graph_head_data_entries: (gid?: string) => unknown[];
|
|
142
|
+
graph_max_head_data_u32: (gid?: string) => number | undefined;
|
|
143
|
+
graph_max_head_data_u32_batch: (gids: string[]) => Array<number | undefined>;
|
|
144
|
+
graph_join_head_entries: (gid?: string) => unknown[];
|
|
145
|
+
graph_child_join_entries: (hash: string) => unknown[];
|
|
146
|
+
graph_entry_metadata_batch: (hashes: string[]) => unknown[];
|
|
147
|
+
graph_entry_metadata_hints_batch?: (hashes: string[]) => unknown[];
|
|
148
|
+
graph_entry_signature_public_key_batch?: (hashes: string[]) => Array<Uint8Array | undefined>;
|
|
149
|
+
graph_unique_reference_gids: (hash: string) => string[] | undefined;
|
|
150
|
+
graph_unique_reference_gid_rows_batch: (hashes: string[]) => unknown[];
|
|
151
|
+
graph_unique_reference_gid_rows_flat_batch?: (hashes: string[]) => Array<[number, string, string]> | undefined;
|
|
152
|
+
graph_plan_delete_recursively: (hashes: string[], skipFirst: boolean) => string[];
|
|
153
|
+
graph_payload_size_sum: () => number;
|
|
154
|
+
graph_oldest_hash: () => string | undefined;
|
|
155
|
+
graph_newest_hash: () => string | undefined;
|
|
156
|
+
graph_count_has_next: (next: string, excludeHash?: string) => number;
|
|
157
|
+
graph_shadowed_gids: (gid: string, next: string[], excludeHash?: string) => string[];
|
|
158
|
+
graph_plan_join: (hash: string, next: string[], type: number, reset: boolean, gid?: string, wallTime?: bigint, logical?: number) => [boolean, string[], boolean, boolean];
|
|
159
|
+
graph_plan_join_batch: (hashes: string[], nexts: string[][], types: Uint8Array, reset: boolean, gids: string[], wallTimes: BigUint64Array, logicals: Uint32Array, cutCheck: boolean) => Array<[boolean, string[], boolean, boolean]>;
|
|
160
|
+
block_get: (key: string) => Uint8Array | undefined;
|
|
161
|
+
block_get_many: (keys: string[]) => Array<Uint8Array | undefined>;
|
|
162
|
+
block_has_many: (keys: string[]) => boolean[];
|
|
163
|
+
block_put: (key: string, value: Uint8Array) => void;
|
|
164
|
+
block_put_many: (keys: string[], values: Uint8Array[]) => void;
|
|
165
|
+
block_delete: (key: string) => boolean;
|
|
166
|
+
block_delete_many: (keys: string[]) => number;
|
|
167
|
+
block_entries: () => Array<[string, Uint8Array]>;
|
|
168
|
+
block_size: () => number;
|
|
169
|
+
sync_send_block_byte_lengths?: (hashes: string[]) => Uint32Array;
|
|
170
|
+
encode_raw_exchange_sync_payload?: (topic: string, strict: boolean, hashes: string[], gidRefrences: string[][], reserved: Uint8Array) => Uint8Array | undefined;
|
|
171
|
+
clear: () => void;
|
|
172
|
+
clear_shared_log: () => void;
|
|
173
|
+
clear_entry_coordinates: () => void;
|
|
174
|
+
put_range: (id: string, hash: string, timestamp: string, start1: string, end1: string, start2: string, end2: string, width: string, mode: number) => void;
|
|
175
|
+
delete_range: (id: string) => boolean;
|
|
176
|
+
put_entry_coordinates: (hash: string, gid: string, hashNumber: string, coordinates: string[], assignedToRangeBoundary: boolean, requestedReplicas: number) => void;
|
|
177
|
+
delete_entry_coordinates: (hash: string) => boolean;
|
|
178
|
+
delete_entry_coordinates_batch: (hashes: string[]) => void;
|
|
179
|
+
commit_entry_coordinates: (hash: string, gid: string, hashNumber: string, coordinates: string[], nextHashes: string[], assignedToRangeBoundary: boolean, requestedReplicas: number) => void;
|
|
180
|
+
commit_entry_coordinates_batch?: (hashes: string[], gids: string[], hashNumbers: string[], coordinateBatches: string[][], nextHashBatches: string[][], assignedToRangeBoundaries: Uint8Array, requestedReplicas: number[]) => void;
|
|
181
|
+
commit_entry_coordinates_batch_u64?: (hashes: string[], gids: string[], hashNumbers: BigUint64Array, coordinateCounts: Uint32Array, coordinates: BigUint64Array, nextHashBatches: string[][], assignedToRangeBoundaries: Uint8Array, requestedReplicas: Uint32Array) => void;
|
|
182
|
+
add_gid_peers: (gid: string, peers: string[], reset: boolean) => number;
|
|
183
|
+
remove_gid_peer: (peer: string, gid?: string) => void;
|
|
184
|
+
remove_gid_peers?: (peer: string, gids: string[]) => void;
|
|
185
|
+
delete_gid_peers: (gid: string) => boolean;
|
|
186
|
+
clear_gid_peers: () => void;
|
|
187
|
+
mark_entries_known_by_peer: (hashes: string[], peer: string) => void;
|
|
188
|
+
remove_entries_known_by_peer: (hashes: string[], peer: string) => void;
|
|
189
|
+
remove_peer_from_entry_known_peers: (peer: string) => void;
|
|
190
|
+
clear_entry_known_peers: () => void;
|
|
191
|
+
plan_entry_leaders_for_gid: (gid: string, replicas: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => [unknown[], unknown[]];
|
|
192
|
+
plan_leaders_for_gids_batch: (gids: string[], replicaCounts: number[], roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => Array<[unknown[], unknown[]]>;
|
|
193
|
+
plan_leader_samples_for_gids_batch?: (gids: string[], replicaCounts: number[], roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
194
|
+
plan_request_prune_leader_hints?: (hashes: string[], skipHashes: string[], roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
195
|
+
plan_request_prune_leader_hint_columns?: (hashes: string[], skipHashes: string[], roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
196
|
+
plan_request_prune_all_confirmed?: (hashes: string[], prunePeer: string, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
197
|
+
plan_request_prune_all_confirmed_no_gid_return?: (hashes: string[], prunePeer: string, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => boolean;
|
|
198
|
+
plan_entry_assignment_for_gid: (gid: string, replicas: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => [unknown[], unknown[], boolean];
|
|
199
|
+
plan_repair_dispatch_for_entries: (entryHashes: string[], entryGids: string[], entryRequestedReplicas: number[], entryCoordinateBatches: string[][], pendingModes: string[], pendingPeersByMode: string[][], optimisticPeersByMode: string[][][], fullReplicaRepairCandidates: string[], fullReplicaRepairCandidateCount: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
200
|
+
plan_repair_dispatch_for_resident_entries: (pendingModes: string[], pendingPeersByMode: string[][], optimisticGidsByMode: string[][], optimisticPeersByGidByMode: string[][][], fullReplicaRepairCandidates: string[], fullReplicaRepairCandidateCount: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => unknown[];
|
|
201
|
+
plan_local_append_for_gid_compact: (entryHash: string, gid: string, hashNumber: string, nextHashes: string[], replicas: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => [unknown[] | undefined, boolean, boolean, unknown[]];
|
|
202
|
+
commit_local_append_for_gid_compact: (entryHash: string, gid: string, hashNumber: string, nextHashes: string[], deleteHashes: string[], replicas: number, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => [unknown[] | undefined, boolean, boolean, unknown[]];
|
|
203
|
+
plan_append_for_gid: (entryHash: string, gid: string, hashNumber: string, nextHashes: string[], replicas: number, fullReplicaCandidates: string[], fallbackRecipients: string[], deliverySelfHash: string, deliveryEnabled: boolean, reliabilityAck: boolean, minAcks: number | undefined, requireRecipients: boolean, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => [
|
|
204
|
+
unknown[],
|
|
205
|
+
unknown[],
|
|
206
|
+
boolean,
|
|
207
|
+
boolean,
|
|
208
|
+
[
|
|
209
|
+
boolean,
|
|
210
|
+
boolean,
|
|
211
|
+
boolean,
|
|
212
|
+
string[],
|
|
213
|
+
string[],
|
|
214
|
+
string[],
|
|
215
|
+
string[],
|
|
216
|
+
string[]
|
|
217
|
+
],
|
|
218
|
+
unknown[]
|
|
219
|
+
];
|
|
220
|
+
plan_append_for_gids_batch: (entryHashes: string[], gids: string[], hashNumbers: string[], nextHashBatches: string[][], replicaCounts: number[], fullReplicaCandidates: string[], fallbackRecipients: string[], deliverySelfHash: string, deliveryEnabled: boolean, reliabilityAck: boolean, minAcks: number | undefined, requireRecipients: boolean, roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => Array<[
|
|
221
|
+
unknown[],
|
|
222
|
+
unknown[],
|
|
223
|
+
boolean,
|
|
224
|
+
boolean,
|
|
225
|
+
[
|
|
226
|
+
boolean,
|
|
227
|
+
boolean,
|
|
228
|
+
boolean,
|
|
229
|
+
string[],
|
|
230
|
+
string[],
|
|
231
|
+
string[],
|
|
232
|
+
string[],
|
|
233
|
+
string[]
|
|
234
|
+
],
|
|
235
|
+
unknown[]
|
|
236
|
+
]>;
|
|
237
|
+
plan_receive_coordinates_for_gids_batch: (entryHashes: string[], gids: string[], hashNumbers: string[], nextHashBatches: string[][], replicaCounts: number[], roleAgeMs: number, now: string, peerFilter: string[] | undefined, expandPeerFilter: boolean, selfHash: string, includeSelf: boolean, fullReplicaFallback: boolean, includeStrictFullReplica: boolean) => Array<[unknown[], unknown[], boolean, boolean, unknown[]]>;
|
|
238
|
+
prepare_plain_entry_commit_facts: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number | undefined) => unknown[];
|
|
239
|
+
prepare_plain_entry_commit_facts_document_index: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number | undefined, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
240
|
+
prepare_plain_entry_commit_facts_document_index_cached_plan: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number | undefined, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
241
|
+
prepare_plain_entry_commit_no_next_facts_document_index_compact: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
242
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
243
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_plain_put_payload?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
244
|
+
prepare_plain_entry_commit_no_next_facts_document_index_trim_hashes: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
245
|
+
prepare_plain_entry_commit_no_next_facts_document_index_compact_trim_hashes: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
246
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_trim_hashes: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
247
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_trim_hashes: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
248
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_trim_hashes_plain_put_payload?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
249
|
+
prepare_plain_entry_commit_latest_facts_document_index_trim_hashes: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number | undefined, documentKey: string, documentValuePrefixBytes: Uint8Array, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
250
|
+
prepare_plain_entry_commit_latest_facts_document_index_cached_plan_trim_hashes: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number | undefined, documentKey: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
251
|
+
prepare_plain_entry_storage_facts_and_put: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array) => unknown[];
|
|
252
|
+
prepare_plain_entry_storage_facts_trim_and_put: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, trimLengthTo: number) => unknown[];
|
|
253
|
+
prepare_plain_no_next_storage_append_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean) => unknown[];
|
|
254
|
+
prepare_plain_no_next_storage_append_transaction_trim: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, trimLengthTo: number) => unknown[];
|
|
255
|
+
prepare_plain_no_next_storage_append_document_index_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
256
|
+
prepare_plain_no_next_storage_append_document_index_transaction_trim: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number) => unknown[];
|
|
257
|
+
prepare_plain_committed_no_next_storage_append_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean) => unknown[];
|
|
258
|
+
prepare_plain_committed_no_next_storage_append_document_index_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
259
|
+
prepare_plain_committed_no_next_storage_append_document_index_cached_plan_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
260
|
+
prepare_plain_committed_no_next_storage_append_document_index_compact_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[];
|
|
261
|
+
prepare_plain_committed_no_next_storage_append_document_index_compact_plain_put_payload_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[];
|
|
262
|
+
prepare_plain_committed_no_next_storage_append_document_index_compact_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentValuePrefixBytes: Uint8Array[], documentExistingCreated: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[][];
|
|
263
|
+
prepare_plain_committed_no_next_storage_append_document_index_compact_plain_put_payload_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentExistingCreated: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[][];
|
|
264
|
+
prepare_plain_committed_no_next_storage_append_document_index_cached_plan_compact_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentExistingCreated: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionEncodedDocuments: Uint8Array[], documentProjectionSigners: Array<Uint8Array | undefined>, trimLengthTo: number | undefined) => unknown[][];
|
|
265
|
+
prepare_plain_committed_no_next_storage_append_document_index_cached_plan_compact_plain_put_payload_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentExistingCreated: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionSigners: Array<Uint8Array | undefined>, trimLengthTo: number | undefined) => unknown[][];
|
|
266
|
+
prepare_plain_committed_no_next_storage_append_document_index_cached_plan_compact_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
267
|
+
prepare_plain_committed_no_next_storage_append_document_index_cached_plan_compact_plain_put_payload_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
268
|
+
prepare_plain_committed_no_next_storage_append_transaction_trim: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, trimLengthTo: number) => unknown[];
|
|
269
|
+
benchmark_plain_committed_no_next_storage_append_transaction_loop: (iterations: number, wallTimeStart: bigint, payloadData: Uint8Array, replicas: number, selfHash: string, useDocumentIndex: boolean, documentByteElementIndexLimit: number, trimLengthTo: number | undefined) => number[];
|
|
270
|
+
prepare_plain_committed_no_next_storage_append_document_index_transaction_trim: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number) => unknown[];
|
|
271
|
+
prepare_plain_committed_no_next_storage_append_document_index_cached_plan_transaction_trim: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number) => unknown[];
|
|
272
|
+
prepare_plain_storage_append_transaction: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean) => unknown[];
|
|
273
|
+
prepare_plain_storage_append_transaction_trim: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, trimLengthTo: number) => unknown[];
|
|
274
|
+
prepare_plain_storage_append_document_index_transaction: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
275
|
+
prepare_plain_storage_append_document_index_transaction_trim: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number) => unknown[];
|
|
276
|
+
prepare_plain_committed_storage_append_transaction: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean) => unknown[];
|
|
277
|
+
prepare_plain_committed_storage_append_document_delete_transaction: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string) => unknown[];
|
|
278
|
+
prepare_plain_committed_storage_append_document_index_transaction: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined) => unknown[];
|
|
279
|
+
prepare_plain_committed_storage_append_document_index_latest_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
280
|
+
prepare_plain_committed_storage_append_document_index_latest_required_previous_signer_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, requiredPreviousSignerPublicKey: Uint8Array, trimLengthTo: number | undefined) => unknown[];
|
|
281
|
+
prepare_plain_committed_storage_append_document_index_latest_compact_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
282
|
+
prepare_plain_committed_storage_append_document_index_latest_compact_plain_put_payload_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[];
|
|
283
|
+
prepare_plain_committed_storage_append_document_index_latest_required_previous_signer_compact_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, requiredPreviousSignerPublicKey: Uint8Array, trimLengthTo: number | undefined) => unknown[];
|
|
284
|
+
prepare_plain_committed_storage_append_document_index_latest_cached_plan_compact_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
285
|
+
prepare_plain_committed_storage_append_document_index_latest_cached_plan_compact_plain_put_payload_transaction?: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKey: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
286
|
+
prepare_plain_committed_storage_append_document_index_latest_cached_plan_transaction: (wallTime: bigint, logical: number, gid: string, type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanId: number, documentProjectionEncodedDocument: Uint8Array, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number | undefined) => unknown[];
|
|
287
|
+
prepare_plain_committed_storage_append_document_index_latest_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKeys: string[], documentValuePrefixBytes: Uint8Array[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[][];
|
|
288
|
+
prepare_plain_committed_storage_append_document_index_latest_required_previous_signer_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKeys: string[], documentValuePrefixBytes: Uint8Array[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, requiredPreviousSignerPublicKey: Uint8Array, trimLengthTo: number | undefined) => unknown[][];
|
|
289
|
+
prepare_plain_committed_storage_append_document_index_latest_compact_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentValuePrefixBytes: Uint8Array[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[][];
|
|
290
|
+
prepare_plain_committed_storage_append_document_index_latest_compact_plain_put_payload_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, trimLengthTo: number | undefined) => unknown[][];
|
|
291
|
+
prepare_plain_committed_storage_append_document_index_latest_required_previous_signer_compact_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentValuePrefixBytes: Uint8Array[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, requiredPreviousSignerPublicKey: Uint8Array, trimLengthTo: number | undefined) => unknown[][];
|
|
292
|
+
prepare_plain_committed_storage_append_document_index_latest_cached_plan_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKeys: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionEncodedDocuments: Uint8Array[], documentProjectionSigners: Array<Uint8Array | undefined>, trimLengthTo: number | undefined) => unknown[][];
|
|
293
|
+
prepare_plain_committed_storage_append_document_index_latest_required_previous_signer_cached_plan_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKeys: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionEncodedDocuments: Uint8Array[], documentProjectionSigners: Array<Uint8Array | undefined>, requiredPreviousSignerPublicKey: Uint8Array, trimLengthTo: number | undefined) => unknown[][];
|
|
294
|
+
prepare_plain_committed_storage_append_document_index_latest_cached_plan_compact_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionEncodedDocuments: Uint8Array[], documentProjectionSigners: Array<Uint8Array | undefined>, trimLengthTo: number | undefined) => unknown[][];
|
|
295
|
+
prepare_plain_committed_storage_append_document_index_latest_required_previous_signer_cached_plan_compact_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionEncodedDocuments: Uint8Array[], documentProjectionSigners: Array<Uint8Array | undefined>, requiredPreviousSignerPublicKey: Uint8Array, trimLengthTo: number | undefined) => unknown[][];
|
|
296
|
+
prepare_plain_committed_storage_append_document_index_latest_cached_plan_compact_plain_put_payload_batch_transaction?: (wallTimes: BigUint64Array, logicals: Uint32Array, gids: string[], type: number, metaDatas: Array<Uint8Array | undefined>, payloadDatas: Uint8Array[], replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, documentKeys: string[], documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlanIds: Uint32Array, documentProjectionSigners: Array<Uint8Array | undefined>, trimLengthTo: number | undefined) => unknown[][];
|
|
297
|
+
prepare_plain_committed_storage_append_transaction_trim: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, trimLengthTo: number) => unknown[];
|
|
298
|
+
prepare_plain_committed_storage_append_document_delete_transaction_trim: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, trimLengthTo: number) => unknown[];
|
|
299
|
+
prepare_plain_committed_storage_append_document_index_transaction_trim: (wallTime: bigint, logical: number, gid: string, next: string[], type: number, metaData: Uint8Array | undefined, payloadData: Uint8Array, replicas: number, roleAgeMs: number, now: string, selfHash: string, selfReplicating: boolean, resolveTrimmedEntries: boolean, documentKey: string, documentValuePrefixBytes: Uint8Array, documentExistingCreated: string, documentByteElementIndexLimit: number, documentDeleteTrimmedHeads: boolean, documentProjectionPlan: NativeBackboneSimpleDocumentProjectionPlan | undefined, documentProjectionEncodedDocument: Uint8Array | undefined, documentProjectionSigner: Uint8Array | undefined, trimLengthTo: number) => unknown[];
|
|
300
|
+
};
|
|
301
|
+
type NativeBackboneHeadFlags = boolean[] | Uint8Array;
|
|
302
|
+
type NativeWireSyncSessionHandle = {
|
|
303
|
+
free: () => void;
|
|
304
|
+
register_topic: (topic: string) => void;
|
|
305
|
+
unregister_topic: (topic: string) => boolean;
|
|
306
|
+
topic_count: () => number;
|
|
307
|
+
decode_and_verify_batch: (frames: Uint8Array[], nowMs: number) => Uint32Array;
|
|
308
|
+
stashed_meta: (id: Uint8Array) => [string[], string[][], Uint32Array, Uint8Array, number] | undefined;
|
|
309
|
+
stashed_blocks: (id: Uint8Array, indexes?: Uint32Array) => Uint8Array[] | undefined;
|
|
310
|
+
release: (id: Uint8Array) => boolean;
|
|
311
|
+
stash_len: () => number;
|
|
312
|
+
counters: () => Uint32Array;
|
|
313
|
+
};
|
|
314
|
+
export type NativeBackboneWireSyncStashedMeta = {
|
|
315
|
+
hashes: string[];
|
|
316
|
+
gidRefrences: string[][];
|
|
317
|
+
byteLengths: Uint32Array;
|
|
318
|
+
reserved: Uint8Array;
|
|
319
|
+
payloadLength: number;
|
|
320
|
+
};
|
|
321
|
+
export type NativeBackboneWireSyncCounters = {
|
|
322
|
+
stashed: number;
|
|
323
|
+
evicted: number;
|
|
324
|
+
metaReads: number;
|
|
325
|
+
blockCopyOuts: number;
|
|
326
|
+
released: number;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Per-node receive-fusion session (`NativeWireSyncSession` in the wasm
|
|
330
|
+
* module). `decodeAndVerifyBatch` is a drop-in for the `nativeWire` option of
|
|
331
|
+
* `@peerbit/stream`'s DirectStream; frames carrying shared-log raw
|
|
332
|
+
* exchange-head payloads for registered topics are kept in wasm memory and
|
|
333
|
+
* consumed by `NativePeerbitBackbone.prepareStashedRawReceive*` without a
|
|
334
|
+
* second boundary copy. Shared-log programs register their RPC topic on open
|
|
335
|
+
* and release stash entries once a message is processed.
|
|
336
|
+
*/
|
|
337
|
+
export declare class NativeBackboneWireSyncSession {
|
|
338
|
+
/** Raw wasm handle; consumed by `NativePeerbitBackbone.prepareStashedRawReceive*`. */
|
|
339
|
+
readonly handle: NativeWireSyncSessionHandle;
|
|
340
|
+
private constructor();
|
|
341
|
+
static create(options: {
|
|
342
|
+
selfHash: string;
|
|
343
|
+
}): Promise<NativeBackboneWireSyncSession>;
|
|
344
|
+
registerTopic(topic: string): void;
|
|
345
|
+
unregisterTopic(topic: string): boolean;
|
|
346
|
+
get topicCount(): number;
|
|
347
|
+
decodeAndVerifyBatch(frames: Uint8Array[], nowMs: number): Uint32Array;
|
|
348
|
+
stashedMeta(id: Uint8Array): NativeBackboneWireSyncStashedMeta | undefined;
|
|
349
|
+
stashedBlocks(id: Uint8Array, indexes?: Uint32Array): Uint8Array[] | undefined;
|
|
350
|
+
release(id: Uint8Array): boolean;
|
|
351
|
+
get stashLength(): number;
|
|
352
|
+
counters(): NativeBackboneWireSyncCounters;
|
|
353
|
+
}
|
|
354
|
+
export declare const createNativeWireSyncSession: typeof NativeBackboneWireSyncSession.create;
|
|
355
|
+
/**
|
|
356
|
+
* Structural session parameter for `prepareStashedRawReceive*` so callers can
|
|
357
|
+
* hold the session behind their own type-only surface. The handle must come
|
|
358
|
+
* from a `NativeBackboneWireSyncSession` of the same wasm module instance.
|
|
359
|
+
*/
|
|
360
|
+
export type NativeBackboneWireSyncSessionLike = {
|
|
361
|
+
handle: unknown;
|
|
362
|
+
};
|
|
363
|
+
type NativeBackboneLeaderSample = {
|
|
364
|
+
intersecting: boolean;
|
|
365
|
+
};
|
|
366
|
+
type NativeBackboneFindLeaderOptions = {
|
|
367
|
+
roleAge?: number;
|
|
368
|
+
now?: bigint | number | string;
|
|
369
|
+
peerFilter?: Iterable<string>;
|
|
370
|
+
expandPeerFilter?: boolean;
|
|
371
|
+
selfHash?: string;
|
|
372
|
+
selfReplicating?: boolean;
|
|
373
|
+
fullReplicaFallback?: boolean;
|
|
374
|
+
includeStrictFullReplica?: boolean;
|
|
375
|
+
};
|
|
376
|
+
type NativeBackboneAppendDeliveryPlan = {
|
|
377
|
+
hasRemoteRecipients: boolean;
|
|
378
|
+
noPeerError: boolean;
|
|
379
|
+
defaultSendSilent: boolean;
|
|
380
|
+
sendTo: string[];
|
|
381
|
+
ackTo: string[];
|
|
382
|
+
silentTo: string[];
|
|
383
|
+
repairTargets: string[];
|
|
384
|
+
authoritativeRecipients: string[];
|
|
385
|
+
};
|
|
386
|
+
type NativeBackboneCoordinatePlan = {
|
|
387
|
+
hash: string;
|
|
388
|
+
hashNumber: number | bigint;
|
|
389
|
+
hashNumberString: string;
|
|
390
|
+
gid: string;
|
|
391
|
+
coordinates: Array<number | bigint>;
|
|
392
|
+
coordinateStrings: string[];
|
|
393
|
+
assignedToRangeBoundary: boolean;
|
|
394
|
+
requestedReplicas: number;
|
|
395
|
+
};
|
|
396
|
+
type NativeBackboneDocumentContextFacts = {
|
|
397
|
+
created: bigint;
|
|
398
|
+
modified: bigint;
|
|
399
|
+
head: string;
|
|
400
|
+
gid: string;
|
|
401
|
+
size: number;
|
|
402
|
+
};
|
|
403
|
+
export type NativeBackboneCoordinateFields = NativeBackboneCoordinatePlan & {
|
|
404
|
+
wallTime: bigint;
|
|
405
|
+
wallTimeString: string;
|
|
406
|
+
metaBytes: Uint8Array;
|
|
407
|
+
};
|
|
408
|
+
type NativeBackboneLeaderPlan = {
|
|
409
|
+
coordinates: Array<number | bigint>;
|
|
410
|
+
coordinateStrings?: string[];
|
|
411
|
+
leaders: Map<string, NativeBackboneLeaderSample>;
|
|
412
|
+
};
|
|
413
|
+
type NativeBackboneLeaderGidBatchInput = {
|
|
414
|
+
gid: string;
|
|
415
|
+
replicas: number;
|
|
416
|
+
};
|
|
417
|
+
type NativeBackboneRequestPruneHints = {
|
|
418
|
+
entries: Map<string, {
|
|
419
|
+
hash: string;
|
|
420
|
+
gid: string;
|
|
421
|
+
data?: Uint8Array;
|
|
422
|
+
replicas?: number;
|
|
423
|
+
}>;
|
|
424
|
+
presentBlockHashes: Set<string>;
|
|
425
|
+
localLeaderHashes: Set<string>;
|
|
426
|
+
replicaCounts: Map<string, number>;
|
|
427
|
+
peerHistoryGids: string[];
|
|
428
|
+
peerHistoryRemovedHashes: Set<string>;
|
|
429
|
+
};
|
|
430
|
+
export type NativeBackboneRequestPruneHintColumns = {
|
|
431
|
+
gids: Array<string | undefined>;
|
|
432
|
+
data: Array<Uint8Array | undefined>;
|
|
433
|
+
presentBlockFlags: Uint8Array;
|
|
434
|
+
localLeaderFlags: Uint8Array;
|
|
435
|
+
replicaCounts: Uint32Array;
|
|
436
|
+
peerHistoryGids: string[];
|
|
437
|
+
peerHistoryRemovedFlags: Uint8Array;
|
|
438
|
+
};
|
|
439
|
+
type NativeBackboneRequestPruneAllConfirmed = {
|
|
440
|
+
allConfirmed: boolean;
|
|
441
|
+
peerHistoryGids: string[];
|
|
442
|
+
};
|
|
443
|
+
type NativeBackboneLeaderCursorBatchInput = {
|
|
444
|
+
cursors: Iterable<bigint | number | string>;
|
|
445
|
+
replicas: number;
|
|
446
|
+
};
|
|
447
|
+
type NativeBackboneEntryAssignmentPlan = NativeBackboneLeaderPlan & {
|
|
448
|
+
assignedToRangeBoundary: boolean;
|
|
449
|
+
};
|
|
450
|
+
type NativeBackboneRepairDispatchEntry = {
|
|
451
|
+
hash: string;
|
|
452
|
+
gid: string;
|
|
453
|
+
requestedReplicas: number;
|
|
454
|
+
coordinates: Iterable<bigint | number | string>;
|
|
455
|
+
};
|
|
456
|
+
type NativeBackboneRepairDispatchInput = {
|
|
457
|
+
entries: Iterable<NativeBackboneRepairDispatchEntry>;
|
|
458
|
+
pendingModes: Iterable<string>;
|
|
459
|
+
pendingPeersByMode: ReadonlyMap<string, Iterable<string>>;
|
|
460
|
+
optimisticPeersByMode?: ReadonlyMap<string, ReadonlyMap<string, Iterable<string>>>;
|
|
461
|
+
fullReplicaRepairCandidates?: Iterable<string>;
|
|
462
|
+
fullReplicaRepairCandidateCount: number;
|
|
463
|
+
selfHash: string;
|
|
464
|
+
};
|
|
465
|
+
type NativeBackboneResidentRepairDispatchInput = Omit<NativeBackboneRepairDispatchInput, "entries">;
|
|
466
|
+
type NativeBackboneRepairDispatchPlan = Map<string, Map<string, string[]>>;
|
|
467
|
+
type NativeBackboneCommittedEntry = {
|
|
468
|
+
cid: string;
|
|
469
|
+
hash: string;
|
|
470
|
+
next: string[];
|
|
471
|
+
bytes?: Uint8Array;
|
|
472
|
+
metaBytes?: Uint8Array;
|
|
473
|
+
byteLength: number;
|
|
474
|
+
signature?: Uint8Array;
|
|
475
|
+
payloadBytes?: Uint8Array;
|
|
476
|
+
signatureBytes?: Uint8Array;
|
|
477
|
+
hashDigestBytes?: Uint8Array;
|
|
478
|
+
};
|
|
479
|
+
type NativeBackboneStorageBackedEntry = NativeBackboneCommittedEntry & {
|
|
480
|
+
bytes: Uint8Array;
|
|
481
|
+
};
|
|
482
|
+
type NativeBackboneLogEntry = {
|
|
483
|
+
hash: string;
|
|
484
|
+
gid: string;
|
|
485
|
+
next: string[];
|
|
486
|
+
type: number;
|
|
487
|
+
head?: boolean;
|
|
488
|
+
payloadSize?: number;
|
|
489
|
+
data?: Uint8Array;
|
|
490
|
+
clock: {
|
|
491
|
+
timestamp: {
|
|
492
|
+
wallTime: bigint | number | string;
|
|
493
|
+
logical?: number;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
export type NativeBackboneLogCommitEntry = NativeBackboneLogEntry & {
|
|
498
|
+
bytes: Uint8Array;
|
|
499
|
+
};
|
|
500
|
+
export type NativeBackboneCoordinateCommitColumns = {
|
|
501
|
+
hashes: string[];
|
|
502
|
+
gids: string[];
|
|
503
|
+
hashNumbers?: string[];
|
|
504
|
+
hashNumberValues?: BigUint64Array;
|
|
505
|
+
coordinateBatches?: string[][];
|
|
506
|
+
coordinateCounts?: Uint32Array;
|
|
507
|
+
coordinateValues?: BigUint64Array;
|
|
508
|
+
nextHashBatches: string[][];
|
|
509
|
+
assignedToRangeBoundaries: Uint8Array;
|
|
510
|
+
requestedReplicas?: number[];
|
|
511
|
+
requestedReplicaValues?: Uint32Array;
|
|
512
|
+
};
|
|
513
|
+
type NativeBackboneRawReceivePreparedFacts = {
|
|
514
|
+
cid: string;
|
|
515
|
+
hashDigestBytes: Uint8Array;
|
|
516
|
+
byteLength: number;
|
|
517
|
+
clockId: Uint8Array;
|
|
518
|
+
wallTime: bigint;
|
|
519
|
+
logical: number;
|
|
520
|
+
gid: string;
|
|
521
|
+
next: string[];
|
|
522
|
+
type: number;
|
|
523
|
+
metaBytes: Uint8Array;
|
|
524
|
+
metaData?: Uint8Array;
|
|
525
|
+
payloadByteLength: number;
|
|
526
|
+
signatureVerified: boolean;
|
|
527
|
+
requestedReplicas?: number;
|
|
528
|
+
hashNumber?: string;
|
|
529
|
+
};
|
|
530
|
+
export type NativeBackboneRawReceiveGroupPlan = {
|
|
531
|
+
gid: string;
|
|
532
|
+
hashes: string[];
|
|
533
|
+
requestedReplicas: number[];
|
|
534
|
+
latestHash: string;
|
|
535
|
+
maxReplicasFromHead: number;
|
|
536
|
+
maxReplicasFromNewEntries: number;
|
|
537
|
+
maxMaxReplicas: number;
|
|
538
|
+
};
|
|
539
|
+
export type NativeBackboneRawReceiveGroupIndexPlan = {
|
|
540
|
+
gid: string;
|
|
541
|
+
indexes: Uint32Array;
|
|
542
|
+
requestedReplicas: number[];
|
|
543
|
+
latestIndex: number;
|
|
544
|
+
maxReplicasFromHead: number;
|
|
545
|
+
maxReplicasFromNewEntries: number;
|
|
546
|
+
maxMaxReplicas: number;
|
|
547
|
+
};
|
|
548
|
+
export type NativeBackboneRawReceiveGroupLeaderPlan = NativeBackboneRawReceiveGroupIndexPlan & NativeBackboneLeaderPlan;
|
|
549
|
+
export type NativeBackboneRawReceiveGroupAssignmentPlan = NativeBackboneRawReceiveGroupIndexPlan & {
|
|
550
|
+
coordinates: Array<number | bigint>;
|
|
551
|
+
coordinateStrings: string[];
|
|
552
|
+
isLeader: boolean;
|
|
553
|
+
fromIsLeader: boolean;
|
|
554
|
+
assignedToRangeBoundary: boolean;
|
|
555
|
+
};
|
|
556
|
+
type NativeBackboneRawReceiveFastDropPlan = {
|
|
557
|
+
canDrop: boolean;
|
|
558
|
+
groupCount: number;
|
|
559
|
+
plannedHashCount: number;
|
|
560
|
+
};
|
|
561
|
+
export type NativeBackboneRawReceiveSelectionPlan = {
|
|
562
|
+
retainedHashes: string[];
|
|
563
|
+
droppedHashes: string[];
|
|
564
|
+
retainedIndexes?: Uint32Array;
|
|
565
|
+
droppedIndexes?: Uint32Array;
|
|
566
|
+
groupCount: number;
|
|
567
|
+
plannedHashCount: number;
|
|
568
|
+
usedNativeFastDropPlan: boolean;
|
|
569
|
+
usedLeaderSamplePlans: boolean;
|
|
570
|
+
retainedGroupLeaderPlans?: NativeBackboneRawReceiveGroupLeaderPlan[];
|
|
571
|
+
};
|
|
572
|
+
type NativeBackbonePreparedRawReceiveColumnsAndSelection = {
|
|
573
|
+
columns: NativeBackboneRawReceivePreparedFactsColumns;
|
|
574
|
+
selection?: NativeBackboneRawReceiveSelectionPlan;
|
|
575
|
+
};
|
|
576
|
+
type NativeBackboneRawReceivePreparedFactsColumns = [
|
|
577
|
+
string[],
|
|
578
|
+
Array<Uint8Array | undefined>,
|
|
579
|
+
Uint32Array,
|
|
580
|
+
Uint8Array[],
|
|
581
|
+
BigUint64Array,
|
|
582
|
+
Uint32Array,
|
|
583
|
+
string[],
|
|
584
|
+
string[][],
|
|
585
|
+
Uint8Array,
|
|
586
|
+
Uint8Array[],
|
|
587
|
+
Array<Uint8Array | undefined>,
|
|
588
|
+
Uint32Array,
|
|
589
|
+
Uint8Array,
|
|
590
|
+
Uint32Array,
|
|
591
|
+
string[] | BigUint64Array
|
|
592
|
+
];
|
|
593
|
+
type NativeBackboneRawReceivePreparedFactsRow = [
|
|
594
|
+
string,
|
|
595
|
+
Uint8Array,
|
|
596
|
+
number,
|
|
597
|
+
Uint8Array,
|
|
598
|
+
string,
|
|
599
|
+
number,
|
|
600
|
+
string,
|
|
601
|
+
string[],
|
|
602
|
+
number,
|
|
603
|
+
Uint8Array,
|
|
604
|
+
Uint8Array | undefined,
|
|
605
|
+
number,
|
|
606
|
+
boolean,
|
|
607
|
+
number | undefined,
|
|
608
|
+
string | undefined
|
|
609
|
+
];
|
|
610
|
+
type NativeBackboneRawReceiveGroupPlanRow = [
|
|
611
|
+
string,
|
|
612
|
+
string[],
|
|
613
|
+
Uint32Array,
|
|
614
|
+
string,
|
|
615
|
+
number,
|
|
616
|
+
number,
|
|
617
|
+
number
|
|
618
|
+
];
|
|
619
|
+
type NativeBackboneRawReceiveGroupIndexPlanRow = [
|
|
620
|
+
string,
|
|
621
|
+
Uint32Array,
|
|
622
|
+
Uint32Array,
|
|
623
|
+
number,
|
|
624
|
+
number,
|
|
625
|
+
number,
|
|
626
|
+
number
|
|
627
|
+
];
|
|
628
|
+
type NativeBackboneRawReceiveGroupLeaderPlanRow = [
|
|
629
|
+
string,
|
|
630
|
+
Uint32Array,
|
|
631
|
+
Uint32Array,
|
|
632
|
+
number,
|
|
633
|
+
number,
|
|
634
|
+
number,
|
|
635
|
+
number,
|
|
636
|
+
unknown[],
|
|
637
|
+
unknown[]
|
|
638
|
+
];
|
|
639
|
+
type NativeBackboneRawReceiveGroupAssignmentPlanRow = [
|
|
640
|
+
string,
|
|
641
|
+
Uint32Array,
|
|
642
|
+
Uint32Array,
|
|
643
|
+
number,
|
|
644
|
+
number,
|
|
645
|
+
number,
|
|
646
|
+
number,
|
|
647
|
+
unknown[],
|
|
648
|
+
boolean,
|
|
649
|
+
boolean,
|
|
650
|
+
boolean
|
|
651
|
+
];
|
|
652
|
+
type NativeBackboneRawReceiveSelectionRow = [
|
|
653
|
+
string[],
|
|
654
|
+
string[],
|
|
655
|
+
number,
|
|
656
|
+
number,
|
|
657
|
+
boolean,
|
|
658
|
+
boolean,
|
|
659
|
+
NativeBackboneRawReceiveGroupLeaderPlanRow[] | undefined,
|
|
660
|
+
Uint32Array?,
|
|
661
|
+
Uint32Array?
|
|
662
|
+
];
|
|
663
|
+
type NativeBackboneTrimmedEntry = {
|
|
664
|
+
hash: string;
|
|
665
|
+
gid: string;
|
|
666
|
+
next: string[];
|
|
667
|
+
type: number;
|
|
668
|
+
payloadSize: number;
|
|
669
|
+
data?: Uint8Array;
|
|
670
|
+
clock: {
|
|
671
|
+
timestamp: {
|
|
672
|
+
wallTime: bigint;
|
|
673
|
+
logical: number;
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
type NativeBackboneAppendInput = {
|
|
678
|
+
wallTime: bigint | number | string;
|
|
679
|
+
logical?: number;
|
|
680
|
+
gid: string;
|
|
681
|
+
type?: number;
|
|
682
|
+
metaData?: Uint8Array;
|
|
683
|
+
payloadData: Uint8Array;
|
|
684
|
+
replicas: number;
|
|
685
|
+
roleAgeMs?: number;
|
|
686
|
+
now?: bigint | number | string;
|
|
687
|
+
selfHash?: string;
|
|
688
|
+
selfReplicating?: boolean;
|
|
689
|
+
trimLengthTo?: number;
|
|
690
|
+
resolveTrimmedEntries?: boolean;
|
|
691
|
+
documentIndex?: {
|
|
692
|
+
key: string;
|
|
693
|
+
valuePrefixBytes?: Uint8Array;
|
|
694
|
+
usePlainPutPayload?: boolean;
|
|
695
|
+
projection?: {
|
|
696
|
+
encodedDocument: Uint8Array;
|
|
697
|
+
plan: NativeBackboneSimpleDocumentProjectionPlan;
|
|
698
|
+
signer?: Uint8Array;
|
|
699
|
+
};
|
|
700
|
+
existingCreated?: bigint | number | string;
|
|
701
|
+
byteElementIndexLimit?: number;
|
|
702
|
+
deleteTrimmedHeads?: boolean;
|
|
703
|
+
useLatestContext?: boolean;
|
|
704
|
+
requiredPreviousSignerPublicKey?: Uint8Array;
|
|
705
|
+
};
|
|
706
|
+
documentDeleteKey?: string;
|
|
707
|
+
};
|
|
708
|
+
type NativeBackboneCommittedNoNextDocumentIndexBatchInput = {
|
|
709
|
+
entries: Array<{
|
|
710
|
+
wallTime: bigint | number | string;
|
|
711
|
+
logical?: number;
|
|
712
|
+
gid: string;
|
|
713
|
+
metaData?: Uint8Array;
|
|
714
|
+
payloadData: Uint8Array;
|
|
715
|
+
documentIndex: NonNullable<NativeBackboneAppendInput["documentIndex"]>;
|
|
716
|
+
}>;
|
|
717
|
+
type?: number;
|
|
718
|
+
replicas: number;
|
|
719
|
+
roleAgeMs?: number;
|
|
720
|
+
now?: bigint | number | string;
|
|
721
|
+
selfHash?: string;
|
|
722
|
+
selfReplicating?: boolean;
|
|
723
|
+
trimLengthTo?: number;
|
|
724
|
+
documentByteElementIndexLimit?: number;
|
|
725
|
+
documentDeleteTrimmedHeads?: boolean;
|
|
726
|
+
};
|
|
727
|
+
type NativeBackboneCommittedLatestDocumentIndexBatchInput = {
|
|
728
|
+
entries: Array<{
|
|
729
|
+
wallTime: bigint | number | string;
|
|
730
|
+
logical?: number;
|
|
731
|
+
gid: string;
|
|
732
|
+
metaData?: Uint8Array;
|
|
733
|
+
payloadData: Uint8Array;
|
|
734
|
+
documentIndex: NonNullable<NativeBackboneAppendInput["documentIndex"]>;
|
|
735
|
+
}>;
|
|
736
|
+
type?: number;
|
|
737
|
+
replicas: number;
|
|
738
|
+
roleAgeMs?: number;
|
|
739
|
+
now?: bigint | number | string;
|
|
740
|
+
selfHash?: string;
|
|
741
|
+
selfReplicating?: boolean;
|
|
742
|
+
resolveTrimmedEntries?: boolean;
|
|
743
|
+
trimLengthTo?: number;
|
|
744
|
+
documentByteElementIndexLimit?: number;
|
|
745
|
+
documentDeleteTrimmedHeads?: boolean;
|
|
746
|
+
};
|
|
747
|
+
type NativeBackboneStorageAppendInput = NativeBackboneAppendInput & {
|
|
748
|
+
next?: Iterable<string>;
|
|
749
|
+
};
|
|
750
|
+
export type NativeBackboneAppendResult = {
|
|
751
|
+
entry: NativeBackboneCommittedEntry;
|
|
752
|
+
coordinate: NativeBackboneCoordinatePlan;
|
|
753
|
+
leaders?: Map<string, NativeBackboneLeaderSample>;
|
|
754
|
+
isLeader: boolean;
|
|
755
|
+
assignedToRangeBoundary: boolean;
|
|
756
|
+
trimmed: NativeBackboneTrimmedEntry[];
|
|
757
|
+
trimmedHashes?: string[];
|
|
758
|
+
documentTrimmedHeadsProcessed?: boolean;
|
|
759
|
+
documentPreviousContext?: NativeBackboneDocumentContextFacts;
|
|
760
|
+
};
|
|
761
|
+
type NativeBackboneStorageAppendResult = {
|
|
762
|
+
entry: NativeBackboneStorageBackedEntry;
|
|
763
|
+
coordinate: NativeBackboneCoordinatePlan;
|
|
764
|
+
leaders?: Map<string, NativeBackboneLeaderSample>;
|
|
765
|
+
isLeader: boolean;
|
|
766
|
+
assignedToRangeBoundary: boolean;
|
|
767
|
+
trimmed: NativeBackboneTrimmedEntry[];
|
|
768
|
+
trimmedHashes?: string[];
|
|
769
|
+
documentTrimmedHeadsProcessed?: boolean;
|
|
770
|
+
documentPreviousContext?: NativeBackboneDocumentContextFacts;
|
|
771
|
+
};
|
|
772
|
+
type NativeBackboneLogGraphOptions = {
|
|
773
|
+
commitBlocks?: boolean;
|
|
774
|
+
documentProjectionPlanId?: (plan: NativeBackboneSimpleDocumentProjectionPlan) => number;
|
|
775
|
+
};
|
|
776
|
+
type NativeBackboneAppendPlan = {
|
|
777
|
+
coordinates: Array<number | bigint>;
|
|
778
|
+
leaders?: Map<string, NativeBackboneLeaderSample>;
|
|
779
|
+
isLeader: boolean;
|
|
780
|
+
assignedToRangeBoundary: boolean;
|
|
781
|
+
delivery?: NativeBackboneAppendDeliveryPlan;
|
|
782
|
+
coordinate: NativeBackboneCoordinatePlan;
|
|
783
|
+
};
|
|
784
|
+
type NativeBackboneReceiveCoordinatePlan = {
|
|
785
|
+
coordinates: Array<number | bigint>;
|
|
786
|
+
leaders?: Map<string, NativeBackboneLeaderSample>;
|
|
787
|
+
isLeader: boolean;
|
|
788
|
+
assignedToRangeBoundary: boolean;
|
|
789
|
+
coordinate: NativeBackboneCoordinatePlan;
|
|
790
|
+
};
|
|
791
|
+
type NativeBackboneAppendEntryBatchInput = {
|
|
792
|
+
entryHash: string;
|
|
793
|
+
gid: string;
|
|
794
|
+
hashNumber?: bigint | number | string;
|
|
795
|
+
nextHashes?: Iterable<string>;
|
|
796
|
+
replicas: number;
|
|
797
|
+
};
|
|
798
|
+
type NativeBackboneRangeInput = {
|
|
799
|
+
id: string;
|
|
800
|
+
hash: string;
|
|
801
|
+
timestamp: bigint | number | string;
|
|
802
|
+
start1: bigint | number | string;
|
|
803
|
+
end1: bigint | number | string;
|
|
804
|
+
start2: bigint | number | string;
|
|
805
|
+
end2: bigint | number | string;
|
|
806
|
+
width: bigint | number | string;
|
|
807
|
+
mode: number;
|
|
808
|
+
};
|
|
809
|
+
type NativeBackboneDocumentSchemaStats = {
|
|
810
|
+
rootFields: number;
|
|
811
|
+
nodeCount: number;
|
|
812
|
+
genericNodes: number;
|
|
813
|
+
};
|
|
814
|
+
export type NativeBackboneSimpleDocumentProjectionPlan = {
|
|
815
|
+
documentVariantType?: "u8" | "string";
|
|
816
|
+
documentVariantValue?: string;
|
|
817
|
+
documentFieldNames: string[];
|
|
818
|
+
documentFieldTypes: string[];
|
|
819
|
+
outputVariantType?: "u8" | "string";
|
|
820
|
+
outputVariantValue?: string;
|
|
821
|
+
outputFieldTypes: string[];
|
|
822
|
+
sourceKinds: string[];
|
|
823
|
+
sourceValues: string[];
|
|
824
|
+
};
|
|
825
|
+
type NativeBackboneSimpleDocumentProjectionContext = {
|
|
826
|
+
created: bigint | number | string;
|
|
827
|
+
modified: bigint | number | string;
|
|
828
|
+
head?: string;
|
|
829
|
+
gid: string;
|
|
830
|
+
size: number;
|
|
831
|
+
signer?: Uint8Array;
|
|
832
|
+
};
|
|
833
|
+
export type NativeBackboneAppendProfile = {
|
|
834
|
+
nativeBackboneStorageAppendInnerMs: number;
|
|
835
|
+
nativeBackboneInputCopyMs: number;
|
|
836
|
+
nativeBackboneLogTotalMs: number;
|
|
837
|
+
nativeBackboneLogNextCloneMs: number;
|
|
838
|
+
nativeBackboneLogEntryCoreMs: number;
|
|
839
|
+
nativeBackboneLogEncodeMetaMs: number;
|
|
840
|
+
nativeBackboneLogEncodePayloadMs: number;
|
|
841
|
+
nativeBackboneLogEncodeSignableMs: number;
|
|
842
|
+
nativeBackboneLogSignMs: number;
|
|
843
|
+
nativeBackboneLogEncodeSignatureMs: number;
|
|
844
|
+
nativeBackboneLogEncodeStorageMs: number;
|
|
845
|
+
nativeBackboneLogCidMs: number;
|
|
846
|
+
nativeBackboneLogCidHashMs: number;
|
|
847
|
+
nativeBackboneLogCidStringMs: number;
|
|
848
|
+
nativeBackboneLogIndexEntryMs: number;
|
|
849
|
+
nativeBackboneLogFactsMs: number;
|
|
850
|
+
nativeBackboneLogBlockPutMs: number;
|
|
851
|
+
nativeBackboneLogGraphPutMs: number;
|
|
852
|
+
nativeBackboneLogTrimMs: number;
|
|
853
|
+
nativeBackboneEntryRowMs: number;
|
|
854
|
+
nativeBackboneTrimRowsMs: number;
|
|
855
|
+
nativeBackboneHashNumberMs: number;
|
|
856
|
+
nativeBackboneCoordinatePlanMs: number;
|
|
857
|
+
nativeBackboneCoordinateCoreMs: number;
|
|
858
|
+
nativeBackboneCoordinateFieldsBuildMs: number;
|
|
859
|
+
nativeBackboneCoordinateValueEncodeMs: number;
|
|
860
|
+
nativeBackboneCoordinateJournalPutMs: number;
|
|
861
|
+
nativeBackboneCoordinateIndexPutMs: number;
|
|
862
|
+
nativeBackboneCoordinateValuePutMs: number;
|
|
863
|
+
nativeBackboneCoordinateDeleteMs: number;
|
|
864
|
+
nativeBackboneDocumentIndexCommitMs: number;
|
|
865
|
+
nativeBackboneDocumentIndexContextEncodeMs: number;
|
|
866
|
+
nativeBackboneDocumentIndexExtractMs: number;
|
|
867
|
+
nativeBackboneDocumentIndexValueBuildMs: number;
|
|
868
|
+
nativeBackboneDocumentIndexPutMs: number;
|
|
869
|
+
nativeBackboneDocumentValuePutMs: number;
|
|
870
|
+
nativeBackboneDocumentIndexTrimDeleteMs: number;
|
|
871
|
+
nativeBackboneResultRowMs: number;
|
|
872
|
+
nativeBackboneRawReceiveInputCopyMs: number;
|
|
873
|
+
nativeBackboneRawReceivePrepareMs: number;
|
|
874
|
+
nativeBackboneRawReceiveDigestMs: number;
|
|
875
|
+
nativeBackboneRawReceiveCidStringMs: number;
|
|
876
|
+
nativeBackboneRawReceiveExpectedCidMs: number;
|
|
877
|
+
nativeBackboneRawReceiveStorageParseMs: number;
|
|
878
|
+
nativeBackboneRawReceiveMetaParseMs: number;
|
|
879
|
+
nativeBackboneRawReceivePayloadParseMs: number;
|
|
880
|
+
nativeBackboneRawReceiveSignatureParseMs: number;
|
|
881
|
+
nativeBackboneRawReceiveSignableMs: number;
|
|
882
|
+
nativeBackboneRawReceiveVerifyBatchMs: number;
|
|
883
|
+
nativeBackboneRawReceiveVerifyFallbackMs: number;
|
|
884
|
+
nativeBackboneRawReceivePrepareColumnsMs: number;
|
|
885
|
+
nativeBackboneRawReceivePendingCheckMs: number;
|
|
886
|
+
nativeBackboneRawReceiveVerifyMs: number;
|
|
887
|
+
nativeBackboneRawReceiveVerifyStatusMs: number;
|
|
888
|
+
nativeBackboneRawReceiveJoinPlanMs: number;
|
|
889
|
+
nativeBackboneRawReceiveRemoveMs: number;
|
|
890
|
+
nativeBackboneRawReceiveBlockPutMs: number;
|
|
891
|
+
nativeBackboneRawReceiveGraphPutMs: number;
|
|
892
|
+
nativeBackboneRawReceiveCoordinateCommitMs: number;
|
|
893
|
+
};
|
|
894
|
+
type NativeBackboneDocumentEntry = [key: string, value: Uint8Array];
|
|
895
|
+
type NativeBackboneDocumentFieldValue = ["bool", boolean] | ["i64", string] | ["u64", string] | ["string", string] | ["bytes", Uint8Array];
|
|
896
|
+
export type NativeBackboneOptions = {
|
|
897
|
+
resolution?: RangeResolution;
|
|
898
|
+
clockId: Uint8Array;
|
|
899
|
+
privateKey: Uint8Array;
|
|
900
|
+
publicKey: Uint8Array;
|
|
901
|
+
};
|
|
902
|
+
type NativeBackboneCoordinatePersistenceFiles = {
|
|
903
|
+
snapshot?: string;
|
|
904
|
+
journal?: string;
|
|
905
|
+
documentSnapshot?: string;
|
|
906
|
+
documentJournal?: string;
|
|
907
|
+
documentSignerSnapshot?: string;
|
|
908
|
+
documentSignerJournal?: string;
|
|
909
|
+
};
|
|
910
|
+
export type NativeBackboneCoordinatePersistenceOptions = NativeBackboneCoordinatePersistenceFiles & {
|
|
911
|
+
flushOnAppend?: boolean;
|
|
912
|
+
flushMaxPendingBytes?: number;
|
|
913
|
+
flushIntervalMs?: number;
|
|
914
|
+
compactMaxJournalBytes?: number;
|
|
915
|
+
compactMaxJournalRecords?: number;
|
|
916
|
+
};
|
|
917
|
+
export type NativeBackboneCoordinatePersistenceStore = {
|
|
918
|
+
read(name: string): Promise<Uint8Array | undefined>;
|
|
919
|
+
write(name: string, bytes: Uint8Array): Promise<void>;
|
|
920
|
+
/**
|
|
921
|
+
* Appends `bytes` to the named file. Callers hand over ownership of
|
|
922
|
+
* `bytes` and must not mutate it afterwards: buffering stores keep the
|
|
923
|
+
* array until their next flush instead of copying it.
|
|
924
|
+
*/
|
|
925
|
+
append(name: string, bytes: Uint8Array): Promise<void>;
|
|
926
|
+
remove?(name: string): Promise<void>;
|
|
927
|
+
flush?(): Promise<void>;
|
|
928
|
+
close?(): Promise<void>;
|
|
929
|
+
};
|
|
930
|
+
export type NativeBackboneCoordinatePersistenceAdapter = {
|
|
931
|
+
flushOnAppend?: boolean;
|
|
932
|
+
flushMaxPendingBytes?: number;
|
|
933
|
+
flushIntervalMs?: number;
|
|
934
|
+
compactMaxJournalBytes?: number;
|
|
935
|
+
compactMaxJournalRecords?: number;
|
|
936
|
+
hydrate(backbone: NativePeerbitBackbone): Promise<number>;
|
|
937
|
+
flushJournal(backbone: NativePeerbitBackbone): Promise<number>;
|
|
938
|
+
flushJournalOnAppend?(backbone: NativePeerbitBackbone): number | Promise<number>;
|
|
939
|
+
compact?(backbone: NativePeerbitBackbone): Promise<void>;
|
|
940
|
+
close?(): Promise<void>;
|
|
941
|
+
};
|
|
942
|
+
export type NativeBackboneCoordinatePersistenceConfig = NativeBackboneCoordinatePersistenceAdapter | (NativeBackboneCoordinatePersistenceOptions & {
|
|
943
|
+
store: NativeBackboneCoordinatePersistenceStore;
|
|
944
|
+
buffered?: boolean | {
|
|
945
|
+
maxBufferedBytes?: number;
|
|
946
|
+
};
|
|
947
|
+
});
|
|
948
|
+
export type NativeBackboneBufferedCoordinatePersistenceOptions = NativeBackboneCoordinatePersistenceFiles & {
|
|
949
|
+
flushMaxPendingBytes?: number;
|
|
950
|
+
flushIntervalMs?: number;
|
|
951
|
+
maxBufferedBytes?: number;
|
|
952
|
+
compactMaxJournalBytes?: number;
|
|
953
|
+
compactMaxJournalRecords?: number;
|
|
954
|
+
};
|
|
955
|
+
export type NativeBackboneNodeCoordinatePersistenceOptions = NativeBackboneCoordinatePersistenceOptions & {
|
|
956
|
+
fs?: NativeBackboneNodeFs;
|
|
957
|
+
writeBufferMaxBytes?: number;
|
|
958
|
+
};
|
|
959
|
+
export declare const defaultNativeBackboneCoordinateFlushMaxPendingBytes: number;
|
|
960
|
+
export declare const defaultNativeBackboneCoordinateCompactMaxJournalBytes: number;
|
|
961
|
+
type NativeBackboneNodeFs = {
|
|
962
|
+
mkdir(path: string, options?: {
|
|
963
|
+
recursive?: boolean;
|
|
964
|
+
}): Promise<unknown>;
|
|
965
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
966
|
+
writeFile(path: string, data: Uint8Array): Promise<unknown>;
|
|
967
|
+
appendFile(path: string, data: Uint8Array): Promise<unknown>;
|
|
968
|
+
open?(path: string, flags: string): Promise<NativeBackboneNodeAppendFileHandle>;
|
|
969
|
+
rm(path: string, options?: {
|
|
970
|
+
force?: boolean;
|
|
971
|
+
}): Promise<unknown>;
|
|
972
|
+
};
|
|
973
|
+
type NativeBackboneNodeAppendFileHandle = {
|
|
974
|
+
write(data: Uint8Array): Promise<unknown>;
|
|
975
|
+
close(): Promise<unknown>;
|
|
976
|
+
};
|
|
977
|
+
type NativeBackboneOPFSFile = {
|
|
978
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
979
|
+
size: number;
|
|
980
|
+
};
|
|
981
|
+
type NativeBackboneOPFSSyncAccessHandle = {
|
|
982
|
+
getSize(): number;
|
|
983
|
+
write(buffer: Uint8Array, options?: {
|
|
984
|
+
at?: number;
|
|
985
|
+
}): number;
|
|
986
|
+
flush?(): void;
|
|
987
|
+
close(): void;
|
|
988
|
+
};
|
|
989
|
+
type NativeBackboneOPFSWritable = {
|
|
990
|
+
seek(position: number): Promise<void>;
|
|
991
|
+
write(data: Uint8Array): Promise<void>;
|
|
992
|
+
close(): Promise<void>;
|
|
993
|
+
};
|
|
994
|
+
export type NativeBackboneOPFSFileHandle = {
|
|
995
|
+
getFile(): Promise<NativeBackboneOPFSFile>;
|
|
996
|
+
createWritable(options?: {
|
|
997
|
+
keepExistingData?: boolean;
|
|
998
|
+
}): Promise<NativeBackboneOPFSWritable>;
|
|
999
|
+
createSyncAccessHandle?: () => Promise<NativeBackboneOPFSSyncAccessHandle>;
|
|
1000
|
+
};
|
|
1001
|
+
export type NativeBackboneOPFSDirectoryHandle = {
|
|
1002
|
+
getDirectoryHandle(name: string, options?: {
|
|
1003
|
+
create?: boolean;
|
|
1004
|
+
}): Promise<NativeBackboneOPFSDirectoryHandle>;
|
|
1005
|
+
getFileHandle(name: string, options?: {
|
|
1006
|
+
create?: boolean;
|
|
1007
|
+
}): Promise<NativeBackboneOPFSFileHandle>;
|
|
1008
|
+
removeEntry(name: string): Promise<void>;
|
|
1009
|
+
};
|
|
1010
|
+
declare class NativeBackboneLogGraph {
|
|
1011
|
+
private readonly native;
|
|
1012
|
+
private readonly options?;
|
|
1013
|
+
constructor(native: NativePeerbitBackboneHandle, options?: NativeBackboneLogGraphOptions | undefined);
|
|
1014
|
+
get length(): number;
|
|
1015
|
+
has(hash: string): boolean;
|
|
1016
|
+
hasMany(hashes: Iterable<string>): Set<string>;
|
|
1017
|
+
put(entry: NativeBackboneLogEntry): void;
|
|
1018
|
+
putBatch(entries: NativeBackboneLogEntry[]): void;
|
|
1019
|
+
putAppendChain(entries: NativeBackboneLogEntry[]): void;
|
|
1020
|
+
commitBlocksAndGraphBatch(entries: NativeBackboneLogCommitEntry[]): void;
|
|
1021
|
+
commitBlocksGraphAndCoordinatesBatch(entries: NativeBackboneLogCommitEntry[], coordinates: NativeBackboneCoordinateCommitColumns): void;
|
|
1022
|
+
commitPreparedRawReceiveBatch(hashes: string[], headFlags: NativeBackboneHeadFlags, coordinates?: NativeBackboneCoordinateCommitColumns): boolean;
|
|
1023
|
+
commitPreparedRawReceiveJoinBatch(hashes: string[], headFlags: NativeBackboneHeadFlags, coordinates?: NativeBackboneCoordinateCommitColumns): boolean | undefined;
|
|
1024
|
+
commitVerifiedPreparedRawReceiveJoinBatch(hashes: string[], headFlags: NativeBackboneHeadFlags, verifyHashes: string[], coordinates?: NativeBackboneCoordinateCommitColumns): boolean | undefined;
|
|
1025
|
+
commitVerifiedAllPreparedRawReceiveJoinBatch(hashes: string[], headFlags: NativeBackboneHeadFlags, coordinates?: NativeBackboneCoordinateCommitColumns): boolean | undefined;
|
|
1026
|
+
clearPreparedRawReceiveEntries(hashes: Iterable<string>): number;
|
|
1027
|
+
verifyPreparedRawReceiveEntries(hashes: Iterable<string>): boolean[] | undefined;
|
|
1028
|
+
prepareEntryV0PlainEntryCommit(input: {
|
|
1029
|
+
clockId: Uint8Array;
|
|
1030
|
+
privateKey: Uint8Array;
|
|
1031
|
+
publicKey: Uint8Array;
|
|
1032
|
+
wallTime: bigint | number | string;
|
|
1033
|
+
logical?: number;
|
|
1034
|
+
gid: string;
|
|
1035
|
+
next?: string[];
|
|
1036
|
+
type?: number;
|
|
1037
|
+
metaData?: Uint8Array;
|
|
1038
|
+
payloadData: Uint8Array;
|
|
1039
|
+
resolveTrimmedEntries?: boolean;
|
|
1040
|
+
includeMaterializationBytes?: boolean;
|
|
1041
|
+
includeAppendFactsBytes?: boolean;
|
|
1042
|
+
trimLengthTo?: number;
|
|
1043
|
+
documentIndex?: {
|
|
1044
|
+
key: string;
|
|
1045
|
+
valuePrefixBytes?: Uint8Array;
|
|
1046
|
+
projection?: {
|
|
1047
|
+
encodedDocument: Uint8Array;
|
|
1048
|
+
plan: NativeBackboneSimpleDocumentProjectionPlan;
|
|
1049
|
+
signer?: Uint8Array;
|
|
1050
|
+
};
|
|
1051
|
+
existingCreated?: bigint | number | string;
|
|
1052
|
+
byteElementIndexLimit?: number;
|
|
1053
|
+
deleteTrimmedHeads?: boolean;
|
|
1054
|
+
useLatestContext?: boolean;
|
|
1055
|
+
};
|
|
1056
|
+
}, _blockStore: unknown): (NativeBackboneCommittedEntry & {
|
|
1057
|
+
trimmedEntries?: NativeBackboneLogEntry[];
|
|
1058
|
+
trimmedEntryHashes?: string[];
|
|
1059
|
+
documentTrimmedHeadsProcessed?: boolean;
|
|
1060
|
+
}) | undefined;
|
|
1061
|
+
prepareEntryV0PlainEntryAndPut(input: {
|
|
1062
|
+
clockId: Uint8Array;
|
|
1063
|
+
privateKey: Uint8Array;
|
|
1064
|
+
publicKey: Uint8Array;
|
|
1065
|
+
wallTime: bigint | number | string;
|
|
1066
|
+
logical?: number;
|
|
1067
|
+
gid: string;
|
|
1068
|
+
next?: string[];
|
|
1069
|
+
type?: number;
|
|
1070
|
+
metaData?: Uint8Array;
|
|
1071
|
+
payloadData: Uint8Array;
|
|
1072
|
+
includeMaterializationBytes?: boolean;
|
|
1073
|
+
includeAppendFactsBytes?: boolean;
|
|
1074
|
+
trimLengthTo?: number;
|
|
1075
|
+
}): NativeBackboneStorageBackedEntry & {
|
|
1076
|
+
trimmedEntries?: NativeBackboneLogEntry[];
|
|
1077
|
+
};
|
|
1078
|
+
delete(hash: string): boolean;
|
|
1079
|
+
deleteMany(hashes: Iterable<string>): number;
|
|
1080
|
+
oldestEntries(limit: number): NativeBackboneLogEntry[];
|
|
1081
|
+
clear(): void;
|
|
1082
|
+
heads(gid?: string): string[];
|
|
1083
|
+
hasHead(gid?: string): boolean;
|
|
1084
|
+
hasAnyHead(gids: Iterable<string>): boolean;
|
|
1085
|
+
hasAnyHeadBatch(gidSets: Iterable<Iterable<string>>): boolean[];
|
|
1086
|
+
headDataEntries(gid?: string): any[];
|
|
1087
|
+
maxHeadDataU32(gid?: string): number | undefined;
|
|
1088
|
+
maxHeadDataU32Batch(gids: Iterable<string>): Array<number | undefined>;
|
|
1089
|
+
headEntries(gid?: string): any[];
|
|
1090
|
+
joinHeadEntries(gid?: string): any[];
|
|
1091
|
+
childJoinEntries(hash: string): any[];
|
|
1092
|
+
entryMetadataBatch(hashes: Iterable<string>): Array<any | undefined>;
|
|
1093
|
+
entryMetadataHintsBatch(hashes: Iterable<string>): Array<any | undefined>;
|
|
1094
|
+
entrySignaturePublicKeysBatch(hashes: Iterable<string>): Array<Uint8Array | undefined>;
|
|
1095
|
+
uniqueReferenceGids(hash: string): string[] | undefined;
|
|
1096
|
+
uniqueReferenceGidRowsBatch(hashes: Iterable<string>): any[];
|
|
1097
|
+
uniqueReferenceGidRowsFlatBatch(hashes: Iterable<string>): Array<[number, string, string]> | undefined;
|
|
1098
|
+
planDeleteRecursively(hashes: Iterable<string>, skipFirst?: boolean): string[];
|
|
1099
|
+
payloadSizeSum(): number;
|
|
1100
|
+
oldestHash(): string | undefined;
|
|
1101
|
+
newestHash(): string | undefined;
|
|
1102
|
+
countHasNext(next: string, excludeHash?: string): number;
|
|
1103
|
+
shadowedGids(gid: string, next: string[], excludeHash?: string): string[];
|
|
1104
|
+
planJoin(hash: string, next: string[], type: number, reset?: boolean, cutCheck?: {
|
|
1105
|
+
gid: string;
|
|
1106
|
+
wallTime: bigint | number | string;
|
|
1107
|
+
logical?: number;
|
|
1108
|
+
}): any;
|
|
1109
|
+
planJoinBatch(entries: Array<{
|
|
1110
|
+
hash: string;
|
|
1111
|
+
next: string[];
|
|
1112
|
+
type: number;
|
|
1113
|
+
cutCheck?: {
|
|
1114
|
+
gid: string;
|
|
1115
|
+
wallTime: bigint | number | string;
|
|
1116
|
+
logical?: number;
|
|
1117
|
+
};
|
|
1118
|
+
}>, reset?: boolean): any[];
|
|
1119
|
+
}
|
|
1120
|
+
declare class NativeBackboneBlockStore {
|
|
1121
|
+
private readonly native;
|
|
1122
|
+
constructor(native: NativePeerbitBackboneHandle);
|
|
1123
|
+
status(): "open";
|
|
1124
|
+
open(): void;
|
|
1125
|
+
close(): void;
|
|
1126
|
+
start(): Promise<void>;
|
|
1127
|
+
stop(): Promise<void>;
|
|
1128
|
+
put(data: Uint8Array | {
|
|
1129
|
+
block: {
|
|
1130
|
+
bytes: Uint8Array;
|
|
1131
|
+
};
|
|
1132
|
+
cid: string;
|
|
1133
|
+
}): Promise<string>;
|
|
1134
|
+
putMany(blocks: Array<Uint8Array | {
|
|
1135
|
+
block: {
|
|
1136
|
+
bytes: Uint8Array;
|
|
1137
|
+
};
|
|
1138
|
+
cid: string;
|
|
1139
|
+
}>): Promise<string[]>;
|
|
1140
|
+
putKnown(cid: string, bytes: Uint8Array): string;
|
|
1141
|
+
putKnownMany(blocks: Array<readonly [cid: string, bytes: Uint8Array]>): string[];
|
|
1142
|
+
putKnownManyColumns(cids: string[], bytes: Uint8Array[]): string[];
|
|
1143
|
+
putImmutable(cid: string, bytes: Uint8Array): void;
|
|
1144
|
+
putManyImmutable(blocks: Array<readonly [cid: string, bytes: Uint8Array]>): void;
|
|
1145
|
+
get(cid: string): Uint8Array | undefined;
|
|
1146
|
+
getMany(cids: string[]): Promise<Array<Uint8Array | undefined>>;
|
|
1147
|
+
has(cid: string): boolean;
|
|
1148
|
+
hasMany(cids: string[]): Promise<boolean[]>;
|
|
1149
|
+
rm(cid: string): void;
|
|
1150
|
+
del(cid: string): void;
|
|
1151
|
+
rmMany(cids: string[]): Promise<number>;
|
|
1152
|
+
iterator(): AsyncGenerator<[string, Uint8Array], void, void>;
|
|
1153
|
+
size(): number;
|
|
1154
|
+
persisted(): boolean;
|
|
1155
|
+
waitFor(): Promise<string[]>;
|
|
1156
|
+
}
|
|
1157
|
+
export declare class NativePeerbitBackbone {
|
|
1158
|
+
private readonly native;
|
|
1159
|
+
private readonly resolution;
|
|
1160
|
+
readonly graph: NativeBackboneLogGraph;
|
|
1161
|
+
readonly storageBackedGraph: NativeBackboneLogGraph;
|
|
1162
|
+
readonly blocks: NativeBackboneBlockStore;
|
|
1163
|
+
private readonly documentProjectionPlanIds;
|
|
1164
|
+
private readonly documentProjectionPlanStructuralIds;
|
|
1165
|
+
private constructor();
|
|
1166
|
+
static create(options: NativeBackboneOptions): Promise<NativePeerbitBackbone>;
|
|
1167
|
+
get logLength(): number;
|
|
1168
|
+
get blockLength(): number;
|
|
1169
|
+
hasLogEntry(hash: string): boolean;
|
|
1170
|
+
hasBlock(hash: string): boolean;
|
|
1171
|
+
/**
|
|
1172
|
+
* Byte lengths of natively stored entry blocks (`undefined` marks a
|
|
1173
|
+
* missing block), used by the fused send path to plan raw exchange-head
|
|
1174
|
+
* message chunking without materializing block bytes in JS.
|
|
1175
|
+
*/
|
|
1176
|
+
syncSendBlockByteLengths(hashes: string[]): Array<number | undefined> | undefined;
|
|
1177
|
+
/**
|
|
1178
|
+
* Serialize one outbound raw exchange sync payload (the full
|
|
1179
|
+
* PubSubData → RequestV0 → DecryptedThing → RawExchangeHeadsMessage
|
|
1180
|
+
* nesting) from the native block store. Returns `undefined` when the
|
|
1181
|
+
* encoder is unavailable or any head's block is not natively stored.
|
|
1182
|
+
*/
|
|
1183
|
+
encodeRawExchangeSyncPayload(properties: {
|
|
1184
|
+
topic: string;
|
|
1185
|
+
strict?: boolean;
|
|
1186
|
+
hashes: string[];
|
|
1187
|
+
gidRefrences: string[][];
|
|
1188
|
+
reserved?: Uint8Array;
|
|
1189
|
+
}): Uint8Array | undefined;
|
|
1190
|
+
prepareRawReceiveBatch(blocks: Uint8Array[]): NativeBackboneRawReceivePreparedFacts[];
|
|
1191
|
+
prepareRawReceiveColumnsBatch(blocks: Uint8Array[], hashes?: string[], options?: {
|
|
1192
|
+
verifySignatures?: boolean;
|
|
1193
|
+
}): NativeBackboneRawReceivePreparedFactsColumns | undefined;
|
|
1194
|
+
prepareRawReceiveExpectedColumnsBatch(blocks: Uint8Array[], hashes: string[], options?: {
|
|
1195
|
+
verifySignatures?: boolean;
|
|
1196
|
+
}): NativeBackboneRawReceivePreparedFactsColumns | undefined;
|
|
1197
|
+
prepareRawReceiveExpectedColumnsAndSelectionBatch(blocks: Uint8Array[], hashes: string[], options: {
|
|
1198
|
+
verifySignatures?: boolean;
|
|
1199
|
+
minReplicas: number;
|
|
1200
|
+
maxReplicas?: number;
|
|
1201
|
+
leaderOptions: NativeBackboneFindLeaderOptions;
|
|
1202
|
+
fromHash: string;
|
|
1203
|
+
}): NativeBackbonePreparedRawReceiveColumnsAndSelection | undefined;
|
|
1204
|
+
/**
|
|
1205
|
+
* Stash-backed twin of `prepareRawReceiveExpectedColumnsBatch`: the entry
|
|
1206
|
+
* block bytes come from the wire-sync stash inside wasm memory instead of
|
|
1207
|
+
* a JS blocks array, so no bytes cross the JS/wasm boundary. Returns
|
|
1208
|
+
* undefined when the stash entry is gone (callers fall back to the
|
|
1209
|
+
* blocks-based path).
|
|
1210
|
+
*/
|
|
1211
|
+
prepareStashedRawReceiveExpectedColumnsBatch(session: NativeBackboneWireSyncSessionLike, id: Uint8Array, indexes: Uint32Array, hashes: string[], options?: {
|
|
1212
|
+
verifySignatures?: boolean;
|
|
1213
|
+
}): NativeBackboneRawReceivePreparedFactsColumns | undefined;
|
|
1214
|
+
/** Stash-backed twin of `prepareRawReceiveExpectedColumnsAndSelectionBatch`. */
|
|
1215
|
+
prepareStashedRawReceiveExpectedColumnsAndSelectionBatch(session: NativeBackboneWireSyncSessionLike, id: Uint8Array, indexes: Uint32Array, hashes: string[], options: {
|
|
1216
|
+
verifySignatures?: boolean;
|
|
1217
|
+
minReplicas: number;
|
|
1218
|
+
maxReplicas?: number;
|
|
1219
|
+
leaderOptions: NativeBackboneFindLeaderOptions;
|
|
1220
|
+
fromHash: string;
|
|
1221
|
+
}): NativeBackbonePreparedRawReceiveColumnsAndSelection | undefined;
|
|
1222
|
+
/**
|
|
1223
|
+
* Raw entry block bytes for a hash from the pending prepared-receive
|
|
1224
|
+
* entries or the committed block store — the fallback for lazily
|
|
1225
|
+
* materialized stash-backed heads whose stash entry was already released.
|
|
1226
|
+
*/
|
|
1227
|
+
rawReceiveBlockBytes(hash: string): Uint8Array | undefined;
|
|
1228
|
+
clearPreparedRawReceiveEntries(hashes: Iterable<string>): number;
|
|
1229
|
+
verifyPreparedRawReceiveEntries(hashes: Iterable<string>): boolean[] | undefined;
|
|
1230
|
+
planPreparedRawReceiveGroups(hashes: Iterable<string>, options: {
|
|
1231
|
+
minReplicas: number;
|
|
1232
|
+
maxReplicas?: number;
|
|
1233
|
+
}): NativeBackboneRawReceiveGroupPlan[] | undefined;
|
|
1234
|
+
planPreparedRawReceiveGroupIndexes(hashes: Iterable<string>, options: {
|
|
1235
|
+
minReplicas: number;
|
|
1236
|
+
maxReplicas?: number;
|
|
1237
|
+
}): NativeBackboneRawReceiveGroupIndexPlan[] | undefined;
|
|
1238
|
+
planPreparedRawReceiveGroupLeaders(hashes: Iterable<string>, options: {
|
|
1239
|
+
minReplicas: number;
|
|
1240
|
+
maxReplicas?: number;
|
|
1241
|
+
}, leaderOptions?: NativeBackboneFindLeaderOptions): NativeBackboneRawReceiveGroupLeaderPlan[] | undefined;
|
|
1242
|
+
planPreparedRawReceiveGroupAssignments(hashes: Iterable<string>, options: {
|
|
1243
|
+
minReplicas: number;
|
|
1244
|
+
maxReplicas?: number;
|
|
1245
|
+
}, leaderOptions: NativeBackboneFindLeaderOptions, fromHash: string): NativeBackboneRawReceiveGroupAssignmentPlan[] | undefined;
|
|
1246
|
+
planPreparedRawReceiveFastDrop(hashes: Iterable<string>, options: {
|
|
1247
|
+
minReplicas: number;
|
|
1248
|
+
maxReplicas?: number;
|
|
1249
|
+
}, leaderOptions: NativeBackboneFindLeaderOptions, fromHash: string): NativeBackboneRawReceiveFastDropPlan | undefined;
|
|
1250
|
+
planPreparedRawReceiveSelection(hashes: Iterable<string>, options: {
|
|
1251
|
+
minReplicas: number;
|
|
1252
|
+
maxReplicas?: number;
|
|
1253
|
+
}, leaderOptions: NativeBackboneFindLeaderOptions, fromHash: string): NativeBackboneRawReceiveSelectionPlan | undefined;
|
|
1254
|
+
selectPreparedRawReceiveHashes(hashes: Iterable<string>, options: {
|
|
1255
|
+
minReplicas: number;
|
|
1256
|
+
maxReplicas?: number;
|
|
1257
|
+
}, leaderOptions: NativeBackboneFindLeaderOptions, fromHash: string): NativeBackboneRawReceiveSelectionPlan | undefined;
|
|
1258
|
+
getEntryCoordinateHashes(): string[];
|
|
1259
|
+
getEntryCoordinates(hash: string): Array<number | bigint> | undefined;
|
|
1260
|
+
getEntryHashesForHashNumbers(hashNumbers: Iterable<bigint | number | string>): Map<bigint, string[]>;
|
|
1261
|
+
getEntryHashesForHashNumbersU64(hashNumbers: BigUint64Array): Map<bigint, string[]> | undefined;
|
|
1262
|
+
getEntryHashListForHashNumbersU64(hashNumbers: BigUint64Array): string[] | undefined;
|
|
1263
|
+
getEntryHashNumbersInRange(range: {
|
|
1264
|
+
start1: bigint | number | string;
|
|
1265
|
+
end1: bigint | number | string;
|
|
1266
|
+
start2: bigint | number | string;
|
|
1267
|
+
end2: bigint | number | string;
|
|
1268
|
+
}): bigint[];
|
|
1269
|
+
getEntryHashNumbersInRangeU64(range: {
|
|
1270
|
+
start1: bigint | number | string;
|
|
1271
|
+
end1: bigint | number | string;
|
|
1272
|
+
start2: bigint | number | string;
|
|
1273
|
+
end2: bigint | number | string;
|
|
1274
|
+
}): BigUint64Array | undefined;
|
|
1275
|
+
countEntryCoordinatesInRanges(ranges: Iterable<{
|
|
1276
|
+
start1: bigint | number | string;
|
|
1277
|
+
end1: bigint | number | string;
|
|
1278
|
+
start2: bigint | number | string;
|
|
1279
|
+
end2: bigint | number | string;
|
|
1280
|
+
}>, options?: {
|
|
1281
|
+
includeAssignedToRangeBoundary?: boolean;
|
|
1282
|
+
}): number;
|
|
1283
|
+
getEntryCoordinateFields(): NativeBackboneCoordinateFields[];
|
|
1284
|
+
get coordinateIndexLength(): number;
|
|
1285
|
+
get coordinateValueLength(): number;
|
|
1286
|
+
hasCoordinateIndexHash(hash: string): boolean;
|
|
1287
|
+
configureDocumentSchemaIr(schemaIr: Uint8Array): NativeBackboneDocumentSchemaStats;
|
|
1288
|
+
setDocumentByteElementIndexLimit(limit: number): void;
|
|
1289
|
+
setDocumentContextHeadField(field: number): void;
|
|
1290
|
+
setDocumentContextFields(fields: {
|
|
1291
|
+
created: number;
|
|
1292
|
+
modified: number;
|
|
1293
|
+
head: number;
|
|
1294
|
+
gid: number;
|
|
1295
|
+
size: number;
|
|
1296
|
+
}): void;
|
|
1297
|
+
projectDocumentIndexSimple(encodedDocument: Uint8Array, plan: NativeBackboneSimpleDocumentProjectionPlan, context: NativeBackboneSimpleDocumentProjectionContext): Uint8Array | undefined;
|
|
1298
|
+
setAppendProfileEnabled(enabled: boolean): void;
|
|
1299
|
+
resetAppendProfile(): void;
|
|
1300
|
+
appendProfile(): NativeBackboneAppendProfile;
|
|
1301
|
+
get documentIndexLength(): number;
|
|
1302
|
+
get documentValueLength(): number;
|
|
1303
|
+
documentExactStringFirstKey(field: number, value: string): string | undefined;
|
|
1304
|
+
documentValueBytes(key: string): Uint8Array | undefined;
|
|
1305
|
+
documentEntry(key: string): NativeBackboneDocumentEntry | undefined;
|
|
1306
|
+
documentKeysExist(keys: Iterable<string>): Uint8Array;
|
|
1307
|
+
documentFieldValue(key: string, field: number): NativeBackboneDocumentFieldValue | undefined;
|
|
1308
|
+
documentContext(key: string): [string, string, string, string, number] | undefined;
|
|
1309
|
+
documentContextBatch(keys: string[]): Array<[string, string, string, string, number] | undefined>;
|
|
1310
|
+
documentPreviousSignaturePublicKey(key: string): {
|
|
1311
|
+
exists: boolean;
|
|
1312
|
+
publicKey?: Uint8Array;
|
|
1313
|
+
} | undefined;
|
|
1314
|
+
documentContextsAndPreviousSignaturePublicKeys(keys: string[]): Array<{
|
|
1315
|
+
context?: NativeBackboneDocumentContextFacts;
|
|
1316
|
+
publicKey?: Uint8Array;
|
|
1317
|
+
}> | undefined;
|
|
1318
|
+
documentQuery(queryBytes: Uint8Array, sortBytes: Uint8Array): NativeBackboneDocumentEntry[];
|
|
1319
|
+
documentQueryPage(queryBytes: Uint8Array, sortBytes: Uint8Array, offset: number, limit: number): NativeBackboneDocumentEntry[];
|
|
1320
|
+
private documentProjectionPlanId;
|
|
1321
|
+
documentCount(queryBytes: Uint8Array): number;
|
|
1322
|
+
documentSum(queryBytes: Uint8Array, field: number): ["none" | "i64" | "u64", string];
|
|
1323
|
+
putDocumentEncodedPartsStored(key: string, valuePrefixBytes: Uint8Array, valueSuffixBytes: Uint8Array, byteElementIndexLimit?: number): void;
|
|
1324
|
+
putDocumentEncodedPartsStoredBatch(values: Array<{
|
|
1325
|
+
key: string;
|
|
1326
|
+
valuePrefixBytes: Uint8Array;
|
|
1327
|
+
valueSuffixBytes: Uint8Array;
|
|
1328
|
+
}>, byteElementIndexLimit?: number): void;
|
|
1329
|
+
deleteDocument(key: string): boolean;
|
|
1330
|
+
deleteDocuments(keys: Iterable<string>): number;
|
|
1331
|
+
deleteDocumentsResult(keys: Iterable<string>): Uint8Array;
|
|
1332
|
+
clearDocumentIndex(): void;
|
|
1333
|
+
get documentPendingJournalLength(): number;
|
|
1334
|
+
get documentPendingJournalByteLength(): number;
|
|
1335
|
+
get documentJournalEnabled(): boolean;
|
|
1336
|
+
setDocumentJournalEnabled(enabled: boolean): void;
|
|
1337
|
+
documentJournalHeader(): Uint8Array;
|
|
1338
|
+
documentJournal(): Uint8Array;
|
|
1339
|
+
clearDocumentJournal(): void;
|
|
1340
|
+
clearDocumentJournalPrefix(byteLength: number, recordCount: number): void;
|
|
1341
|
+
documentSnapshot(): Uint8Array;
|
|
1342
|
+
loadDocumentSnapshotAndJournal(snapshot?: Uint8Array, journal?: Uint8Array): number;
|
|
1343
|
+
get coordinatePendingJournalLength(): number;
|
|
1344
|
+
get coordinatePendingJournalByteLength(): number;
|
|
1345
|
+
get coordinateJournalEnabled(): boolean;
|
|
1346
|
+
setCoordinateJournalEnabled(enabled: boolean): void;
|
|
1347
|
+
coordinateJournalHeader(): Uint8Array;
|
|
1348
|
+
coordinateJournal(): Uint8Array;
|
|
1349
|
+
clearCoordinateJournal(): void;
|
|
1350
|
+
clearCoordinateJournalPrefix(byteLength: number, recordCount: number): void;
|
|
1351
|
+
coordinateSnapshot(): Uint8Array;
|
|
1352
|
+
loadCoordinateSnapshotAndJournal(snapshot?: Uint8Array, journal?: Uint8Array): number;
|
|
1353
|
+
get documentSignerPendingJournalLength(): number;
|
|
1354
|
+
get documentSignerPendingJournalByteLength(): number;
|
|
1355
|
+
get documentSignerJournalEnabled(): boolean;
|
|
1356
|
+
setDocumentSignerJournalEnabled(enabled: boolean): void;
|
|
1357
|
+
documentSignerJournalHeader(): Uint8Array;
|
|
1358
|
+
documentSignerJournal(): Uint8Array;
|
|
1359
|
+
clearDocumentSignerJournal(): void;
|
|
1360
|
+
clearDocumentSignerJournalPrefix(byteLength: number, recordCount: number): void;
|
|
1361
|
+
documentSignerSnapshot(): Uint8Array;
|
|
1362
|
+
loadDocumentSignerSnapshotAndJournal(snapshot?: Uint8Array, journal?: Uint8Array): number;
|
|
1363
|
+
clear(): void;
|
|
1364
|
+
clearSharedLog(): void;
|
|
1365
|
+
clearEntryCoordinates(): void;
|
|
1366
|
+
putRange(range: NativeBackboneRangeInput): void;
|
|
1367
|
+
deleteRange(id: string): boolean;
|
|
1368
|
+
putEntryCoordinates(hash: string, gid: string, coordinates: Iterable<bigint | number | string>, assignedToRangeBoundary: boolean, requestedReplicas: number, hashNumber: bigint | number | string): void;
|
|
1369
|
+
deleteEntryCoordinates(hash: string): boolean;
|
|
1370
|
+
deleteEntryCoordinatesBatch(hashes: Iterable<string>): void;
|
|
1371
|
+
commitEntryCoordinates(hash: string, gid: string, coordinates: Iterable<bigint | number | string>, nextHashes: Iterable<string>, assignedToRangeBoundary: boolean, requestedReplicas: number, hashNumber: bigint | number | string): void;
|
|
1372
|
+
commitEntryCoordinatesBatch(entries: Iterable<{
|
|
1373
|
+
hash: string;
|
|
1374
|
+
gid: string;
|
|
1375
|
+
coordinates: Iterable<bigint | number | string>;
|
|
1376
|
+
nextHashes: Iterable<string>;
|
|
1377
|
+
assignedToRangeBoundary: boolean;
|
|
1378
|
+
requestedReplicas: number;
|
|
1379
|
+
hashNumber: bigint | number | string;
|
|
1380
|
+
}>): void;
|
|
1381
|
+
commitEntryCoordinatesColumnsBatch(columns: NativeBackboneCoordinateCommitColumns): void;
|
|
1382
|
+
addGidPeers(gid: string, peers: Iterable<string>, reset?: boolean): number;
|
|
1383
|
+
removeGidPeer(peer: string, gid?: string): void;
|
|
1384
|
+
removeGidPeers(peer: string, gids: Iterable<string>): void;
|
|
1385
|
+
deleteGidPeers(gid: string): boolean;
|
|
1386
|
+
clearGidPeers(): void;
|
|
1387
|
+
markEntriesKnownByPeer(hashes: Iterable<string>, peer: string): void;
|
|
1388
|
+
removeEntriesKnownByPeer(hashes: Iterable<string>, peer: string): void;
|
|
1389
|
+
removePeerFromEntryKnownPeers(peer: string): void;
|
|
1390
|
+
clearEntryKnownPeers(): void;
|
|
1391
|
+
getGrid(from: bigint | number | string, count: number): Array<number | bigint>;
|
|
1392
|
+
getGidCoordinates(gid: string, count: number): Array<number | bigint>;
|
|
1393
|
+
findLeaders(cursors: Iterable<bigint | number | string>, replicas: number, options?: NativeBackboneFindLeaderOptions): Map<string, NativeBackboneLeaderSample>;
|
|
1394
|
+
findLeadersBatch(items: Iterable<NativeBackboneLeaderCursorBatchInput>, options?: NativeBackboneFindLeaderOptions): Array<Map<string, NativeBackboneLeaderSample>>;
|
|
1395
|
+
planLeadersForGid(gid: string, replicas: number, options?: NativeBackboneFindLeaderOptions): NativeBackboneLeaderPlan;
|
|
1396
|
+
planLeadersForGidsBatch(items: Iterable<NativeBackboneLeaderGidBatchInput>, options?: NativeBackboneFindLeaderOptions): NativeBackboneLeaderPlan[];
|
|
1397
|
+
planLeaderSamplesForGidsBatch(items: Iterable<NativeBackboneLeaderGidBatchInput>, options?: NativeBackboneFindLeaderOptions): Array<Map<string, NativeBackboneLeaderSample>> | undefined;
|
|
1398
|
+
planRequestPruneLeaderHints(hashes: Iterable<string>, skipHashes: Iterable<string>, options?: NativeBackboneFindLeaderOptions): NativeBackboneRequestPruneHints | undefined;
|
|
1399
|
+
planRequestPruneLeaderHintColumns(hashes: Iterable<string>, skipHashes: Iterable<string>, options?: NativeBackboneFindLeaderOptions): NativeBackboneRequestPruneHintColumns | undefined;
|
|
1400
|
+
planRequestPruneAllConfirmed(hashes: Iterable<string>, prunePeer: string, options?: NativeBackboneFindLeaderOptions & {
|
|
1401
|
+
omitPeerHistoryGids?: boolean;
|
|
1402
|
+
}): NativeBackboneRequestPruneAllConfirmed | undefined;
|
|
1403
|
+
planEntryAssignmentForGid(gid: string, replicas: number, options?: NativeBackboneFindLeaderOptions): NativeBackboneEntryAssignmentPlan;
|
|
1404
|
+
planRepairDispatchForEntries(input: NativeBackboneRepairDispatchInput, options?: NativeBackboneFindLeaderOptions): NativeBackboneRepairDispatchPlan;
|
|
1405
|
+
planRepairDispatchForResidentEntries(input: NativeBackboneResidentRepairDispatchInput, options?: NativeBackboneFindLeaderOptions): NativeBackboneRepairDispatchPlan;
|
|
1406
|
+
planLocalAppendForGidCompact(input: {
|
|
1407
|
+
entryHash: string;
|
|
1408
|
+
gid: string;
|
|
1409
|
+
hashNumber?: bigint | number | string;
|
|
1410
|
+
nextHashes?: Iterable<string>;
|
|
1411
|
+
replicas: number;
|
|
1412
|
+
selfHash: string;
|
|
1413
|
+
}, options?: NativeBackboneFindLeaderOptions): NativeBackboneAppendPlan;
|
|
1414
|
+
commitLocalAppendForGidCompact(input: {
|
|
1415
|
+
entryHash: string;
|
|
1416
|
+
gid: string;
|
|
1417
|
+
hashNumber?: bigint | number | string;
|
|
1418
|
+
nextHashes?: Iterable<string>;
|
|
1419
|
+
deleteHashes?: Iterable<string>;
|
|
1420
|
+
replicas: number;
|
|
1421
|
+
selfHash: string;
|
|
1422
|
+
}, options?: NativeBackboneFindLeaderOptions): NativeBackboneAppendPlan;
|
|
1423
|
+
planAppendForGid(input: {
|
|
1424
|
+
entryHash: string;
|
|
1425
|
+
gid: string;
|
|
1426
|
+
hashNumber?: bigint | number | string;
|
|
1427
|
+
nextHashes?: Iterable<string>;
|
|
1428
|
+
replicas: number;
|
|
1429
|
+
fullReplicaCandidates?: Iterable<string>;
|
|
1430
|
+
fallbackRecipients?: Iterable<string>;
|
|
1431
|
+
selfHash: string;
|
|
1432
|
+
deliveryEnabled: boolean;
|
|
1433
|
+
reliabilityAck: boolean;
|
|
1434
|
+
minAcks?: number;
|
|
1435
|
+
requireRecipients: boolean;
|
|
1436
|
+
}, options?: NativeBackboneFindLeaderOptions): NativeBackboneAppendPlan;
|
|
1437
|
+
planAppendForGidsBatch(input: {
|
|
1438
|
+
entries: Iterable<NativeBackboneAppendEntryBatchInput>;
|
|
1439
|
+
fullReplicaCandidates?: Iterable<string>;
|
|
1440
|
+
fallbackRecipients?: Iterable<string>;
|
|
1441
|
+
selfHash: string;
|
|
1442
|
+
deliveryEnabled: boolean;
|
|
1443
|
+
reliabilityAck: boolean;
|
|
1444
|
+
minAcks?: number;
|
|
1445
|
+
requireRecipients: boolean;
|
|
1446
|
+
}, options?: NativeBackboneFindLeaderOptions): NativeBackboneAppendPlan[];
|
|
1447
|
+
planReceiveCoordinatesForGidsBatch(input: {
|
|
1448
|
+
entries: Iterable<NativeBackboneAppendEntryBatchInput>;
|
|
1449
|
+
selfHash: string;
|
|
1450
|
+
}, options?: NativeBackboneFindLeaderOptions): NativeBackboneReceiveCoordinatePlan[];
|
|
1451
|
+
appendPlainNoNextTransaction(input: NativeBackboneAppendInput): NativeBackboneAppendResult;
|
|
1452
|
+
preparePlainNoNextStorageAppendTransaction(input: NativeBackboneStorageAppendInput): NativeBackboneStorageAppendResult;
|
|
1453
|
+
preparePlainStorageAppendTransaction(input: NativeBackboneStorageAppendInput): NativeBackboneStorageAppendResult;
|
|
1454
|
+
preparePlainCommittedStorageAppendTransaction(input: NativeBackboneStorageAppendInput): NativeBackboneAppendResult;
|
|
1455
|
+
preparePlainCommittedStorageAppendDocumentIndexLatestBatchTransaction(input: NativeBackboneCommittedLatestDocumentIndexBatchInput): NativeBackboneAppendResult[] | undefined;
|
|
1456
|
+
preparePlainCommittedNoNextStorageAppendTransaction(input: NativeBackboneStorageAppendInput): NativeBackboneAppendResult;
|
|
1457
|
+
preparePlainCommittedNoNextStorageAppendDocumentIndexCompactTransaction(input: NativeBackboneStorageAppendInput): NativeBackboneAppendResult;
|
|
1458
|
+
preparePlainCommittedNoNextStorageAppendDocumentIndexCompactBatchTransaction(input: NativeBackboneCommittedNoNextDocumentIndexBatchInput): NativeBackboneAppendResult[] | undefined;
|
|
1459
|
+
}
|
|
1460
|
+
export declare class NativeBackboneMemoryCoordinatePersistenceStore implements NativeBackboneCoordinatePersistenceStore {
|
|
1461
|
+
readonly files: Map<string, Uint8Array<ArrayBufferLike>>;
|
|
1462
|
+
read(name: string): Promise<Uint8Array | undefined>;
|
|
1463
|
+
write(name: string, bytes: Uint8Array): Promise<void>;
|
|
1464
|
+
append(name: string, bytes: Uint8Array): Promise<void>;
|
|
1465
|
+
remove(name: string): Promise<void>;
|
|
1466
|
+
}
|
|
1467
|
+
export declare class NativeBackboneNodeCoordinatePersistenceStore implements NativeBackboneCoordinatePersistenceStore {
|
|
1468
|
+
private readonly directory;
|
|
1469
|
+
private readonly fs?;
|
|
1470
|
+
private readonly appendHandles;
|
|
1471
|
+
private readonly filePaths;
|
|
1472
|
+
private directoryEnsured;
|
|
1473
|
+
constructor(directory: string, fs?: NativeBackboneNodeFs | undefined);
|
|
1474
|
+
private nodeFs;
|
|
1475
|
+
private filePath;
|
|
1476
|
+
private ensureDirectory;
|
|
1477
|
+
private closeAppendHandle;
|
|
1478
|
+
private appendHandle;
|
|
1479
|
+
read(name: string): Promise<Uint8Array | undefined>;
|
|
1480
|
+
write(name: string, bytes: Uint8Array): Promise<void>;
|
|
1481
|
+
append(name: string, bytes: Uint8Array): Promise<void>;
|
|
1482
|
+
remove(name: string): Promise<void>;
|
|
1483
|
+
close(): Promise<void>;
|
|
1484
|
+
}
|
|
1485
|
+
export declare class NativeBackboneOPFSCoordinatePersistenceStore implements NativeBackboneCoordinatePersistenceStore {
|
|
1486
|
+
private readonly directory;
|
|
1487
|
+
constructor(directory: NativeBackboneOPFSDirectoryHandle);
|
|
1488
|
+
static create(options?: {
|
|
1489
|
+
root?: NativeBackboneOPFSDirectoryHandle;
|
|
1490
|
+
directory?: string | string[];
|
|
1491
|
+
}): Promise<NativeBackboneOPFSCoordinatePersistenceStore>;
|
|
1492
|
+
private static defaultRoot;
|
|
1493
|
+
private static directoryParts;
|
|
1494
|
+
read(name: string): Promise<Uint8Array | undefined>;
|
|
1495
|
+
write(name: string, bytes: Uint8Array): Promise<void>;
|
|
1496
|
+
append(name: string, bytes: Uint8Array): Promise<void>;
|
|
1497
|
+
remove(name: string): Promise<void>;
|
|
1498
|
+
}
|
|
1499
|
+
export declare class NativeBackboneBufferedCoordinatePersistenceStore implements NativeBackboneCoordinatePersistenceStore {
|
|
1500
|
+
private readonly inner;
|
|
1501
|
+
private readonly options;
|
|
1502
|
+
private readonly buffers;
|
|
1503
|
+
private bufferedBytes;
|
|
1504
|
+
constructor(inner: NativeBackboneCoordinatePersistenceStore, options?: {
|
|
1505
|
+
maxBufferedBytes?: number;
|
|
1506
|
+
});
|
|
1507
|
+
private buffer;
|
|
1508
|
+
read(name: string): Promise<Uint8Array | undefined>;
|
|
1509
|
+
write(name: string, bytes: Uint8Array): Promise<void>;
|
|
1510
|
+
append(name: string, bytes: Uint8Array): Promise<void>;
|
|
1511
|
+
remove(name: string): Promise<void>;
|
|
1512
|
+
flush(name?: string): Promise<void>;
|
|
1513
|
+
close(): Promise<void>;
|
|
1514
|
+
}
|
|
1515
|
+
export declare class NativeBackboneCoordinatePersistence {
|
|
1516
|
+
private readonly store;
|
|
1517
|
+
readonly flushOnAppend: boolean;
|
|
1518
|
+
readonly flushMaxPendingBytes?: number;
|
|
1519
|
+
readonly flushIntervalMs?: number;
|
|
1520
|
+
readonly compactMaxJournalBytes?: number;
|
|
1521
|
+
readonly compactMaxJournalRecords?: number;
|
|
1522
|
+
private readonly snapshotFile;
|
|
1523
|
+
private readonly journalFile;
|
|
1524
|
+
private readonly documentSnapshotFile;
|
|
1525
|
+
private readonly documentJournalFile;
|
|
1526
|
+
private readonly documentSignerSnapshotFile;
|
|
1527
|
+
private readonly documentSignerJournalFile;
|
|
1528
|
+
private journalInitialized;
|
|
1529
|
+
private journalByteLength;
|
|
1530
|
+
private journalRecordCount;
|
|
1531
|
+
private documentJournalInitialized;
|
|
1532
|
+
private documentJournalByteLength;
|
|
1533
|
+
private documentJournalRecordCount;
|
|
1534
|
+
private documentSignerJournalInitialized;
|
|
1535
|
+
private documentSignerJournalByteLength;
|
|
1536
|
+
private documentSignerJournalRecordCount;
|
|
1537
|
+
private lastFlushMs;
|
|
1538
|
+
private persistenceQueue;
|
|
1539
|
+
constructor(store: NativeBackboneCoordinatePersistenceStore, options?: NativeBackboneCoordinatePersistenceOptions);
|
|
1540
|
+
hydrate(backbone: NativePeerbitBackbone): Promise<number>;
|
|
1541
|
+
shouldFlushJournalOnAppend(backbone: NativePeerbitBackbone, now?: number): boolean;
|
|
1542
|
+
flushJournalOnAppend(backbone: NativePeerbitBackbone): number | Promise<number>;
|
|
1543
|
+
flushJournal(backbone: NativePeerbitBackbone): Promise<number>;
|
|
1544
|
+
private enqueuePersistence;
|
|
1545
|
+
private flushJournalInternal;
|
|
1546
|
+
private shouldCompactJournal;
|
|
1547
|
+
compact(backbone: NativePeerbitBackbone): Promise<void>;
|
|
1548
|
+
private compactInternal;
|
|
1549
|
+
close(): Promise<void>;
|
|
1550
|
+
}
|
|
1551
|
+
export declare class NativeBackboneNodeCoordinatePersistence extends NativeBackboneCoordinatePersistence {
|
|
1552
|
+
private readonly writeBuffer?;
|
|
1553
|
+
constructor(directory: string, options?: NativeBackboneNodeCoordinatePersistenceOptions);
|
|
1554
|
+
flushJournalWriteBuffer(fileName?: string): Promise<void>;
|
|
1555
|
+
}
|
|
1556
|
+
export declare const createNativeBackboneCoordinatePersistence: (config: NativeBackboneCoordinatePersistenceConfig) => NativeBackboneCoordinatePersistenceAdapter;
|
|
1557
|
+
export declare const createBufferedNativeBackboneCoordinatePersistence: (store: NativeBackboneCoordinatePersistenceStore, options?: NativeBackboneBufferedCoordinatePersistenceOptions) => NativeBackboneCoordinatePersistenceAdapter;
|
|
1558
|
+
export declare const createBufferedNativeBackboneNodeCoordinatePersistence: (directory: string, options?: NativeBackboneNodeCoordinatePersistenceOptions) => NativeBackboneCoordinatePersistenceAdapter;
|
|
1559
|
+
export declare const createNativePeerbitBackbone: typeof NativePeerbitBackbone.create;
|
|
1560
|
+
export {};
|
|
1561
|
+
//# sourceMappingURL=index.d.ts.map
|