Correct documentation
This commit is contained in:
@@ -277,7 +277,7 @@ export const Wallet = () => {
|
||||
</Box>
|
||||
) : (
|
||||
<Box>
|
||||
<Typography variant="body1">Please, enter your nemonic to receive your account info</Typography>
|
||||
<Typography variant="body1">Please, enter your mnemonic to receive your account information</Typography>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
#### __How can I interact with Nym?__
|
||||
|
||||
##### For existing projects:
|
||||
You'd like to integrate parts of the Nym stack to your existing app? Please check our dedicated Integrations page.
|
||||
You'd like to integrate parts of the Nym stack to your existing app? Please check the dedicated [integrations page](../FAQ/integrations).
|
||||
|
||||
##### For builders:
|
||||
###### SDKs
|
||||
You'd like to build or Nymify existing solutions? If you develop in Rust or TS/JS, then our SDKs are your go-to.
|
||||
Please refer [here](https://nymtech.net/developers/tutorials/rust-sdk.html) for more RUST information and tutorials and here (you are there) for using the TypeScript SDK.
|
||||
Please visit the [RUST SDK documentation](https://nymtech.net/developers/tutorials/rust-sdk.html) for more RUST-related information and tutorials and go to the [TS SDK handbook](../) (you are here) for using the TypeScript SDK.
|
||||
These SDKs abstract away much of the messaging and core logic from your app, and allow you to run a Nym client as part of your application process, instead of having to run them seperately.
|
||||
|
||||
###### Nym clients: Websocket, WebAssembly, SOCKS5
|
||||
Alternatively, you can also use one of the three Nym clients to connect your application to the mixnet. These clients do the majority of the heavy-lifting with regards to cryptographic operations and routing under the hood, and all do basically the same thing: create a connection to a gateway, encrypt and decrypt packets sent to and received from the mixnet, and send cover traffic to hide the flow of actual app traffic from observers. You can learn more about the Nym clients [here](https://nymtech.net/developers/integrations/mixnet-integration.html).
|
||||
Alternatively, you can also use one of the three Nym clients to connect your application to the mixnet. These clients do the majority of the heavy-lifting with regards to cryptographic operations and routing under the hood, and all do basically the same thing: create a connection to a gateway, encrypt and decrypt packets sent to and received from the mixnet, and send cover traffic to hide the flow of actual app traffic from observers. You can learn more about the Nym clients in this [Nym integration page](https://nymtech.net/developers/integrations/mixnet-integration.html).
|
||||
|
||||
###### Network requesters:
|
||||
Network requesters are a type of Service Provider, that in essence, act as a form of proxy (somewhat analagous to a Tor exit node). If you have access to a server, you can run the Network Requester, which allows Nym users to send outbound requests from their local machine through the mixnet to a server, which then makes the request on their behalf, shielding them (and their metadata) from clearnet, untrusted and unknown infrastructure, such as email or message client servers.
|
||||
@@ -36,7 +36,7 @@ Gateways serve a few different functions:
|
||||
- They send encrypted surb-acks for potentially offline recipients, to ensure reliable message delivery;
|
||||
- They offer a stable addressing location for apps, although the IP may change frequently;
|
||||
|
||||
If you want to learn more about gateways, you can check [this page.](https://nymtech.net/developers/integrations/mixnet-integration.html)
|
||||
If you want to learn more about gateways, you can check the [mixnet integration page](https://nymtech.net/developers/integrations/mixnet-integration.html).
|
||||
|
||||
|
||||
#### __Why and when does the mixnet client complain about insufficient topology?__
|
||||
@@ -66,4 +66,4 @@ Currently, the different options are:
|
||||
- You can get it added to the local list of an existing Network Requester;
|
||||
- You can ask the Nym team to add it to the global [allow list](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) if it's not already there;
|
||||
- You can run your own Network Requester and locally configure it to allow the hosts you need to connect to;
|
||||
If you'd like to learn more about Network Requesters and the global allow list, you can [visit this page](https://nymtech.net/operators/nodes/network-requester-setup.html).
|
||||
If you'd like to learn more about Network Requesters and the global allow list, you can visit the [network requester set-up page](https://nymtech.net/operators/nodes/network-requester-setup.html).
|
||||
@@ -54,7 +54,7 @@ For integration entry points:
|
||||
|
||||
### How to deal with Service Providers?
|
||||
In a nutshell: that depends on your app's goal and architecture (and the endpoint it needs to hit).
|
||||
Again, as detailed in the FAQ:
|
||||
Again, as detailed in the [FAQ](../FAQ/general):
|
||||
|
||||
- No Service Provider (Network Requester) needed: If you’re running a purely P2P application, then just integrating clients and having some method of sharing addresses should be enough to route your traffic through the mixnet.
|
||||
- Network Requester needed (existing or own): If you’re wanting to place the mixnet between your users’ application instances and a server-based backend, you will need a Network Requester. In this case, if your app supports SOCKS5, you could either use an existing NR or, if your app supports SOCKS5 but needs more extensive whitelisting, you could use the [network requester service provider binary](https://nymtech.net/operators/nodes/network-requester-setup.html) to proxy these requests to your application backend yourself, with the mixnet ‘between’ the user and your service, in order to prevent metadata leakage being broadcast to the internet.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Troubleshooting Bundling
|
||||
# Troubleshooting bundling
|
||||
|
||||
You might need some help bundling packages from the Nym Typescript SDK into your package.
|
||||
|
||||
@@ -41,7 +41,7 @@ list. Use `[name][ext]` to preserve the output filename, because the package exp
|
||||
|
||||
## ESM not supported
|
||||
|
||||
If your bundler does not support ECMAScript Modules (ESM) we provide CommonJS packages for most parts of the SDK.
|
||||
If your bundler does not support ECMAScript Modules (ESM), CommonJS packages are supported for most parts of the SDK.
|
||||
|
||||
For those that don't have ESM versions, you will need to use a tool like [Babel](https://babeljs.io/) to convert
|
||||
ESM to CommonJS.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Cosmos Kit
|
||||
|
||||
The wonderful people of Cosmology have made some [fantastic components](https://cosmoskit.com/) that can be used with
|
||||
Nym, these include:
|
||||
Nym. These include:
|
||||
|
||||
- using the wallets such as Keplr, Cosmostation and others from your React application
|
||||
- using the [Ledger hardware wallet](https://docs.cosmoskit.com/integrating-wallets/ledger) from the browser
|
||||
- any wallet that supports [Wallet Connect v2.0](https://docs.cosmoskit.com/integrating-wallets/adding-new-wallets)
|
||||
- Using the wallets such as Keplr, Cosmostation and others from your React application;
|
||||
- Using the [Ledger hardware wallet](https://docs.cosmoskit.com/integrating-wallets/ledger) from your browser;
|
||||
- Any wallet that supports [Wallet Connect v2.0](https://docs.cosmoskit.com/integrating-wallets/adding-new-wallets);
|
||||
|
||||
##### Environment Setup
|
||||
Begin by creating a directory and configuring your application environment:
|
||||
|
||||
@@ -7,12 +7,11 @@ An easy way to secure parts or all of your web app is to replace calls to [`fetc
|
||||
MixFetch works the same as vanilla `fetch` as it's a proxied wrapper around the original function. Read [this article](https://blog.nymtech.net/mixfetch-like-the-fetch-api-but-via-the-mixnet-82acfd435c62) to learn more about mixFetch.
|
||||
Sounds great, are there any catches? Well, there are a few (for now):
|
||||
|
||||
1. Currently, the operators of Network Requesters that make the final request at the egress part of the Nym Mixnet to
|
||||
1. Currently, the operators of Network Requesters that make the final request at the egress part of the Nym mixnet to
|
||||
the internet use a [standard allow list](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt)
|
||||
in combination with their own configuration. If you are trying to access something that is not on the allow list, please check the FAQ page.
|
||||
|
||||
2. We periodically update the CA certificates in `mixFetch` so if you get a certificate error, we may not have the
|
||||
root CA certificate you need in our list. [Send us a PR](https://github.com/nymtech/nym/pulls) if you need changes.
|
||||
2. CA certificates in `mixFetch` are periodically updated, so if you get a certificate error, the root certificate you need might not be in the [standard allow list](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt). If that's the case, [send a PR](https://github.com/nymtech/nym/pulls) if you need changes.
|
||||
|
||||
3. If you are using `mixFetch` in a web app with HTTPS you will need to use a gateway that has Secure Websockets to
|
||||
avoid getting a [mixed content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content) error.
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Callout } from 'nextra/components'
|
||||
|
||||
# Mixnet Client
|
||||
|
||||
As you know by now, in order to send or receive messages over the mixnet, you'll need to use the [`SDK Client`](https://www.npmjs.com/package/@nymproject/sdk), which will allow you to create apps that can use the Nym Mixnet and Coconut credentials.
|
||||
As you know by now, in order to send or receive messages over the mixnet, you'll need to use the [`SDK Client`](https://www.npmjs.com/package/@nymproject/sdk), which will allow you to create apps that can use the Nym mixnet and Coconut credentials.
|
||||
|
||||
This client is message based - it can only send a one-way message to another client's address.
|
||||
|
||||
Replying can be done in two ways:
|
||||
Replying can be achieved in two ways:
|
||||
- reveal the sender's address to the recipient (as part of the payload)
|
||||
- use a SURB (single use reply block) that allows the recipient to reply to the sender without compromising the identity of either party
|
||||
|
||||
@@ -38,10 +38,10 @@ Import the SDK's Mixnet Client in your app:
|
||||
import { createNymMixnetClient, NymMixnetClient, Payload } from "@nymproject/sdk-full-fat";
|
||||
````
|
||||
|
||||
##### Example: using the SDK's Mixnet Client to send and receive messages over the Nym Mixnet
|
||||
##### Example: using the SDK's Mixnet Client to send and receive messages over the Nym mixnet
|
||||
By pasting the below code example, you should be able to send and receive messages through the mixnet through an unstyled mixnet app template!
|
||||
<Callout type="info" emoji="ℹ️">
|
||||
For this example, we will be using the `full-fat` version of the ESM SDK. If you'd like to use the unbundled ESM one, make sure your [bundler configuration](../../bundling) copies the WebAssembly (WASM) and web worker files to the output bundle.
|
||||
For this example, we will be using the `full-fat` version of the ESM SDK. If you'd like to use the unbundled version of the ESM one, make sure your [bundler configuration](../../bundling/bundling) copies the WebAssembly (WASM) and web worker files to the output bundle.
|
||||
</Callout>
|
||||
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import { Callout } from 'nextra/components'
|
||||
As previously mentioned, to query or execute on any of the Nym contracts, you'll need to use one of the [`Contract Clients`](https://www.npmjs.com/package/@nymproject/contract-clients), which contains read-only query and signing clients for all of Nym's smart contracts.
|
||||
|
||||
##### Contract Clients list
|
||||
Lists of the diffent available clients and methods from the `Contract Clients` can be found in the `.client.ts` files:
|
||||
Lists of the different available clients and methods from the `Contract Clients` can be found in the `.client.ts` files:
|
||||
| Client name | Functionality| Methods list |
|
||||
| :-------------: | :----------: | :----------: |
|
||||
| Coconut Bandwidth Client| Manages the depositing and release of funds. Tracks double spending. | [Coconut Bandwidth](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/CoconutBandwidth.client.ts) |
|
||||
| Coconut DKG Client | Allows signers partcipating in issuing Coconut credentials to derive keys to be used. | [Coconut DKG](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/CoconutDkg.client.ts) |
|
||||
| Cw3FlexMultisig Client | Used by the Coconut APIs to issue credentials. [This](https://github.com/CosmWasm/cw-plus/tree/main/contracts/cw3-flex-multisig) is a multisig contract that is backed by the cw4 (group) contract, which independently maintains the voter set. | [Cw3Flex Multisig](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.client.ts) |
|
||||
| Cw4Group Client | Used by the Coconut APIs to issue credentials. [Cw4 Group](https://github.com/CosmWasm/cw-plus/tree/main/contracts/cw4-group) stores a set of members along with an admin, and allows the admin to update the state. | [Cw4Group](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/Cw4Group.client.ts) |
|
||||
| Mixnet Client | Manages the network topology of the mixnet, tracking delegations and rewarding | [Mixnet](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/Mixnet.client.ts) |
|
||||
| Mixnet Client | Manages the network topology of the mixnet, tracking delegations and rewards. | [Mixnet](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/Mixnet.client.ts) |
|
||||
| Name Service Client | Operates as a directory of user-defined aliases, analogous to a Domain Name System (DNS). | [Name service](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/NameService.client.ts) |
|
||||
| Service provider Directory Client| Allows users to register their service provider in a public directory. | [Service Provider](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/ServiceProviderDirectory.client.ts) |
|
||||
| Vesting Client | Manages NYM token vesting functionality. | [Vesting](https://github.com/nymtech/nym/blob/develop/sdk/typescript/codegen/contract-clients/src/Vesting.client.ts) |
|
||||
@@ -55,8 +55,8 @@ import { contracts } from '@nymproject/contract-clients';
|
||||
import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate";
|
||||
````
|
||||
|
||||
##### Example: using the Mixnet smart contract client to query
|
||||
In this example, we will use the `MixnetQueryClient`from the `Contract Clients` to simply query the contract and return a list of Mixnodes.
|
||||
##### Example: using the mixnet smart contract client to query
|
||||
In this example, we will use the `MixnetQueryClient`from the `Contract Clients` to simply query the contract and return a list of mixnodes.
|
||||
|
||||
```ts
|
||||
import "./App.css";
|
||||
|
||||
@@ -19,10 +19,10 @@ of the message will be displayed.
|
||||
|
||||
If you are using the Ledger hardware wallet, please make sure:
|
||||
|
||||
- you have the `cosmoshub` app installed on the Ledger
|
||||
- it is connected to your computer
|
||||
- it is unlocked
|
||||
- the Cosmos Hub app is open
|
||||
- grant permissions to your browser when you click the button above to connect to the Ledger (if you do not see a prompt, try another browser)
|
||||
- You have the `cosmoshub` app installed on the Ledger;
|
||||
- It is connected to your computer;
|
||||
- It is unlocked;
|
||||
- The Cosmos Hub app is open;
|
||||
- Grant permissions to your browser when you click the button above to connect to the Ledger (if you do not see a prompt, try another browser);
|
||||
|
||||
<FormattedCosmoskitExampleCode />
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Traffic } from '../../components/traffic';
|
||||
import Box from '@mui/material/Box';
|
||||
import FormattedTrafficExampleCode from '../../code-examples/traffic-example-code.mdx';
|
||||
|
||||
Use this tool to experiment with the Mixnet: send and receive messages!
|
||||
Use this tool to experiment with the mixnet: send and receive messages!
|
||||
|
||||
<Traffic />
|
||||
<FormattedTrafficExampleCode />
|
||||
@@ -60,7 +60,7 @@ const main = async () => {
|
||||
|
||||
## MixFetch
|
||||
|
||||
Use the [`mixFetch`](https://www.npmjs.com/package/@nymproject/mix-fetch) package as a drop-in replacement for `fetch`to send HTTP requests over the Nym Mixnet:
|
||||
Use the [`mixFetch`](https://www.npmjs.com/package/@nymproject/mix-fetch) package as a drop-in replacement for `fetch`to send HTTP requests over the Nym mixnet:
|
||||
|
||||
```ts
|
||||
import { mixFetch } from '@nymproject/mix-fetch';
|
||||
@@ -78,7 +78,7 @@ const apiResponse = await mixFetch('https://api.example.com', {
|
||||
```
|
||||
|
||||
Check the [standard allowed list](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to see
|
||||
if the host you want to `mixFetch` from is allowed.
|
||||
if the host you want to `mixFetch` from is whitelisted.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user