Skip to main content

Crate host_product_view

Crate host_product_view 

Source
Expand description

ProductView delegate trait and supporting types for Polkadot product host embedding.

This crate defines the contract between the host-api message processor and the platform-specific host layer (iOS, Android, desktop, WASM). It is intentionally free of host-api internals so it can be implemented across all target platforms without pulling in SCALE codecs or smoldot.

§Usage

  1. Implement ProductViewDelegate for your platform’s view controller.
  2. After calling HostApi::handle_message, map the HostApiOutcome fields to the corresponding delegate method.
  3. Use ProductLoadState to drive loading UI and ProductAssets to serve the verified bundle into the WebView.

Re-exports§

pub use delegate::ChainRpcRequest;
pub use delegate::ProductViewDelegate;
pub use error::ProductError;
pub use grant_store::InMemorySandboxGrantStore;
pub use grant_store::SandboxGrantStore;
pub use grant_store::SandboxGrantStoreError;
pub use manifest::ConsentChainTarget;
pub use manifest::ConsentSandboxRequest;
pub use manifest::HostChainRequirements;
pub use manifest::HostChainTarget;
pub use manifest::HostManifest;
pub use manifest::HostSandboxRequest;
pub use manifest::HostSandboxRequirements;
pub use manifest::ManifestError;
pub use manifest::PreparedProductBundle;
pub use manifest::PresentationConsentSummary;
pub use manifest::ProductBundleError;
pub use manifest::ProductConsentSummary;
pub use manifest::ProductManifest;
pub use manifest::ProductMetadata;
pub use manifest::ProductModality;
pub use manifest::ProductSource;
pub use manifest::PublisherMetadata;
pub use manifest::SandboxRequestKind;
pub use manifest::VerifiedConsentSummary;
pub use permissions::EffectiveSandboxPermissions;
pub use permissions::GrantedSandboxRequest;
pub use permissions::SandboxGrant;
pub use permissions::SandboxPermissionResolution;
pub use preflight::ConsentDenyBehavior;
pub use preflight::ProductConsentDecision;
pub use preflight::ProductPreflightContext;
pub use preflight::ProductPreflightDenyReason;
pub use preflight::ProductPreflightError;
pub use preflight::ProductPreflightOutcome;
pub use preflight::ProductPreflightPrompt;
pub use security::csp_for_scheme;
pub use security::inject_into_head;
pub use serving::serve_asset;
pub use state::ProductAssets;
pub use state::ProductLoadState;

Modules§

delegate
The ProductViewDelegate trait.
error
Error types for host-product-view.
grant_store
manifest
mime
MIME type detection and asset path validation for serving product bundles.
permissions
preflight
security
Security constants and scripts for sandboxing product WebViews.
serving
Asset serving helpers for custom URI scheme handlers.
state
Product loading state and asset types.