@polkadot-apps/host-sdk
v0.4.0
Published
TypeScript wrapper for @polkadot-apps/host-wasm — typed APIs, lifecycle management, and ergonomic initialization
Downloads
2,596
Readme
@polkadot/host-sdk
TypeScript helpers and wrappers for host SDK consumers.
Experimental
This package currently includes an experimental peer-to-peer file transfer module built on top of window.host.ext.data.
Current location:
src/experimental/file-transfer.tssrc/experimental/logger.tsexamples/file-transfer-console.ts
Current consumer:
vox
Current design:
- JSON control messages
- binary chunk payloads
- adaptive receive window
- retry/recovery handling
- cancel support
- SHA-256 integrity verification
Current status:
- validated manually with medium and large transfers
- API is not yet stable
- behavior and tuning may still change
Recommended usage for now:
import * as experimental from "@polkadot/host-sdk/experimental";
experimental.initDataEvents();
experimental.onDataEvent((event) => {
console.log(event.type);
});There is also a minimal example consumer in:
examples/file-transfer-console.ts
Near-term roadmap:
- keep Vox as the primary consumer while the API settles
- continue throughput tuning against this module instead of app-local code
- later decide whether to promote this to a stable supported surface
