diff --git a/README.md b/README.md index 16fb48e..69d1fec 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Ensure you have the following installed: ### Installation To install the XLink SDK, use the following command: ```bash -pnpm install @xlink-project/xlink-sdk +pnpm install @xlink-network/xlink-sdk ``` ## XLink SDK API @@ -58,9 +58,8 @@ The `KnownTokenId` namespace manages the token IDs of supported cryptocurrencies Note: Users can transfer between different coins/tokens, not just the same token on different blockchains. For example, it's possible to convert BTC to WBTC when moving from Bitcoin to an EVM network. - ### XLink SDK -The `XLinkSDK` object contains the most important functions of this library, all grouped together. To create it: +The [`XLinkSDK`](https://docs-typedoc.xlink-sdk.pages.dev/modules/XLinkSDK) object contains the most important functions of this library, all grouped together. To create it: ```typescript const theSdk = new XLinkSDK(); @@ -68,21 +67,20 @@ const theSdk = new XLinkSDK(); For detailed API documentation, including a full list of available methods and their usage, please refer to: -[Latest version SDK API Documentation](https://releases-latest.xlink-sdk.pages.dev/) +[SDK API Documentation](https://docs-typedoc.xlink-sdk.pages.dev/classes/XLinkSDK.XLinkSDK) -### USE CASES +### Use Cases Create an instance of the SDK with default options ```typescript -import{ XLinkSDK } from '@xlink-project/xlink-sdk/src'; - +import{ XLinkSDK } from '@xlink-network/xlink-sdk'; const xlinkSdk = new XLinkSDK(); ``` 1. Bridge from Stacks ```typescript -import { BridgeInfoFromStacksInput } from '@xlink-project/xlink-sdk/src/xlinkSdkUtils/bridgeInfoFromStacks'; -import { BridgeFromStacksInput } from '@xlink-project/xlink-sdk/src/xlinkSdkUtils/bridgeFromStacks'; -import { KnownChainId, KnownTokenId } from '@xlink-project/xlink-sdk/src/utils/types/knownIds'; +import { BridgeInfoFromStacksInput } from '@xlink-network/xlink-sdk/xlinkSdkUtils/bridgeInfoFromStacks'; +import { BridgeFromStacksInput } from '@xlink-network/xlink-sdk/xlinkSdkUtils/bridgeFromStacks'; +import { KnownChainId, KnownTokenId } from '@xlink-network/xlink-sdk/utils/types/knownIds'; // Get bridge info const bridgeInfo = await xlinkSdk.bridgeInfoFromStacks({ @@ -124,9 +122,9 @@ console.log("Transaction ID:", result.txid); 2. Bridge from EVM ```typescript -import { BridgeInfoFromEVMInput } from '@xlink-project/xlink-sdk/src/xlinkSdkUtils/bridgeInfoFromEVM'; -import { BridgeFromEVMInput } from '@xlink-project/xlink-sdk/src/xlinkSdkUtils/bridgeFromEVM'; -import { KnownChainId, KnownTokenId } from '@xlink-project/xlink-sdk/src/utils/types/knownIds'; +import { BridgeInfoFromEVMInput } from '@xlink-network/xlink-sdk/xlinkSdkUtils/bridgeInfoFromEVM'; +import { BridgeFromEVMInput } from '@xlink-network/xlink-sdk/xlinkSdkUtils/bridgeFromEVM'; +import { KnownChainId, KnownTokenId } from '@xlink-network/xlink-sdk/utils/types/knownIds'; // Get bridge info const bridgeInfo = await xlinkSdk.bridgeInfoFromEVM({ @@ -153,9 +151,9 @@ console.log("Transaction ID:", result.txHash); 3. Bridge from Bitcoin ```typescript -import { BridgeInfoFromBitcoinInput } from '@xlink-project/xlink-sdk/src/xlinkSdkUtils/bridgeInfoFromBitcoin'; -import { BridgeFromBitcoinInput } from '@xlink-project/xlink-sdk/src/xlinkSdkUtils/bridgeFromBitcoin'; -import { KnownChainId, KnownTokenId } from '@xlink-project/xlink-sdk/src/utils/types/knownIds'; +import { BridgeInfoFromBitcoinInput } from '@xlink-network/xlink-sdk/xlinkSdkUtils/bridgeInfoFromBitcoin'; +import { BridgeFromBitcoinInput } from '@xlink-network/xlink-sdk/xlinkSdkUtils/bridgeFromBitcoin'; +import { KnownChainId, KnownTokenId } from '@xlink-network/xlink-sdk/utils/types/knownIds'; // Get bridge info const bridgeInfo = await xlinkSdk.bridgeInfoFromBitcoin({ diff --git a/package.json b/package.json index 103281a..e98b803 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "scripts": { "gen:stacksContract": "rm -rf generated/smartContract && mkdir -p generated/smartContract && tsx ./scripts/generateClarityTranscoders.ts", "gen": "pnpm run gen:stacksContract", - "docs": "typedoc", - "docs:watch": "typedoc --watch", + "docs": "typedoc src/index.ts", + "docs:watch": "typedoc src/index.ts --watch", "build": "pnpm run gen && rm -rf lib && tsup-node --sourcemap --dts -d lib --format cjs,esm src", "prepare": "pnpm run build", "test": "vitest --exclude lib"