Skip to content

Commit 8dbc6c3

Browse files
Adds introduction content for the SDK section. (#319)
1 parent 0b7a882 commit 8dbc6c3

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

content/reference/javascript-sdk/_index.md

+73
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,76 @@ lead: "The SDK is the fastest way to start integrating the Entropy network into
44
aliases:
55
- "sdk"
66
---
7+
8+
{{< callout type="warning" >}}
9+
The Entropy SDK is currently in alpha. While we're excited about its capabilities, keep in mind that breaking changes may occur, APIs might be unstable, and features and functionality may change. Do not use this SDK in a production environment.
10+
{{< /callout >}}
11+
12+
## Overview
13+
14+
The Entropy SDK enables developers to integrate decentralized threshold signatures into their projects. Unlike traditional signature solutions that rely on single keys or centralized services, Entropy distributes the signing process across a decentralized network while maintaining the simplicity of a regular API. The SDK also features robust account management and Entropy Program deployment functions.
15+
16+
Built on Substrate, Entropy provides a robust foundation for blockchain applications that require secure, distributed signing capabilities. The SDK abstracts away the complexity of threshold cryptography, allowing developers to focus on building their applications.
17+
18+
## Core features
19+
20+
{{< cards cols="2" >}}
21+
{{< card link="../callout" title="Program deployment" icon="tag" subtitle="Deploy and manage programs that define your signing logic. Each program acts as a customizable rule set for how signatures should be generated and validated." >}}
22+
{{< card link="../callout" title="Signature creation and verification" icon="tag" subtitle="Create and verify signatures through a straightforward API that handles all the underlying cryptographic operations." >}}
23+
{{< card link="../callout" title="Account management" icon="tag" subtitle="Manage user accounts and keys securely with the SDKs built-in account functions." >}}
24+
{{< card link="../callout" title="General utilities" icon="tag" subtitle="Easily incorporate basic utilite functions built right into the SDK.">}}
25+
{{< /cards >}}
26+
27+
## Getting Started
28+
29+
Start building with the Entropy SDK quickly by grabbing the appropriate package, setting up a development environment, and creating a basic startup script.
30+
31+
### Installation
32+
33+
Install the SDK using NPM or Yarn:
34+
35+
{{< tabs items="NPM, Yarn" >}}
36+
37+
{{< tab >}}
38+
```shell
39+
npm install @entropyxyz/sdk
40+
```
41+
{{< /tab >}}
42+
43+
{{< tab >}}
44+
```shell
45+
yarn add @entropyxyz/sdk
46+
```
47+
{{< /tab >}}
48+
49+
{{< /tabs >}}
50+
51+
### Basic Setup
52+
53+
Initialize the SDK to create your first signature:
54+
55+
```javascript
56+
import { Keyring } from '@entropyxyz/sdk/keys';
57+
import { wasmGlobalsReady, Entropy } from '@entropyxyz/sdk';
58+
59+
async function quickStart() {
60+
await wasmGlobalsReady();
61+
const keyring = new Keyring({ seed: yourSeed });
62+
const entropy = new Entropy({
63+
endpoint: 'ws://127.0.0.1:9944',
64+
keyring
65+
});
66+
await entropy.ready;
67+
// Your code here
68+
}
69+
```
70+
71+
### Local Development
72+
73+
For development and testing, we recommend [setting up a local devnet](https://docs.entropy.xyz/guides/spin-up-a-devnet/). A devnet provides a controlled environment to freely experiment with different programs and configurations.
74+
75+
### Move to the testnet
76+
77+
Once your application works locally, move to testnet testing by using the testnet endpoint: `wss://testnet.entropy.xyz`. Remember that programs can only be deployed once per account on testnet. Use the [Entropy CLI](https://github.com/entropyxyz/cli) for additional testing and management capabilities
78+
79+
## Next steps

0 commit comments

Comments
 (0)