/** * @paritytech/host-sdk — TypeScript wrapper for host-wasm. * * Provides typed APIs, auto-tick lifecycle management, and ergonomic * initialization on top of the raw WASM bindings. * * @example * ```ts * import { createHostSdk } from "@paritytech/host-sdk"; * * const sdk = await createHostSdk(); * sdk.wallet.loadMnemonic("abandon abandon ..."); * sdk.wallet.setOnAutoLock(() => console.log("wallet locked!")); * * const outcome = sdk.handleMessage(rawBytes, "com.myapp"); * if (outcome.type === "NeedsSign") { * const sig = sdk.wallet.sign(outcome.public_key, outcome.payload); * // ... send response back * } * ``` */ export type { AccountCreateProofErrorKind, AccountRequestCredentialsErrorKind, HostApiOutcome, OutcomeNeedsAccountCreateProof, OutcomeNeedsAccountGet, OutcomeNeedsAccountGetAlias, OutcomeNeedsPaymentBalanceSubscription, OutcomeNeedsPaymentRequest, OutcomeNeedsPaymentStatusSubscription, OutcomeNeedsPaymentTopUp, OutcomeResponse, OutcomeNeedsSign, OutcomeNeedsChainQuery, OutcomeNeedsChainSubscription, OutcomeNeedsNavigate, OutcomeNeedsChainFollow, OutcomeNeedsChainRpc, PaymentAmount, PaymentBalance, PaymentReceipt, PaymentRequest, PaymentStatus, PaymentTopUpRequest, PaymentTopUpSource, ProductAccountId, RingLocation, OutcomeSilent, DecodedStatement, WalletState, AutoLockCallback, } from "./types.js"; export type { FileOffer, DataEventType } from "./experimental/file-transfer.js"; export { SmoldotDriver } from "./chain.js"; export type { ChainReadinessOptions, ChainStatus, JsChainStore, SmoldotChainName, SmoldotClient, SmoldotChain, WasmChainClientHandle, } from "./chain.js"; export { StatementStoreDriver } from "./statement-store.js"; export type { StatementCallback, WasmStatementHandle, StatementTransport, } from "./statement-store.js"; export { mountProductView, mountProductViewUrl, prepareProductViewAssets } from "./product-view.js"; export type { ProductViewDelegate, ProductViewHandle, InteractiveProductViewHandle, StableBridgeAdapter, PrepareProductViewAssetsOptions, MountProductViewOptions, MountProductViewUrlOptions, ProductLoadState as ProductViewLoadState, SandboxViolation, } from "./product-view.js"; export { mountHostedProductView } from "./product-view-hosted.js"; export type { MountHostedProductViewOptions } from "./product-view-hosted.js"; export { createLocalStorageProductProtocolStorage, createProductProtocolChainProvider, mountProductProtocolBridge, } from "./product-protocol.js"; export type { MountProductProtocolBridgeOptions, ProductProtocolAccount, ProductProtocolBridgeHandle, ProductProtocolStorageAdapter, } from "./product-protocol.js"; export { createWalletAccountProvider } from "./account-provider.js"; export type { WalletAccountNameResolver, WalletAccountProvider, WalletAccountProviderOptions, } from "./account-provider.js"; export { isResponse, isNeedsSign, isNeedsChainQuery, isNeedsChainSubscription, isNeedsNavigate, isNeedsChainFollow, isNeedsChainRpc, isNeedsPaymentBalanceSubscription, isNeedsPaymentTopUp, isNeedsPaymentRequest, isNeedsPaymentStatusSubscription, isSilent, } from "./types.js"; export { DATA_CONNECTED, DATA_MESSAGE, DATA_BINARY, DATA_CLOSED, DATA_ERROR, DATA_INCOMING_CALL, MEDIA_TRACK_READY, MEDIA_CONNECTED, MEDIA_REMOTE_TRACK, MEDIA_CLOSED, MEDIA_ERROR, MEDIA_INCOMING_CALL, MEDIA_SIGNALING_PROGRESS, MEDIA_TRACK_STOPPED, MESH_TOPIC, MESH_QUERY, MESH_REPLY, MESH_SCOPED_QUERY, MESH_SCOPED_REPLY, MESH_PRESENCE, MESH_HEARTBEAT, MESH_PRIVATE_CONTROL, MESH_PRIVATE_RECEIPT, CRDT_REMOTE_UPDATE, CRDT_AWARENESS, CRDT_PEER_CHANGE, STATEMENT, } from "./events.js"; export type { DataConnectedPayload, DataMessagePayload, DataBinaryPayload, DataClosedPayload, DataErrorPayload, DataIncomingCallPayload, MediaTrackReadyPayload, MediaConnectedPayload, MediaRemoteTrackPayload, MediaClosedPayload, MediaErrorPayload, MediaIncomingCallPayload, MediaSignalingProgressPayload, MediaTrackStoppedPayload, MeshTopicPayload, MeshQueryPayload, MeshReplyPayload, MeshScopedQueryPayload, MeshScopedReplyPayload, MeshPresencePayload, MeshHeartbeatPayload, MeshControlEnvelope, MeshObjectPolicy, MeshObjectReadReason, MeshObjectResult, MeshPrivateControlPayload, MeshPrivateObjectRef, MeshPrivateReceiptPayload, CrdtJoinResult, CrdtRemoteUpdatePayload, CrdtAwarenessPayload, CrdtPeerChangePayload, } from "./events.js"; export { SIGNAL_OFFER, SIGNAL_ANSWER, SIGNAL_CANDIDATE, SIGNAL_HANGUP, SIGNAL_RING, SIGNAL_CONNECTED, SIGNAL_CLOSED, SIGNAL_REMOTE_TRACK, } from "./protocol.js"; export type { ProtocolUtils } from "./protocol.js"; export { onDataEvent, connectData, startDataListening, initDataEvents, closeData, isConnected, sendFile, acceptFileOffer, rejectFileOffer, cancelFileTransfer, } from "./experimental/file-transfer.js"; export * as experimental from "./experimental/index.js"; export { WalletSession } from "./wallet-session.js"; export { HostRuntime } from "./host-runtime.js"; export type { HostRuntimeSession, HostApiAccount } from "./host-runtime.js"; export { ProductHostRuntime } from "./product-host-runtime.js"; export { AUDITED_SUBSCRIPTION_STOP_METHODS, RuntimeChainBridge, STALE_PENDING_SUBSCRIPTION_TTL_MS, SmoldotRuntimeChainService, createRemoteRuntimeProvider, createSmoldotRuntimeChainService, } from "./runtime-chain.js"; export type { ProviderRuntimeChainService, RuntimeChainDriver, RuntimeChainRpcOptions, RuntimeChainService, SmoldotRuntimeChainServiceOptions, } from "./runtime-chain.js"; export { installScopedFrame, isTrustedOrigin, mountScopedFrame } from "./scoped-frame.js"; export type { InstallScopedFrameOptions, MountScopedFrameOptions, ScopedFrameHandle, ScopedFrameInitMessage, ScopedFrameReadyMessage, TrustedOriginMatcher, } from "./scoped-frame.js"; export { HostRuntimeRegistry, defaultHostRuntimeRegistry } from "./host-runtime-registry.js"; export { installHostRuntimeFrame, mountHostRuntimeFrame } from "./host-runtime-frame.js"; export type { InstallHostRuntimeFrameOptions, MountHostRuntimeFrameOptions, HostRuntimeFrameHandle, } from "./host-runtime-frame.js"; export { installRuntimeStorageAccessPrompt, mountRuntimeStorageAccessPrompt, getRuntimeStorageAccessStatus, } from "./runtime-storage-access.js"; export type { RuntimeStorageAccessTypes, RuntimeStorageAccessStatus, InstallRuntimeStorageAccessPromptOptions, MountRuntimeStorageAccessPromptOptions, RuntimeStorageAccessPromptHandle, } from "./runtime-storage-access.js"; export { chatAnnouncementTopic, chatReceiptTopic, chatMessageObjectPath, chatStreamId, createChatAnnouncement, createChatReceipt, createChatHeartbeat, chatStatusFromMeshStage, chatRepairTargetsFromHeartbeat, } from "./mesh-chat.js"; export type { MeshReceiptKind, MeshDeliveryStage, ChatMessageStatus, ChatAnnouncement, ChatReceipt, ChatHeartbeat, ChatRepairPlanInput, } from "./mesh-chat.js"; export { pairingSessionPrefix, pairingCapabilityId, pairingChallengePath, pairingApprovalPath, pairingRejectPath, createPairingCapability, createPairingBootstrap, createPairingChallengeRequest, createPairingApprovalReply, pairingStageFromReply, } from "./mesh-pairing.js"; export type { PairingStage, PairingCapability, PairingBootstrap, PairingScopedQueryRequest, PairingScopedQueryReply, } from "./mesh-pairing.js"; export { attachmentObjectPath, createAttachmentDescriptor, attachmentStageFromAvailability, } from "./mesh-attachment.js"; export type { AttachmentTransferStage, AttachmentDescriptor } from "./mesh-attachment.js"; export { notificationStreamId, notificationAnnouncementTopic, notificationReceiptTopic, notificationObjectPath, createNotificationAnnouncement, notificationStatusFromMesh, } from "./mesh-notification.js"; export type { NotificationUrgency, NotificationAudience, NotificationStatus, NotificationAnnouncement, } from "./mesh-notification.js"; export { meshPendingReason, meshPendingLabel } from "./mesh-delivery-diagnostics.js"; export type { MeshPendingReason, MeshPendingStateOptions } from "./mesh-delivery-diagnostics.js"; export type { ChainBootstrapSdk, CreateHostSdkOptions, DotnsSdk, HostSdk, } from "./sdk-interfaces.js"; import type { ChainBootstrapSdk, CreateHostSdkOptions, DotnsSdk, HostSdk } from "./sdk-interfaces.js"; /** * Initialize only the DOTNS/codec subset of host-sdk. * * This is intended for deterministic codec and resolver helper usage where * wallet, host-api, statement, and chain-client handles are unnecessary. */ export declare function createDotnsSdk(options?: CreateHostSdkOptions): Promise; /** * Initialize only the shared chain/bootstrap subset of host-sdk. * * This is intended for cold-path consumers that need chain-store ownership, * smoldot/runtime-chain integration, and hex helpers without wallet, * host-api, statement, or extension handles. */ export declare function createChainBootstrapSdk(options?: CreateHostSdkOptions): Promise; /** * Initialize the WASM module and create a fully-typed HostSdk instance. * * @example * ```ts * const sdk = await createHostSdk(); * console.log(sdk.wallet.state()); // "NoWallet" * ``` */ export declare function createHostSdk(options?: CreateHostSdkOptions): Promise; //# sourceMappingURL=index.d.ts.map