From 8bf93ea9c6768a97df17c6f87ad4e0d13f858a14 Mon Sep 17 00:00:00 2001 From: Chad Ostrowski <221614+chadoh@users.noreply.github.com> Date: Wed, 15 May 2024 12:24:43 -0400 Subject: [PATCH] docs: attempt documenting exported modules this doesn't actually show up when you import these things. looking into it. in the meantime, it's useful to have the notes I wrote, so we can actually export them in the future. --- src/index.ts | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 45ca253b2..83dfde51f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,11 +16,33 @@ export * as Friendbot from './friendbot'; // Horizon-related classes to expose export * as Horizon from './horizon'; -// Soroban RPC-related classes to expose +/** + * Tools for interacting with the Soroban RPC server, such as `Server`, + * `assembleTransaction`, and the `Api` types. You can import these from the + * `/rpc` entrypoint, if your version of Node and your TypeScript configuration + * allow it: + * + * ```ts + * import { Server } from '@stellar/stellar-sdk/rpc'; + * ``` + */ export * as rpc from './rpc'; + +/** + * @deprecated Use `rpc` instead + */ export * as SorobanRpc from './rpc'; -// Soroban Contract-related classes to expose +/** + * Tools for interacting with smart contracts, such as `Client`, `Spec`, and + * `AssembledTransaction`. You can import these from the `/contract` + * entrypoint, if your version of Node and your TypeScript configuration allow + * it: + * + * ```ts + * import { Client } from '@stellar/stellar-sdk/contract'; + * ``` + */ export * as contract from './contract' // expose classes and functions from stellar-base