UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

22 lines (21 loc) 1.05 kB
import { Metadata } from '@grpc/grpc-js'; /** * The SemVer version of the gRPC proto API, independent of the SDK version. * Matches `protos/VERSION` and `CanKingServiceInfo.ProtoApiVersion` in the .NET server. * @internal */ export declare const PROTO_API_VERSION = "2.0.0"; /** * Creates gRPC call metadata for the CanKing client. * * Attach the returned `Metadata` to every gRPC call so the CanKing Service can * identify the caller, apply the correct locale, and detect version mismatches. * * @internal * * @param version - The version of the CanKing client. Defaults to the version from `package.json` or `'unknown'`. * @param language - BCP 47 language tag for the UI locale (e.g. `'en'`, `'sv'`). Defaults to `'en'`. * @param useHexNumericBase - Whether to display numeric values in hexadecimal. Defaults to `true`. * @returns A {@link Metadata} object populated with standard CanKing client headers. */ export declare function createCanKingMetadata(version?: string, language?: string, useHexNumericBase?: boolean): Metadata;