{"id":41256594,"url":"https://github.com/0chain/zus-example-webapp","last_synced_at":"2026-01-23T01:51:57.919Z","repository":{"id":173454367,"uuid":"585511633","full_name":"0chain/zus-example-webapp","owner":"0chain","description":"Example Web App using JS SDK","archived":false,"fork":false,"pushed_at":"2024-09-10T15:59:50.000Z","size":58594,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-09-11T11:04:46.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0chain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-05T11:06:15.000Z","updated_at":"2024-09-10T15:59:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"1dd544cf-1fa3-4ba5-a0f4-fc735fe6ab21","html_url":"https://github.com/0chain/zus-example-webapp","commit_stats":null,"previous_names":["0chain/zus-example-webapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0chain/zus-example-webapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0chain%2Fzus-example-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0chain%2Fzus-example-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0chain%2Fzus-example-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0chain%2Fzus-example-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0chain","download_url":"https://codeload.github.com/0chain/zus-example-webapp/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0chain%2Fzus-example-webapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T01:51:57.837Z","updated_at":"2026-01-23T01:51:57.897Z","avatar_url":"https://github.com/0chain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Züs Example Webapp\n\nWelcome to the Züs Example Webapp! This web application demonstrates the usage of the [zus-js-sdk](https://www.npmjs.com/package/@zerochain/zus-sdk) to interact with the 0chain blockchain.\n\n- [Züs Example Webapp]()\n  - [Züs Overview](#züs-overview)\n  - [Getting Started](#getting-started)\n  - [Hackathon Discord Link](#hackathon-discord-link)\n\n### Preview\n\nSee the Live Preview here: https://dev-zus-webapp.zus.network\n\n\u003cdiv align=\"center\"\u003e\n  \n  https://www.loom.com/share/423667e8aa444ca6b0c8183a5eceb20f\n  \n\u003c/div\u003e\n\n## Züs Overview\n\n[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.\n\nFor 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.\n\nUsers 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.\n\n[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.\n\nThe [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.\n\nZü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.\n\nOther 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.\n\n## Getting Started\n\nFollow the steps below to run the webapp.\n\n#### Installation\n\nTo install the dependencies, run the following command:\n\n```bash\nnpm install\n# or\nyarn\n```\n\n#### Running the Development Server\n\nStart the development server using the following command:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nOnce the server is running, open [http://localhost:3000](http://localhost:3000) in your browser to see the result.\n\n### Supported Features\n\nThis webapp covers demo for two product lines of Zus i.e. bolt and vult.\n\n#### Bolt\n\nBolt is a cryptocurrency wallet for exchanging ZCN ERC-20 and Ethereum tokens. It also supports token staking, allowing users to earn rewards.\n\n#### Vult\n\nVult is a decentralized anonymous file-sharing platform. Users can upload files and securely share them with others.\n\nBoth Bolt and Vult rely on the [zus-js-sdk](https://www.npmjs.com/package/@zerochain/zus-sdk) to interact with the 0chain blockchain.\n\n### Creating a Webapp using Zus JS SDK\n\nFollow the step-by-step guide below to create a webapp using the Zus JS SDK:\n\n1. Set up a webapp using [Next.js](https://nextjs.org/) or any other framework of your choice.\n2. Install the Zus JS SDK by running either of the following commands:\n\n- `npm install @zerochain/zus-sdk`\n- `yarn add @zerochain/zus-sdk`\n\n3. Download the latest build of wasm(goSdk), and place it in the same dicrectory as your app's entrypoint. In most cases it would be the public or dist directory. You can get the latest build of wasm from the first action on [this page](https://github.com/0chain/gosdk/actions/workflows/sdk-release.yml?query=branch%3Astaging).\n   [How to download wasm?](https://www.loom.com/share/46490db9803c41228eeea54f5ae8c990?sid=4e559a14-df8c-4f6a-924b-c839e96a479b)\n\n4. Add these two scripts to the `head` of your entrypoint html file. These scripts are required by wasm for it's operations.\n\n```js\n  \u003cscript src=\"https://cdn.jsdelivr.net/gh/herumi/bls-wasm@v1.0.0/browser/bls.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/gh/golang/go@go1.20.4/misc/wasm/wasm_exec.js\"\u003e\u003c/script\u003e\n```\n\n5. Initialize the Zus JS SDK by following the [zus-js-sdk documentation:](https://github.com/0chain/zus-js-sdk#get-started)\n\n```js\nimport { init } from '@zerochain/zus-sdk'\n\n// default config\nconst configJson = {\n  chainId: '0afc093ffb509f059c55478bc1a60351cef7b4e9c008a53a6cc8241ca8617dfe',\n  signatureScheme: 'bls0chain',\n  minConfirmation: 50,\n  minSubmit: 50,\n  confirmationChainLength: 3,\n  blockWorker: 'https://demo.zus.network/dns',\n  zboxHost: 'https://0box.demo.zus.network',\n  defaultSharderConsensous: 3,\n}\n\nconst config = [\n  configJson.chainId,\n  configJson.blockWorker,\n  configJson.signatureScheme,\n  configJson.minConfirmation,\n  configJson.minSubmit,\n  configJson.confirmationChainLength,\n  configJson.zboxHost,\n  configJson.zboxAppType,\n  configJson.defaultSharderConsensous,\n]\n\nawait init(config)\n```\n\n6. Utilize the Zus JS SDK's methods to interact with the 0chain blockchain. Refer to the [zus-js-sdk documentation](https://docs.zus.network/guides/zus-js-sdk/get-started) for detailed information.\n\n7. Create a wallet using the Zus JS SDK's `createWallet` method. This method returns a wallet object containing the public and private keys.\n\n```js\nimport { createWallet } from '@zerochain/zus-sdk'\n\nconst wallet = await createWallet()\n// save the wallet in local storage by using Redux or any other state management library\n```\n\n8. Set your wallet in the Zus JS SDK by using the `setWallet` method. This method takes the walletId, privateKey, publicKey, and mnemonic as parameters.\n\n```js\nimport { setWallet } from '@zerochain/zus-sdk'\n\nawait setWallet(walletId, privateKey, publicKey, mnemonic)\n```\n\n9. Use the Zus JS SDK's `getBalance` method to get the balance of your wallet. This method takes the walletId as a parameter.\n\n```js\nimport { getBalance } from '@zerochain/zus-sdk'\n\nconst balance = await getBalance(walletId)\n```\n\n10. Use the Zus JS SDK's `createAllocation` method to create an allocation. This method takes the allocation config object as a parameter.\n\n```js\nimport { createAllocation } from '@zerochain/zus-sdk'\n\n// default config\nconst config = {\n  datashards: 2,\n  parityshards: 2,\n  size: 1073741824,\n  expiry: Math.round(new Date().getTime() / 1000) + 2628000,\n  minReadPrice: 0,\n  maxReadPrice: 10000000000,\n  minWritePrice: 0,\n  maxWritePrice: 10000000000,\n  lock: 10450000000,\n}\n\nconst allocation = await createAllocation(config)\n// save the allocation in local storage by using Redux or any other state management library\n```\n\nExplore this demo webapp's source code to learn more about how to use the Zus JS SDK.\n\n#### Common Terms\n\nHere are some common terms used in our code and the 0chain blockchain:\n\n- **Blobber**: A blobber is a storage provider that stores files on behalf of users. Blobbers are paid in ZCN tokens for storing and serving files.\n- **Allocation**: An allocation is a group of blobbers used to store files. It defines storage and payment parameters and is paid in ZCN tokens.\n- **Miners**: Miners are the nodes that run the 0chain blockchain and are rewarded in ZCN tokens.\n- **Sharders**: Sharders are the nodes that run the 0chain blockchain and are rewarded in ZCN tokens.\n- **Wallet**: A wallet is a collection of keys used to sign transactions. It is used for blobbers, miners, sharders, and users.\n- **ZCN**: ZCN is the token used to pay miners, sharders, blobbers, and users.\n- **ERC20**: ERC20 is the token format used by ZCN and Ethereum.\n- **Public Key**: A public key is used to verify a signature and transactions.\n- **Private Key**: A private key is used to sign transactions.\n- **Signature**: A signature verifies that a transaction was signed by a private key.\n- **Mnemonics**: Mnemonics are a set of words used to generate a wallet for a user.\n\n### Hackathon Discord Link\n\nJoin our Hackathon Discord community for support and discussions:\n\nhttps://discord.gg/7JSzwpcK55\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0chain%2Fzus-example-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0chain%2Fzus-example-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0chain%2Fzus-example-webapp/lists"}