interface ModuleFields<TParams extends ModuleParams = ModuleParams> {
    address: Lowercase<string>;
    config: TParams["config"];
    id: string;
    modName?: string;
    params: TParams;
    previousHash: () => Promisable<undefined | string>;
    queries: string[];
    query: <
        T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
        TConf extends
            DeepRestrictToStringKeys<
                {
                    allowedQueries?: string[];
                    archiving?: { archivists?: string[]; queries?: string[] };
                    archivist?: string;
                    consoleLogger?: LogLevel;
                    labels?: { [key: string]: undefined | string };
                    name?: string;
                    paging?: { [key: string]: { size?: number } };
                    retry?: { backoff?: number; interval?: number; retries?: number };
                    schema: "network.xyo.module.config";
                    security?: {
                        allowAnonymous?: boolean;
                        allowed?: {
                            [key: string]: (Lowercase<string> | Lowercase<(...)>[])[];
                        };
                        disallowed?: { [key: string]: Lowercase<string>[] };
                    };
                    sign?: boolean;
                    storeQueries?: boolean;
                    timestamp?: boolean;
                },
            > = DeepRestrictToStringKeys<
            {
                allowedQueries?: string[];
                archiving?: { archivists?: string[]; queries?: string[] };
                archivist?: string;
                consoleLogger?: LogLevel;
                labels?: { [key: string]: undefined | string };
                name?: string;
                paging?: { [key: string]: { size?: number } };
                retry?: { backoff?: number; interval?: number; retries?: number };
                schema: "network.xyo.module.config";
                security?: {
                    allowAnonymous?: boolean;
                    allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                    disallowed?: { [key: string]: Lowercase<string>[] };
                };
                sign?: boolean;
                storeQueries?: boolean;
                timestamp?: boolean;
            },
        >,
    >(
        query: T,
        payloads?: DeepRestrictToStringKeys<{ schema: string }>[],
        queryConfig?: TConf,
    ) => Promisable<ModuleQueryResult>;
    queryable: <
        T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
        TConf extends
            DeepRestrictToStringKeys<
                {
                    allowedQueries?: string[];
                    archiving?: { archivists?: string[]; queries?: string[] };
                    archivist?: string;
                    consoleLogger?: LogLevel;
                    labels?: { [key: string]: undefined | string };
                    name?: string;
                    paging?: { [key: string]: { size?: number } };
                    retry?: { backoff?: number; interval?: number; retries?: number };
                    schema: "network.xyo.module.config";
                    security?: {
                        allowAnonymous?: boolean;
                        allowed?: {
                            [key: string]: (Lowercase<string> | Lowercase<(...)>[])[];
                        };
                        disallowed?: { [key: string]: Lowercase<string>[] };
                    };
                    sign?: boolean;
                    storeQueries?: boolean;
                    timestamp?: boolean;
                },
            > = DeepRestrictToStringKeys<
            {
                allowedQueries?: string[];
                archiving?: { archivists?: string[]; queries?: string[] };
                archivist?: string;
                consoleLogger?: LogLevel;
                labels?: { [key: string]: undefined | string };
                name?: string;
                paging?: { [key: string]: { size?: number } };
                retry?: { backoff?: number; interval?: number; retries?: number };
                schema: "network.xyo.module.config";
                security?: {
                    allowAnonymous?: boolean;
                    allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                    disallowed?: { [key: string]: Lowercase<string>[] };
                };
                sign?: boolean;
                storeQueries?: boolean;
                timestamp?: boolean;
            },
        >,
    >(
        query: T,
        payloads?: DeepRestrictToStringKeys<{ schema: string }>[],
        queryConfig?: TConf,
    ) => Promisable<boolean>;
    start?: () => Promisable<boolean>;
    stop?: () => Promisable<boolean>;
}

Type Parameters

Hierarchy (View Summary)

Properties

address: Lowercase<string>
config: TParams["config"]
id: string

The name (if specified) or address of the module

modName?: string
params: TParams
previousHash: () => Promisable<undefined | string>
queries: string[]
query: <
    T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
    TConf extends
        DeepRestrictToStringKeys<
            {
                allowedQueries?: string[];
                archiving?: { archivists?: string[]; queries?: string[] };
                archivist?: string;
                consoleLogger?: LogLevel;
                labels?: { [key: string]: undefined | string };
                name?: string;
                paging?: { [key: string]: { size?: number } };
                retry?: { backoff?: number; interval?: number; retries?: number };
                schema: "network.xyo.module.config";
                security?: {
                    allowAnonymous?: boolean;
                    allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                    disallowed?: { [key: string]: Lowercase<string>[] };
                };
                sign?: boolean;
                storeQueries?: boolean;
                timestamp?: boolean;
            },
        > = DeepRestrictToStringKeys<
        {
            allowedQueries?: string[];
            archiving?: { archivists?: string[]; queries?: string[] };
            archivist?: string;
            consoleLogger?: LogLevel;
            labels?: { [key: string]: undefined | string };
            name?: string;
            paging?: { [key: string]: { size?: number } };
            retry?: { backoff?: number; interval?: number; retries?: number };
            schema: "network.xyo.module.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                disallowed?: { [key: string]: Lowercase<string>[] };
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        },
    >,
>(
    query: T,
    payloads?: DeepRestrictToStringKeys<{ schema: string }>[],
    queryConfig?: TConf,
) => Promisable<ModuleQueryResult>
queryable: <
    T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
    TConf extends
        DeepRestrictToStringKeys<
            {
                allowedQueries?: string[];
                archiving?: { archivists?: string[]; queries?: string[] };
                archivist?: string;
                consoleLogger?: LogLevel;
                labels?: { [key: string]: undefined | string };
                name?: string;
                paging?: { [key: string]: { size?: number } };
                retry?: { backoff?: number; interval?: number; retries?: number };
                schema: "network.xyo.module.config";
                security?: {
                    allowAnonymous?: boolean;
                    allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                    disallowed?: { [key: string]: Lowercase<string>[] };
                };
                sign?: boolean;
                storeQueries?: boolean;
                timestamp?: boolean;
            },
        > = DeepRestrictToStringKeys<
        {
            allowedQueries?: string[];
            archiving?: { archivists?: string[]; queries?: string[] };
            archivist?: string;
            consoleLogger?: LogLevel;
            labels?: { [key: string]: undefined | string };
            name?: string;
            paging?: { [key: string]: { size?: number } };
            retry?: { backoff?: number; interval?: number; retries?: number };
            schema: "network.xyo.module.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                disallowed?: { [key: string]: Lowercase<string>[] };
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        },
    >,
>(
    query: T,
    payloads?: DeepRestrictToStringKeys<{ schema: string }>[],
    queryConfig?: TConf,
) => Promisable<boolean>
start?: () => Promisable<boolean>
stop?: () => Promisable<boolean>