hyoo_sync_client 0.0.18 → 0.0.19
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/node.d.ts +443 -441
- package/node.deps.json +1 -1
- package/node.js +2111 -2102
- package/node.js.map +1 -1
- package/node.mjs +2111 -2102
- package/node.mjs.map +1 -1
- package/node.test.js +2340 -2331
- package/node.test.js.map +1 -1
- package/package.json +38 -38
- package/web.d.ts +204 -202
- package/web.deps.json +1 -1
- package/web.js +1834 -1825
- package/web.js.map +1 -1
- package/web.mjs +1834 -1825
- package/web.mjs.map +1 -1
- package/web.test.js +257 -257
- package/web.test.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyoo_sync_client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"exports": {
|
|
5
5
|
"node": {
|
|
6
6
|
"import": "./node.mjs",
|
|
@@ -28,6 +28,43 @@
|
|
|
28
28
|
"$mol_fail",
|
|
29
29
|
"$mol_type_writable",
|
|
30
30
|
"$mol_type",
|
|
31
|
+
"$hyoo_crowd_unit",
|
|
32
|
+
"$hyoo_crowd",
|
|
33
|
+
"$mol_int62",
|
|
34
|
+
"$mol_charset_encode",
|
|
35
|
+
"$mol_charset",
|
|
36
|
+
"$node",
|
|
37
|
+
"$node_modules",
|
|
38
|
+
"$mol_exec",
|
|
39
|
+
"$mol_log3",
|
|
40
|
+
"$mol_tree2_from_json",
|
|
41
|
+
"$mol_tree2_from",
|
|
42
|
+
"$mol_tree2",
|
|
43
|
+
"$mol_span",
|
|
44
|
+
"$mol_tree2_from_string",
|
|
45
|
+
"$mol_error_syntax",
|
|
46
|
+
"$mol_error",
|
|
47
|
+
"$mol_tree2_to_string",
|
|
48
|
+
"$mol_tree2_to",
|
|
49
|
+
"$mol_term_color",
|
|
50
|
+
"$mol_term",
|
|
51
|
+
"$mol_env",
|
|
52
|
+
"$mol_data_enum",
|
|
53
|
+
"$mol_data",
|
|
54
|
+
"$mol_data_setup",
|
|
55
|
+
"$mol_data_value",
|
|
56
|
+
"$mol_data_error",
|
|
57
|
+
"$mol_error_mix",
|
|
58
|
+
"$mol_diff_path",
|
|
59
|
+
"$mol_diff",
|
|
60
|
+
"$hyoo_crowd_peer",
|
|
61
|
+
"$mol_crypto_auditor",
|
|
62
|
+
"$mol_crypto",
|
|
63
|
+
"$mol_crypto_native",
|
|
64
|
+
"$mol_dev_format",
|
|
65
|
+
"$mol_dev",
|
|
66
|
+
"$mol_charset_decode",
|
|
67
|
+
"$mol_charset_encoding",
|
|
31
68
|
"$mol_mem",
|
|
32
69
|
"$mol_wire_solo",
|
|
33
70
|
"$mol_wire",
|
|
@@ -37,8 +74,6 @@
|
|
|
37
74
|
"$mol_wire_atom",
|
|
38
75
|
"$mol_wire_fiber",
|
|
39
76
|
"$mol_wire_pub_sub",
|
|
40
|
-
"$mol_dev_format",
|
|
41
|
-
"$mol_dev",
|
|
42
77
|
"$mol_after_frame",
|
|
43
78
|
"$mol_after",
|
|
44
79
|
"$mol_after_timeout",
|
|
@@ -64,46 +99,11 @@
|
|
|
64
99
|
"$mol_object",
|
|
65
100
|
"$mol_dom_context",
|
|
66
101
|
"$mol_dom",
|
|
67
|
-
"$node",
|
|
68
|
-
"$node_modules",
|
|
69
|
-
"$mol_exec",
|
|
70
|
-
"$mol_log3",
|
|
71
|
-
"$mol_tree2_from_json",
|
|
72
|
-
"$mol_tree2_from",
|
|
73
|
-
"$mol_tree2",
|
|
74
|
-
"$mol_span",
|
|
75
|
-
"$mol_tree2_from_string",
|
|
76
|
-
"$mol_error_syntax",
|
|
77
|
-
"$mol_error",
|
|
78
|
-
"$mol_tree2_to_string",
|
|
79
|
-
"$mol_tree2_to",
|
|
80
|
-
"$mol_term_color",
|
|
81
|
-
"$mol_term",
|
|
82
|
-
"$mol_env",
|
|
83
|
-
"$hyoo_crowd_peer",
|
|
84
|
-
"$hyoo_crowd",
|
|
85
|
-
"$mol_int62",
|
|
86
|
-
"$mol_charset_encode",
|
|
87
|
-
"$mol_charset",
|
|
88
|
-
"$mol_crypto_auditor",
|
|
89
|
-
"$mol_crypto",
|
|
90
|
-
"$mol_crypto_native",
|
|
91
102
|
"$mol_wire_solid",
|
|
92
103
|
"$hyoo_crowd_world",
|
|
93
104
|
"$hyoo_crowd_land",
|
|
94
105
|
"$mol_memo",
|
|
95
106
|
"$mol_wrapper",
|
|
96
|
-
"$hyoo_crowd_unit",
|
|
97
|
-
"$mol_data_enum",
|
|
98
|
-
"$mol_data",
|
|
99
|
-
"$mol_data_setup",
|
|
100
|
-
"$mol_data_value",
|
|
101
|
-
"$mol_data_error",
|
|
102
|
-
"$mol_error_mix",
|
|
103
|
-
"$mol_diff_path",
|
|
104
|
-
"$mol_diff",
|
|
105
|
-
"$mol_charset_decode",
|
|
106
|
-
"$mol_charset_encoding",
|
|
107
107
|
"$hyoo_crowd_clock",
|
|
108
108
|
"$hyoo_crowd_time",
|
|
109
109
|
"$hyoo_crowd_node",
|
package/web.d.ts
CHANGED
|
@@ -69,6 +69,207 @@ declare namespace $ {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
declare var $node: any;
|
|
73
|
+
|
|
74
|
+
declare namespace $ {
|
|
75
|
+
function $mol_charset_encode(value: string): Uint8Array;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare namespace $ {
|
|
79
|
+
type $mol_int62_string = `${string}_${string}`;
|
|
80
|
+
function $mol_int62_string_ensure(str: unknown): `${string}_${string}` | null;
|
|
81
|
+
type $mol_int62_pair = {
|
|
82
|
+
readonly lo: number;
|
|
83
|
+
readonly hi: number;
|
|
84
|
+
};
|
|
85
|
+
const $mol_int62_max: number;
|
|
86
|
+
const $mol_int62_min: number;
|
|
87
|
+
const $mol_int62_range: number;
|
|
88
|
+
function $mol_int62_to_string({ lo, hi }: $mol_int62_pair): `${string}_${string}`;
|
|
89
|
+
function $mol_int62_from_string(str: string): null | $mol_int62_pair;
|
|
90
|
+
function $mol_int62_compare(left_lo: number, left_hi: number, right_lo: number, right_hi: number): number;
|
|
91
|
+
function $mol_int62_inc(lo: number, hi: number, max?: number): $mol_int62_pair;
|
|
92
|
+
function $mol_int62_random(): $mol_int62_pair;
|
|
93
|
+
function $mol_int62_hash_string(str: string): `${string}_${string}`;
|
|
94
|
+
function $mol_int62_hash_buffer(buf: Uint8Array, seed?: {
|
|
95
|
+
lo: number;
|
|
96
|
+
hi: number;
|
|
97
|
+
}): $mol_int62_pair;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare namespace $ {
|
|
101
|
+
type $mol_data_value<Input = any, Output = any> = (val: Input) => Output;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare namespace $ {
|
|
105
|
+
function $mol_data_setup<Value extends $mol_data_value, Config = never>(value: Value, config: Config): Value & {
|
|
106
|
+
config: Config;
|
|
107
|
+
Value: ReturnType<Value>;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare namespace $ {
|
|
112
|
+
function $mol_diff_path<Item>(...paths: Item[][]): {
|
|
113
|
+
prefix: Item[];
|
|
114
|
+
suffix: Item[][];
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare namespace $ {
|
|
119
|
+
class $mol_error_mix extends Error {
|
|
120
|
+
errors: Error[];
|
|
121
|
+
constructor(message: string, ...errors: Error[]);
|
|
122
|
+
toJSON(): string;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare namespace $ {
|
|
127
|
+
class $mol_data_error extends $mol_error_mix {
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare namespace $ {
|
|
132
|
+
function $mol_data_enum<Dict extends Record<number | string, number | string>>(name: string, dict: Dict): ((value: Dict[keyof Dict]) => Dict[keyof Dict]) & {
|
|
133
|
+
config: {
|
|
134
|
+
name: string;
|
|
135
|
+
dict: Dict;
|
|
136
|
+
};
|
|
137
|
+
Value: Dict[keyof Dict];
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare namespace $ {
|
|
142
|
+
var $mol_crypto_native: Crypto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare namespace $ {
|
|
146
|
+
function $mol_crypto_auditor_pair(this: $): Promise<{
|
|
147
|
+
public: $mol_crypto_auditor_public;
|
|
148
|
+
private: $mol_crypto_auditor_private;
|
|
149
|
+
}>;
|
|
150
|
+
class $mol_crypto_auditor_public extends Object {
|
|
151
|
+
readonly native: CryptoKey & {
|
|
152
|
+
type: 'public';
|
|
153
|
+
};
|
|
154
|
+
static size: number;
|
|
155
|
+
constructor(native: CryptoKey & {
|
|
156
|
+
type: 'public';
|
|
157
|
+
});
|
|
158
|
+
static from(serial: string): Promise<$mol_crypto_auditor_public>;
|
|
159
|
+
serial(): Promise<string>;
|
|
160
|
+
verify(data: BufferSource, sign: BufferSource): Promise<boolean>;
|
|
161
|
+
}
|
|
162
|
+
class $mol_crypto_auditor_private extends Object {
|
|
163
|
+
readonly native: CryptoKey & {
|
|
164
|
+
type: 'private';
|
|
165
|
+
};
|
|
166
|
+
static size: number;
|
|
167
|
+
constructor(native: CryptoKey & {
|
|
168
|
+
type: 'private';
|
|
169
|
+
});
|
|
170
|
+
static from(serial: string): Promise<$mol_crypto_auditor_private>;
|
|
171
|
+
serial(): Promise<string>;
|
|
172
|
+
sign(data: BufferSource): Promise<ArrayBuffer>;
|
|
173
|
+
public(): Promise<$mol_crypto_auditor_public>;
|
|
174
|
+
}
|
|
175
|
+
const $mol_crypto_auditor_sign_size = 64;
|
|
176
|
+
function $mol_crypto_auditor_private_to_public(serial: string): string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
declare namespace $ {
|
|
180
|
+
enum $hyoo_crowd_peer_level {
|
|
181
|
+
get = 0,
|
|
182
|
+
add = 1,
|
|
183
|
+
mod = 2,
|
|
184
|
+
law = 3
|
|
185
|
+
}
|
|
186
|
+
class $hyoo_crowd_peer extends Object {
|
|
187
|
+
readonly key_public: $mol_crypto_auditor_public;
|
|
188
|
+
readonly key_public_serial: string;
|
|
189
|
+
readonly key_private: $mol_crypto_auditor_private;
|
|
190
|
+
readonly key_private_serial: string;
|
|
191
|
+
id: $mol_int62_string;
|
|
192
|
+
constructor(key_public: $mol_crypto_auditor_public, key_public_serial: string, key_private: $mol_crypto_auditor_private, key_private_serial: string);
|
|
193
|
+
static generate(): Promise<$hyoo_crowd_peer>;
|
|
194
|
+
static restore(serial: string): Promise<$hyoo_crowd_peer>;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare namespace $ {
|
|
199
|
+
function $mol_dev_format_register(config: {
|
|
200
|
+
header: (val: any, config: any) => any;
|
|
201
|
+
hasBody: (val: any, config: any) => false;
|
|
202
|
+
} | {
|
|
203
|
+
header: (val: any, config: any) => any;
|
|
204
|
+
hasBody: (val: any, config: any) => boolean;
|
|
205
|
+
body: (val: any, config: any) => any;
|
|
206
|
+
}): void;
|
|
207
|
+
let $mol_dev_format_head: symbol;
|
|
208
|
+
let $mol_dev_format_body: symbol;
|
|
209
|
+
function $mol_dev_format_native(obj: any): any;
|
|
210
|
+
function $mol_dev_format_auto(obj: any): any;
|
|
211
|
+
function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[];
|
|
212
|
+
function $mol_dev_format_span(style: object, ...content: any[]): any[];
|
|
213
|
+
let $mol_dev_format_div: (style: object, ...content: any[]) => any[];
|
|
214
|
+
let $mol_dev_format_ol: (style: object, ...content: any[]) => any[];
|
|
215
|
+
let $mol_dev_format_li: (style: object, ...content: any[]) => any[];
|
|
216
|
+
let $mol_dev_format_table: (style: object, ...content: any[]) => any[];
|
|
217
|
+
let $mol_dev_format_tr: (style: object, ...content: any[]) => any[];
|
|
218
|
+
let $mol_dev_format_td: (style: object, ...content: any[]) => any[];
|
|
219
|
+
let $mol_dev_format_accent: (...args: any[]) => any[];
|
|
220
|
+
let $mol_dev_format_strong: (...args: any[]) => any[];
|
|
221
|
+
let $mol_dev_format_string: (...args: any[]) => any[];
|
|
222
|
+
let $mol_dev_format_shade: (...args: any[]) => any[];
|
|
223
|
+
let $mol_dev_format_indent: (...args: any[]) => any[];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare namespace $ {
|
|
227
|
+
type $mol_charset_encoding = 'utf8' | 'utf-16le' | 'utf-16be' | 'ibm866' | 'iso-8859-2' | 'iso-8859-3' | 'iso-8859-4' | 'iso-8859-5' | 'iso-8859-6' | 'iso-8859-7' | 'iso-8859-8' | 'iso-8859-8i' | 'iso-8859-10' | 'iso-8859-13' | 'iso-8859-14' | 'iso-8859-15' | 'iso-8859-16' | 'koi8-r' | 'koi8-u' | 'koi8-r' | 'macintosh' | 'windows-874' | 'windows-1250' | 'windows-1251' | 'windows-1252' | 'windows-1253' | 'windows-1254' | 'windows-1255' | 'windows-1256' | 'windows-1257' | 'windows-1258' | 'x-mac-cyrillic' | 'gbk' | 'gb18030' | 'hz-gb-2312' | 'big5' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'iso-2022-kr';
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
declare namespace $ {
|
|
231
|
+
function $mol_charset_decode(buffer: BufferSource, encoding?: $mol_charset_encoding): string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare namespace $ {
|
|
235
|
+
type $hyoo_crowd_unit_id = `${$mol_int62_string}!${$mol_int62_string}`;
|
|
236
|
+
enum $hyoo_crowd_unit_kind {
|
|
237
|
+
grab = 0,
|
|
238
|
+
join = 1,
|
|
239
|
+
give = 2,
|
|
240
|
+
data = 3
|
|
241
|
+
}
|
|
242
|
+
enum $hyoo_crowd_unit_group {
|
|
243
|
+
auth = 0,
|
|
244
|
+
data = 1
|
|
245
|
+
}
|
|
246
|
+
class $hyoo_crowd_unit extends Object {
|
|
247
|
+
readonly land: $mol_int62_string;
|
|
248
|
+
readonly auth: $mol_int62_string;
|
|
249
|
+
readonly head: $mol_int62_string;
|
|
250
|
+
readonly self: $mol_int62_string;
|
|
251
|
+
readonly next: $mol_int62_string;
|
|
252
|
+
readonly prev: $mol_int62_string;
|
|
253
|
+
readonly time: number;
|
|
254
|
+
readonly data: unknown;
|
|
255
|
+
bin: $hyoo_crowd_unit_bin | null;
|
|
256
|
+
constructor(land: $mol_int62_string, auth: $mol_int62_string, head: $mol_int62_string, self: $mol_int62_string, next: $mol_int62_string, prev: $mol_int62_string, time: number, data: unknown, bin: $hyoo_crowd_unit_bin | null);
|
|
257
|
+
kind(): $hyoo_crowd_unit_kind;
|
|
258
|
+
group(): $hyoo_crowd_unit_group;
|
|
259
|
+
level(): $hyoo_crowd_peer_level;
|
|
260
|
+
[Symbol.toPrimitive](): string;
|
|
261
|
+
}
|
|
262
|
+
class $hyoo_crowd_unit_bin extends DataView {
|
|
263
|
+
static from_buffer(buffer: Int16Array): $hyoo_crowd_unit_bin;
|
|
264
|
+
static from_unit(unit: $hyoo_crowd_unit): $hyoo_crowd_unit_bin;
|
|
265
|
+
sign(next?: Uint8Array): Uint8Array;
|
|
266
|
+
size(): number;
|
|
267
|
+
sens(): Uint8Array;
|
|
268
|
+
unit(): $hyoo_crowd_unit;
|
|
269
|
+
}
|
|
270
|
+
function $hyoo_crowd_unit_compare(left: $hyoo_crowd_unit, right: $hyoo_crowd_unit): number;
|
|
271
|
+
}
|
|
272
|
+
|
|
72
273
|
declare namespace $ {
|
|
73
274
|
enum $mol_wire_cursor {
|
|
74
275
|
stale = -1,
|
|
@@ -116,34 +317,6 @@ declare namespace $ {
|
|
|
116
317
|
const $mol_wire_affected: (number | $mol_wire_sub)[];
|
|
117
318
|
}
|
|
118
319
|
|
|
119
|
-
declare namespace $ {
|
|
120
|
-
function $mol_dev_format_register(config: {
|
|
121
|
-
header: (val: any, config: any) => any;
|
|
122
|
-
hasBody: (val: any, config: any) => false;
|
|
123
|
-
} | {
|
|
124
|
-
header: (val: any, config: any) => any;
|
|
125
|
-
hasBody: (val: any, config: any) => boolean;
|
|
126
|
-
body: (val: any, config: any) => any;
|
|
127
|
-
}): void;
|
|
128
|
-
let $mol_dev_format_head: symbol;
|
|
129
|
-
let $mol_dev_format_body: symbol;
|
|
130
|
-
function $mol_dev_format_native(obj: any): any;
|
|
131
|
-
function $mol_dev_format_auto(obj: any): any;
|
|
132
|
-
function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[];
|
|
133
|
-
function $mol_dev_format_span(style: object, ...content: any[]): any[];
|
|
134
|
-
let $mol_dev_format_div: (style: object, ...content: any[]) => any[];
|
|
135
|
-
let $mol_dev_format_ol: (style: object, ...content: any[]) => any[];
|
|
136
|
-
let $mol_dev_format_li: (style: object, ...content: any[]) => any[];
|
|
137
|
-
let $mol_dev_format_table: (style: object, ...content: any[]) => any[];
|
|
138
|
-
let $mol_dev_format_tr: (style: object, ...content: any[]) => any[];
|
|
139
|
-
let $mol_dev_format_td: (style: object, ...content: any[]) => any[];
|
|
140
|
-
let $mol_dev_format_accent: (...args: any[]) => any[];
|
|
141
|
-
let $mol_dev_format_strong: (...args: any[]) => any[];
|
|
142
|
-
let $mol_dev_format_string: (...args: any[]) => any[];
|
|
143
|
-
let $mol_dev_format_shade: (...args: any[]) => any[];
|
|
144
|
-
let $mol_dev_format_indent: (...args: any[]) => any[];
|
|
145
|
-
}
|
|
146
|
-
|
|
147
320
|
declare namespace $ {
|
|
148
321
|
class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub {
|
|
149
322
|
protected pub_from: number;
|
|
@@ -389,91 +562,6 @@ declare namespace $ {
|
|
|
389
562
|
declare namespace $ {
|
|
390
563
|
}
|
|
391
564
|
|
|
392
|
-
declare var $node: any;
|
|
393
|
-
|
|
394
|
-
declare namespace $ {
|
|
395
|
-
function $mol_charset_encode(value: string): Uint8Array;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
declare namespace $ {
|
|
399
|
-
type $mol_int62_string = `${string}_${string}`;
|
|
400
|
-
function $mol_int62_string_ensure(str: unknown): `${string}_${string}` | null;
|
|
401
|
-
type $mol_int62_pair = {
|
|
402
|
-
readonly lo: number;
|
|
403
|
-
readonly hi: number;
|
|
404
|
-
};
|
|
405
|
-
const $mol_int62_max: number;
|
|
406
|
-
const $mol_int62_min: number;
|
|
407
|
-
const $mol_int62_range: number;
|
|
408
|
-
function $mol_int62_to_string({ lo, hi }: $mol_int62_pair): `${string}_${string}`;
|
|
409
|
-
function $mol_int62_from_string(str: string): null | $mol_int62_pair;
|
|
410
|
-
function $mol_int62_compare(left_lo: number, left_hi: number, right_lo: number, right_hi: number): number;
|
|
411
|
-
function $mol_int62_inc(lo: number, hi: number, max?: number): $mol_int62_pair;
|
|
412
|
-
function $mol_int62_random(): $mol_int62_pair;
|
|
413
|
-
function $mol_int62_hash_string(str: string): `${string}_${string}`;
|
|
414
|
-
function $mol_int62_hash_buffer(buf: Uint8Array, seed?: {
|
|
415
|
-
lo: number;
|
|
416
|
-
hi: number;
|
|
417
|
-
}): $mol_int62_pair;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
declare namespace $ {
|
|
421
|
-
var $mol_crypto_native: Crypto;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
declare namespace $ {
|
|
425
|
-
function $mol_crypto_auditor_pair(this: $): Promise<{
|
|
426
|
-
public: $mol_crypto_auditor_public;
|
|
427
|
-
private: $mol_crypto_auditor_private;
|
|
428
|
-
}>;
|
|
429
|
-
class $mol_crypto_auditor_public extends Object {
|
|
430
|
-
readonly native: CryptoKey & {
|
|
431
|
-
type: 'public';
|
|
432
|
-
};
|
|
433
|
-
static size: number;
|
|
434
|
-
constructor(native: CryptoKey & {
|
|
435
|
-
type: 'public';
|
|
436
|
-
});
|
|
437
|
-
static from(serial: string): Promise<$mol_crypto_auditor_public>;
|
|
438
|
-
serial(): Promise<string>;
|
|
439
|
-
verify(data: BufferSource, sign: BufferSource): Promise<boolean>;
|
|
440
|
-
}
|
|
441
|
-
class $mol_crypto_auditor_private extends Object {
|
|
442
|
-
readonly native: CryptoKey & {
|
|
443
|
-
type: 'private';
|
|
444
|
-
};
|
|
445
|
-
static size: number;
|
|
446
|
-
constructor(native: CryptoKey & {
|
|
447
|
-
type: 'private';
|
|
448
|
-
});
|
|
449
|
-
static from(serial: string): Promise<$mol_crypto_auditor_private>;
|
|
450
|
-
serial(): Promise<string>;
|
|
451
|
-
sign(data: BufferSource): Promise<ArrayBuffer>;
|
|
452
|
-
public(): Promise<$mol_crypto_auditor_public>;
|
|
453
|
-
}
|
|
454
|
-
const $mol_crypto_auditor_sign_size = 64;
|
|
455
|
-
function $mol_crypto_auditor_private_to_public(serial: string): string;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
declare namespace $ {
|
|
459
|
-
enum $hyoo_crowd_peer_level {
|
|
460
|
-
get = 0,
|
|
461
|
-
add = 1,
|
|
462
|
-
mod = 2,
|
|
463
|
-
law = 3
|
|
464
|
-
}
|
|
465
|
-
class $hyoo_crowd_peer extends Object {
|
|
466
|
-
readonly key_public: $mol_crypto_auditor_public;
|
|
467
|
-
readonly key_public_serial: string;
|
|
468
|
-
readonly key_private: $mol_crypto_auditor_private;
|
|
469
|
-
readonly key_private_serial: string;
|
|
470
|
-
id: $mol_int62_string;
|
|
471
|
-
constructor(key_public: $mol_crypto_auditor_public, key_public_serial: string, key_private: $mol_crypto_auditor_private, key_private_serial: string);
|
|
472
|
-
static generate(): Promise<$hyoo_crowd_peer>;
|
|
473
|
-
static restore(serial: string): Promise<$hyoo_crowd_peer>;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
|
|
477
565
|
declare namespace $ {
|
|
478
566
|
function $hyoo_sync_peer(path: string): Promise<$hyoo_crowd_peer>;
|
|
479
567
|
}
|
|
@@ -499,94 +587,6 @@ declare namespace $ {
|
|
|
499
587
|
}
|
|
500
588
|
}
|
|
501
589
|
|
|
502
|
-
declare namespace $ {
|
|
503
|
-
type $mol_data_value<Input = any, Output = any> = (val: Input) => Output;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
declare namespace $ {
|
|
507
|
-
function $mol_data_setup<Value extends $mol_data_value, Config = never>(value: Value, config: Config): Value & {
|
|
508
|
-
config: Config;
|
|
509
|
-
Value: ReturnType<Value>;
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
declare namespace $ {
|
|
514
|
-
function $mol_diff_path<Item>(...paths: Item[][]): {
|
|
515
|
-
prefix: Item[];
|
|
516
|
-
suffix: Item[][];
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
declare namespace $ {
|
|
521
|
-
class $mol_error_mix extends Error {
|
|
522
|
-
errors: Error[];
|
|
523
|
-
constructor(message: string, ...errors: Error[]);
|
|
524
|
-
toJSON(): string;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
declare namespace $ {
|
|
529
|
-
class $mol_data_error extends $mol_error_mix {
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
declare namespace $ {
|
|
534
|
-
function $mol_data_enum<Dict extends Record<number | string, number | string>>(name: string, dict: Dict): ((value: Dict[keyof Dict]) => Dict[keyof Dict]) & {
|
|
535
|
-
config: {
|
|
536
|
-
name: string;
|
|
537
|
-
dict: Dict;
|
|
538
|
-
};
|
|
539
|
-
Value: Dict[keyof Dict];
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
declare namespace $ {
|
|
544
|
-
type $mol_charset_encoding = 'utf8' | 'utf-16le' | 'utf-16be' | 'ibm866' | 'iso-8859-2' | 'iso-8859-3' | 'iso-8859-4' | 'iso-8859-5' | 'iso-8859-6' | 'iso-8859-7' | 'iso-8859-8' | 'iso-8859-8i' | 'iso-8859-10' | 'iso-8859-13' | 'iso-8859-14' | 'iso-8859-15' | 'iso-8859-16' | 'koi8-r' | 'koi8-u' | 'koi8-r' | 'macintosh' | 'windows-874' | 'windows-1250' | 'windows-1251' | 'windows-1252' | 'windows-1253' | 'windows-1254' | 'windows-1255' | 'windows-1256' | 'windows-1257' | 'windows-1258' | 'x-mac-cyrillic' | 'gbk' | 'gb18030' | 'hz-gb-2312' | 'big5' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'iso-2022-kr';
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
declare namespace $ {
|
|
548
|
-
function $mol_charset_decode(buffer: BufferSource, encoding?: $mol_charset_encoding): string;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
declare namespace $ {
|
|
552
|
-
type $hyoo_crowd_unit_id = `${$mol_int62_string}!${$mol_int62_string}`;
|
|
553
|
-
enum $hyoo_crowd_unit_kind {
|
|
554
|
-
grab = 0,
|
|
555
|
-
join = 1,
|
|
556
|
-
give = 2,
|
|
557
|
-
data = 3
|
|
558
|
-
}
|
|
559
|
-
enum $hyoo_crowd_unit_group {
|
|
560
|
-
auth = 0,
|
|
561
|
-
data = 1
|
|
562
|
-
}
|
|
563
|
-
class $hyoo_crowd_unit extends Object {
|
|
564
|
-
readonly land: $mol_int62_string;
|
|
565
|
-
readonly auth: $mol_int62_string;
|
|
566
|
-
readonly head: $mol_int62_string;
|
|
567
|
-
readonly self: $mol_int62_string;
|
|
568
|
-
readonly next: $mol_int62_string;
|
|
569
|
-
readonly prev: $mol_int62_string;
|
|
570
|
-
readonly time: number;
|
|
571
|
-
readonly data: unknown;
|
|
572
|
-
bin: $hyoo_crowd_unit_bin | null;
|
|
573
|
-
constructor(land: $mol_int62_string, auth: $mol_int62_string, head: $mol_int62_string, self: $mol_int62_string, next: $mol_int62_string, prev: $mol_int62_string, time: number, data: unknown, bin: $hyoo_crowd_unit_bin | null);
|
|
574
|
-
kind(): $hyoo_crowd_unit_kind;
|
|
575
|
-
group(): $hyoo_crowd_unit_group;
|
|
576
|
-
level(): $hyoo_crowd_peer_level;
|
|
577
|
-
[Symbol.toPrimitive](): string;
|
|
578
|
-
}
|
|
579
|
-
class $hyoo_crowd_unit_bin extends DataView {
|
|
580
|
-
static from_buffer(buffer: Int16Array): $hyoo_crowd_unit_bin;
|
|
581
|
-
static from_unit(unit: $hyoo_crowd_unit): $hyoo_crowd_unit_bin;
|
|
582
|
-
sign(next?: Uint8Array): Uint8Array;
|
|
583
|
-
size(): number;
|
|
584
|
-
sens(): Uint8Array;
|
|
585
|
-
unit(): $hyoo_crowd_unit;
|
|
586
|
-
}
|
|
587
|
-
function $hyoo_crowd_unit_compare(left: $hyoo_crowd_unit, right: $hyoo_crowd_unit): number;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
590
|
declare namespace $ {
|
|
591
591
|
function $hyoo_crowd_time_now(): number;
|
|
592
592
|
function $hyoo_crowd_time_stamp(time: number): number;
|
|
@@ -609,8 +609,9 @@ declare namespace $ {
|
|
|
609
609
|
tick(peer: $mol_int62_string): number;
|
|
610
610
|
}
|
|
611
611
|
class $hyoo_crowd_clock_bin extends DataView {
|
|
612
|
-
static from(land_id: $mol_int62_string, clocks: readonly [$hyoo_crowd_clock, $hyoo_crowd_clock]): $hyoo_crowd_clock_bin;
|
|
612
|
+
static from(land_id: $mol_int62_string, clocks: readonly [$hyoo_crowd_clock, $hyoo_crowd_clock], count: number): $hyoo_crowd_clock_bin;
|
|
613
613
|
land(): `${string}_${string}`;
|
|
614
|
+
count(): number;
|
|
614
615
|
}
|
|
615
616
|
}
|
|
616
617
|
|
|
@@ -854,6 +855,7 @@ declare namespace $ {
|
|
|
854
855
|
|
|
855
856
|
declare namespace $ {
|
|
856
857
|
class $hyoo_sync_yard<Line> extends $mol_object2 {
|
|
858
|
+
db_unit_persisted: WeakSet<$hyoo_crowd_unit>;
|
|
857
859
|
log_pack(data: any): any;
|
|
858
860
|
peer(): $hyoo_crowd_peer;
|
|
859
861
|
world(): $hyoo_crowd_world;
|