From b50fa7e3f77c2ccf96bd3e81236c2e67744dda09 Mon Sep 17 00:00:00 2001 From: thephez Date: Wed, 4 Sep 2024 12:55:47 -0400 Subject: [PATCH 1/2] docs: add warnings about the js sdk Since it doesn't request proofs it's less secure than it could be otherwise --- docs/sdk-js/overview.md | 6 ++++++ docs/tutorials/connecting-to-testnet.md | 2 +- docs/tutorials/introduction.md | 14 ++++++++++---- docs/tutorials/setup-sdk-client.md | 8 +++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/sdk-js/overview.md b/docs/sdk-js/overview.md index 73c021747..f81cc2c3f 100644 --- a/docs/sdk-js/overview.md +++ b/docs/sdk-js/overview.md @@ -11,6 +11,12 @@ Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...) +:::{warning} +The JavaScript SDK provides easy access to Dash Platform without requiring a full node; +however, it **_does not support Dash Platform's proofs_**. Therefore, it is less secure than the +[Rust SDK](../sdk-rs/overview.md), which requests proofs for all queried data. +::: + Dash library provides access via [DAPI](../explanations/dapi.md) to use both the Dash Core network and Dash Platform on [supported networks](https://github.com/dashpay/platform/#supported-networks). The Dash Core network can be used to broadcast and receive payments. Dash Platform can be used to manage identities, register data contracts for applications, and submit or retrieve application data via documents. ## Install diff --git a/docs/tutorials/connecting-to-testnet.md b/docs/tutorials/connecting-to-testnet.md index 7048b55ee..6c4fac112 100644 --- a/docs/tutorials/connecting-to-testnet.md +++ b/docs/tutorials/connecting-to-testnet.md @@ -26,7 +26,7 @@ npm install dash ### 2. Connect to Dash Platform -:::{attention} +:::{tip} The JavaScript Dash SDK connects to testnet by default. Mainnet can only be accessed by [connecting via address](#connect-via-address). ::: diff --git a/docs/tutorials/introduction.md b/docs/tutorials/introduction.md index 6fe1d7103..454681467 100644 --- a/docs/tutorials/introduction.md +++ b/docs/tutorials/introduction.md @@ -6,12 +6,14 @@ The tutorials in this section walk through the steps necessary to begin building on Dash Platform using the Dash JavaScript SDK. As all communication happens via the masternode hosted decentralized API (DAPI), you can begin using Dash Platform immediately without running a local blockchain node. -Building on Dash Platform requires first registering an Identity and then registering a Data Contract describing the schema of data to be stored. Once that is done, data can be stored and updated by submitting Documents that comply with the Data Contract. - -:::{tip} -You can clone a repository containing the code for all tutorials from GitHub or download it as a [zip file](https://github.com/dashpay/platform-readme-tutorials/archive/refs/heads/main.zip). +:::{warning} +Only the JavaScript SDK provides easy access to Dash Platform without requiring a full node; +however, it **_does not support Dash Platform's proofs_**. Therefore, it is less secure than the +[Rust SDK](../sdk-rs/overview.md), which requests proofs for all queried data. ::: +Building on Dash Platform requires first registering an Identity and then registering a Data Contract describing the schema of data to be stored. Once that is done, data can be stored and updated by submitting Documents that comply with the Data Contract. + ## Prerequisites The tutorials in this section are written in JavaScript and use [Node.js](https://nodejs.org/en/about/). The following prerequisites are necessary to complete the tutorials: @@ -22,6 +24,10 @@ The tutorials in this section are written in JavaScript and use [Node.js](https: ## Quickstart +:::{tip} +You can clone a repository containing the code for all tutorials from GitHub or download it as a [zip file](https://github.com/dashpay/platform-readme-tutorials/archive/refs/heads/main.zip). +::: + While going through each tutorial is advantageous, the subset of tutorials listed below get you from a start to storing data on Dash Platform most quickly: - [Obtaining test funds](../tutorials/create-and-fund-a-wallet.md) diff --git a/docs/tutorials/setup-sdk-client.md b/docs/tutorials/setup-sdk-client.md index f850de07b..2ddd673cb 100644 --- a/docs/tutorials/setup-sdk-client.md +++ b/docs/tutorials/setup-sdk-client.md @@ -1,5 +1,11 @@ # Setup SDK Client +:::{warning} +The JavaScript SDK provides easy access to Dash Platform without requiring a full node; +however, it **_does not support Dash Platform's proofs_**. Therefore, it is less secure than the +[Rust SDK](../sdk-rs/overview.md), which requests proofs for all queried data. +::: + In this tutorial we will show how to configure the client for use in the remaining tutorials. ## Prerequisites @@ -10,7 +16,7 @@ In this tutorial we will show how to configure the client for use in the remaini ## Code -:::{attention} +:::{tip} The JavaScript Dash SDK connects to testnet by default. Mainnet can only be accessed by [connecting via address](./connecting-to-testnet.md#connect-to-a-network). ::: From 94db8d4f97c759b3a6388db6dc5a5d6e5416ba29 Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 5 Sep 2024 15:12:01 -0400 Subject: [PATCH 2/2] docs: update message based on feedback --- docs/sdk-js/overview.md | 5 +++-- docs/tutorials/setup-sdk-client.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/sdk-js/overview.md b/docs/sdk-js/overview.md index f81cc2c3f..bd5d891f1 100644 --- a/docs/sdk-js/overview.md +++ b/docs/sdk-js/overview.md @@ -12,8 +12,9 @@ Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...) :::{warning} -The JavaScript SDK provides easy access to Dash Platform without requiring a full node; -however, it **_does not support Dash Platform's proofs_**. Therefore, it is less secure than the +The JavaScript SDK should only be used in production when connected to trusted nodes. While it +provides easy access to Dash Platform without requiring a full node, it **_does not support Dash +Platform's proofs or verify synchronized blockchain data_**. Therefore, it is less secure than the [Rust SDK](../sdk-rs/overview.md), which requests proofs for all queried data. ::: diff --git a/docs/tutorials/setup-sdk-client.md b/docs/tutorials/setup-sdk-client.md index 2ddd673cb..045d7be55 100644 --- a/docs/tutorials/setup-sdk-client.md +++ b/docs/tutorials/setup-sdk-client.md @@ -1,8 +1,9 @@ # Setup SDK Client :::{warning} -The JavaScript SDK provides easy access to Dash Platform without requiring a full node; -however, it **_does not support Dash Platform's proofs_**. Therefore, it is less secure than the +The JavaScript SDK should only be used in production when connected to trusted nodes. While it +provides easy access to Dash Platform without requiring a full node, it **_does not support Dash +Platform's proofs or verify synchronized blockchain data_**. Therefore, it is less secure than the [Rust SDK](../sdk-rs/overview.md), which requests proofs for all queried data. :::