Documentation
    Preparing search index...

    Interface CatalogIntentResolverOptions

    interface CatalogIntentResolverOptions {
        targets: IntentTargetController;
        authorizeExplicitHandler?(
            sender: string,
            handler: string,
            request: IntentRequest,
            candidate: IntentCandidate,
        ): boolean | Promise<boolean>;
        chooseHandler?(
            archetype: string,
            candidates: IntentCandidate[],
            sender: string,
        ): string | Promise<string | undefined> | undefined;
        getDefaultHandler?(archetype: string): string | undefined;
        loadCatalog(): IntentCatalogEntry[] | Promise<IntentCatalogEntry[]>;
    }
    Index

    Properties

    Target controller that creates/readies the selected target and dispatches its convention.

    Methods

    • Authorize a caller's explicit handler dTag preference.

      Parameters

      • sender: string

        Runtime-attested source napplet dTag.

      • handler: string

        Explicit requested handler dTag.

      • request: IntentRequest

        Normalized intent request.

      • candidate: IntentCandidate

        Installed exact-compatible candidate.

      Returns boolean | Promise<boolean>

      true only when explicit targeting is user-authorized.

    • Ask user policy to select one exact-compatible candidate.

      Parameters

      • archetype: string

        Normalized archetype slug.

      • candidates: IntentCandidate[]

        Only candidates with an exact matching contract.

      • sender: string

        Runtime-attested source napplet dTag.

      Returns string | Promise<string | undefined> | undefined

      A candidate dTag, or undefined when the user cancels.

    • Return the user's default handler dTag for an archetype.

      Parameters

      • archetype: string

        Normalized archetype slug.

      Returns string | undefined

      The user-selected default dTag, or undefined.