Polkadot Apps
    Preparing search index...

    Provider for the Host API (Polkadot Desktop / Android).

    Dynamically imports @novasamatech/product-sdk at runtime so it remains an optional peer dependency. Apps running outside a host container will gracefully get a HOST_UNAVAILABLE error.

    Supports both non-product accounts (user's external wallets) and product accounts (app-scoped derived accounts managed by the host).

    Implements

    Index

    Constructors

    Properties

    type: ProviderType = "host"

    Unique identifier for this provider type.

    Methods

    • Create a Ring VRF proof for anonymous operations.

      Proves that the signer is a member of the ring at the given location without revealing which member. Used for privacy-preserving protocols.

      Requires a prior successful connect() call.

      Parameters

      • dotNsIdentifier: string
      • derivationIndex: number
      • location: RingLocation
      • message: Uint8Array

      Returns Promise<Result<Uint8Array<ArrayBufferLike>, SignerError>>

    • Get an app-scoped product account from the host.

      Product accounts are derived by the host wallet for each app, identified by dotNsIdentifier (e.g., "mark3t.dot"). The user controls these accounts but they are scoped to the requesting app.

      Requires a prior successful connect() call.

      Parameters

      • dotNsIdentifier: string
      • derivationIndex: number = 0

      Returns Promise<Result<SignerAccount, SignerError>>

    • Inject the host wallet as a Spektr extension into window.injectedWeb3.

      This is a compatibility fallback for container environments where the direct Host API connection fails. After injection, the host wallet appears as a standard browser extension and can be used via ExtensionProvider.

      The direct Host API path (via HostProvider.connect()) is preferred because it supports the full Host API surface (product accounts, Ring VRF, etc.). Spektr injection only provides non-product account access.

      Parameters

      • OptionalloadSdk: () => Promise<ProductSdkModule>

        Custom SDK loader for testing. Defaults to dynamic import.

      Returns Promise<boolean>

      true if injection succeeded, false otherwise.