Skip to content

Commit

Permalink
docs: add warnings about the js sdk
Browse files Browse the repository at this point in the history
Since it doesn't request proofs it's less secure than it could be otherwise
  • Loading branch information
thephez committed Sep 4, 2024
1 parent da1cb73 commit b50fa7e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/sdk-js/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/connecting-to-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
:::

Expand Down
14 changes: 10 additions & 4 deletions docs/tutorials/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://github.com/dashpay/platform-readme-tutorials#readme" target="_blank">GitHub</a> 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:
Expand All @@ -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 <a href="https://github.com/dashpay/platform-readme-tutorials#readme" target="_blank">GitHub</a> 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)
Expand Down
8 changes: 7 additions & 1 deletion docs/tutorials/setup-sdk-client.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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).
:::

Expand Down

0 comments on commit b50fa7e

Please sign in to comment.