@automerge/subduction 0.7.0-alpha.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/wasm-base64.cjs +1 -1
- package/dist/cjs/web-bindings.cjs +584 -701
- package/dist/cjs/web.cjs +585 -702
- package/dist/esm/wasm-base64.js +1 -1
- package/dist/iife/index.js +580 -695
- package/dist/index.d.ts +269 -283
- package/dist/subduction.wasm +0 -0
- package/dist/wasm_bindgen/bundler/subduction_wasm.d.ts +269 -283
- package/dist/wasm_bindgen/bundler/subduction_wasm.js +1 -1
- package/dist/wasm_bindgen/bundler/subduction_wasm_bg.js +689 -809
- package/dist/wasm_bindgen/bundler/subduction_wasm_bg.wasm +0 -0
- package/dist/wasm_bindgen/bundler/subduction_wasm_bg.wasm.d.ts +83 -93
- package/dist/wasm_bindgen/nodejs/subduction_wasm.cjs +689 -811
- package/dist/wasm_bindgen/nodejs/subduction_wasm.d.ts +269 -283
- package/dist/wasm_bindgen/nodejs/subduction_wasm_bg.wasm +0 -0
- package/dist/wasm_bindgen/nodejs/subduction_wasm_bg.wasm.d.ts +83 -93
- package/dist/wasm_bindgen/web/subduction_wasm.d.ts +352 -376
- package/dist/wasm_bindgen/web/subduction_wasm.js +689 -809
- package/dist/wasm_bindgen/web/subduction_wasm_bg.wasm +0 -0
- package/dist/wasm_bindgen/web/subduction_wasm_bg.wasm.d.ts +83 -93
- package/package.json +1 -1
|
@@ -19,16 +19,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// subduction_wasm/dist/wasm_bindgen/web/subduction_wasm.js
|
|
20
20
|
var subduction_wasm_exports = {};
|
|
21
21
|
__export(subduction_wasm_exports, {
|
|
22
|
-
AuthenticatedConnection: () => AuthenticatedConnection,
|
|
23
22
|
AuthenticatedLongPoll: () => AuthenticatedLongPoll,
|
|
23
|
+
AuthenticatedTransport: () => AuthenticatedTransport,
|
|
24
24
|
AuthenticatedWebSocket: () => AuthenticatedWebSocket,
|
|
25
25
|
BatchSyncRequest: () => BatchSyncRequest,
|
|
26
26
|
BatchSyncResponse: () => BatchSyncResponse,
|
|
27
27
|
BlobMeta: () => BlobMeta,
|
|
28
28
|
CallError: () => CallError,
|
|
29
29
|
CommitWithBlob: () => CommitWithBlob,
|
|
30
|
-
ConnErrorPair: () => ConnErrorPair,
|
|
31
|
-
ConnectionId: () => ConnectionId,
|
|
32
30
|
Depth: () => Depth,
|
|
33
31
|
Digest: () => Digest,
|
|
34
32
|
Fragment: () => Fragment,
|
|
@@ -39,8 +37,7 @@ __export(subduction_wasm_exports, {
|
|
|
39
37
|
LooseCommit: () => LooseCommit,
|
|
40
38
|
MemorySigner: () => MemorySigner,
|
|
41
39
|
MemoryStorage: () => MemoryStorage,
|
|
42
|
-
|
|
43
|
-
MessagePortConnection: () => MessagePortConnection,
|
|
40
|
+
MessagePortTransport: () => MessagePortTransport,
|
|
44
41
|
Nonce: () => Nonce,
|
|
45
42
|
PeerBatchSyncResult: () => PeerBatchSyncResult,
|
|
46
43
|
PeerId: () => PeerId,
|
|
@@ -52,15 +49,16 @@ __export(subduction_wasm_exports, {
|
|
|
52
49
|
SignedFragment: () => SignedFragment,
|
|
53
50
|
SignedLooseCommit: () => SignedLooseCommit,
|
|
54
51
|
Subduction: () => Subduction,
|
|
52
|
+
SubductionHttpLongPoll: () => SubductionHttpLongPoll,
|
|
55
53
|
SubductionLongPoll: () => SubductionLongPoll,
|
|
56
|
-
SubductionLongPollConnection: () => SubductionLongPollConnection,
|
|
57
54
|
SubductionWebSocket: () => SubductionWebSocket,
|
|
55
|
+
SyncMessage: () => SyncMessage,
|
|
58
56
|
SyncStats: () => SyncStats,
|
|
59
57
|
WebCryptoSigner: () => WebCryptoSigner,
|
|
60
58
|
__wbg_set_wasm: () => __wbg_set_wasm,
|
|
61
59
|
default: () => __wbg_init,
|
|
62
60
|
initSync: () => initSync,
|
|
63
|
-
|
|
61
|
+
makeMessagePortTransport: () => makeMessagePortTransport,
|
|
64
62
|
start: () => start
|
|
65
63
|
});
|
|
66
64
|
module.exports = __toCommonJS(subduction_wasm_exports);
|
|
@@ -72,23 +70,76 @@ function tryIntoJsSedimentreeIdsArray(xs) {
|
|
|
72
70
|
|
|
73
71
|
// subduction_wasm/dist/wasm_bindgen/web/subduction_wasm.js
|
|
74
72
|
var import_meta = {};
|
|
75
|
-
var
|
|
73
|
+
var AuthenticatedLongPoll = class _AuthenticatedLongPoll {
|
|
74
|
+
static __wrap(ptr) {
|
|
75
|
+
ptr = ptr >>> 0;
|
|
76
|
+
const obj = Object.create(_AuthenticatedLongPoll.prototype);
|
|
77
|
+
obj.__wbg_ptr = ptr;
|
|
78
|
+
AuthenticatedLongPollFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
__destroy_into_raw() {
|
|
82
|
+
const ptr = this.__wbg_ptr;
|
|
83
|
+
this.__wbg_ptr = 0;
|
|
84
|
+
AuthenticatedLongPollFinalization.unregister(this);
|
|
85
|
+
return ptr;
|
|
86
|
+
}
|
|
87
|
+
free() {
|
|
88
|
+
const ptr = this.__destroy_into_raw();
|
|
89
|
+
wasm.__wbg_authenticatedlongpoll_free(ptr, 0);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The verified peer identity.
|
|
93
|
+
* @returns {PeerId}
|
|
94
|
+
*/
|
|
95
|
+
get peerId() {
|
|
96
|
+
const ret = wasm.authenticatedlongpoll_peerId(this.__wbg_ptr);
|
|
97
|
+
return PeerId.__wrap(ret);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The session ID assigned by the server.
|
|
101
|
+
* @returns {string}
|
|
102
|
+
*/
|
|
103
|
+
get sessionId() {
|
|
104
|
+
let deferred1_0;
|
|
105
|
+
let deferred1_1;
|
|
106
|
+
try {
|
|
107
|
+
const ret = wasm.authenticatedlongpoll_sessionId(this.__wbg_ptr);
|
|
108
|
+
deferred1_0 = ret[0];
|
|
109
|
+
deferred1_1 = ret[1];
|
|
110
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
111
|
+
} finally {
|
|
112
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Convert to a transport-erased [`AuthenticatedTransport`](super::WasmAuthenticatedTransport).
|
|
117
|
+
* @returns {AuthenticatedTransport}
|
|
118
|
+
*/
|
|
119
|
+
toTransport() {
|
|
120
|
+
const ptr = this.__destroy_into_raw();
|
|
121
|
+
const ret = wasm.authenticatedlongpoll_toTransport(ptr);
|
|
122
|
+
return AuthenticatedTransport.__wrap(ret);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
if (Symbol.dispose) AuthenticatedLongPoll.prototype[Symbol.dispose] = AuthenticatedLongPoll.prototype.free;
|
|
126
|
+
var AuthenticatedTransport = class _AuthenticatedTransport {
|
|
76
127
|
static __wrap(ptr) {
|
|
77
128
|
ptr = ptr >>> 0;
|
|
78
|
-
const obj = Object.create(
|
|
129
|
+
const obj = Object.create(_AuthenticatedTransport.prototype);
|
|
79
130
|
obj.__wbg_ptr = ptr;
|
|
80
|
-
|
|
131
|
+
AuthenticatedTransportFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
81
132
|
return obj;
|
|
82
133
|
}
|
|
83
134
|
__destroy_into_raw() {
|
|
84
135
|
const ptr = this.__wbg_ptr;
|
|
85
136
|
this.__wbg_ptr = 0;
|
|
86
|
-
|
|
137
|
+
AuthenticatedTransportFinalization.unregister(this);
|
|
87
138
|
return ptr;
|
|
88
139
|
}
|
|
89
140
|
free() {
|
|
90
141
|
const ptr = this.__destroy_into_raw();
|
|
91
|
-
wasm.
|
|
142
|
+
wasm.__wbg_authenticatedtransport_free(ptr, 0);
|
|
92
143
|
}
|
|
93
144
|
/**
|
|
94
145
|
* Accept an incoming handshake over a custom transport (responder side).
|
|
@@ -98,20 +149,20 @@ var AuthenticatedConnection = class _AuthenticatedConnection {
|
|
|
98
149
|
*
|
|
99
150
|
* # Arguments
|
|
100
151
|
*
|
|
101
|
-
* * `
|
|
152
|
+
* * `transport` - A `Transport` implementing `sendBytes`/`recvBytes`/`disconnect`
|
|
102
153
|
* * `signer` - The responder's signer for authentication
|
|
103
154
|
* * `max_drift_seconds` - Maximum acceptable clock drift in seconds (default: 600)
|
|
104
155
|
*
|
|
105
156
|
* # Errors
|
|
106
157
|
*
|
|
107
158
|
* Returns a [`HandshakeError`](WasmHandshakeError) if the handshake fails.
|
|
108
|
-
* @param {
|
|
159
|
+
* @param {Transport} transport
|
|
109
160
|
* @param {any} signer
|
|
110
161
|
* @param {number | null} [max_drift_seconds]
|
|
111
|
-
* @returns {Promise<
|
|
162
|
+
* @returns {Promise<AuthenticatedTransport>}
|
|
112
163
|
*/
|
|
113
|
-
static accept(
|
|
114
|
-
const ret = wasm.
|
|
164
|
+
static accept(transport, signer, max_drift_seconds) {
|
|
165
|
+
const ret = wasm.authenticatedtransport_accept(transport, signer, isLikeNone(max_drift_seconds) ? 4294967297 : max_drift_seconds >>> 0);
|
|
115
166
|
return ret;
|
|
116
167
|
}
|
|
117
168
|
/**
|
|
@@ -119,91 +170,68 @@ var AuthenticatedConnection = class _AuthenticatedConnection {
|
|
|
119
170
|
* @returns {PeerId}
|
|
120
171
|
*/
|
|
121
172
|
get peerId() {
|
|
122
|
-
const ret = wasm.
|
|
173
|
+
const ret = wasm.authenticatedtransport_peerId(this.__wbg_ptr);
|
|
123
174
|
return PeerId.__wrap(ret);
|
|
124
175
|
}
|
|
125
176
|
/**
|
|
126
177
|
* Run the Subduction handshake over a custom transport, producing an
|
|
127
|
-
* authenticated
|
|
178
|
+
* authenticated transport.
|
|
128
179
|
*
|
|
129
|
-
* The `
|
|
130
|
-
* (
|
|
131
|
-
*
|
|
180
|
+
* The `transport` object must implement the `Transport` interface
|
|
181
|
+
* (`sendBytes`/`recvBytes`/`disconnect`).
|
|
182
|
+
* The same object is used for both the handshake phase and post-handshake
|
|
183
|
+
* communication.
|
|
132
184
|
*
|
|
133
185
|
* # Arguments
|
|
134
186
|
*
|
|
135
|
-
* * `
|
|
187
|
+
* * `transport` - A `Transport` implementing `sendBytes`/`recvBytes`/`disconnect`
|
|
136
188
|
* * `signer` - The client's signer for authentication
|
|
137
189
|
* * `expected_peer_id` - The expected server peer ID (verified during handshake)
|
|
138
190
|
*
|
|
139
191
|
* # Errors
|
|
140
192
|
*
|
|
141
193
|
* Returns a [`HandshakeError`](WasmHandshakeError) if the handshake fails.
|
|
142
|
-
* @param {
|
|
194
|
+
* @param {Transport} transport
|
|
143
195
|
* @param {any} signer
|
|
144
196
|
* @param {PeerId} expected_peer_id
|
|
145
|
-
* @returns {Promise<
|
|
197
|
+
* @returns {Promise<AuthenticatedTransport>}
|
|
146
198
|
*/
|
|
147
|
-
static setup(
|
|
199
|
+
static setup(transport, signer, expected_peer_id) {
|
|
148
200
|
_assertClass(expected_peer_id, PeerId);
|
|
149
|
-
const ret = wasm.
|
|
201
|
+
const ret = wasm.authenticatedtransport_setup(transport, signer, expected_peer_id.__wbg_ptr);
|
|
150
202
|
return ret;
|
|
151
203
|
}
|
|
152
|
-
};
|
|
153
|
-
if (Symbol.dispose) AuthenticatedConnection.prototype[Symbol.dispose] = AuthenticatedConnection.prototype.free;
|
|
154
|
-
var AuthenticatedLongPoll = class _AuthenticatedLongPoll {
|
|
155
|
-
static __wrap(ptr) {
|
|
156
|
-
ptr = ptr >>> 0;
|
|
157
|
-
const obj = Object.create(_AuthenticatedLongPoll.prototype);
|
|
158
|
-
obj.__wbg_ptr = ptr;
|
|
159
|
-
AuthenticatedLongPollFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
160
|
-
return obj;
|
|
161
|
-
}
|
|
162
|
-
__destroy_into_raw() {
|
|
163
|
-
const ptr = this.__wbg_ptr;
|
|
164
|
-
this.__wbg_ptr = 0;
|
|
165
|
-
AuthenticatedLongPollFinalization.unregister(this);
|
|
166
|
-
return ptr;
|
|
167
|
-
}
|
|
168
|
-
free() {
|
|
169
|
-
const ptr = this.__destroy_into_raw();
|
|
170
|
-
wasm.__wbg_authenticatedlongpoll_free(ptr, 0);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* The verified peer identity.
|
|
174
|
-
* @returns {PeerId}
|
|
175
|
-
*/
|
|
176
|
-
get peerId() {
|
|
177
|
-
const ret = wasm.authenticatedlongpoll_peerId(this.__wbg_ptr);
|
|
178
|
-
return PeerId.__wrap(ret);
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* The session ID assigned by the server.
|
|
182
|
-
* @returns {string}
|
|
183
|
-
*/
|
|
184
|
-
get sessionId() {
|
|
185
|
-
let deferred1_0;
|
|
186
|
-
let deferred1_1;
|
|
187
|
-
try {
|
|
188
|
-
const ret = wasm.authenticatedlongpoll_sessionId(this.__wbg_ptr);
|
|
189
|
-
deferred1_0 = ret[0];
|
|
190
|
-
deferred1_1 = ret[1];
|
|
191
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
192
|
-
} finally {
|
|
193
|
-
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
204
|
/**
|
|
197
|
-
*
|
|
198
|
-
*
|
|
205
|
+
* Run the Subduction handshake over a custom transport using discovery
|
|
206
|
+
* mode, producing an authenticated transport.
|
|
207
|
+
*
|
|
208
|
+
* Unlike [`setup`](Self::setup) which requires a known peer ID,
|
|
209
|
+
* this method discovers the peer's identity during the handshake
|
|
210
|
+
* using a shared service name.
|
|
211
|
+
*
|
|
212
|
+
* # Arguments
|
|
213
|
+
*
|
|
214
|
+
* * `transport` - A `Transport` implementing `sendBytes`/`recvBytes`/`disconnect`
|
|
215
|
+
* * `signer` - The client's signer for authentication
|
|
216
|
+
* * `service_name` - Shared service name for discovery.
|
|
217
|
+
* Defaults to [`DEFAULT_LOCAL_SERVICE_NAME`] (`"subduction:local"`) if omitted.
|
|
218
|
+
*
|
|
219
|
+
* # Errors
|
|
220
|
+
*
|
|
221
|
+
* Returns a [`HandshakeError`](WasmHandshakeError) if the handshake fails.
|
|
222
|
+
* @param {Transport} transport
|
|
223
|
+
* @param {any} signer
|
|
224
|
+
* @param {string | null} [service_name]
|
|
225
|
+
* @returns {Promise<AuthenticatedTransport>}
|
|
199
226
|
*/
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
227
|
+
static setupDiscover(transport, signer, service_name) {
|
|
228
|
+
var ptr0 = isLikeNone(service_name) ? 0 : passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
229
|
+
var len0 = WASM_VECTOR_LEN;
|
|
230
|
+
const ret = wasm.authenticatedtransport_setupDiscover(transport, signer, ptr0, len0);
|
|
231
|
+
return ret;
|
|
204
232
|
}
|
|
205
233
|
};
|
|
206
|
-
if (Symbol.dispose)
|
|
234
|
+
if (Symbol.dispose) AuthenticatedTransport.prototype[Symbol.dispose] = AuthenticatedTransport.prototype.free;
|
|
207
235
|
var AuthenticatedWebSocket = class _AuthenticatedWebSocket {
|
|
208
236
|
static __wrap(ptr) {
|
|
209
237
|
ptr = ptr >>> 0;
|
|
@@ -231,13 +259,13 @@ var AuthenticatedWebSocket = class _AuthenticatedWebSocket {
|
|
|
231
259
|
return PeerId.__wrap(ret);
|
|
232
260
|
}
|
|
233
261
|
/**
|
|
234
|
-
* Convert to a transport-erased [`
|
|
235
|
-
* @returns {
|
|
262
|
+
* Convert to a transport-erased [`AuthenticatedTransport`](super::WasmAuthenticatedTransport).
|
|
263
|
+
* @returns {AuthenticatedTransport}
|
|
236
264
|
*/
|
|
237
|
-
|
|
265
|
+
toTransport() {
|
|
238
266
|
const ptr = this.__destroy_into_raw();
|
|
239
|
-
const ret = wasm.
|
|
240
|
-
return
|
|
267
|
+
const ret = wasm.authenticatedwebsocket_toTransport(ptr);
|
|
268
|
+
return AuthenticatedTransport.__wrap(ret);
|
|
241
269
|
}
|
|
242
270
|
};
|
|
243
271
|
if (Symbol.dispose) AuthenticatedWebSocket.prototype[Symbol.dispose] = AuthenticatedWebSocket.prototype.free;
|
|
@@ -461,55 +489,6 @@ var CommitWithBlob = class _CommitWithBlob {
|
|
|
461
489
|
}
|
|
462
490
|
};
|
|
463
491
|
if (Symbol.dispose) CommitWithBlob.prototype[Symbol.dispose] = CommitWithBlob.prototype.free;
|
|
464
|
-
var ConnErrorPair = class _ConnErrorPair {
|
|
465
|
-
static __wrap(ptr) {
|
|
466
|
-
ptr = ptr >>> 0;
|
|
467
|
-
const obj = Object.create(_ConnErrorPair.prototype);
|
|
468
|
-
obj.__wbg_ptr = ptr;
|
|
469
|
-
ConnErrorPairFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
470
|
-
return obj;
|
|
471
|
-
}
|
|
472
|
-
__destroy_into_raw() {
|
|
473
|
-
const ptr = this.__wbg_ptr;
|
|
474
|
-
this.__wbg_ptr = 0;
|
|
475
|
-
ConnErrorPairFinalization.unregister(this);
|
|
476
|
-
return ptr;
|
|
477
|
-
}
|
|
478
|
-
free() {
|
|
479
|
-
const ptr = this.__destroy_into_raw();
|
|
480
|
-
wasm.__wbg_connerrorpair_free(ptr, 0);
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* The connection that encountered the error.
|
|
484
|
-
* @returns {Connection}
|
|
485
|
-
*/
|
|
486
|
-
get conn() {
|
|
487
|
-
const ret = wasm.connerrorpair_conn(this.__wbg_ptr);
|
|
488
|
-
return ret;
|
|
489
|
-
}
|
|
490
|
-
/**
|
|
491
|
-
* The error that occurred during the call.
|
|
492
|
-
* @returns {Error}
|
|
493
|
-
*/
|
|
494
|
-
get err() {
|
|
495
|
-
const ret = wasm.connerrorpair_err(this.__wbg_ptr);
|
|
496
|
-
return ret;
|
|
497
|
-
}
|
|
498
|
-
};
|
|
499
|
-
if (Symbol.dispose) ConnErrorPair.prototype[Symbol.dispose] = ConnErrorPair.prototype.free;
|
|
500
|
-
var ConnectionId = class {
|
|
501
|
-
__destroy_into_raw() {
|
|
502
|
-
const ptr = this.__wbg_ptr;
|
|
503
|
-
this.__wbg_ptr = 0;
|
|
504
|
-
ConnectionIdFinalization.unregister(this);
|
|
505
|
-
return ptr;
|
|
506
|
-
}
|
|
507
|
-
free() {
|
|
508
|
-
const ptr = this.__destroy_into_raw();
|
|
509
|
-
wasm.__wbg_connectionid_free(ptr, 0);
|
|
510
|
-
}
|
|
511
|
-
};
|
|
512
|
-
if (Symbol.dispose) ConnectionId.prototype[Symbol.dispose] = ConnectionId.prototype.free;
|
|
513
492
|
var Depth = class _Depth {
|
|
514
493
|
static __wrap(ptr) {
|
|
515
494
|
ptr = ptr >>> 0;
|
|
@@ -1298,236 +1277,30 @@ var MemoryStorage = class {
|
|
|
1298
1277
|
}
|
|
1299
1278
|
};
|
|
1300
1279
|
if (Symbol.dispose) MemoryStorage.prototype[Symbol.dispose] = MemoryStorage.prototype.free;
|
|
1301
|
-
var
|
|
1280
|
+
var MessagePortTransport = class _MessagePortTransport {
|
|
1302
1281
|
static __wrap(ptr) {
|
|
1303
1282
|
ptr = ptr >>> 0;
|
|
1304
|
-
const obj = Object.create(
|
|
1283
|
+
const obj = Object.create(_MessagePortTransport.prototype);
|
|
1305
1284
|
obj.__wbg_ptr = ptr;
|
|
1306
|
-
|
|
1285
|
+
MessagePortTransportFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1307
1286
|
return obj;
|
|
1308
1287
|
}
|
|
1309
1288
|
__destroy_into_raw() {
|
|
1310
1289
|
const ptr = this.__wbg_ptr;
|
|
1311
1290
|
this.__wbg_ptr = 0;
|
|
1312
|
-
|
|
1291
|
+
MessagePortTransportFinalization.unregister(this);
|
|
1313
1292
|
return ptr;
|
|
1314
1293
|
}
|
|
1315
1294
|
free() {
|
|
1316
1295
|
const ptr = this.__destroy_into_raw();
|
|
1317
|
-
wasm.
|
|
1318
|
-
}
|
|
1319
|
-
/**
|
|
1320
|
-
* Upcasts; to the JS-import type for [`WasmMessage`].
|
|
1321
|
-
* @returns {Message}
|
|
1322
|
-
*/
|
|
1323
|
-
__wasm_refgen_toWasmMessage() {
|
|
1324
|
-
const ret = wasm.message___wasm_refgen_toWasmMessage(this.__wbg_ptr);
|
|
1325
|
-
return _Message.__wrap(ret);
|
|
1326
|
-
}
|
|
1327
|
-
/**
|
|
1328
|
-
* Create a [`Message::BatchSyncRequest`] message.
|
|
1329
|
-
* @param {BatchSyncRequest} request
|
|
1330
|
-
* @returns {Message}
|
|
1331
|
-
*/
|
|
1332
|
-
static batchSyncRequest(request) {
|
|
1333
|
-
_assertClass(request, BatchSyncRequest);
|
|
1334
|
-
const ret = wasm.message_batchSyncRequest(request.__wbg_ptr);
|
|
1335
|
-
return _Message.__wrap(ret);
|
|
1336
|
-
}
|
|
1337
|
-
/**
|
|
1338
|
-
* Create a [`Message::BatchSyncResponse`] message.
|
|
1339
|
-
* @param {BatchSyncResponse} response
|
|
1340
|
-
* @returns {Message}
|
|
1341
|
-
*/
|
|
1342
|
-
static batchSyncResponse(response) {
|
|
1343
|
-
_assertClass(response, BatchSyncResponse);
|
|
1344
|
-
const ret = wasm.message_batchSyncResponse(response.__wbg_ptr);
|
|
1345
|
-
return _Message.__wrap(ret);
|
|
1346
|
-
}
|
|
1347
|
-
/**
|
|
1348
|
-
* The [`Blob`] for commit or fragment messages, if applicable.
|
|
1349
|
-
* @returns {Uint8Array | undefined}
|
|
1350
|
-
*/
|
|
1351
|
-
get blob() {
|
|
1352
|
-
const ret = wasm.message_blob(this.__wbg_ptr);
|
|
1353
|
-
return ret;
|
|
1354
|
-
}
|
|
1355
|
-
/**
|
|
1356
|
-
* The [`Blob`]s for a [`Message::BlobsResponse`], if applicable.
|
|
1357
|
-
* @returns {Uint8Array[] | undefined}
|
|
1358
|
-
*/
|
|
1359
|
-
get blobs() {
|
|
1360
|
-
const ret = wasm.message_blobs(this.__wbg_ptr);
|
|
1361
|
-
let v1;
|
|
1362
|
-
if (ret[0] !== 0) {
|
|
1363
|
-
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1364
|
-
wasm.__wbindgen_export5(ret[0], ret[1] * 4, 4);
|
|
1365
|
-
}
|
|
1366
|
-
return v1;
|
|
1367
|
-
}
|
|
1368
|
-
/**
|
|
1369
|
-
* Create a [`Message::BlobsRequest`] message.
|
|
1370
|
-
* @param {SedimentreeId} id
|
|
1371
|
-
* @param {Digest[]} digests
|
|
1372
|
-
* @returns {Message}
|
|
1373
|
-
*/
|
|
1374
|
-
static blobsRequest(id, digests) {
|
|
1375
|
-
_assertClass(id, SedimentreeId);
|
|
1376
|
-
const ptr0 = passArrayJsValueToWasm0(digests, wasm.__wbindgen_export);
|
|
1377
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1378
|
-
const ret = wasm.message_blobsRequest(id.__wbg_ptr, ptr0, len0);
|
|
1379
|
-
return _Message.__wrap(ret);
|
|
1380
|
-
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Create a [`Message::BlobsResponse`] message.
|
|
1383
|
-
* @param {SedimentreeId} id
|
|
1384
|
-
* @param {Uint8Array[]} blobs
|
|
1385
|
-
* @returns {Message}
|
|
1386
|
-
*/
|
|
1387
|
-
static blobsResponse(id, blobs) {
|
|
1388
|
-
_assertClass(id, SedimentreeId);
|
|
1389
|
-
const ptr0 = passArrayJsValueToWasm0(blobs, wasm.__wbindgen_export);
|
|
1390
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1391
|
-
const ret = wasm.message_blobsResponse(id.__wbg_ptr, ptr0, len0);
|
|
1392
|
-
return _Message.__wrap(ret);
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* The [`LooseCommit`] for a [`Message::LooseCommit`], if applicable.
|
|
1396
|
-
*
|
|
1397
|
-
* Decodes the signed payload to extract the underlying commit.
|
|
1398
|
-
* @returns {LooseCommit | undefined}
|
|
1399
|
-
*/
|
|
1400
|
-
get commit() {
|
|
1401
|
-
const ret = wasm.message_commit(this.__wbg_ptr);
|
|
1402
|
-
return ret === 0 ? void 0 : LooseCommit.__wrap(ret);
|
|
1403
|
-
}
|
|
1404
|
-
/**
|
|
1405
|
-
* The requested [`Digest`]s for a [`Message::BlobsRequest`], if applicable.
|
|
1406
|
-
* @returns {Digest[] | undefined}
|
|
1407
|
-
*/
|
|
1408
|
-
get digests() {
|
|
1409
|
-
const ret = wasm.message_digests(this.__wbg_ptr);
|
|
1410
|
-
let v1;
|
|
1411
|
-
if (ret[0] !== 0) {
|
|
1412
|
-
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1413
|
-
wasm.__wbindgen_export5(ret[0], ret[1] * 4, 4);
|
|
1414
|
-
}
|
|
1415
|
-
return v1;
|
|
1416
|
-
}
|
|
1417
|
-
/**
|
|
1418
|
-
* The [`Fragment`] for a [`Message::Fragment`], if applicable.
|
|
1419
|
-
*
|
|
1420
|
-
* Decodes the signed payload to extract the underlying fragment.
|
|
1421
|
-
* @returns {Fragment | undefined}
|
|
1422
|
-
*/
|
|
1423
|
-
get fragment() {
|
|
1424
|
-
const ret = wasm.message_fragment(this.__wbg_ptr);
|
|
1425
|
-
return ret === 0 ? void 0 : Fragment.__wrap(ret);
|
|
1426
|
-
}
|
|
1427
|
-
/**
|
|
1428
|
-
* Deserialize a message from bytes.
|
|
1429
|
-
*
|
|
1430
|
-
* # Errors
|
|
1431
|
-
*
|
|
1432
|
-
* Returns a [`JsMessageDeserializationError`] if deserialization fails.
|
|
1433
|
-
* @param {Uint8Array} bytes
|
|
1434
|
-
* @returns {Message}
|
|
1435
|
-
*/
|
|
1436
|
-
static fromBytes(bytes) {
|
|
1437
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
1438
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1439
|
-
const ret = wasm.message_fromBytes(ptr0, len0);
|
|
1440
|
-
if (ret[2]) {
|
|
1441
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1442
|
-
}
|
|
1443
|
-
return _Message.__wrap(ret[0]);
|
|
1444
|
-
}
|
|
1445
|
-
/**
|
|
1446
|
-
* The [`BatchSyncRequest`] for a [`Message::BatchSyncRequest`], if applicable.
|
|
1447
|
-
* @returns {BatchSyncRequest | undefined}
|
|
1448
|
-
*/
|
|
1449
|
-
get request() {
|
|
1450
|
-
const ret = wasm.message_request(this.__wbg_ptr);
|
|
1451
|
-
return ret === 0 ? void 0 : BatchSyncRequest.__wrap(ret);
|
|
1452
|
-
}
|
|
1453
|
-
/**
|
|
1454
|
-
* The [`BatchSyncResponse`] for a [`Message::BatchSyncResponse`], if applicable.
|
|
1455
|
-
* @returns {BatchSyncResponse | undefined}
|
|
1456
|
-
*/
|
|
1457
|
-
get response() {
|
|
1458
|
-
const ret = wasm.message_response(this.__wbg_ptr);
|
|
1459
|
-
return ret === 0 ? void 0 : BatchSyncResponse.__wrap(ret);
|
|
1460
|
-
}
|
|
1461
|
-
/**
|
|
1462
|
-
* The [`SedimentreeId`] associated with this message, if any.
|
|
1463
|
-
* @returns {SedimentreeId | undefined}
|
|
1464
|
-
*/
|
|
1465
|
-
get sedimentreeId() {
|
|
1466
|
-
const ret = wasm.message_sedimentreeId(this.__wbg_ptr);
|
|
1467
|
-
return ret === 0 ? void 0 : SedimentreeId.__wrap(ret);
|
|
1468
|
-
}
|
|
1469
|
-
/**
|
|
1470
|
-
* Serialize the message to bytes.
|
|
1471
|
-
* @returns {Uint8Array}
|
|
1472
|
-
*/
|
|
1473
|
-
toBytes() {
|
|
1474
|
-
const ret = wasm.message_toBytes(this.__wbg_ptr);
|
|
1475
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1476
|
-
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
1477
|
-
return v1;
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
* The message variant name.
|
|
1481
|
-
* @returns {string}
|
|
1482
|
-
*/
|
|
1483
|
-
get type() {
|
|
1484
|
-
let deferred1_0;
|
|
1485
|
-
let deferred1_1;
|
|
1486
|
-
try {
|
|
1487
|
-
const ret = wasm.message_type(this.__wbg_ptr);
|
|
1488
|
-
deferred1_0 = ret[0];
|
|
1489
|
-
deferred1_1 = ret[1];
|
|
1490
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1491
|
-
} finally {
|
|
1492
|
-
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
};
|
|
1496
|
-
if (Symbol.dispose) Message.prototype[Symbol.dispose] = Message.prototype.free;
|
|
1497
|
-
var MessagePortConnection = class _MessagePortConnection {
|
|
1498
|
-
static __wrap(ptr) {
|
|
1499
|
-
ptr = ptr >>> 0;
|
|
1500
|
-
const obj = Object.create(_MessagePortConnection.prototype);
|
|
1501
|
-
obj.__wbg_ptr = ptr;
|
|
1502
|
-
MessagePortConnectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1503
|
-
return obj;
|
|
1504
|
-
}
|
|
1505
|
-
__destroy_into_raw() {
|
|
1506
|
-
const ptr = this.__wbg_ptr;
|
|
1507
|
-
this.__wbg_ptr = 0;
|
|
1508
|
-
MessagePortConnectionFinalization.unregister(this);
|
|
1509
|
-
return ptr;
|
|
1510
|
-
}
|
|
1511
|
-
free() {
|
|
1512
|
-
const ptr = this.__destroy_into_raw();
|
|
1513
|
-
wasm.__wbg_messageportconnection_free(ptr, 0);
|
|
1514
|
-
}
|
|
1515
|
-
/**
|
|
1516
|
-
* Not supported on `MessagePort` connections.
|
|
1517
|
-
* @param {any} _request
|
|
1518
|
-
* @param {number | null} [_timeout_ms]
|
|
1519
|
-
* @returns {Promise<any>}
|
|
1520
|
-
*/
|
|
1521
|
-
call(_request, _timeout_ms) {
|
|
1522
|
-
const ret = wasm.messageportconnection_call(this.__wbg_ptr, _request, !isLikeNone(_timeout_ms), isLikeNone(_timeout_ms) ? 0 : _timeout_ms);
|
|
1523
|
-
return ret;
|
|
1296
|
+
wasm.__wbg_messageporttransport_free(ptr, 0);
|
|
1524
1297
|
}
|
|
1525
1298
|
/**
|
|
1526
1299
|
* Disconnect (close the port).
|
|
1527
1300
|
* @returns {Promise<any>}
|
|
1528
1301
|
*/
|
|
1529
1302
|
disconnect() {
|
|
1530
|
-
const ret = wasm.
|
|
1303
|
+
const ret = wasm.messageporttransport_disconnect(this.__wbg_ptr);
|
|
1531
1304
|
return ret;
|
|
1532
1305
|
}
|
|
1533
1306
|
/**
|
|
@@ -1535,42 +1308,17 @@ var MessagePortConnection = class _MessagePortConnection {
|
|
|
1535
1308
|
* @param {any} port
|
|
1536
1309
|
*/
|
|
1537
1310
|
constructor(port) {
|
|
1538
|
-
const ret = wasm.
|
|
1311
|
+
const ret = wasm.messageporttransport_new(port);
|
|
1539
1312
|
this.__wbg_ptr = ret >>> 0;
|
|
1540
|
-
|
|
1313
|
+
MessagePortTransportFinalization.register(this, this.__wbg_ptr, this);
|
|
1541
1314
|
return this;
|
|
1542
1315
|
}
|
|
1543
|
-
/**
|
|
1544
|
-
* Not supported on `MessagePort` connections.
|
|
1545
|
-
* @returns {Promise<any>}
|
|
1546
|
-
*/
|
|
1547
|
-
nextRequestId() {
|
|
1548
|
-
const ret = wasm.messageportconnection_nextRequestId(this.__wbg_ptr);
|
|
1549
|
-
return ret;
|
|
1550
|
-
}
|
|
1551
|
-
/**
|
|
1552
|
-
* Receive the next message.
|
|
1553
|
-
* @returns {Promise<any>}
|
|
1554
|
-
*/
|
|
1555
|
-
recv() {
|
|
1556
|
-
const ret = wasm.messageportconnection_recv(this.__wbg_ptr);
|
|
1557
|
-
return ret;
|
|
1558
|
-
}
|
|
1559
1316
|
/**
|
|
1560
1317
|
* Receive raw bytes (for the handshake phase).
|
|
1561
1318
|
* @returns {Promise<any>}
|
|
1562
1319
|
*/
|
|
1563
1320
|
recvBytes() {
|
|
1564
|
-
const ret = wasm.
|
|
1565
|
-
return ret;
|
|
1566
|
-
}
|
|
1567
|
-
/**
|
|
1568
|
-
* Send a structured message (post-handshake).
|
|
1569
|
-
* @param {any} message
|
|
1570
|
-
* @returns {Promise<any>}
|
|
1571
|
-
*/
|
|
1572
|
-
send(message) {
|
|
1573
|
-
const ret = wasm.messageportconnection_send(this.__wbg_ptr, message);
|
|
1321
|
+
const ret = wasm.messageporttransport_recvBytes(this.__wbg_ptr);
|
|
1574
1322
|
return ret;
|
|
1575
1323
|
}
|
|
1576
1324
|
/**
|
|
@@ -1581,11 +1329,11 @@ var MessagePortConnection = class _MessagePortConnection {
|
|
|
1581
1329
|
sendBytes(bytes) {
|
|
1582
1330
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
1583
1331
|
const len0 = WASM_VECTOR_LEN;
|
|
1584
|
-
const ret = wasm.
|
|
1332
|
+
const ret = wasm.messageporttransport_sendBytes(this.__wbg_ptr, ptr0, len0);
|
|
1585
1333
|
return ret;
|
|
1586
1334
|
}
|
|
1587
1335
|
};
|
|
1588
|
-
if (Symbol.dispose)
|
|
1336
|
+
if (Symbol.dispose) MessagePortTransport.prototype[Symbol.dispose] = MessagePortTransport.prototype.free;
|
|
1589
1337
|
var Nonce = class _Nonce {
|
|
1590
1338
|
static __wrap(ptr) {
|
|
1591
1339
|
ptr = ptr >>> 0;
|
|
@@ -1665,16 +1413,6 @@ var PeerBatchSyncResult = class _PeerBatchSyncResult {
|
|
|
1665
1413
|
const ptr = this.__destroy_into_raw();
|
|
1666
1414
|
wasm.__wbg_peerbatchsyncresult_free(ptr, 0);
|
|
1667
1415
|
}
|
|
1668
|
-
/**
|
|
1669
|
-
* List of connection errors that occurred during the batch sync.
|
|
1670
|
-
* @returns {ConnErrorPair[]}
|
|
1671
|
-
*/
|
|
1672
|
-
get connErrors() {
|
|
1673
|
-
const ret = wasm.peerbatchsyncresult_connErrors(this.__wbg_ptr);
|
|
1674
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1675
|
-
wasm.__wbindgen_export5(ret[0], ret[1] * 4, 4);
|
|
1676
|
-
return v1;
|
|
1677
|
-
}
|
|
1678
1416
|
/**
|
|
1679
1417
|
* Statistics about the sync operation.
|
|
1680
1418
|
* @returns {SyncStats}
|
|
@@ -1691,6 +1429,16 @@ var PeerBatchSyncResult = class _PeerBatchSyncResult {
|
|
|
1691
1429
|
const ret = wasm.peerbatchsyncresult_success(this.__wbg_ptr);
|
|
1692
1430
|
return ret !== 0;
|
|
1693
1431
|
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Errors that occurred during the batch sync.
|
|
1434
|
+
* @returns {Error[]}
|
|
1435
|
+
*/
|
|
1436
|
+
get transportErrors() {
|
|
1437
|
+
const ret = wasm.peerbatchsyncresult_transportErrors(this.__wbg_ptr);
|
|
1438
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1439
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 4, 4);
|
|
1440
|
+
return v1;
|
|
1441
|
+
}
|
|
1694
1442
|
};
|
|
1695
1443
|
if (Symbol.dispose) PeerBatchSyncResult.prototype[Symbol.dispose] = PeerBatchSyncResult.prototype.free;
|
|
1696
1444
|
var PeerId = class _PeerId {
|
|
@@ -2156,6 +1904,30 @@ var Subduction = class _Subduction {
|
|
|
2156
1904
|
const ptr = this.__destroy_into_raw();
|
|
2157
1905
|
wasm.__wbg_subduction_free(ptr, 0);
|
|
2158
1906
|
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Accept a connection from a peer over any [`Transport`](JsTransport).
|
|
1909
|
+
*
|
|
1910
|
+
* Performs the responder side of the handshake, then adds the authenticated
|
|
1911
|
+
* connection. This is the counterpart to [`connectTransport`](Self::connect_transport).
|
|
1912
|
+
*
|
|
1913
|
+
* # Arguments
|
|
1914
|
+
*
|
|
1915
|
+
* * `transport` - Any JS object with `sendBytes`/`recvBytes`/`disconnect`
|
|
1916
|
+
* * `service_name` - Shared service name for discovery
|
|
1917
|
+
*
|
|
1918
|
+
* # Errors
|
|
1919
|
+
*
|
|
1920
|
+
* Returns an error if the handshake or connection fails.
|
|
1921
|
+
* @param {Transport} transport
|
|
1922
|
+
* @param {string} service_name
|
|
1923
|
+
* @returns {Promise<PeerId>}
|
|
1924
|
+
*/
|
|
1925
|
+
acceptTransport(transport, service_name) {
|
|
1926
|
+
const ptr0 = passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1927
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1928
|
+
const ret = wasm.subduction_acceptTransport(this.__wbg_ptr, transport, ptr0, len0);
|
|
1929
|
+
return ret;
|
|
1930
|
+
}
|
|
2159
1931
|
/**
|
|
2160
1932
|
* Add a commit with its associated blob to the storage.
|
|
2161
1933
|
*
|
|
@@ -2178,15 +1950,15 @@ var Subduction = class _Subduction {
|
|
|
2178
1950
|
return ret;
|
|
2179
1951
|
}
|
|
2180
1952
|
/**
|
|
2181
|
-
* Onboard an authenticated
|
|
1953
|
+
* Onboard an authenticated transport: add it and sync all sedimentrees.
|
|
2182
1954
|
*
|
|
2183
|
-
* Accepts an [`
|
|
2184
|
-
* obtained via [`
|
|
2185
|
-
* [`AuthenticatedWebSocket.
|
|
1955
|
+
* Accepts an [`AuthenticatedTransport`](WasmAuthenticatedTransport),
|
|
1956
|
+
* obtained via [`AuthenticatedTransport.setup`](WasmAuthenticatedTransport::setup),
|
|
1957
|
+
* [`AuthenticatedWebSocket.toTransport`], or [`AuthenticatedLongPoll.toTransport`].
|
|
2186
1958
|
*
|
|
2187
1959
|
* Returns `true` if this is a new peer, `false` if already connected.
|
|
2188
1960
|
*
|
|
2189
|
-
* Add an authenticated
|
|
1961
|
+
* Add an authenticated transport to tracking.
|
|
2190
1962
|
*
|
|
2191
1963
|
* This does not perform any synchronization. To sync after adding,
|
|
2192
1964
|
* call [`fullSyncWithPeer`](Self::full_sync_with_peer).
|
|
@@ -2196,12 +1968,12 @@ var Subduction = class _Subduction {
|
|
|
2196
1968
|
* # Errors
|
|
2197
1969
|
*
|
|
2198
1970
|
* Returns an error if the connection is rejected by the policy.
|
|
2199
|
-
* @param {
|
|
1971
|
+
* @param {AuthenticatedTransport} transport
|
|
2200
1972
|
* @returns {Promise<boolean>}
|
|
2201
1973
|
*/
|
|
2202
|
-
addConnection(
|
|
2203
|
-
_assertClass(
|
|
2204
|
-
const ret = wasm.subduction_addConnection(this.__wbg_ptr,
|
|
1974
|
+
addConnection(transport) {
|
|
1975
|
+
_assertClass(transport, AuthenticatedTransport);
|
|
1976
|
+
const ret = wasm.subduction_addConnection(this.__wbg_ptr, transport.__wbg_ptr);
|
|
2205
1977
|
return ret;
|
|
2206
1978
|
}
|
|
2207
1979
|
/**
|
|
@@ -2261,19 +2033,17 @@ var Subduction = class _Subduction {
|
|
|
2261
2033
|
*
|
|
2262
2034
|
* * `address` - The WebSocket URL to connect to
|
|
2263
2035
|
* * `expected_peer_id` - The expected server peer ID (verified during handshake)
|
|
2264
|
-
* * `timeout_milliseconds` - Request timeout in milliseconds
|
|
2265
2036
|
*
|
|
2266
2037
|
* # Errors
|
|
2267
2038
|
*
|
|
2268
2039
|
* Returns an error if connection, handshake, or adding the connection fails.
|
|
2269
2040
|
* @param {URL} address
|
|
2270
2041
|
* @param {PeerId} expected_peer_id
|
|
2271
|
-
* @param {number} timeout_milliseconds
|
|
2272
2042
|
* @returns {Promise<PeerId>}
|
|
2273
2043
|
*/
|
|
2274
|
-
connect(address, expected_peer_id
|
|
2044
|
+
connect(address, expected_peer_id) {
|
|
2275
2045
|
_assertClass(expected_peer_id, PeerId);
|
|
2276
|
-
const ret = wasm.subduction_connect(this.__wbg_ptr, address, expected_peer_id.__wbg_ptr
|
|
2046
|
+
const ret = wasm.subduction_connect(this.__wbg_ptr, address, expected_peer_id.__wbg_ptr);
|
|
2277
2047
|
return ret;
|
|
2278
2048
|
}
|
|
2279
2049
|
/**
|
|
@@ -2291,14 +2061,13 @@ var Subduction = class _Subduction {
|
|
|
2291
2061
|
*
|
|
2292
2062
|
* Returns an error if connection, handshake, or adding the connection fails.
|
|
2293
2063
|
* @param {URL} address
|
|
2294
|
-
* @param {number | null} [timeout_milliseconds]
|
|
2295
2064
|
* @param {string | null} [service_name]
|
|
2296
2065
|
* @returns {Promise<PeerId>}
|
|
2297
2066
|
*/
|
|
2298
|
-
connectDiscover(address,
|
|
2067
|
+
connectDiscover(address, service_name) {
|
|
2299
2068
|
var ptr0 = isLikeNone(service_name) ? 0 : passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2300
2069
|
var len0 = WASM_VECTOR_LEN;
|
|
2301
|
-
const ret = wasm.subduction_connectDiscover(this.__wbg_ptr, address,
|
|
2070
|
+
const ret = wasm.subduction_connectDiscover(this.__wbg_ptr, address, ptr0, len0);
|
|
2302
2071
|
return ret;
|
|
2303
2072
|
}
|
|
2304
2073
|
/**
|
|
@@ -2316,16 +2085,15 @@ var Subduction = class _Subduction {
|
|
|
2316
2085
|
*
|
|
2317
2086
|
* Returns an error if connection, handshake, or adding the connection fails.
|
|
2318
2087
|
* @param {string} base_url
|
|
2319
|
-
* @param {number | null} [timeout_milliseconds]
|
|
2320
2088
|
* @param {string | null} [service_name]
|
|
2321
2089
|
* @returns {Promise<PeerId>}
|
|
2322
2090
|
*/
|
|
2323
|
-
connectDiscoverLongPoll(base_url,
|
|
2091
|
+
connectDiscoverLongPoll(base_url, service_name) {
|
|
2324
2092
|
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2325
2093
|
const len0 = WASM_VECTOR_LEN;
|
|
2326
2094
|
var ptr1 = isLikeNone(service_name) ? 0 : passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2327
2095
|
var len1 = WASM_VECTOR_LEN;
|
|
2328
|
-
const ret = wasm.subduction_connectDiscoverLongPoll(this.__wbg_ptr, ptr0, len0,
|
|
2096
|
+
const ret = wasm.subduction_connectDiscoverLongPoll(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2329
2097
|
return ret;
|
|
2330
2098
|
}
|
|
2331
2099
|
/**
|
|
@@ -2344,14 +2112,37 @@ var Subduction = class _Subduction {
|
|
|
2344
2112
|
* Returns an error if connection, handshake, or adding the connection fails.
|
|
2345
2113
|
* @param {string} base_url
|
|
2346
2114
|
* @param {PeerId} expected_peer_id
|
|
2347
|
-
* @param {number | null} [timeout_milliseconds]
|
|
2348
2115
|
* @returns {Promise<PeerId>}
|
|
2349
2116
|
*/
|
|
2350
|
-
connectLongPoll(base_url, expected_peer_id
|
|
2117
|
+
connectLongPoll(base_url, expected_peer_id) {
|
|
2351
2118
|
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2352
2119
|
const len0 = WASM_VECTOR_LEN;
|
|
2353
2120
|
_assertClass(expected_peer_id, PeerId);
|
|
2354
|
-
const ret = wasm.subduction_connectLongPoll(this.__wbg_ptr, ptr0, len0, expected_peer_id.__wbg_ptr
|
|
2121
|
+
const ret = wasm.subduction_connectLongPoll(this.__wbg_ptr, ptr0, len0, expected_peer_id.__wbg_ptr);
|
|
2122
|
+
return ret;
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* Connect to a peer over any [`Transport`](JsTransport) using discovery mode.
|
|
2126
|
+
*
|
|
2127
|
+
* Performs a discovery handshake, then adds the authenticated connection.
|
|
2128
|
+
* The peer's identity is discovered during the handshake.
|
|
2129
|
+
*
|
|
2130
|
+
* # Arguments
|
|
2131
|
+
*
|
|
2132
|
+
* * `transport` - Any JS object with `sendBytes`/`recvBytes`/`disconnect`
|
|
2133
|
+
* * `service_name` - Shared service name for discovery
|
|
2134
|
+
*
|
|
2135
|
+
* # Errors
|
|
2136
|
+
*
|
|
2137
|
+
* Returns an error if the handshake or connection fails.
|
|
2138
|
+
* @param {Transport} transport
|
|
2139
|
+
* @param {string} service_name
|
|
2140
|
+
* @returns {Promise<PeerId>}
|
|
2141
|
+
*/
|
|
2142
|
+
connectTransport(transport, service_name) {
|
|
2143
|
+
const ptr0 = passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2144
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2145
|
+
const ret = wasm.subduction_connectTransport(this.__wbg_ptr, transport, ptr0, len0);
|
|
2355
2146
|
return ret;
|
|
2356
2147
|
}
|
|
2357
2148
|
/**
|
|
@@ -2516,6 +2307,27 @@ var Subduction = class _Subduction {
|
|
|
2516
2307
|
const ret = wasm.subduction_hydrate(signer, storage, ptr0, len0, isLikeNone(hash_metric_override) ? 0 : addToExternrefTable0(hash_metric_override), isLikeNone(max_pending_blob_requests) ? 4294967297 : max_pending_blob_requests >>> 0);
|
|
2517
2308
|
return ret;
|
|
2518
2309
|
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Link two local [`Subduction`](WasmSubduction) instances over a
|
|
2312
|
+
* [`MessageChannel`](web_sys::MessageChannel).
|
|
2313
|
+
*
|
|
2314
|
+
* Creates a `MessageChannel`, performs a discovery handshake between
|
|
2315
|
+
* the two instances, and adds the connections to both. This is the
|
|
2316
|
+
* simplest way to sync two local instances.
|
|
2317
|
+
*
|
|
2318
|
+
* # Errors
|
|
2319
|
+
*
|
|
2320
|
+
* Returns an error if the handshake or connection fails.
|
|
2321
|
+
* @param {Subduction} a
|
|
2322
|
+
* @param {Subduction} b
|
|
2323
|
+
* @returns {Promise<void>}
|
|
2324
|
+
*/
|
|
2325
|
+
static link(a, b) {
|
|
2326
|
+
_assertClass(a, _Subduction);
|
|
2327
|
+
_assertClass(b, _Subduction);
|
|
2328
|
+
const ret = wasm.subduction_link(a.__wbg_ptr, b.__wbg_ptr);
|
|
2329
|
+
return ret;
|
|
2330
|
+
}
|
|
2519
2331
|
/**
|
|
2520
2332
|
* Create a new [`Subduction`] instance.
|
|
2521
2333
|
*
|
|
@@ -2638,6 +2450,65 @@ var Subduction = class _Subduction {
|
|
|
2638
2450
|
}
|
|
2639
2451
|
};
|
|
2640
2452
|
if (Symbol.dispose) Subduction.prototype[Symbol.dispose] = Subduction.prototype.free;
|
|
2453
|
+
var SubductionHttpLongPoll = class _SubductionHttpLongPoll {
|
|
2454
|
+
static __wrap(ptr) {
|
|
2455
|
+
ptr = ptr >>> 0;
|
|
2456
|
+
const obj = Object.create(_SubductionHttpLongPoll.prototype);
|
|
2457
|
+
obj.__wbg_ptr = ptr;
|
|
2458
|
+
SubductionHttpLongPollFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2459
|
+
return obj;
|
|
2460
|
+
}
|
|
2461
|
+
__destroy_into_raw() {
|
|
2462
|
+
const ptr = this.__wbg_ptr;
|
|
2463
|
+
this.__wbg_ptr = 0;
|
|
2464
|
+
SubductionHttpLongPollFinalization.unregister(this);
|
|
2465
|
+
return ptr;
|
|
2466
|
+
}
|
|
2467
|
+
free() {
|
|
2468
|
+
const ptr = this.__destroy_into_raw();
|
|
2469
|
+
wasm.__wbg_subductionhttplongpoll_free(ptr, 0);
|
|
2470
|
+
}
|
|
2471
|
+
/**
|
|
2472
|
+
* Disconnect from the peer gracefully.
|
|
2473
|
+
*
|
|
2474
|
+
* # Errors
|
|
2475
|
+
*
|
|
2476
|
+
* Returns an error if the disconnect fails.
|
|
2477
|
+
* @returns {Promise<void>}
|
|
2478
|
+
*/
|
|
2479
|
+
disconnect() {
|
|
2480
|
+
const ret = wasm.subductionhttplongpoll_disconnect(this.__wbg_ptr);
|
|
2481
|
+
return ret;
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* Receive the next message frame as raw bytes.
|
|
2485
|
+
*
|
|
2486
|
+
* # Errors
|
|
2487
|
+
*
|
|
2488
|
+
* Returns an error if the inbound channel is closed.
|
|
2489
|
+
* @returns {Promise<Uint8Array>}
|
|
2490
|
+
*/
|
|
2491
|
+
recvBytes() {
|
|
2492
|
+
const ret = wasm.subductionhttplongpoll_recvBytes(this.__wbg_ptr);
|
|
2493
|
+
return ret;
|
|
2494
|
+
}
|
|
2495
|
+
/**
|
|
2496
|
+
* Send raw bytes over the transport.
|
|
2497
|
+
*
|
|
2498
|
+
* # Errors
|
|
2499
|
+
*
|
|
2500
|
+
* Returns an error if the outbound channel is closed.
|
|
2501
|
+
* @param {Uint8Array} bytes
|
|
2502
|
+
* @returns {Promise<void>}
|
|
2503
|
+
*/
|
|
2504
|
+
sendBytes(bytes) {
|
|
2505
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
2506
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2507
|
+
const ret = wasm.subductionhttplongpoll_sendBytes(this.__wbg_ptr, ptr0, len0);
|
|
2508
|
+
return ret;
|
|
2509
|
+
}
|
|
2510
|
+
};
|
|
2511
|
+
if (Symbol.dispose) SubductionHttpLongPoll.prototype[Symbol.dispose] = SubductionHttpLongPoll.prototype.free;
|
|
2641
2512
|
var SubductionLongPoll = class {
|
|
2642
2513
|
__destroy_into_raw() {
|
|
2643
2514
|
const ptr = this.__wbg_ptr;
|
|
@@ -2661,18 +2532,17 @@ var SubductionLongPoll = class {
|
|
|
2661
2532
|
*
|
|
2662
2533
|
* # Errors
|
|
2663
2534
|
*
|
|
2664
|
-
* Returns [`
|
|
2535
|
+
* Returns [`LongPollTransportError`] if connection or handshake fails.
|
|
2665
2536
|
* @param {string} base_url
|
|
2666
2537
|
* @param {any} signer
|
|
2667
2538
|
* @param {PeerId} expected_peer_id
|
|
2668
|
-
* @param {number | null} [timeout_milliseconds]
|
|
2669
2539
|
* @returns {Promise<AuthenticatedLongPoll>}
|
|
2670
2540
|
*/
|
|
2671
|
-
static tryConnect(base_url, signer, expected_peer_id
|
|
2541
|
+
static tryConnect(base_url, signer, expected_peer_id) {
|
|
2672
2542
|
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2673
2543
|
const len0 = WASM_VECTOR_LEN;
|
|
2674
2544
|
_assertClass(expected_peer_id, PeerId);
|
|
2675
|
-
const ret = wasm.subductionlongpoll_tryConnect(ptr0, len0, signer, expected_peer_id.__wbg_ptr
|
|
2545
|
+
const ret = wasm.subductionlongpoll_tryConnect(ptr0, len0, signer, expected_peer_id.__wbg_ptr);
|
|
2676
2546
|
return ret;
|
|
2677
2547
|
}
|
|
2678
2548
|
/**
|
|
@@ -2682,111 +2552,26 @@ var SubductionLongPoll = class {
|
|
|
2682
2552
|
*
|
|
2683
2553
|
* * `base_url` - The server's HTTP base URL (e.g., `http://localhost:8080`)
|
|
2684
2554
|
* * `signer` - The client's signer for authentication
|
|
2685
|
-
* * `timeout_milliseconds` - Request timeout in milliseconds (default: 30000)
|
|
2686
2555
|
* * `service_name` - The service name for discovery. If omitted, the base URL is used.
|
|
2687
2556
|
*
|
|
2688
2557
|
* # Errors
|
|
2689
2558
|
*
|
|
2690
|
-
* Returns [`
|
|
2559
|
+
* Returns [`LongPollTransportError`] if connection or handshake fails.
|
|
2691
2560
|
* @param {string} base_url
|
|
2692
2561
|
* @param {any} signer
|
|
2693
|
-
* @param {number | null} [timeout_milliseconds]
|
|
2694
2562
|
* @param {string | null} [service_name]
|
|
2695
2563
|
* @returns {Promise<AuthenticatedLongPoll>}
|
|
2696
2564
|
*/
|
|
2697
|
-
static tryDiscover(base_url, signer,
|
|
2565
|
+
static tryDiscover(base_url, signer, service_name) {
|
|
2698
2566
|
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2699
2567
|
const len0 = WASM_VECTOR_LEN;
|
|
2700
|
-
var ptr1 = isLikeNone(service_name) ? 0 : passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2701
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2702
|
-
const ret = wasm.subductionlongpoll_tryDiscover(ptr0, len0, signer,
|
|
2703
|
-
return ret;
|
|
2704
|
-
}
|
|
2705
|
-
};
|
|
2706
|
-
if (Symbol.dispose) SubductionLongPoll.prototype[Symbol.dispose] = SubductionLongPoll.prototype.free;
|
|
2707
|
-
var SubductionLongPollConnection = class _SubductionLongPollConnection {
|
|
2708
|
-
static __wrap(ptr) {
|
|
2709
|
-
ptr = ptr >>> 0;
|
|
2710
|
-
const obj = Object.create(_SubductionLongPollConnection.prototype);
|
|
2711
|
-
obj.__wbg_ptr = ptr;
|
|
2712
|
-
SubductionLongPollConnectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2713
|
-
return obj;
|
|
2714
|
-
}
|
|
2715
|
-
__destroy_into_raw() {
|
|
2716
|
-
const ptr = this.__wbg_ptr;
|
|
2717
|
-
this.__wbg_ptr = 0;
|
|
2718
|
-
SubductionLongPollConnectionFinalization.unregister(this);
|
|
2719
|
-
return ptr;
|
|
2720
|
-
}
|
|
2721
|
-
free() {
|
|
2722
|
-
const ptr = this.__destroy_into_raw();
|
|
2723
|
-
wasm.__wbg_subductionlongpollconnection_free(ptr, 0);
|
|
2724
|
-
}
|
|
2725
|
-
/**
|
|
2726
|
-
* Make a synchronous call to the peer.
|
|
2727
|
-
*
|
|
2728
|
-
* # Errors
|
|
2729
|
-
*
|
|
2730
|
-
* Returns an error if the call fails or times out.
|
|
2731
|
-
* @param {BatchSyncRequest} request
|
|
2732
|
-
* @param {number | null} [timeout_ms]
|
|
2733
|
-
* @returns {Promise<BatchSyncResponse>}
|
|
2734
|
-
*/
|
|
2735
|
-
call(request, timeout_ms) {
|
|
2736
|
-
_assertClass(request, BatchSyncRequest);
|
|
2737
|
-
var ptr0 = request.__destroy_into_raw();
|
|
2738
|
-
const ret = wasm.subductionlongpollconnection_call(this.__wbg_ptr, ptr0, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
|
|
2739
|
-
return ret;
|
|
2740
|
-
}
|
|
2741
|
-
/**
|
|
2742
|
-
* Disconnect from the peer gracefully.
|
|
2743
|
-
*
|
|
2744
|
-
* # Errors
|
|
2745
|
-
*
|
|
2746
|
-
* Returns [`WasmLongPollConnError`] if the disconnect fails.
|
|
2747
|
-
* @returns {Promise<void>}
|
|
2748
|
-
*/
|
|
2749
|
-
disconnect() {
|
|
2750
|
-
const ret = wasm.subductionlongpollconnection_disconnect(this.__wbg_ptr);
|
|
2751
|
-
return ret;
|
|
2752
|
-
}
|
|
2753
|
-
/**
|
|
2754
|
-
* Get the next request ID.
|
|
2755
|
-
* @returns {Promise<RequestId>}
|
|
2756
|
-
*/
|
|
2757
|
-
nextRequestId() {
|
|
2758
|
-
const ret = wasm.subductionlongpollconnection_nextRequestId(this.__wbg_ptr);
|
|
2759
|
-
return ret;
|
|
2760
|
-
}
|
|
2761
|
-
/**
|
|
2762
|
-
* Receive a message.
|
|
2763
|
-
*
|
|
2764
|
-
* # Errors
|
|
2765
|
-
*
|
|
2766
|
-
* Returns an error if the inbound channel is closed.
|
|
2767
|
-
* @returns {Promise<Message>}
|
|
2768
|
-
*/
|
|
2769
|
-
recv() {
|
|
2770
|
-
const ret = wasm.subductionlongpollconnection_recv(this.__wbg_ptr);
|
|
2771
|
-
return ret;
|
|
2772
|
-
}
|
|
2773
|
-
/**
|
|
2774
|
-
* Send a message.
|
|
2775
|
-
*
|
|
2776
|
-
* # Errors
|
|
2777
|
-
*
|
|
2778
|
-
* Returns an error if the outbound channel is closed.
|
|
2779
|
-
* @param {Message} message
|
|
2780
|
-
* @returns {Promise<void>}
|
|
2781
|
-
*/
|
|
2782
|
-
send(message) {
|
|
2783
|
-
_assertClass(message, Message);
|
|
2784
|
-
var ptr0 = message.__destroy_into_raw();
|
|
2785
|
-
const ret = wasm.subductionlongpollconnection_send(this.__wbg_ptr, ptr0);
|
|
2568
|
+
var ptr1 = isLikeNone(service_name) ? 0 : passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2569
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2570
|
+
const ret = wasm.subductionlongpoll_tryDiscover(ptr0, len0, signer, ptr1, len1);
|
|
2786
2571
|
return ret;
|
|
2787
2572
|
}
|
|
2788
2573
|
};
|
|
2789
|
-
if (Symbol.dispose)
|
|
2574
|
+
if (Symbol.dispose) SubductionLongPoll.prototype[Symbol.dispose] = SubductionLongPoll.prototype.free;
|
|
2790
2575
|
var SubductionWebSocket = class _SubductionWebSocket {
|
|
2791
2576
|
static __wrap(ptr) {
|
|
2792
2577
|
ptr = ptr >>> 0;
|
|
@@ -2805,22 +2590,6 @@ var SubductionWebSocket = class _SubductionWebSocket {
|
|
|
2805
2590
|
const ptr = this.__destroy_into_raw();
|
|
2806
2591
|
wasm.__wbg_subductionwebsocket_free(ptr, 0);
|
|
2807
2592
|
}
|
|
2808
|
-
/**
|
|
2809
|
-
* Make a synchronous call to the peer.
|
|
2810
|
-
*
|
|
2811
|
-
* # Errors
|
|
2812
|
-
*
|
|
2813
|
-
* Returns [`WasmCallError`] if the call fails or times out.
|
|
2814
|
-
* @param {BatchSyncRequest} request
|
|
2815
|
-
* @param {number | null} [timeout_ms]
|
|
2816
|
-
* @returns {Promise<BatchSyncResponse>}
|
|
2817
|
-
*/
|
|
2818
|
-
call(request, timeout_ms) {
|
|
2819
|
-
_assertClass(request, BatchSyncRequest);
|
|
2820
|
-
var ptr0 = request.__destroy_into_raw();
|
|
2821
|
-
const ret = wasm.subductionwebsocket_call(this.__wbg_ptr, ptr0, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
|
|
2822
|
-
return ret;
|
|
2823
|
-
}
|
|
2824
2593
|
/**
|
|
2825
2594
|
* Disconnect from the peer gracefully.
|
|
2826
2595
|
* @returns {Promise<void>}
|
|
@@ -2830,46 +2599,30 @@ var SubductionWebSocket = class _SubductionWebSocket {
|
|
|
2830
2599
|
return ret;
|
|
2831
2600
|
}
|
|
2832
2601
|
/**
|
|
2833
|
-
*
|
|
2834
|
-
* @returns {Promise<RequestId>}
|
|
2835
|
-
*/
|
|
2836
|
-
nextRequestId() {
|
|
2837
|
-
const ret = wasm.subductionwebsocket_nextRequestId(this.__wbg_ptr);
|
|
2838
|
-
return ret;
|
|
2839
|
-
}
|
|
2840
|
-
/**
|
|
2841
|
-
* Get the peer ID of the remote peer.
|
|
2842
|
-
* @returns {PeerId}
|
|
2843
|
-
*/
|
|
2844
|
-
peerId() {
|
|
2845
|
-
const ret = wasm.subductionwebsocket_peerId(this.__wbg_ptr);
|
|
2846
|
-
return PeerId.__wrap(ret);
|
|
2847
|
-
}
|
|
2848
|
-
/**
|
|
2849
|
-
* Receive a message.
|
|
2602
|
+
* Receive the next message frame as raw bytes.
|
|
2850
2603
|
*
|
|
2851
2604
|
* # Errors
|
|
2852
2605
|
*
|
|
2853
2606
|
* Returns [`ReadFromClosedChannel`] if the channel has been closed.
|
|
2854
|
-
* @returns {Promise<
|
|
2607
|
+
* @returns {Promise<Uint8Array>}
|
|
2855
2608
|
*/
|
|
2856
|
-
|
|
2857
|
-
const ret = wasm.
|
|
2609
|
+
recvBytes() {
|
|
2610
|
+
const ret = wasm.subductionwebsocket_recvBytes(this.__wbg_ptr);
|
|
2858
2611
|
return ret;
|
|
2859
2612
|
}
|
|
2860
2613
|
/**
|
|
2861
|
-
* Send
|
|
2614
|
+
* Send raw bytes over the WebSocket.
|
|
2862
2615
|
*
|
|
2863
2616
|
* # Errors
|
|
2864
2617
|
*
|
|
2865
|
-
* Returns [`WasmSendError`] if the
|
|
2866
|
-
* @param {
|
|
2618
|
+
* Returns [`WasmSendError`] if the bytes could not be sent.
|
|
2619
|
+
* @param {Uint8Array} bytes
|
|
2867
2620
|
* @returns {Promise<void>}
|
|
2868
2621
|
*/
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
const ret = wasm.
|
|
2622
|
+
sendBytes(bytes) {
|
|
2623
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
2624
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2625
|
+
const ret = wasm.subductionwebsocket_sendBytes(this.__wbg_ptr, ptr0, len0);
|
|
2873
2626
|
return ret;
|
|
2874
2627
|
}
|
|
2875
2628
|
/**
|
|
@@ -2891,12 +2644,11 @@ var SubductionWebSocket = class _SubductionWebSocket {
|
|
|
2891
2644
|
* @param {WebSocket} ws
|
|
2892
2645
|
* @param {any} signer
|
|
2893
2646
|
* @param {PeerId} expected_peer_id
|
|
2894
|
-
* @param {number} timeout_milliseconds
|
|
2895
2647
|
* @returns {Promise<AuthenticatedWebSocket>}
|
|
2896
2648
|
*/
|
|
2897
|
-
static setup(ws, signer, expected_peer_id
|
|
2649
|
+
static setup(ws, signer, expected_peer_id) {
|
|
2898
2650
|
_assertClass(expected_peer_id, PeerId);
|
|
2899
|
-
const ret = wasm.subductionwebsocket_setup(ws, signer, expected_peer_id.__wbg_ptr
|
|
2651
|
+
const ret = wasm.subductionwebsocket_setup(ws, signer, expected_peer_id.__wbg_ptr);
|
|
2900
2652
|
return ret;
|
|
2901
2653
|
}
|
|
2902
2654
|
/**
|
|
@@ -2907,8 +2659,6 @@ var SubductionWebSocket = class _SubductionWebSocket {
|
|
|
2907
2659
|
* * `address` - The WebSocket URL to connect to
|
|
2908
2660
|
* * `signer` - The client's signer for authentication
|
|
2909
2661
|
* * `expected_peer_id` - The expected server peer ID (verified during handshake)
|
|
2910
|
-
* * `timeout_milliseconds` - Request timeout in milliseconds
|
|
2911
|
-
*
|
|
2912
2662
|
* # Errors
|
|
2913
2663
|
*
|
|
2914
2664
|
* Returns an error if:
|
|
@@ -2917,12 +2667,11 @@ var SubductionWebSocket = class _SubductionWebSocket {
|
|
|
2917
2667
|
* @param {URL} address
|
|
2918
2668
|
* @param {any} signer
|
|
2919
2669
|
* @param {PeerId} expected_peer_id
|
|
2920
|
-
* @param {number} timeout_milliseconds
|
|
2921
2670
|
* @returns {Promise<AuthenticatedWebSocket>}
|
|
2922
2671
|
*/
|
|
2923
|
-
static tryConnect(address, signer, expected_peer_id
|
|
2672
|
+
static tryConnect(address, signer, expected_peer_id) {
|
|
2924
2673
|
_assertClass(expected_peer_id, PeerId);
|
|
2925
|
-
const ret = wasm.subductionwebsocket_tryConnect(address, signer, expected_peer_id.__wbg_ptr
|
|
2674
|
+
const ret = wasm.subductionwebsocket_tryConnect(address, signer, expected_peer_id.__wbg_ptr);
|
|
2926
2675
|
return ret;
|
|
2927
2676
|
}
|
|
2928
2677
|
/**
|
|
@@ -2947,18 +2696,213 @@ var SubductionWebSocket = class _SubductionWebSocket {
|
|
|
2947
2696
|
* - The handshake fails (signature invalid, clock drift, etc.)
|
|
2948
2697
|
* @param {URL} address
|
|
2949
2698
|
* @param {any} signer
|
|
2950
|
-
* @param {number | null} [timeout_milliseconds]
|
|
2951
2699
|
* @param {string | null} [service_name]
|
|
2952
2700
|
* @returns {Promise<AuthenticatedWebSocket>}
|
|
2953
2701
|
*/
|
|
2954
|
-
static tryDiscover(address, signer,
|
|
2702
|
+
static tryDiscover(address, signer, service_name) {
|
|
2955
2703
|
var ptr0 = isLikeNone(service_name) ? 0 : passStringToWasm0(service_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2956
2704
|
var len0 = WASM_VECTOR_LEN;
|
|
2957
|
-
const ret = wasm.subductionwebsocket_tryDiscover(address, signer,
|
|
2705
|
+
const ret = wasm.subductionwebsocket_tryDiscover(address, signer, ptr0, len0);
|
|
2958
2706
|
return ret;
|
|
2959
2707
|
}
|
|
2960
2708
|
};
|
|
2961
2709
|
if (Symbol.dispose) SubductionWebSocket.prototype[Symbol.dispose] = SubductionWebSocket.prototype.free;
|
|
2710
|
+
var SyncMessage = class _SyncMessage {
|
|
2711
|
+
static __wrap(ptr) {
|
|
2712
|
+
ptr = ptr >>> 0;
|
|
2713
|
+
const obj = Object.create(_SyncMessage.prototype);
|
|
2714
|
+
obj.__wbg_ptr = ptr;
|
|
2715
|
+
SyncMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2716
|
+
return obj;
|
|
2717
|
+
}
|
|
2718
|
+
__destroy_into_raw() {
|
|
2719
|
+
const ptr = this.__wbg_ptr;
|
|
2720
|
+
this.__wbg_ptr = 0;
|
|
2721
|
+
SyncMessageFinalization.unregister(this);
|
|
2722
|
+
return ptr;
|
|
2723
|
+
}
|
|
2724
|
+
free() {
|
|
2725
|
+
const ptr = this.__destroy_into_raw();
|
|
2726
|
+
wasm.__wbg_syncmessage_free(ptr, 0);
|
|
2727
|
+
}
|
|
2728
|
+
/**
|
|
2729
|
+
* Upcasts; to the JS-import type for [`WasmMessage`].
|
|
2730
|
+
* @returns {SyncMessage}
|
|
2731
|
+
*/
|
|
2732
|
+
__wasm_refgen_toWasmMessage() {
|
|
2733
|
+
const ret = wasm.syncmessage___wasm_refgen_toWasmMessage(this.__wbg_ptr);
|
|
2734
|
+
return _SyncMessage.__wrap(ret);
|
|
2735
|
+
}
|
|
2736
|
+
/**
|
|
2737
|
+
* Create a [`SyncMessage::BatchSyncRequest`] message.
|
|
2738
|
+
* @param {BatchSyncRequest} request
|
|
2739
|
+
* @returns {SyncMessage}
|
|
2740
|
+
*/
|
|
2741
|
+
static batchSyncRequest(request) {
|
|
2742
|
+
_assertClass(request, BatchSyncRequest);
|
|
2743
|
+
const ret = wasm.syncmessage_batchSyncRequest(request.__wbg_ptr);
|
|
2744
|
+
return _SyncMessage.__wrap(ret);
|
|
2745
|
+
}
|
|
2746
|
+
/**
|
|
2747
|
+
* Create a [`SyncMessage::BatchSyncResponse`] message.
|
|
2748
|
+
* @param {BatchSyncResponse} response
|
|
2749
|
+
* @returns {SyncMessage}
|
|
2750
|
+
*/
|
|
2751
|
+
static batchSyncResponse(response) {
|
|
2752
|
+
_assertClass(response, BatchSyncResponse);
|
|
2753
|
+
const ret = wasm.syncmessage_batchSyncResponse(response.__wbg_ptr);
|
|
2754
|
+
return _SyncMessage.__wrap(ret);
|
|
2755
|
+
}
|
|
2756
|
+
/**
|
|
2757
|
+
* The [`Blob`] for commit or fragment messages, if applicable.
|
|
2758
|
+
* @returns {Uint8Array | undefined}
|
|
2759
|
+
*/
|
|
2760
|
+
get blob() {
|
|
2761
|
+
const ret = wasm.syncmessage_blob(this.__wbg_ptr);
|
|
2762
|
+
return ret;
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* The [`Blob`]s for a [`SyncMessage::BlobsResponse`], if applicable.
|
|
2766
|
+
* @returns {Uint8Array[] | undefined}
|
|
2767
|
+
*/
|
|
2768
|
+
get blobs() {
|
|
2769
|
+
const ret = wasm.syncmessage_blobs(this.__wbg_ptr);
|
|
2770
|
+
let v1;
|
|
2771
|
+
if (ret[0] !== 0) {
|
|
2772
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2773
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 4, 4);
|
|
2774
|
+
}
|
|
2775
|
+
return v1;
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Create a [`SyncMessage::BlobsRequest`] message.
|
|
2779
|
+
* @param {SedimentreeId} id
|
|
2780
|
+
* @param {Digest[]} digests
|
|
2781
|
+
* @returns {SyncMessage}
|
|
2782
|
+
*/
|
|
2783
|
+
static blobsRequest(id, digests) {
|
|
2784
|
+
_assertClass(id, SedimentreeId);
|
|
2785
|
+
const ptr0 = passArrayJsValueToWasm0(digests, wasm.__wbindgen_export);
|
|
2786
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2787
|
+
const ret = wasm.syncmessage_blobsRequest(id.__wbg_ptr, ptr0, len0);
|
|
2788
|
+
return _SyncMessage.__wrap(ret);
|
|
2789
|
+
}
|
|
2790
|
+
/**
|
|
2791
|
+
* Create a [`SyncMessage::BlobsResponse`] message.
|
|
2792
|
+
* @param {SedimentreeId} id
|
|
2793
|
+
* @param {Uint8Array[]} blobs
|
|
2794
|
+
* @returns {SyncMessage}
|
|
2795
|
+
*/
|
|
2796
|
+
static blobsResponse(id, blobs) {
|
|
2797
|
+
_assertClass(id, SedimentreeId);
|
|
2798
|
+
const ptr0 = passArrayJsValueToWasm0(blobs, wasm.__wbindgen_export);
|
|
2799
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2800
|
+
const ret = wasm.syncmessage_blobsResponse(id.__wbg_ptr, ptr0, len0);
|
|
2801
|
+
return _SyncMessage.__wrap(ret);
|
|
2802
|
+
}
|
|
2803
|
+
/**
|
|
2804
|
+
* The [`LooseCommit`] for a [`SyncMessage::LooseCommit`], if applicable.
|
|
2805
|
+
*
|
|
2806
|
+
* Decodes the signed payload to extract the underlying commit.
|
|
2807
|
+
* @returns {LooseCommit | undefined}
|
|
2808
|
+
*/
|
|
2809
|
+
get commit() {
|
|
2810
|
+
const ret = wasm.syncmessage_commit(this.__wbg_ptr);
|
|
2811
|
+
return ret === 0 ? void 0 : LooseCommit.__wrap(ret);
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* The requested [`Digest`]s for a [`SyncMessage::BlobsRequest`], if applicable.
|
|
2815
|
+
* @returns {Digest[] | undefined}
|
|
2816
|
+
*/
|
|
2817
|
+
get digests() {
|
|
2818
|
+
const ret = wasm.syncmessage_digests(this.__wbg_ptr);
|
|
2819
|
+
let v1;
|
|
2820
|
+
if (ret[0] !== 0) {
|
|
2821
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2822
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 4, 4);
|
|
2823
|
+
}
|
|
2824
|
+
return v1;
|
|
2825
|
+
}
|
|
2826
|
+
/**
|
|
2827
|
+
* The [`Fragment`] for a [`SyncMessage::Fragment`], if applicable.
|
|
2828
|
+
*
|
|
2829
|
+
* Decodes the signed payload to extract the underlying fragment.
|
|
2830
|
+
* @returns {Fragment | undefined}
|
|
2831
|
+
*/
|
|
2832
|
+
get fragment() {
|
|
2833
|
+
const ret = wasm.syncmessage_fragment(this.__wbg_ptr);
|
|
2834
|
+
return ret === 0 ? void 0 : Fragment.__wrap(ret);
|
|
2835
|
+
}
|
|
2836
|
+
/**
|
|
2837
|
+
* Deserialize a message from bytes.
|
|
2838
|
+
*
|
|
2839
|
+
* # Errors
|
|
2840
|
+
*
|
|
2841
|
+
* Returns a [`JsMessageDeserializationError`] if deserialization fails.
|
|
2842
|
+
* @param {Uint8Array} bytes
|
|
2843
|
+
* @returns {SyncMessage}
|
|
2844
|
+
*/
|
|
2845
|
+
static fromBytes(bytes) {
|
|
2846
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
2847
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2848
|
+
const ret = wasm.syncmessage_fromBytes(ptr0, len0);
|
|
2849
|
+
if (ret[2]) {
|
|
2850
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2851
|
+
}
|
|
2852
|
+
return _SyncMessage.__wrap(ret[0]);
|
|
2853
|
+
}
|
|
2854
|
+
/**
|
|
2855
|
+
* The [`BatchSyncRequest`] for a [`SyncMessage::BatchSyncRequest`], if applicable.
|
|
2856
|
+
* @returns {BatchSyncRequest | undefined}
|
|
2857
|
+
*/
|
|
2858
|
+
get request() {
|
|
2859
|
+
const ret = wasm.syncmessage_request(this.__wbg_ptr);
|
|
2860
|
+
return ret === 0 ? void 0 : BatchSyncRequest.__wrap(ret);
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* The [`BatchSyncResponse`] for a [`SyncMessage::BatchSyncResponse`], if applicable.
|
|
2864
|
+
* @returns {BatchSyncResponse | undefined}
|
|
2865
|
+
*/
|
|
2866
|
+
get response() {
|
|
2867
|
+
const ret = wasm.syncmessage_response(this.__wbg_ptr);
|
|
2868
|
+
return ret === 0 ? void 0 : BatchSyncResponse.__wrap(ret);
|
|
2869
|
+
}
|
|
2870
|
+
/**
|
|
2871
|
+
* The [`SedimentreeId`] associated with this message, if any.
|
|
2872
|
+
* @returns {SedimentreeId | undefined}
|
|
2873
|
+
*/
|
|
2874
|
+
get sedimentreeId() {
|
|
2875
|
+
const ret = wasm.syncmessage_sedimentreeId(this.__wbg_ptr);
|
|
2876
|
+
return ret === 0 ? void 0 : SedimentreeId.__wrap(ret);
|
|
2877
|
+
}
|
|
2878
|
+
/**
|
|
2879
|
+
* Serialize the message to bytes.
|
|
2880
|
+
* @returns {Uint8Array}
|
|
2881
|
+
*/
|
|
2882
|
+
toBytes() {
|
|
2883
|
+
const ret = wasm.syncmessage_toBytes(this.__wbg_ptr);
|
|
2884
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2885
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
2886
|
+
return v1;
|
|
2887
|
+
}
|
|
2888
|
+
/**
|
|
2889
|
+
* The message variant name.
|
|
2890
|
+
* @returns {string}
|
|
2891
|
+
*/
|
|
2892
|
+
get type() {
|
|
2893
|
+
let deferred1_0;
|
|
2894
|
+
let deferred1_1;
|
|
2895
|
+
try {
|
|
2896
|
+
const ret = wasm.syncmessage_type(this.__wbg_ptr);
|
|
2897
|
+
deferred1_0 = ret[0];
|
|
2898
|
+
deferred1_1 = ret[1];
|
|
2899
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2900
|
+
} finally {
|
|
2901
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
};
|
|
2905
|
+
if (Symbol.dispose) SyncMessage.prototype[Symbol.dispose] = SyncMessage.prototype.free;
|
|
2962
2906
|
var SyncStats = class _SyncStats {
|
|
2963
2907
|
static __wrap(ptr) {
|
|
2964
2908
|
ptr = ptr >>> 0;
|
|
@@ -3102,9 +3046,9 @@ var WebCryptoSigner = class _WebCryptoSigner {
|
|
|
3102
3046
|
}
|
|
3103
3047
|
};
|
|
3104
3048
|
if (Symbol.dispose) WebCryptoSigner.prototype[Symbol.dispose] = WebCryptoSigner.prototype.free;
|
|
3105
|
-
function
|
|
3106
|
-
const ret = wasm.
|
|
3107
|
-
return
|
|
3049
|
+
function makeMessagePortTransport(port) {
|
|
3050
|
+
const ret = wasm.makeMessagePortTransport(port);
|
|
3051
|
+
return MessagePortTransport.__wrap(ret);
|
|
3108
3052
|
}
|
|
3109
3053
|
function start() {
|
|
3110
3054
|
wasm.start();
|
|
@@ -3112,12 +3056,6 @@ function start() {
|
|
|
3112
3056
|
function __wbg_get_imports() {
|
|
3113
3057
|
const import0 = {
|
|
3114
3058
|
__proto__: null,
|
|
3115
|
-
__wbg___wasm_refgen_toWasmBatchSyncResponse_d314d3b3e09c54af: function(arg0) {
|
|
3116
|
-
const ret = arg0.__wasm_refgen_toWasmBatchSyncResponse();
|
|
3117
|
-
_assertClass(ret, BatchSyncResponse);
|
|
3118
|
-
var ptr1 = ret.__destroy_into_raw();
|
|
3119
|
-
return ptr1;
|
|
3120
|
-
},
|
|
3121
3059
|
__wbg___wasm_refgen_toWasmCommitWithBlob_dd531ffcf07010df: function(arg0) {
|
|
3122
3060
|
const ret = arg0.__wasm_refgen_toWasmCommitWithBlob();
|
|
3123
3061
|
_assertClass(ret, CommitWithBlob);
|
|
@@ -3154,18 +3092,6 @@ function __wbg_get_imports() {
|
|
|
3154
3092
|
var ptr1 = ret.__destroy_into_raw();
|
|
3155
3093
|
return ptr1;
|
|
3156
3094
|
},
|
|
3157
|
-
__wbg___wasm_refgen_toWasmMessage_03bf79fea85775dc: function(arg0) {
|
|
3158
|
-
const ret = arg0.__wasm_refgen_toWasmMessage();
|
|
3159
|
-
_assertClass(ret, Message);
|
|
3160
|
-
var ptr1 = ret.__destroy_into_raw();
|
|
3161
|
-
return ptr1;
|
|
3162
|
-
},
|
|
3163
|
-
__wbg___wasm_refgen_toWasmRequestId_659561cf5c639011: function(arg0) {
|
|
3164
|
-
const ret = arg0.__wasm_refgen_toWasmRequestId();
|
|
3165
|
-
_assertClass(ret, RequestId);
|
|
3166
|
-
var ptr1 = ret.__destroy_into_raw();
|
|
3167
|
-
return ptr1;
|
|
3168
|
-
},
|
|
3169
3095
|
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
3170
3096
|
const ret = debugString(arg1);
|
|
3171
3097
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -3216,46 +3142,29 @@ function __wbg_get_imports() {
|
|
|
3216
3142
|
return ret;
|
|
3217
3143
|
}, arguments);
|
|
3218
3144
|
},
|
|
3219
|
-
__wbg_authenticatedconnection_new: function(arg0) {
|
|
3220
|
-
const ret = AuthenticatedConnection.__wrap(arg0);
|
|
3221
|
-
return ret;
|
|
3222
|
-
},
|
|
3223
3145
|
__wbg_authenticatedlongpoll_new: function(arg0) {
|
|
3224
3146
|
const ret = AuthenticatedLongPoll.__wrap(arg0);
|
|
3225
3147
|
return ret;
|
|
3226
3148
|
},
|
|
3227
|
-
|
|
3228
|
-
const ret =
|
|
3149
|
+
__wbg_authenticatedtransport_new: function(arg0) {
|
|
3150
|
+
const ret = AuthenticatedTransport.__wrap(arg0);
|
|
3229
3151
|
return ret;
|
|
3230
3152
|
},
|
|
3231
|
-
|
|
3232
|
-
const ret =
|
|
3153
|
+
__wbg_authenticatedwebsocket_new: function(arg0) {
|
|
3154
|
+
const ret = AuthenticatedWebSocket.__wrap(arg0);
|
|
3233
3155
|
return ret;
|
|
3234
3156
|
},
|
|
3235
3157
|
__wbg_buffer_60b8043cd926067d: function(arg0) {
|
|
3236
3158
|
const ret = arg0.buffer;
|
|
3237
3159
|
return ret;
|
|
3238
3160
|
},
|
|
3239
|
-
__wbg_call_15d4cdb7fcc8c67d: function(arg0, arg1, arg2, arg3) {
|
|
3240
|
-
const ret = arg0.call(BatchSyncRequest.__wrap(arg1), arg2 === 0 ? void 0 : arg3);
|
|
3241
|
-
return ret;
|
|
3242
|
-
},
|
|
3243
3161
|
__wbg_call_2d781c1f4d5c0ef8: function() {
|
|
3244
3162
|
return handleError(function(arg0, arg1, arg2) {
|
|
3245
3163
|
const ret = arg0.call(arg1, arg2);
|
|
3246
3164
|
return ret;
|
|
3247
3165
|
}, arguments);
|
|
3248
3166
|
},
|
|
3249
|
-
|
|
3250
|
-
return handleError(function(arg0, arg1) {
|
|
3251
|
-
const ret = arg0.call(arg1);
|
|
3252
|
-
return ret;
|
|
3253
|
-
}, arguments);
|
|
3254
|
-
},
|
|
3255
|
-
__wbg_clearTimeout_b47e5bf918898b2b: function(arg0) {
|
|
3256
|
-
clearTimeout(arg0);
|
|
3257
|
-
},
|
|
3258
|
-
__wbg_close_83c08a226256ebab: function(arg0) {
|
|
3167
|
+
__wbg_close_9b95bf80abb12681: function(arg0) {
|
|
3259
3168
|
arg0.close();
|
|
3260
3169
|
},
|
|
3261
3170
|
__wbg_close_cbf870bdad0aad99: function(arg0) {
|
|
@@ -3265,10 +3174,6 @@ function __wbg_get_imports() {
|
|
|
3265
3174
|
const ret = CommitWithBlob.__wrap(arg0);
|
|
3266
3175
|
return ret;
|
|
3267
3176
|
},
|
|
3268
|
-
__wbg_connerrorpair_new: function(arg0) {
|
|
3269
|
-
const ret = ConnErrorPair.__wrap(arg0);
|
|
3270
|
-
return ret;
|
|
3271
|
-
},
|
|
3272
3177
|
__wbg_contains_ef4bfb7fa5a241b7: function(arg0, arg1, arg2) {
|
|
3273
3178
|
const ret = arg0.contains(getStringFromWasm0(arg1, arg2));
|
|
3274
3179
|
return ret;
|
|
@@ -3303,7 +3208,7 @@ function __wbg_get_imports() {
|
|
|
3303
3208
|
const ret = Digest.__unwrap(arg0);
|
|
3304
3209
|
return ret;
|
|
3305
3210
|
},
|
|
3306
|
-
|
|
3211
|
+
__wbg_disconnect_285027c2ec32acf6: function(arg0) {
|
|
3307
3212
|
const ret = arg0.disconnect();
|
|
3308
3213
|
return ret;
|
|
3309
3214
|
},
|
|
@@ -3542,8 +3447,8 @@ function __wbg_get_imports() {
|
|
|
3542
3447
|
const ret = LooseCommit.__wrap(arg0);
|
|
3543
3448
|
return ret;
|
|
3544
3449
|
},
|
|
3545
|
-
|
|
3546
|
-
const ret =
|
|
3450
|
+
__wbg_messageporttransport_new: function(arg0) {
|
|
3451
|
+
const ret = MessagePortTransport.__wrap(arg0);
|
|
3547
3452
|
return ret;
|
|
3548
3453
|
},
|
|
3549
3454
|
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
@@ -3579,7 +3484,7 @@ function __wbg_get_imports() {
|
|
|
3579
3484
|
const a = state0.a;
|
|
3580
3485
|
state0.a = 0;
|
|
3581
3486
|
try {
|
|
3582
|
-
return
|
|
3487
|
+
return __wasm_bindgen_func_elem_1476_183(a, state0.b, arg02, arg12);
|
|
3583
3488
|
} finally {
|
|
3584
3489
|
state0.a = a;
|
|
3585
3490
|
}
|
|
@@ -3600,6 +3505,12 @@ function __wbg_get_imports() {
|
|
|
3600
3505
|
return ret;
|
|
3601
3506
|
}, arguments);
|
|
3602
3507
|
},
|
|
3508
|
+
__wbg_new_f7708ba82c4c12f6: function() {
|
|
3509
|
+
return handleError(function() {
|
|
3510
|
+
const ret = new MessageChannel();
|
|
3511
|
+
return ret;
|
|
3512
|
+
}, arguments);
|
|
3513
|
+
},
|
|
3603
3514
|
__wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
|
|
3604
3515
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
3605
3516
|
return ret;
|
|
@@ -3611,7 +3522,7 @@ function __wbg_get_imports() {
|
|
|
3611
3522
|
const a = state0.a;
|
|
3612
3523
|
state0.a = 0;
|
|
3613
3524
|
try {
|
|
3614
|
-
return
|
|
3525
|
+
return __wasm_bindgen_func_elem_1476_184(a, state0.b, arg02, arg12);
|
|
3615
3526
|
} finally {
|
|
3616
3527
|
state0.a = a;
|
|
3617
3528
|
}
|
|
@@ -3632,10 +3543,6 @@ function __wbg_get_imports() {
|
|
|
3632
3543
|
return ret;
|
|
3633
3544
|
}, arguments);
|
|
3634
3545
|
},
|
|
3635
|
-
__wbg_nextRequestId_dd2f74cf9aba6ad5: function(arg0) {
|
|
3636
|
-
const ret = arg0.nextRequestId();
|
|
3637
|
-
return ret;
|
|
3638
|
-
},
|
|
3639
3546
|
__wbg_node_84ea875411254db1: function(arg0) {
|
|
3640
3547
|
const ret = arg0.node;
|
|
3641
3548
|
return ret;
|
|
@@ -3662,10 +3569,6 @@ function __wbg_get_imports() {
|
|
|
3662
3569
|
const ret = Array.of(arg0, arg1);
|
|
3663
3570
|
return ret;
|
|
3664
3571
|
},
|
|
3665
|
-
__wbg_onmessage_8ab5822ce277f116: function(arg0) {
|
|
3666
|
-
const ret = arg0.onmessage;
|
|
3667
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3668
|
-
},
|
|
3669
3572
|
__wbg_open_e7a9d3d6344572f6: function() {
|
|
3670
3573
|
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
3671
3574
|
const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
@@ -3684,7 +3587,15 @@ function __wbg_get_imports() {
|
|
|
3684
3587
|
const ret = PeerResultMap.__wrap(arg0);
|
|
3685
3588
|
return ret;
|
|
3686
3589
|
},
|
|
3687
|
-
|
|
3590
|
+
__wbg_port1_869a7ef90538dbdf: function(arg0) {
|
|
3591
|
+
const ret = arg0.port1;
|
|
3592
|
+
return ret;
|
|
3593
|
+
},
|
|
3594
|
+
__wbg_port2_947a51b8ba00adc9: function(arg0) {
|
|
3595
|
+
const ret = arg0.port2;
|
|
3596
|
+
return ret;
|
|
3597
|
+
},
|
|
3598
|
+
__wbg_postMessage_1acd85b7323d11a6: function(arg0, arg1) {
|
|
3688
3599
|
arg0.postMessage(arg1);
|
|
3689
3600
|
},
|
|
3690
3601
|
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
@@ -3720,22 +3631,10 @@ function __wbg_get_imports() {
|
|
|
3720
3631
|
const ret = arg0.readyState;
|
|
3721
3632
|
return ret;
|
|
3722
3633
|
},
|
|
3723
|
-
|
|
3634
|
+
__wbg_recvBytes_35ad4c7c108ff4dd: function(arg0) {
|
|
3724
3635
|
const ret = arg0.recvBytes();
|
|
3725
3636
|
return ret;
|
|
3726
3637
|
},
|
|
3727
|
-
__wbg_recv_347c2a4b277359e4: function(arg0) {
|
|
3728
|
-
const ret = arg0.recv();
|
|
3729
|
-
return ret;
|
|
3730
|
-
},
|
|
3731
|
-
__wbg_reject_452b6409a2fde3cd: function(arg0) {
|
|
3732
|
-
const ret = Promise.reject(arg0);
|
|
3733
|
-
return ret;
|
|
3734
|
-
},
|
|
3735
|
-
__wbg_requestid_new: function(arg0) {
|
|
3736
|
-
const ret = RequestId.__wrap(arg0);
|
|
3737
|
-
return ret;
|
|
3738
|
-
},
|
|
3739
3638
|
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
3740
3639
|
return handleError(function() {
|
|
3741
3640
|
const ret = module.require;
|
|
@@ -3772,7 +3671,7 @@ function __wbg_get_imports() {
|
|
|
3772
3671
|
const ret = SedimentreeId.__unwrap(arg0);
|
|
3773
3672
|
return ret;
|
|
3774
3673
|
},
|
|
3775
|
-
|
|
3674
|
+
__wbg_sendBytes_c3a40be4ec4bfd25: function(arg0, arg1) {
|
|
3776
3675
|
const ret = arg0.sendBytes(arg1);
|
|
3777
3676
|
return ret;
|
|
3778
3677
|
},
|
|
@@ -3781,11 +3680,7 @@ function __wbg_get_imports() {
|
|
|
3781
3680
|
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
3782
3681
|
}, arguments);
|
|
3783
3682
|
},
|
|
3784
|
-
|
|
3785
|
-
const ret = arg0.send(Message.__wrap(arg1));
|
|
3786
|
-
return ret;
|
|
3787
|
-
},
|
|
3788
|
-
__wbg_setTimeout_44f7c6b8fbfaf279: function(arg0, arg1) {
|
|
3683
|
+
__wbg_setTimeout_5e8107dbc66751b5: function(arg0, arg1) {
|
|
3789
3684
|
const ret = setTimeout(arg0, arg1);
|
|
3790
3685
|
return ret;
|
|
3791
3686
|
},
|
|
@@ -3827,10 +3722,10 @@ function __wbg_get_imports() {
|
|
|
3827
3722
|
__wbg_set_onerror_901ca711f94a5bbb: function(arg0, arg1) {
|
|
3828
3723
|
arg0.onerror = arg1;
|
|
3829
3724
|
},
|
|
3830
|
-
|
|
3725
|
+
__wbg_set_onmessage_3b92dfded4487295: function(arg0, arg1) {
|
|
3831
3726
|
arg0.onmessage = arg1;
|
|
3832
3727
|
},
|
|
3833
|
-
|
|
3728
|
+
__wbg_set_onmessage_6f80ab771bf151aa: function(arg0, arg1) {
|
|
3834
3729
|
arg0.onmessage = arg1;
|
|
3835
3730
|
},
|
|
3836
3731
|
__wbg_set_onopen_34e3e24cf9337ddd: function(arg0, arg1) {
|
|
@@ -3842,16 +3737,16 @@ function __wbg_get_imports() {
|
|
|
3842
3737
|
__wbg_set_onupgradeneeded_860ce42184f987e7: function(arg0, arg1) {
|
|
3843
3738
|
arg0.onupgradeneeded = arg1;
|
|
3844
3739
|
},
|
|
3740
|
+
__wbg_sign_23c468db7fe0ee83: function(arg0, arg1) {
|
|
3741
|
+
const ret = arg0.sign(arg1);
|
|
3742
|
+
return ret;
|
|
3743
|
+
},
|
|
3845
3744
|
__wbg_sign_a34d057afd14c54d: function() {
|
|
3846
3745
|
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
3847
3746
|
const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
|
|
3848
3747
|
return ret;
|
|
3849
3748
|
}, arguments);
|
|
3850
3749
|
},
|
|
3851
|
-
__wbg_sign_b6a174bd584137fc: function(arg0, arg1) {
|
|
3852
|
-
const ret = arg0.sign(arg1);
|
|
3853
|
-
return ret;
|
|
3854
|
-
},
|
|
3855
3750
|
__wbg_signedfragment_new: function(arg0) {
|
|
3856
3751
|
const ret = SignedFragment.__wrap(arg0);
|
|
3857
3752
|
return ret;
|
|
@@ -3867,6 +3762,9 @@ function __wbg_get_imports() {
|
|
|
3867
3762
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3868
3763
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3869
3764
|
},
|
|
3765
|
+
__wbg_start_f837ba2bac4733b5: function(arg0) {
|
|
3766
|
+
arg0.start();
|
|
3767
|
+
},
|
|
3870
3768
|
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
3871
3769
|
const ret = typeof global === "undefined" ? null : global;
|
|
3872
3770
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
@@ -3895,8 +3793,8 @@ function __wbg_get_imports() {
|
|
|
3895
3793
|
const ret = Subduction.__wrap(arg0);
|
|
3896
3794
|
return ret;
|
|
3897
3795
|
},
|
|
3898
|
-
|
|
3899
|
-
const ret =
|
|
3796
|
+
__wbg_subductionhttplongpoll_new: function(arg0) {
|
|
3797
|
+
const ret = SubductionHttpLongPoll.__wrap(arg0);
|
|
3900
3798
|
return ret;
|
|
3901
3799
|
},
|
|
3902
3800
|
__wbg_subductionwebsocket_new: function(arg0) {
|
|
@@ -3940,7 +3838,7 @@ function __wbg_get_imports() {
|
|
|
3940
3838
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3941
3839
|
}, arguments);
|
|
3942
3840
|
},
|
|
3943
|
-
|
|
3841
|
+
__wbg_verifyingKey_e2a30e05511820c4: function(arg0) {
|
|
3944
3842
|
const ret = arg0.verifyingKey();
|
|
3945
3843
|
return ret;
|
|
3946
3844
|
},
|
|
@@ -3953,66 +3851,62 @@ function __wbg_get_imports() {
|
|
|
3953
3851
|
return ret;
|
|
3954
3852
|
},
|
|
3955
3853
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3956
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3854
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_255, __wasm_bindgen_func_elem_552);
|
|
3957
3855
|
return ret;
|
|
3958
3856
|
},
|
|
3959
3857
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3960
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3858
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_255, __wasm_bindgen_func_elem_552_1);
|
|
3961
3859
|
return ret;
|
|
3962
3860
|
},
|
|
3963
3861
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3964
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3862
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_255, __wasm_bindgen_func_elem_552_2);
|
|
3965
3863
|
return ret;
|
|
3966
3864
|
},
|
|
3967
3865
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3968
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3866
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_255, __wasm_bindgen_func_elem_552_3);
|
|
3969
3867
|
return ret;
|
|
3970
3868
|
},
|
|
3971
3869
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3972
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3973
|
-
return ret;
|
|
3974
|
-
},
|
|
3975
|
-
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3976
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_239, __wasm_bindgen_func_elem_528);
|
|
3870
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_255, __wasm_bindgen_func_elem_1476);
|
|
3977
3871
|
return ret;
|
|
3978
3872
|
},
|
|
3979
|
-
|
|
3873
|
+
__wbindgen_cast_0000000000000006: function(arg0) {
|
|
3980
3874
|
const ret = arg0;
|
|
3981
3875
|
return ret;
|
|
3982
3876
|
},
|
|
3983
|
-
|
|
3877
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3984
3878
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3985
3879
|
return ret;
|
|
3986
3880
|
},
|
|
3987
|
-
|
|
3881
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3988
3882
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
3989
3883
|
return ret;
|
|
3990
3884
|
},
|
|
3991
|
-
|
|
3885
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3992
3886
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3993
3887
|
wasm.__wbindgen_export5(arg0, arg1 * 4, 4);
|
|
3994
3888
|
const ret = v0;
|
|
3995
3889
|
return ret;
|
|
3996
3890
|
},
|
|
3997
|
-
|
|
3891
|
+
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
3998
3892
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3999
3893
|
wasm.__wbindgen_export5(arg0, arg1 * 4, 4);
|
|
4000
3894
|
const ret = v0;
|
|
4001
3895
|
return ret;
|
|
4002
3896
|
},
|
|
4003
|
-
|
|
3897
|
+
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
4004
3898
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
4005
3899
|
wasm.__wbindgen_export5(arg0, arg1 * 4, 4);
|
|
4006
3900
|
const ret = v0;
|
|
4007
3901
|
return ret;
|
|
4008
3902
|
},
|
|
4009
|
-
|
|
3903
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
4010
3904
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
4011
3905
|
wasm.__wbindgen_export5(arg0, arg1 * 4, 4);
|
|
4012
3906
|
const ret = v0;
|
|
4013
3907
|
return ret;
|
|
4014
3908
|
},
|
|
4015
|
-
|
|
3909
|
+
__wbindgen_cast_000000000000000d: function(arg0, arg1) {
|
|
4016
3910
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
4017
3911
|
wasm.__wbindgen_export5(arg0, arg1 * 4, 4);
|
|
4018
3912
|
const ret = v0;
|
|
@@ -4033,39 +3927,33 @@ function __wbg_get_imports() {
|
|
|
4033
3927
|
"./subduction_wasm_bg.js": import0
|
|
4034
3928
|
};
|
|
4035
3929
|
}
|
|
4036
|
-
function
|
|
4037
|
-
wasm.
|
|
4038
|
-
}
|
|
4039
|
-
function __wasm_bindgen_func_elem_529(arg0, arg1, arg2) {
|
|
4040
|
-
wasm.__wasm_bindgen_func_elem_529(arg0, arg1, arg2);
|
|
3930
|
+
function __wasm_bindgen_func_elem_552(arg0, arg1, arg2) {
|
|
3931
|
+
wasm.__wasm_bindgen_func_elem_552(arg0, arg1, arg2);
|
|
4041
3932
|
}
|
|
4042
|
-
function
|
|
4043
|
-
wasm.
|
|
3933
|
+
function __wasm_bindgen_func_elem_552_1(arg0, arg1, arg2) {
|
|
3934
|
+
wasm.__wasm_bindgen_func_elem_552_1(arg0, arg1, arg2);
|
|
4044
3935
|
}
|
|
4045
|
-
function
|
|
4046
|
-
wasm.
|
|
3936
|
+
function __wasm_bindgen_func_elem_552_2(arg0, arg1, arg2) {
|
|
3937
|
+
wasm.__wasm_bindgen_func_elem_552_2(arg0, arg1, arg2);
|
|
4047
3938
|
}
|
|
4048
|
-
function
|
|
4049
|
-
wasm.
|
|
3939
|
+
function __wasm_bindgen_func_elem_552_3(arg0, arg1, arg2) {
|
|
3940
|
+
wasm.__wasm_bindgen_func_elem_552_3(arg0, arg1, arg2);
|
|
4050
3941
|
}
|
|
4051
|
-
function
|
|
4052
|
-
const ret = wasm.
|
|
3942
|
+
function __wasm_bindgen_func_elem_1476(arg0, arg1, arg2) {
|
|
3943
|
+
const ret = wasm.__wasm_bindgen_func_elem_1476(arg0, arg1, arg2);
|
|
4053
3944
|
if (ret[1]) {
|
|
4054
3945
|
throw takeFromExternrefTable0(ret[0]);
|
|
4055
3946
|
}
|
|
4056
3947
|
}
|
|
4057
|
-
function
|
|
4058
|
-
wasm.
|
|
3948
|
+
function __wasm_bindgen_func_elem_1476_183(arg0, arg1, arg2, arg3) {
|
|
3949
|
+
wasm.__wasm_bindgen_func_elem_1476_183(arg0, arg1, arg2, arg3);
|
|
4059
3950
|
}
|
|
4060
|
-
function
|
|
4061
|
-
wasm.
|
|
3951
|
+
function __wasm_bindgen_func_elem_1476_184(arg0, arg1, arg2, arg3) {
|
|
3952
|
+
wasm.__wasm_bindgen_func_elem_1476_184(arg0, arg1, arg2, arg3);
|
|
4062
3953
|
}
|
|
4063
3954
|
var __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
4064
3955
|
var __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
4065
3956
|
var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
4066
|
-
var ConnErrorPairFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4067
|
-
}, unregister: () => {
|
|
4068
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_connerrorpair_free(ptr >>> 0, 1));
|
|
4069
3957
|
var MemorySignerFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4070
3958
|
}, unregister: () => {
|
|
4071
3959
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_memorysigner_free(ptr >>> 0, 1));
|
|
@@ -4075,12 +3963,12 @@ var MemoryStorageFinalization = typeof FinalizationRegistry === "undefined" ? {
|
|
|
4075
3963
|
var PeerBatchSyncResultFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4076
3964
|
}, unregister: () => {
|
|
4077
3965
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_peerbatchsyncresult_free(ptr >>> 0, 1));
|
|
4078
|
-
var AuthenticatedConnectionFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4079
|
-
}, unregister: () => {
|
|
4080
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_authenticatedconnection_free(ptr >>> 0, 1));
|
|
4081
3966
|
var AuthenticatedLongPollFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4082
3967
|
}, unregister: () => {
|
|
4083
3968
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_authenticatedlongpoll_free(ptr >>> 0, 1));
|
|
3969
|
+
var AuthenticatedTransportFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
3970
|
+
}, unregister: () => {
|
|
3971
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_authenticatedtransport_free(ptr >>> 0, 1));
|
|
4084
3972
|
var AuthenticatedWebSocketFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4085
3973
|
}, unregister: () => {
|
|
4086
3974
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_authenticatedwebsocket_free(ptr >>> 0, 1));
|
|
@@ -4099,9 +3987,6 @@ var CallErrorFinalization = typeof FinalizationRegistry === "undefined" ? { regi
|
|
|
4099
3987
|
var CommitWithBlobFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4100
3988
|
}, unregister: () => {
|
|
4101
3989
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_commitwithblob_free(ptr >>> 0, 1));
|
|
4102
|
-
var ConnectionIdFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4103
|
-
}, unregister: () => {
|
|
4104
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_connectionid_free(ptr >>> 0, 1));
|
|
4105
3990
|
var DepthFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4106
3991
|
}, unregister: () => {
|
|
4107
3992
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_depth_free(ptr >>> 0, 1));
|
|
@@ -4123,21 +4008,21 @@ var FragmentsArrayFinalization = typeof FinalizationRegistry === "undefined" ? {
|
|
|
4123
4008
|
var HashMetricFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4124
4009
|
}, unregister: () => {
|
|
4125
4010
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_hashmetric_free(ptr >>> 0, 1));
|
|
4011
|
+
var SubductionHttpLongPollFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4012
|
+
}, unregister: () => {
|
|
4013
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_subductionhttplongpoll_free(ptr >>> 0, 1));
|
|
4126
4014
|
var SubductionLongPollFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4127
4015
|
}, unregister: () => {
|
|
4128
4016
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_subductionlongpoll_free(ptr >>> 0, 1));
|
|
4129
|
-
var SubductionLongPollConnectionFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4130
|
-
}, unregister: () => {
|
|
4131
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_subductionlongpollconnection_free(ptr >>> 0, 1));
|
|
4132
4017
|
var LooseCommitFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4133
4018
|
}, unregister: () => {
|
|
4134
4019
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_loosecommit_free(ptr >>> 0, 1));
|
|
4135
|
-
var
|
|
4020
|
+
var SyncMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4136
4021
|
}, unregister: () => {
|
|
4137
|
-
} } : new FinalizationRegistry((ptr) => wasm.
|
|
4138
|
-
var
|
|
4022
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_syncmessage_free(ptr >>> 0, 1));
|
|
4023
|
+
var MessagePortTransportFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4139
4024
|
}, unregister: () => {
|
|
4140
|
-
} } : new FinalizationRegistry((ptr) => wasm.
|
|
4025
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_messageporttransport_free(ptr >>> 0, 1));
|
|
4141
4026
|
var NonceFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
4142
4027
|
}, unregister: () => {
|
|
4143
4028
|
} } : new FinalizationRegistry((ptr) => wasm.__wbg_nonce_free(ptr >>> 0, 1));
|
|
@@ -4472,16 +4357,14 @@ function __wbg_set_wasm(val) {
|
|
|
4472
4357
|
}
|
|
4473
4358
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4474
4359
|
0 && (module.exports = {
|
|
4475
|
-
AuthenticatedConnection,
|
|
4476
4360
|
AuthenticatedLongPoll,
|
|
4361
|
+
AuthenticatedTransport,
|
|
4477
4362
|
AuthenticatedWebSocket,
|
|
4478
4363
|
BatchSyncRequest,
|
|
4479
4364
|
BatchSyncResponse,
|
|
4480
4365
|
BlobMeta,
|
|
4481
4366
|
CallError,
|
|
4482
4367
|
CommitWithBlob,
|
|
4483
|
-
ConnErrorPair,
|
|
4484
|
-
ConnectionId,
|
|
4485
4368
|
Depth,
|
|
4486
4369
|
Digest,
|
|
4487
4370
|
Fragment,
|
|
@@ -4492,8 +4375,7 @@ function __wbg_set_wasm(val) {
|
|
|
4492
4375
|
LooseCommit,
|
|
4493
4376
|
MemorySigner,
|
|
4494
4377
|
MemoryStorage,
|
|
4495
|
-
|
|
4496
|
-
MessagePortConnection,
|
|
4378
|
+
MessagePortTransport,
|
|
4497
4379
|
Nonce,
|
|
4498
4380
|
PeerBatchSyncResult,
|
|
4499
4381
|
PeerId,
|
|
@@ -4505,13 +4387,14 @@ function __wbg_set_wasm(val) {
|
|
|
4505
4387
|
SignedFragment,
|
|
4506
4388
|
SignedLooseCommit,
|
|
4507
4389
|
Subduction,
|
|
4390
|
+
SubductionHttpLongPoll,
|
|
4508
4391
|
SubductionLongPoll,
|
|
4509
|
-
SubductionLongPollConnection,
|
|
4510
4392
|
SubductionWebSocket,
|
|
4393
|
+
SyncMessage,
|
|
4511
4394
|
SyncStats,
|
|
4512
4395
|
WebCryptoSigner,
|
|
4513
4396
|
__wbg_set_wasm,
|
|
4514
4397
|
initSync,
|
|
4515
|
-
|
|
4398
|
+
makeMessagePortTransport,
|
|
4516
4399
|
start
|
|
4517
4400
|
});
|