@honua/sdk-js
    Preparing search index...

    Interface QueryCapableProtocolModule<TKind, TAdapter, TQueryBinding>

    Atomic query-capable extension of ProtocolModule.

    A module either implements this interface and therefore provides both hooks, or implements the discovery-only base interface and provides neither. Keeping the pair in a separate required interface prevents partially executable modules from satisfying the public contract.

    interface QueryCapableProtocolModule<
        TKind extends string = string,
        TAdapter = unknown,
        TQueryBinding extends
            ProtocolModuleQueryBinding = ProtocolModuleQueryBinding,
    > {
        environments: readonly ProtocolModuleEnvironment[];
        kind: TKind;
        peer?: unknown;
        capabilities(descriptor: SourceDescriptor<Protocol | TKind>): Capabilities;
        compile(
            input: ProtocolModuleQueryCompileInput<
                TQueryBinding["source"],
                TQueryBinding["compileQuery"],
            >,
        ): TQueryBinding["compiled"];
        discover(
            descriptor: SourceDescriptor<Protocol | TKind>,
            options?: ProtocolModuleDiscoverOptions,
        ):
            | ProtocolModuleHandle<TAdapter, Protocol | TKind>
            | Promise<ProtocolModuleHandle<TAdapter, Protocol | TKind>>;
        execute<TRecord = Record<string, unknown>>(
            handle: ProtocolModuleHandle<TAdapter, Protocol | TKind>,
            input: ProtocolModuleQueryExecuteInput<
                TQueryBinding["compiled"],
                TQueryBinding["executeQuery"],
            >,
        ): Promise<Result<TRecord>>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    environments: readonly ProtocolModuleEnvironment[]
    kind: TKind
    peer?: unknown

    Methods