@freqhole/midden 0.2.8 → 0.2.10
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/midden.d.ts +9 -0
- package/midden_bg.js +23 -7
- package/midden_bg.wasm +0 -0
- package/package.json +1 -1
package/midden.d.ts
CHANGED
|
@@ -425,6 +425,15 @@ export class MiddenNode {
|
|
|
425
425
|
* peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
|
|
426
426
|
*/
|
|
427
427
|
fetch_hello_image(peer_addr: string): Promise<HelloImageResult>;
|
|
428
|
+
/**
|
|
429
|
+
* snapshot of this node's own outgoing blob transfers currently in
|
|
430
|
+
* flight (this node serving, some other peer snatching) - mirrors
|
|
431
|
+
* reliquary's hub-side `TransferRegistry::snapshot`, so loam's
|
|
432
|
+
* `p2p/transfer-progress.ts` can show live upload progress for browser
|
|
433
|
+
* peers too, not just tauri peers. each entry serializes as
|
|
434
|
+
* `{ peerId, blake3, bytesSent, totalSize }`.
|
|
435
|
+
*/
|
|
436
|
+
get_active_transfers(): any;
|
|
428
437
|
/**
|
|
429
438
|
* check whether a blob with the given blake3 hash is currently held in the store
|
|
430
439
|
* via an active TempTag. avoids expensive OPFS read + bao recomputation when the
|
package/midden_bg.js
CHANGED
|
@@ -910,6 +910,22 @@ export class MiddenNode {
|
|
|
910
910
|
const ret = wasm.middennode_fetch_hello_image(this.__wbg_ptr, ptr0, len0);
|
|
911
911
|
return ret;
|
|
912
912
|
}
|
|
913
|
+
/**
|
|
914
|
+
* snapshot of this node's own outgoing blob transfers currently in
|
|
915
|
+
* flight (this node serving, some other peer snatching) - mirrors
|
|
916
|
+
* reliquary's hub-side `TransferRegistry::snapshot`, so loam's
|
|
917
|
+
* `p2p/transfer-progress.ts` can show live upload progress for browser
|
|
918
|
+
* peers too, not just tauri peers. each entry serializes as
|
|
919
|
+
* `{ peerId, blake3, bytesSent, totalSize }`.
|
|
920
|
+
* @returns {any}
|
|
921
|
+
*/
|
|
922
|
+
get_active_transfers() {
|
|
923
|
+
const ret = wasm.middennode_get_active_transfers(this.__wbg_ptr);
|
|
924
|
+
if (ret[2]) {
|
|
925
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
926
|
+
}
|
|
927
|
+
return takeFromExternrefTable0(ret[0]);
|
|
928
|
+
}
|
|
913
929
|
/**
|
|
914
930
|
* check whether a blob with the given blake3 hash is currently held in the store
|
|
915
931
|
* via an active TempTag. avoids expensive OPFS read + bao recomputation when the
|
|
@@ -2106,37 +2122,37 @@ export function __wbg_write_e557b5312ec23477() { return handleError(function (ar
|
|
|
2106
2122
|
return ret;
|
|
2107
2123
|
}, arguments); }
|
|
2108
2124
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
2109
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
2125
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3541, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2110
2126
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_);
|
|
2111
2127
|
return ret;
|
|
2112
2128
|
}
|
|
2113
2129
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
2114
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
2130
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5587, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2115
2131
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_);
|
|
2116
2132
|
return ret;
|
|
2117
2133
|
}
|
|
2118
2134
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
2119
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
2135
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2819, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2120
2136
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_);
|
|
2121
2137
|
return ret;
|
|
2122
2138
|
}
|
|
2123
2139
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
2124
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
2140
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4172, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2125
2141
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_);
|
|
2126
2142
|
return ret;
|
|
2127
2143
|
}
|
|
2128
2144
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
2129
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2145
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3460, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2130
2146
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_);
|
|
2131
2147
|
return ret;
|
|
2132
2148
|
}
|
|
2133
2149
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
2134
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2150
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3714, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2135
2151
|
const ret = makeClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_);
|
|
2136
2152
|
return ret;
|
|
2137
2153
|
}
|
|
2138
2154
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
2139
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2155
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5551, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2140
2156
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_);
|
|
2141
2157
|
return ret;
|
|
2142
2158
|
}
|
package/midden_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED