From b17b3dcd445b1cc1775c3c7fc1ae635d9559eed0 Mon Sep 17 00:00:00 2001 From: Lorexia Date: Wed, 4 Oct 2023 09:57:04 +0200 Subject: [PATCH] Update documentation: introduction, overview and installation --- sdk/typescript/docs/pages/installation.mdx | 20 ++++++++++---------- sdk/typescript/docs/pages/overview.mdx | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sdk/typescript/docs/pages/installation.mdx b/sdk/typescript/docs/pages/installation.mdx index b11ddb64fd..06b0e1e897 100644 --- a/sdk/typescript/docs/pages/installation.mdx +++ b/sdk/typescript/docs/pages/installation.mdx @@ -2,7 +2,7 @@ import { Callout } from 'nextra/components' # Overview -The Typescript SDK's different modules allow developers to start building browser-based applications quickly, by simply importing the SDK module of their choice - depending on the component from the Nym architecture they want to use - into their code via NPM as they would any other Typescript library. +The different modules in the Typescript SDK allow developers to start building browser-based applications quickly. Simply import the SDK module of your choice – depending on the component from the Nym architecture you want to use – into your code via NPM, as you would any other TypeScript library. Other than the `Contract Clients`, SDK modules come in four different flavours (ESM, CJS and full-fat for ESM and CJS). @@ -12,15 +12,15 @@ The Typescript SDK's different modules allow developers to start building browse #### Install all ```bash -npm install @nymproject/contract-clients @cosmjs/cosmwasm-stargate @cosmjs/proto-signing @nymproject/sdk-full-fat @nymproject/mix-fetch-full-fat --save +npm install @nymproject/contract-clients @cosmjs/cosmwasm-stargate @cosmjs/proto-signing @nymproject/sdk-full-fat @nymproject/mix-fetch-full-fat ``` ## Nym Smart Contracts #### Overview The Nyx blockchain is a general-purpose CosmWasm-enabled smart contract platform, and the home of the smart contracts which keep track of the mixnet, amongst others. -Information about the chain can be found on the [Nyx blockchain explorer](https://nym.explorers.guru/). +Further information about the chain can be found on the [Nyx blockchain explorer](https://nym.explorers.guru/). -Using the [Nym Mixnet smart contract clients](https://nymtech.net/docs/nyx/smart-contracts.html), you will be able to query contract states or execute methods when providing a signing key. +Using the [Nym mixnet smart contract clients](https://nymtech.net/docs/nyx/smart-contracts.html), you will be able to query contract states or execute methods when providing a signing key. *You can learn about our different methods to interact with the chain [here](https://nymtech.net/docs/nyx/interacting-with-chain.html)*. @@ -30,14 +30,14 @@ In order to query or execute on any of the Nym smart contracts, you'll need to u First install the package and its dependencies from Cosmos Stargate: ```bash -npm install @nymproject/contract-clients @cosmjs/cosmwasm-stargate @cosmjs/proto-signing --save +npm install @nymproject/contract-clients @cosmjs/cosmwasm-stargate @cosmjs/proto-signing ``` ## Mixnet #### Overview -The [Nym mixnet](https://nymtech.net/docs/architecture/network-overview.html) provides very strong security guarantees against network-level surveillance. It wraps into packets and mixes together IP traffic from many users inside the mixnet. It encrypts and mixes [Sphinx packet](https://cypherpunks.ca/~iang/pubs/Sphinx_Oakland09.pdf) traffic so that it cannot be determined who is communicating with whom. Our mixnet is based on a modified version of the Loopix design. +The [Nym mixnet](https://nymtech.net/docs/architecture/network-overview.html) provides extremely robust protection against network-level surveillance. splits data into smaller, identically sized,[Sphinx encrypted packet](https://cypherpunks.ca/~iang/pubs/Sphinx_Oakland09.pdf), which are then mixed in with dummy traffic and dispersed through Nym nodes around the world at randomised intervals. Finally these are decrypted and reassembled, preventing the observation of metadata and providing pattern privacy so that it cannot be determined who is communicating with whom. The Nym mixnet is based on a modified version of the [Loopix design](https://www.usenix.org/sites/default/files/conference/protected-files/usenixsecurity17_slides_piotrowska.pdf). -*You can explore our mixnet using our [mixnet explorer](https://nymtech.net/docs/explorers/mixnet-explorer.html) here.* +*You can explore the Nym mixnet using the [mixnet explorer](https://nymtech.net/docs/explorers/mixnet-explorer.html) here.* #### Installation: Mixnet Client @@ -46,12 +46,12 @@ In order to send or receive traffic over the mixnet, you'll need to use the [`Mi First install the package and its dependencies: ```bash -npm install @nymproject/sdk-full-fat --save +npm install @nymproject/sdk-full-fat ``` ## MixFetch #### Overview -MixFetch is a drop-in replacement for [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) that sends HTTP requests through the Mixnet. It does this by grabbing the same arguments as traditional fetch and constructing a SOCKS5 request that will be made to the destination host on the Internet via a [SOCKS5](https://nymtech.net/developers/quickstart/socks-proxy.html) [Network Requester](https://nymtech.net/docs/nodes/network-requester.html). +MixFetch is a drop-in replacement for [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) that sends HTTP requests through the Nym mixnet. It does this by grabbing the same arguments as traditional fetch and constructing a SOCKS5 request that will be made to the destination host on the Internet via a [SOCKS5](https://nymtech.net/developers/quickstart/socks-proxy.html) [Network Requester](https://nymtech.net/docs/nodes/network-requester.html). #### Installation: MixFetch package In order to fetch data through mixFetch you'll need to use the [`MixFetch package`](https://www.npmjs.com/package/@nymproject/mix-fetch). @@ -59,7 +59,7 @@ In order to fetch data through mixFetch you'll need to use the [`MixFetch packag First install the package and its dependencies: ```bash -npm install @nymproject/mix-fetch-full-fat --save +npm install @nymproject/mix-fetch-full-fat ``` diff --git a/sdk/typescript/docs/pages/overview.mdx b/sdk/typescript/docs/pages/overview.mdx index 0b456b7fa9..b11d7d3b4a 100644 --- a/sdk/typescript/docs/pages/overview.mdx +++ b/sdk/typescript/docs/pages/overview.mdx @@ -3,9 +3,9 @@ import { TableContainer, Table, TableBody, TableCell, TableRow, Paper } from '@m import { NPMLink } from '../components/npm'; ## SDK overview -The Typescript SDK allows developers to start building browser-based mixnet applications quickly, by simply importing the SDK modules into their code via NPM as they would any other Typescript library. +The Typescript SDK allows developers to start building browser-based Nym-based applications quickly, by simply importing the SDK modules into their code via NPM as they would any other Typescript library. -Currently developers can use different packages from the Typescript SDK to do the following entirely in the browser: +Currently developers can use different packages from the Typescript SDK to run the following entirely in browser: @@ -57,10 +57,10 @@ Currently developers can use different packages from the Typescript SDK to do th ## Which package should I use? All packages come in four different variations: -- **ESM**: For new projects with current tooling. These packages use the ECMAScript Modules (ESM) system. You may need to [configure your bundler](bundling) to handle the packages WASM and Web Worker components; +- **ESM**: For new projects with current tooling. These packages use the ECMAScript Modules (ESM) system. You may need to [configure your bundler](bundling) to handle the packages WASM and web worker components; - **ESM full-fat**: These ESM packages are pre-bundled and include inline WebAssembly and web worker code; -- **CommonJS**: For older projects that still use CommonJS. All WebAssembly (WASM) and Web Workers in the package need to be [bundled](bundling) to work correctly; -- **CommonJS full-fat**: These packages are already pre-bundled and should work in your project as is; +- **CommonJS**: For older projects that still use CommonJS. All WebAssembly (WASM) and web workers in the package need to be [bundled](bundling) to work correctly; +- **CommonJS full-fat**: These packages are already pre-bundled and should work in your project without additional configuration; All `*-full-fat` variants have large bundle sizes because they include all WASM and web-workers as inline Base64 strings. If you care about your app's bundle size, then use the ESM variant.