Skip to content

Commit 1f92df5

Browse files
committed
update README.md
1 parent de1f5a5 commit 1f92df5

File tree

4 files changed

+49
-10650
lines changed

4 files changed

+49
-10650
lines changed

.changeset/light-eagles-look.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@zerochain/sdk': patch
3+
---
4+
5+
Documentation update

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1-
# @zerochain/sdk
1+
# ZÜS JS Client SDK
22

3-
## 🚧 **Work in Progress** 🚧
3+
[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
44

5-
# Züs JS Client SDK
5+
The Züs SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network. It allows developers to perform various operations such as creating and managing allocations, uploading and downloading files, executing smart contracts, and more.
66

7+
## Züs Overview
8+
9+
[Züs](https://zus.network/) is a high-performance cloud on a fast blockchain offering privacy and configurable uptime. It is an alternative to traditional cloud S3 and has shown better performance on a test network due to its parallel data architecture. The technology uses erasure code to distribute the data between data and parity servers. Züs storage is configurable to provide flexibility for IT managers to design for desired security and uptime, and can design a hybrid or a multi-cloud architecture with a few clicks using [Blimp's](https://blimp.software/) workflow, and can change redundancy and providers on the fly.
10+
11+
For instance, the user can start with 10 data and 5 parity providers and select where they are located globally, and later decide to add a provider on-the-fly to increase resilience, performance, or switch to a lower cost provider.
12+
13+
Users can also add their own servers to the network to operate in a hybrid cloud architecture. Such flexibility allows the user to improve their regulatory, content distribution, and security requirements with a true multi-cloud architecture. Users can also construct a private cloud with all of their own servers rented across the globe to have a better content distribution, highly available network, higher performance, and lower cost.
14+
15+
[The QoS protocol](https://medium.com/0chain/qos-protocol-weekly-debrief-april-12-2023-44524924381f) is time-based where the blockchain challenges a provider on a file that the provider must respond within a certain time based on its size to pass. This forces the provider to have a good server and data center performance to earn rewards and income.
16+
17+
The [privacy protocol](https://zus.network/build) from Züs is unique where a user can easily share their encrypted data with their business partners, friends, and family through a proxy key sharing protocol, where the key is given to the providers, and they re-encrypt the data using the proxy key so that only the recipient can decrypt it with their private key.
18+
19+
Züs has ecosystem apps to encourage traditional storage consumption such as [Blimp](https://blimp.software/), a S3 server and cloud migration platform, and [Vult](https://vult.network/), a personal cloud app to store encrypted data and share privately with friends and family, and [Chalk](https://chalk.software/), a zero upfront cost permanent storage solution for NFT artists.
20+
21+
Other apps are [Bolt](https://bolt.holdings/), a wallet that is very secure with air-gapped 2FA split-key protocol to prevent hacks from compromising your digital assets, and it enables you to stake and earn from the storage providers; [Atlus](https://atlus.cloud/), a blockchain explorer and [Chimney](https://demo.chimney.software/), which allows anyone to join the network and earn using their server or by just renting one, with no prior knowledge required.
22+
23+
24+
## Resources
25+
26+
- [JS SDK Documentation](https://0chain.github.io/js-sdk/)
27+
- [Go SDK Documentation](https://docs-old.zus.network/guides/zus-gosdk)
28+
- [Whitepapers](https://zus.network/whitepapers/?v=1)
729
<!--
830
## Configure package and its deployment on NPM
931
- Replace all instances of `your-package-name` with your package name

package/README.md

Lines changed: 19 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ZÜS JS Client SDK
22

3-
[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
3+
[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
44

55
The Züs SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network. It allows developers to perform various operations such as creating and managing allocations, uploading and downloading files, executing smart contracts, and more.
66

@@ -20,148 +20,25 @@ Züs has ecosystem apps to encourage traditional storage consumption such as [Bl
2020

2121
Other apps are [Bolt](https://bolt.holdings/), a wallet that is very secure with air-gapped 2FA split-key protocol to prevent hacks from compromising your digital assets, and it enables you to stake and earn from the storage providers; [Atlus](https://atlus.cloud/), a blockchain explorer and [Chimney](https://demo.chimney.software/), which allows anyone to join the network and earn using their server or by just renting one, with no prior knowledge required.
2222

23-
## Get Started
2423

25-
This sections aims at getting you started with the Züs SDK.
24+
## Resources
2625

27-
- [Installation](#installation)
28-
- [SDK Reference](#sdk-reference)
29-
- [Contributing](#contributing)
26+
- [JS SDK Documentation](https://0chain.github.io/js-sdk/)
27+
- [Go SDK Documentation](https://docs-old.zus.network/guides/zus-gosdk)
28+
- [Whitepapers](https://zus.network/whitepapers/?v=1)
29+
<!--
30+
## Configure package and its deployment on NPM
31+
- Replace all instances of `your-package-name` with your package name
32+
- Replace all instances of `your-org` with your GitHub org name / your username
33+
- Required Settings in Github Repo Settings:
34+
- Enable Permission: Allow GitHub Actions to create and approve pull requests: https://github.com/changesets/changesets/discussions/1090
35+
- Add `NPM_TOKEN` to your Repo Actions Secrets.
3036
31-
## Installation
37+
## Deploy Docusaurus on GitHub pages
38+
- Set GitHub Pages source to "GitHub Actions"
39+
- Go to Settings -> Pages section -> Build and deployment -> Source: GitHub Actions
3240
33-
### Prerequisites
34-
35-
#### Yarn Package Manager
36-
37-
##### Linux
38-
39-
```
40-
sudo apt update
41-
sudo apt install curl
42-
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
43-
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
44-
sudo apt install yarn -y
45-
```
46-
47-
##### Mac
48-
49-
In Mac Yarn can be installed using the Homebrew package manager. To install Yarn on macOS, open a terminal and type:
50-
51-
```
52-
brew install yarn
53-
```
54-
55-
Note: Make sure that Homebrew is installed properly using the command below
56-
57-
```
58-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
59-
```
60-
61-
##### Windows
62-
63-
Download yarn windows based msi installer from [here](https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.msi)
64-
65-
### Install zus-sdk
66-
67-
Add the zus-sdk package for use in your project
68-
69-
```
70-
yarn add @zerochain/zus-sdk
71-
```
72-
73-
---
74-
75-
## SDK Reference
76-
77-
Zus JS-sdk provides many functions for implementing blobber, allocation and file operation functionalities in web applications.
78-
79-
For a detailed understanding of the functions provided by the JS SDK, please refer to the JS Doc comments in the [index.ts file](https://github.com/0chain/js-sdk/blob/main/lib/js-sdk/src/index.ts)
80-
81-
Most of the exposed SDK functions are well-documented with JS Doc comments, detailing their usage, parameter types, and return types.
82-
83-
## Usage
84-
85-
To use the Züs SDK in your project, import the necessary functions and utilities:
86-
87-
```js
88-
import { init, createWasm, getBalance, sendTransaction } from "@zerochain/zus-sdk";
89-
```
90-
91-
### Initialize WebAssembly
92-
93-
Before using the Züs SDK, you need to initialize the WebAssembly module by calling the init function:
94-
95-
```js
96-
const config = {
97-
// configuration options
98-
};
99-
100-
await init(config);
101-
const wasm = await createWasm();
102-
```
103-
104-
The `init` function initializes the Züs SDK with the provided configuration, and `createWasm` returns the WebAssembly instance.
105-
106-
### Get Balance
107-
108-
To get the balance of a client, use the `getBalance` function:
109-
110-
```js
111-
const clientId = "client_id";
112-
const balance = await getBalance(clientId);
113-
114-
console.log(balance);
115-
```
116-
117-
The `getBalance` function retrieves the balance of the specified client from the Züs Network.
118-
119-
### Send Transaction
120-
121-
To send a transaction from one client to another, use the `sendTransaction` function:
122-
123-
```js
124-
const fromClient = "sender_client_id";
125-
const toClient = "recipient_client_id";
126-
const value = 10; // transaction value
127-
const note = "Transaction note";
128-
129-
const response = await sendTransaction(fromClient, toClient, value, note);
130-
131-
console.log(response);
132-
```
133-
134-
The `sendTransaction` function sends a transaction from the specified sender client to the recipient client with the specified value and note.
135-
136-
## Utilities
137-
138-
The Züs SDK also provides some utility functions that may be helpful during development:
139-
140-
- `createWallet()`: Generates a new wallet with a random mnemonic and returns the wallet information.
141-
- `recoverWallet(mnemonic: string)`: Recovers a wallet using a given mnemonic and returns the wallet information.
142-
- `decodeAuthTicket(authTicket: string)`: Decodes an authentication ticket and returns the decoded object.
143-
- `truncateAddress(addressString: string, start: number, flag: boolean, end: number): string`: Truncates an address string for display purposes.
144-
- `hexStringToByte(str: string): Uint8Array`: Converts a hexadecimal string to a Uint8Array.
145-
146-
These utility functions can be imported and used as needed in your application.
147-
148-
With the provided functions and utilities, developers can easily interact with the ZeroChain network, perform transactions, retrieve balances, and utilize various utility functions.
149-
150-
## Contributing
151-
152-
We'd love to accept your patches and contributions to this project. There are just a few guidelines you need to follow.
153-
154-
### [Code of Conduct](.github/CODE_OF_CONDUCT.md)
155-
156-
This project follows [Contributor Covenant](https://www.contributor-covenant.org/)
157-
as it's Code of Conduct, and we expect all project participants to adhere to it.
158-
Please read the [full guide](.github/CODE_OF_CONDUCT.md) so that you can understand
159-
what actions will not be tolerated.
160-
161-
### [Contributing Guide](.github/CONTRIBUTING.md)
162-
163-
Read our [contributing guide](.github/CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to project.
164-
165-
### [LICENSE](./LICENSE)
166-
167-
The SDK is released under the [MIT License](./LICENSE).
41+
## Issues
42+
- Is `changeset` unable to publish?
43+
- https://github.com/changesets/action/issues/98#issuecomment-2546826646
44+
-->

0 commit comments

Comments
 (0)