From 2ba11290d4ed4e8592ec0317e688b70fabbbb179 Mon Sep 17 00:00:00 2001 From: c4605 Date: Thu, 29 Aug 2024 01:33:47 +0200 Subject: [PATCH 1/6] docs: update latest version doc url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4118e7..16fb48e 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ const theSdk = new XLinkSDK(); For detailed API documentation, including a full list of available methods and their usage, please refer to: -[SDK API Documentation](https://docs-typedoc.xlink-sdk.pages.dev/classes/XLinkSDK.XLinkSDK) +[Latest version SDK API Documentation](https://releases-latest.xlink-sdk.pages.dev/) ### USE CASES From ccf04ee1445d6792c0536b61a7e98ab25cd58e66 Mon Sep 17 00:00:00 2001 From: c4605 Date: Thu, 29 Aug 2024 13:47:52 +0200 Subject: [PATCH 2/6] docs: add docs/project-branch-model.md to illustrate the branch model --- docs/project-branch-model.md | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/project-branch-model.md diff --git a/docs/project-branch-model.md b/docs/project-branch-model.md new file mode 100644 index 0000000..4a2e0f0 --- /dev/null +++ b/docs/project-branch-model.md @@ -0,0 +1,40 @@ +# Project Branch Model + +## Branch Structure + +- `master` +- `snapshots/*` (including `feature/*`, `fix/*`, etc.) +- `releases/latest` +- `releases/v*` + +## Branch Descriptions + +### Main Branch + +The `master` branch is our blessed branch, has the latest code and documentation. + +### Working Branches + +`snapshots/*`, `feature/*`, `fix/*`, and other similar branches are used as working branches for ongoing development. + +### Release Branches + +- `releases/v*`: Specific version release branches +- `releases/latest`: Always points to the latest release branch + +## Workflow + +1. Development occurs in working branches (`snapshots/*`, `feature/*`, `fix/*`, etc.). + +2. Periodic pull requests are created from working branches to `master`, allowing team members to review changes and update corresponding documents. + +3. After `master` is updated, working branches are rebased onto `master` to continue development. + +4. For public releases: + - Version number is bumped + - Changes are merged into `releases/v*` branches + +5. Cloudflare tracks all `releases/*` branches, building and hosting documentation for each version. + +6. The `releases/latest` branch is updated to reference the most recent release, ensuring the latest documentation is always available. + From 454139143e784c3bd6a68b9eb3544c44ea754d14 Mon Sep 17 00:00:00 2001 From: "ignacio.pena@coinfabrik.com" Date: Thu, 29 Aug 2024 17:17:54 -0300 Subject: [PATCH 3/6] refactor README --- README.md | 30 ++++++++++++++---------------- package.json | 4 ++-- 2 files changed, 16 insertions(+), 18 deletions(-) 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" From 68a65cf55a91e50f204360ff5b1f4aa3f62d1556 Mon Sep 17 00:00:00 2001 From: "ignacio.pena@coinfabrik.com" Date: Tue, 3 Sep 2024 16:12:37 -0300 Subject: [PATCH 4/6] fix link to typedoc --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69d1fec..d689655 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ 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`](https://docs-typedoc.xlink-sdk.pages.dev/modules/XLinkSDK) object contains the most important functions of this library, all grouped together. To create it: +The [`XLinkSDK`](https://releases-latest.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(); @@ -67,7 +67,7 @@ const theSdk = new XLinkSDK(); For detailed API documentation, including a full list of available methods and their usage, please refer to: -[SDK API Documentation](https://docs-typedoc.xlink-sdk.pages.dev/classes/XLinkSDK.XLinkSDK) +[SDK API Documentation](https://releases-latest.xlink-sdk.pages.dev) ### Use Cases From 859f9e9ea108cb7bb7cbbcf9fd42f8a172365b76 Mon Sep 17 00:00:00 2001 From: "ignacio.pena@coinfabrik.com" Date: Wed, 4 Sep 2024 09:47:22 -0300 Subject: [PATCH 5/6] typedoc config was modified --- .config/typedoc.config.mjs | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/typedoc.config.mjs b/.config/typedoc.config.mjs index d5b4c08..016eea3 100644 --- a/.config/typedoc.config.mjs +++ b/.config/typedoc.config.mjs @@ -2,7 +2,7 @@ import pkgInfo from "../package.json" assert { type: "json" } import path from "node:path" const entryPoints = Object.keys(pkgInfo.exports).map(i => { - const exportEndpoint = i === "." ? "./XLinkSDK" : i + const exportEndpoint = i === "." ? "./index" : i const exportEndpointFilePath = path.join("../src", exportEndpoint) + ".ts" return exportEndpointFilePath }) diff --git a/package.json b/package.json index e98b803..103281a 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 src/index.ts", - "docs:watch": "typedoc src/index.ts --watch", + "docs": "typedoc", + "docs:watch": "typedoc --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" From fea350266921f9d7db0e58b93caa191486a35262 Mon Sep 17 00:00:00 2001 From: "ignacio.pena@coinfabrik.com" Date: Wed, 4 Sep 2024 17:35:01 -0300 Subject: [PATCH 6/6] fixed imports --- README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d689655..33d17c5 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,12 @@ const xlinkSdk = new XLinkSDK(); ``` 1. Bridge from Stacks ```typescript -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'; +import{ + BridgeInfoFromStacksInput, + BridgeFromStacksInput, + KnownChainId, + KnownTokenId, +} from '@xlink-network/xlink-sdk'; // Get bridge info const bridgeInfo = await xlinkSdk.bridgeInfoFromStacks({ @@ -122,9 +125,12 @@ console.log("Transaction ID:", result.txid); 2. Bridge from EVM ```typescript -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'; +import { + BridgeInfoFromEVMInput, + BridgeFromEVMInput, + KnownChainId, + KnownTokenId, +} from '@xlink-network/xlink-sdk'; // Get bridge info const bridgeInfo = await xlinkSdk.bridgeInfoFromEVM({ @@ -151,9 +157,12 @@ console.log("Transaction ID:", result.txHash); 3. Bridge from Bitcoin ```typescript -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'; +import { + BridgeInfoFromBitcoinInput, + BridgeFromBitcoinInput, + KnownChainId, + KnownTokenId, +} from '@xlink-network/xlink-sdk'; // Get bridge info const bridgeInfo = await xlinkSdk.bridgeInfoFromBitcoin({