Update decision tree

This commit is contained in:
Lorexia
2023-10-12 11:39:37 +02:00
parent 751e3f739a
commit 0fea2e09ae
+6 -6
View File
@@ -6,32 +6,32 @@ import { GitHubRepoSearch } from '../code-snippets/mixfetchurl';
# Integrations page
## How can I integrate Nym into my app?
If you're unsure where to start, the following set of questions should help you determine which path to follow in regards to integrations:
If you're unsure where to start, the following set of questions should help you determine which path to follow in regards to integrations with Nym:
<Steps>
### Is your app developed in TS/JS or Rust?
<Tabs items={['YES', 'NO']}>
<Tabs.Tab >**Yes - TS/JS or RUST**: If yes, you can use one of our SDKs and leverage either `mixfetch` (note that this only works for JS/TS at the moment, as we do not currently have a RUST implementation of it) or the `sdk client` to route app traffic through the mixnet.</Tabs.Tab>
<Tabs.Tab >**Yes - TS/JS or RUST**: If yes, you will either be able to leverage `mixFetch` (go to step 2 below) or the `sdk client` to route app traffic through the mixnet. Note that `mixfetch` currently only works with JS/TS at the moment, as we do not yet have a Rust implementation of it. </Tabs.Tab>
<Tabs.Tab>**No**: You'll most likely need to use FFI or one of our [standalone clients](https://nymtech.net/developers/integrations/mixnet-integration.html).</Tabs.Tab>
</Tabs>
### Does your TS/JS app rely on using `fetch` for its network traffic and remote connections?
### Does your TS/JS app rely on `fetch` for its network traffic and remote connections?
Check whether `mixFetch` can be used to route your traffic through the mixnet by entering your repository's URL below:
<GitHubRepoSearch />
<Tabs items={['YES', 'NO']}>
<Tabs.Tab >**Yes - `fetch`**: The best way to integrate Nym into your application will be where external network calls and RPC happens, for example, something in the lines of `sendRawTransaction` if you have an ETH-compatible wallet or `JsonRpcClient` if you use CosmJS. Although you can simply search for any JS `fetch` calls in your code (using our tool above) that are easily replaceable with `mixFetch`, keep in mind that `fetch` is not the only way to make `JSONRPC` or `XHR` calls. We advise to approach the integration process in a semantic way, searching for a module that is the common denominator for external communication in the codebase. Usually these are API controllers, middlewares or repositories.</Tabs.Tab>
<Tabs.Tab>**No**: While mixFetch is the shortest and easiest way to integrate Nym, a well-modularized codebase should permit the integration of one of our SDK components, which allow much more flexibility and control.</Tabs.Tab>
<Tabs.Tab >**Yes - my repo currently uses `fetch`**: The best way to integrate Nym's `mixFetch` into your application will be where external network calls and RPC happens, for example, something in the lines of `sendRawTransaction` if you have an ETH-compatible wallet or `JsonRpcClient` if you use CosmJS. Although you can simply search for any JS `fetch` calls in your code (using our tool above) that are easily replaceable with `mixFetch`, keep in mind that `fetch` is not the only way to make `JSONRPC` or `XHR` calls. We advise to approach the integration process in a semantic way, searching for a module that is the common denominator for external communication in the codebase. Usually these are API controllers, middlewares or repositories.</Tabs.Tab>
<Tabs.Tab>**No**: While mixFetch is the shortest and easiest way to integrate Nym, a well-modularized JS/TS or Rust codebase should permit the integration of one of our SDK components, which will allow more flexibility and control. Read more about our different SDK components in the [TS SDK overview page](./overview) and the [Rust SDK documentation](https://nymtech.net/developers/tutorials/rust-sdk.html). </Tabs.Tab>
</Tabs>
### Use one of our standalone Nym clients
If you've answered 'No' to all of the above, you may need to use one of our standalone clients. All Nym client packages present basically the same capabilities to the privacy application developer. They need to run as a persistent process in order to stay connected and ready to receive any incoming messages from their gateway nodes. They register and authenticate to gateways, and encrypt Sphinx packets.
If you've answered 'No' to all of the above, you may need to use one of our [standalone clients](https://nymtech.net/docs/clients/overview.html). All Nym client packages present basically the same capabilities to the privacy application developer. They need to run as a persistent process in order to stay connected and ready to receive any incoming messages from their gateway nodes. They register and authenticate to gateways, and encrypt Sphinx packets.
You can find more information about the different standalone clients and the ways to interact with them [in this page](https://nymtech.net/developers/integrations/mixnet-integration.html).