diff --git a/documentation/docs/pages/developers/integrations.mdx b/documentation/docs/pages/developers/integrations.mdx index 237d18c65d..ea2b44dad7 100644 --- a/documentation/docs/pages/developers/integrations.mdx +++ b/documentation/docs/pages/developers/integrations.mdx @@ -3,8 +3,11 @@ import { Steps } from 'nextra/components' import { Tabs } from 'nextra/components' import { GitHubRepoSearch } from '../../code-snippets/mixfetchurl'; -# Integrating Mixnet Functionality +# Integration Options +Developers might want to either integrate a Mixnet client or just to interact with the blockchain. See the relevant section below. + +### Integrating Mixnet Functionality There are several options available to developers wanting to embed a Nym client in their application code. @@ -30,7 +33,7 @@ There are several options available to developers wanting to embed a Nym client If your app is not written in any of the supported languages, you might still be able to send traffic through a standalone socks5 client TODO LINK but will have to think about packaging and bundling the client binary with e.g. a `systemd` file for autostart to run the client as a daemon. If you want to discuss FFI options reach out to us via our public dev channel. -## Interacting with Nyx +### Interacting with Nyx If instead of relying on the Mixnet you wish to interact with the [Nyx]() TODO LINK chain, either as a payment processor or to get on-chain events, see [interacting with the chain]() TODO LINK. diff --git a/documentation/docs/pages/developers/rust.md b/documentation/docs/pages/developers/rust.md new file mode 100644 index 0000000000..28fec391fa --- /dev/null +++ b/documentation/docs/pages/developers/rust.md @@ -0,0 +1,7 @@ +# Introduction +The Rust SDK allows developers building applications in Rust to import and interact with Nym clients as they would any other dependency, instead of running the client as a separate process on their machine. This makes both developing and running applications much easier, reducing complexity in the development process (not having to restart another client in a separate console window/tab) and being able to have a single binary for other people to use. + +Currently developers can use the Rust SDK to import either websocket client ([`nym-client`](../../clients/websocket-client.md)) or [`socks-client`](../../clients/socks5-client.md) functionality into their Rust code. + +### Generate Crate Docs +In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/nym-sdk/` diff --git a/documentation/docs/pages/developers/rust/_meta.json b/documentation/docs/pages/developers/rust/_meta.json index 1495ee2660..dd00e9a111 100644 --- a/documentation/docs/pages/developers/rust/_meta.json +++ b/documentation/docs/pages/developers/rust/_meta.json @@ -1,5 +1,6 @@ { - "index": "Introduction", + "development-status": "Development Status", + "importing": "Importing", "examples": "Basic Examples", "message-helpers": "Message Helpers", "message-types": "Message Types", diff --git a/documentation/docs/pages/developers/rust/development-status.md b/documentation/docs/pages/developers/rust/development-status.md new file mode 100644 index 0000000000..a7edbe144c --- /dev/null +++ b/documentation/docs/pages/developers/rust/development-status.md @@ -0,0 +1,14 @@ +# Development status +The SDK is still somewhat a work in progress: interfaces are fairly stable but still may change in subsequent releases. + +In the future the SDK will be made up of several components, each of which will allow developers to interact with different parts of Nym infrastructure. + +| Component | Functionality | Released | +|-----------|---------------------------------------------------------------------------------------|----------| +| Mixnet | Create / load clients & keypairs, subscribe to Mixnet events, send & receive messages | ✔️ | +| Ecash | Create & verify Ecash credentials | 🛠️ | +| Validator | Sign & broadcast Nyx blockchain transactions, query the blockchain | ❌ | + +The `mixnet` component currently exposes the logic of two clients: the [websocket client]() TODO LINK, and the [socks]() TODO client. + +The `ecash` component is currently being worked on. Right now it exposes logic allowing for the creation of Ecash credentials on the Sandbox testnet. diff --git a/documentation/docs/pages/developers/rust/importing.md b/documentation/docs/pages/developers/rust/importing.md new file mode 100644 index 0000000000..b2cf1f490c --- /dev/null +++ b/documentation/docs/pages/developers/rust/importing.md @@ -0,0 +1,23 @@ +# Installation +The `nym-sdk` crate is **not yet available via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: + +```toml +nym-sdk = { git = "https://github.com/nymtech/nym" } +``` + +By default the above command will import the current `HEAD` of the default branch, which in our case is `develop`. Assuming instead you wish to pull in another branch (e.g. `master` or a particular release) you can specify this like so: + +```toml +# importing HEAD of master branch +nym-sdk = { git = "https://github.com/nymtech/nym", branch = "master" } +# importing HEAD of the third release of 2023, codename 'kinder' +nym-sdk = { git = "https://github.com/nymtech/nym", branch = "release/2023.3-kinder" } +``` + +You can also define a particular git commit to use as your import like so: + +```toml +nym-sdk = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +``` + +Since the `HEAD` of `master` is always the most recent release, we recommend developers use that for their imports, unless they have a reason to pull in a specific historic version of the code. diff --git a/documentation/docs/pages/developers/rust/index.md b/documentation/docs/pages/developers/rust/index.md deleted file mode 100644 index 2e65f1f869..0000000000 --- a/documentation/docs/pages/developers/rust/index.md +++ /dev/null @@ -1,46 +0,0 @@ -# Introduction -The Rust SDK allows developers building applications in Rust to import and interact with Nym clients as they would any other dependency, instead of running the client as a separate process on their machine. This makes both developing and running applications much easier, reducing complexity in the development process (not having to restart another client in a separate console window/tab) and being able to have a single binary for other people to use. - -Currently developers can use the Rust SDK to import either websocket client ([`nym-client`](../../clients/websocket-client.md)) or [`socks-client`](../../clients/socks5-client.md) functionality into their Rust code. - -In the future the SDK will be made up of several components, each of which will allow developers to interact with different parts of Nym infrastructure. - -| Component | Functionality | Released | -|-----------|---------------------------------------------------------------------------------------|----------| -| Mixnet | Create / load clients & keypairs, subscribe to Mixnet events, send & receive messages | ✔️ | -| Coconut | Create & verify Coconut credentials | 🛠️ | -| Validator | Sign & broadcast Nyx blockchain transactions, query the blockchain | ❌ | - -The `mixnet` component currently exposes the logic of two clients: the [websocket client](../../clients/websocket-client.md), and the [socks](../../clients/socks5-client.md) client. - -The `coconut` component is currently being worked on. Right now it exposes logic allowing for the creation of coconut credentials on the Sandbox testnet. - -### Development status -The SDK is still somewhat a work in progress: interfaces are fairly stable but still may change in subsequent releases. - -### Installation -The `nym-sdk` crate is **not yet available via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: - -```toml -nym-sdk = { git = "https://github.com/nymtech/nym" } -``` - -By default the above command will import the current `HEAD` of the default branch, which in our case is `develop`. Assuming instead you wish to pull in another branch (e.g. `master` or a particular release) you can specify this like so: - -```toml -# importing HEAD of master branch -nym-sdk = { git = "https://github.com/nymtech/nym", branch = "master" } -# importing HEAD of the third release of 2023, codename 'kinder' -nym-sdk = { git = "https://github.com/nymtech/nym", branch = "release/2023.3-kinder" } -``` - -You can also define a particular git commit to use as your import like so: - -```toml -nym-sdk = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } -``` - -Since the `HEAD` of `master` is always the most recent release, we recommend developers use that for their imports, unless they have a reason to pull in a specific historic version of the code. - -### Generate Crate Docs -In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/nym-sdk/` diff --git a/documentation/docs/pages/developers/tools.mdx b/documentation/docs/pages/developers/tools.mdx index f31dc44c3b..c9be8c6510 100644 --- a/documentation/docs/pages/developers/tools.mdx +++ b/documentation/docs/pages/developers/tools.mdx @@ -1,3 +1,5 @@ # Tools -There are a few tools available to developers for chain interaction: the `nym-cli` tool, which operates as an easier-to-use wrapper around `nyxd`, and the CLI wallet. +There are a few tools available to developers for chain interaction: the `nym-cli` tool, which operates as an easier-to-use wrapper around `nyxd`, and the CLI wallet, to allow operators to script interactions with their infrastructure (and those who prefer CLI tools ;) ). + +There is also a basic echo server tool which app developers can use as a quick endpoint for traffic testing. This will be deployed onto a persistent public server in the future so devs dont have to run it themselves.