From 375d30ee5240c6714f153fa70b55a2e0bf4f2a27 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 7 Jul 2020 07:52:16 +0200 Subject: [PATCH] Add doc comment to LcdClient --- packages/sdk38/src/lcdclient.ts | 12 ++++++++++++ packages/sdk38/types/lcdclient.d.ts | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/packages/sdk38/src/lcdclient.ts b/packages/sdk38/src/lcdclient.ts index 384e35ea..92613533 100644 --- a/packages/sdk38/src/lcdclient.ts +++ b/packages/sdk38/src/lcdclient.ts @@ -52,6 +52,18 @@ function parseAxiosError(err: AxiosError): never { } } +/** + * A client to the LCD's (light client daemon) API. + * This light client connects to Tendermint (i.e. the chain), encodes/decodes Amino data for us and provides a convenient JSON interface. + * + * This _JSON over HTTP_ API is sometimes referred to as "REST" or "RPC", which are both misleading terms + * for the same thing. + * + * Please note that the client to the LCD can not verify light client proofs. When using this, + * you need to trust the API provider as well as the network connection between client and API. + * + * @see https://cosmos.network/rpc + */ export class LcdClient { /** Constructs an LCD client with 0 modules */ public static withModules(options: LcdClientBaseOptions): LcdClient; diff --git a/packages/sdk38/types/lcdclient.d.ts b/packages/sdk38/types/lcdclient.d.ts index 6850ddd2..f044d509 100644 --- a/packages/sdk38/types/lcdclient.d.ts +++ b/packages/sdk38/types/lcdclient.d.ts @@ -18,6 +18,18 @@ export interface LcdClientBaseOptions { readonly apiUrl: string; readonly broadcastMode?: BroadcastMode; } +/** + * A client to the LCD's (light client daemon) API. + * This light client connects to Tendermint (i.e. the chain), encodes/decodes Amino data for us and provides a convenient JSON interface. + * + * This _JSON over HTTP_ API is sometimes referred to as "REST" or "RPC", which are both misleading terms + * for the same thing. + * + * Please note that the client to the LCD can not verify light client proofs. When using this, + * you need to trust the API provider as well as the network connection between client and API. + * + * @see https://cosmos.network/rpc + */ export declare class LcdClient { /** Constructs an LCD client with 0 modules */ static withModules(options: LcdClientBaseOptions): LcdClient;